From c7d4e7fbe4b459a6a6bbebf35f11c63bdfd1c320 Mon Sep 17 00:00:00 2001 From: waleed Date: Sun, 28 Jun 2026 21:48:02 -0700 Subject: [PATCH] improvement(emcn): extract design system into shared @sim/emcn package Moves apps/sim/components/emcn into a shared @sim/emcn package consumed directly by apps/sim and apps/docs. cn/keyboard/use-copy-to-clipboard move into the package; all imports become direct @sim/emcn (icons via @sim/emcn/icons, CSS via file path). ChipModal email validation is now prop-driven (quickValidateEmail stays in apps/sim, injected via validate). Docs drops its local chip/chip-dropdown/dropdown-menu mirrors and consumes @sim/emcn. --- .claude/rules/emcn-components.md | 4 +- .claude/rules/sim-imports.md | 2 +- .claude/rules/sim-styling.md | 4 +- .cursor/rules/emcn-components.mdc | 4 +- .cursor/rules/sim-imports.mdc | 2 +- .cursor/rules/sim-styling.mdc | 4 +- CLAUDE.md | 6 +- apps/docs/app/[lang]/not-found.tsx | 2 +- apps/docs/app/global.css | 12 ++ apps/docs/components/navbar/navbar.tsx | 2 +- apps/docs/components/page-actions.tsx | 2 +- apps/docs/components/ui/chip-dropdown.tsx | 140 -------------- apps/docs/components/ui/chip.tsx | 175 ------------------ apps/docs/components/ui/dropdown-menu.tsx | 61 ------ apps/docs/components/ui/language-dropdown.tsx | 2 +- apps/docs/components/ui/search-trigger.tsx | 4 +- apps/docs/next.config.ts | 1 + apps/docs/package.json | 1 + .../app/(auth)/components/auth-background.tsx | 2 +- .../components/social-login-buttons.tsx | 2 +- .../(auth)/components/sso-login-button.tsx | 4 +- apps/sim/app/(auth)/login/loading.tsx | 2 +- apps/sim/app/(auth)/login/login-form.tsx | 14 +- .../sim/app/(auth)/reset-password/loading.tsx | 2 +- .../reset-password/reset-password-form.tsx | 3 +- apps/sim/app/(auth)/signup/loading.tsx | 2 +- apps/sim/app/(auth)/signup/signup-form.tsx | 3 +- apps/sim/app/(auth)/sso/loading.tsx | 2 +- apps/sim/app/(auth)/verify/loading.tsx | 2 +- apps/sim/app/(auth)/verify/verify-content.tsx | 3 +- .../sim/app/(landing)/blog/[slug]/loading.tsx | 2 +- apps/sim/app/(landing)/blog/[slug]/page.tsx | 2 +- .../(landing)/blog/[slug]/share-button.tsx | 9 +- .../(landing)/blog/authors/[id]/loading.tsx | 2 +- .../(landing)/blog/components/blog-image.tsx | 2 +- apps/sim/app/(landing)/blog/loading.tsx | 2 +- apps/sim/app/(landing)/blog/page.tsx | 2 +- apps/sim/app/(landing)/blog/tags/loading.tsx | 2 +- .../components/auth-modal/auth-modal.tsx | 10 +- .../collaboration/collaboration.tsx | 2 +- .../components/contact/contact-form.tsx | 4 +- .../demo-request/demo-request-modal.tsx | 8 +- .../features/components/features-preview.tsx | 5 +- .../components/features/features.tsx | 2 +- .../components/footer/footer-cta.tsx | 3 +- .../(landing)/components/footer/footer.tsx | 2 +- .../app/(landing)/components/hero/hero.tsx | 2 +- .../app/(landing)/components/landing-faq.tsx | 3 +- .../landing-preview-files.tsx | 2 +- .../landing-preview-home.tsx | 4 +- .../landing-preview-knowledge.tsx | 2 +- .../landing-preview-logs.tsx | 7 +- .../landing-preview-panel.tsx | 2 +- .../landing-preview-resource.tsx | 3 +- .../landing-preview-scheduled-tasks.tsx | 2 +- .../landing-preview-sidebar.tsx | 6 +- .../landing-preview-tables.tsx | 7 +- .../preview-block-node.tsx | 2 +- .../navbar/components/blog-dropdown.tsx | 2 +- .../(landing)/components/navbar/navbar.tsx | 2 +- .../(landing)/components/pricing/pricing.tsx | 2 +- .../components/templates/templates.tsx | 3 +- .../components/template-card-button.tsx | 2 +- .../integrations/(shell)/[slug]/loading.tsx | 2 +- .../(landing)/integrations/(shell)/page.tsx | 2 +- .../(landing)/integrations/[slug]/loading.tsx | 2 +- .../components/integration-grid.tsx | 2 +- .../components/integration-icon.tsx | 2 +- .../components/request-integration-modal.tsx | 2 +- .../(shell)/[provider]/[model]/loading.tsx | 2 +- .../models/(shell)/[provider]/loading.tsx | 2 +- .../models/(shell)/[provider]/page.tsx | 2 +- .../sim/app/(landing)/models/(shell)/page.tsx | 2 +- .../models/[provider]/[model]/loading.tsx | 2 +- .../(landing)/models/[provider]/loading.tsx | 2 +- .../models/components/model-directory.tsx | 2 +- .../models/components/model-primitives.tsx | 2 +- apps/sim/app/(landing)/privacy/loading.tsx | 2 +- apps/sim/app/(landing)/terms/loading.tsx | 2 +- .../app/_shell/providers/tooltip-provider.tsx | 2 +- .../components/course-progress.tsx | 2 +- .../[lessonSlug]/components/lesson-quiz.tsx | 2 +- .../components/sandbox-canvas-provider.tsx | 2 +- .../components/validation-checklist.tsx | 2 +- .../changelog/components/timeline-list.tsx | 2 +- apps/sim/app/changelog/loading.tsx | 2 +- apps/sim/app/chat/[identifier]/loading.tsx | 2 +- .../chat/components/auth/email/email-auth.tsx | 3 +- .../auth/password/password-auth.tsx | 3 +- apps/sim/app/chat/components/input/input.tsx | 4 +- .../loading-state/loading-state.tsx | 2 +- .../message/components/file-download.test.tsx | 2 +- .../message/components/file-download.tsx | 2 +- .../message/components/markdown-renderer.tsx | 2 +- .../chat/components/message/message.test.tsx | 2 +- .../app/chat/components/message/message.tsx | 2 +- .../voice-interface/voice-interface.tsx | 2 +- .../credential-account/[token]/loading.tsx | 2 +- apps/sim/app/f/[token]/public-file-auth.tsx | 3 +- .../app/f/[token]/public-file-email-auth.tsx | 3 +- .../app/f/[token]/public-file-sso-auth.tsx | 3 +- apps/sim/app/f/[token]/public-file-view.tsx | 4 +- apps/sim/app/invite/[id]/loading.tsx | 2 +- .../sim/app/invite/components/status-card.tsx | 4 +- apps/sim/app/playground/page.tsx | 6 +- .../[workflowId]/[executionId]/loading.tsx | 2 +- .../[executionId]/resume-page-client.tsx | 8 +- apps/sim/app/unsubscribe/loading.tsx | 2 +- apps/sim/app/unsubscribe/unsubscribe.tsx | 2 +- .../connect-oauth-modal.tsx | 6 +- .../conversation-list-item.tsx | 2 +- .../components/add-people-modal.tsx | 6 +- .../components/chip-field.ts | 15 +- .../components/credential-members-section.tsx | 4 +- .../components/unsaved-changes-modal.tsx | 2 +- .../hooks/use-credential-detail-form.ts | 2 +- .../[workspaceId]/components/error/error.tsx | 2 +- .../impersonation-banner.tsx | 2 +- .../message-actions/message-actions.tsx | 8 +- .../components/floating-overflow-text.tsx | 8 +- .../resource-header/resource-header.tsx | 8 +- .../resource-options/resource-options.tsx | 4 +- .../components/resource/resource.tsx | 8 +- .../workspace-chrome/workspace-chrome.tsx | 2 +- .../components/action-bar/action-bar.tsx | 9 +- .../delete-confirm-modal.tsx | 2 +- .../file-row-context-menu.tsx | 4 +- .../components/file-viewer/csv-import.ts | 2 +- .../components/file-viewer/data-table.tsx | 2 +- .../components/file-viewer/docx-preview.tsx | 2 +- .../file-viewer/editor-context-menu.tsx | 6 +- .../components/file-viewer/preview-panel.tsx | 2 +- .../components/file-viewer/preview-shared.tsx | 2 +- .../file-viewer/preview-toolbar.tsx | 3 +- .../rich-markdown-editor/code-block.tsx | 16 +- .../rich-markdown-editor/image.tsx | 2 +- .../mention/mention-chip.tsx | 2 +- .../menus/link-hover-card.tsx | 2 +- .../menus/suggestion-list.tsx | 2 +- .../menus/toolbar-button.tsx | 3 +- .../rich-markdown-editor.tsx | 5 +- .../rich-markdown-field.tsx | 5 +- .../components/file-viewer/text-editor.tsx | 2 +- .../components/file-viewer/xlsx-preview.tsx | 2 +- .../file-viewer/zoomable-preview.tsx | 2 +- .../files-list-context-menu.tsx | 9 +- .../components/share-modal/share-modal.tsx | 6 +- .../workspace/[workspaceId]/files/files.tsx | 14 +- .../workspace/[workspaceId]/files/loading.tsx | 2 +- .../[workspaceId]/files/move-options.tsx | 4 +- .../chat-context-kind-registry.tsx | 2 +- .../chat-message-attachments.tsx | 2 +- .../components/credits-chip/credits-chip.tsx | 4 +- .../components/agent-group/agent-group.tsx | 3 +- .../components/agent-group/tool-call-item.tsx | 2 +- .../components/chat-content/chat-content.tsx | 5 +- .../components/special-tags/special-tags.tsx | 9 +- .../home/components/message-content/utils.ts | 4 +- .../mothership-chat-skeleton.tsx | 2 +- .../mothership-chat/mothership-chat.tsx | 2 +- .../add-resource-dropdown.tsx | 8 +- .../generic-resource-content.tsx | 2 +- .../resource-content/resource-content.tsx | 10 +- .../resource-registry/resource-registry.tsx | 6 +- .../resource-tabs/resource-tabs.tsx | 5 +- .../mothership-view/mothership-view.tsx | 2 +- .../queued-messages/queued-messages.tsx | 3 +- .../suggested-actions/suggested-actions.tsx | 11 +- .../attached-files-list.tsx | 2 +- .../user-input/components/constants.ts | 2 +- .../components/mic-button/mic-button.tsx | 3 +- .../plus-menu-dropdown/plus-menu-dropdown.tsx | 6 +- .../prompt-editor/prompt-editor.tsx | 2 +- .../components/send-button/send-button.tsx | 3 +- .../skills-menu-dropdown.tsx | 3 +- .../home/components/user-input/user-input.tsx | 3 +- .../user-message-content.tsx | 2 +- .../app/workspace/[workspaceId]/home/home.tsx | 4 +- .../[block]/integration-block-detail.tsx | 3 +- .../[block]/integration-skills-section.tsx | 2 +- .../integrations/[block]/page.tsx | 2 +- .../connect-service-account-modal.tsx | 6 +- .../integration-tabs-header.tsx | 2 +- .../showcase-with-explore.tsx | 2 +- .../connected-credential-detail.tsx | 10 +- .../integrations/integrations.tsx | 8 +- .../chunk-context-menu/chunk-context-menu.tsx | 4 +- .../components/chunk-editor/chunk-editor.tsx | 3 +- .../delete-chunk-modal/delete-chunk-modal.tsx | 2 +- .../document-tags-modal.tsx | 6 +- .../knowledge/[id]/[documentId]/document.tsx | 4 +- .../knowledge/[id]/[documentId]/loading.tsx | 4 +- .../[workspaceId]/knowledge/[id]/base.tsx | 22 +-- .../[id]/components/action-bar/action-bar.tsx | 3 +- .../add-connector-modal.tsx | 10 +- .../add-documents-modal.tsx | 10 +- .../base-tags-modal/base-tags-modal.tsx | 6 +- .../connector-config-fields.tsx | 2 +- .../connector-selector-field.tsx | 2 +- .../connectors-section/connectors-section.tsx | 3 +- .../document-context-menu.tsx | 4 +- .../edit-connector-modal.tsx | 6 +- .../rename-document-modal.tsx | 6 +- .../[workspaceId]/knowledge/[id]/loading.tsx | 4 +- .../components/base-card/base-card.tsx | 2 +- .../create-base-modal/create-base-modal.tsx | 16 +- .../delete-knowledge-base-modal.tsx | 2 +- .../edit-knowledge-base-modal.tsx | 6 +- .../knowledge-base-context-menu.tsx | 4 +- .../knowledge-list-context-menu.tsx | 9 +- .../[workspaceId]/knowledge/knowledge.tsx | 6 +- .../[workspaceId]/knowledge/loading.tsx | 4 +- .../app/workspace/[workspaceId]/layout.tsx | 2 +- .../[workspaceId]/lib/prefetch.test.ts | 2 +- .../components/line-chart/line-chart.tsx | 3 +- .../components/status-bar/status-bar.tsx | 2 +- .../workflows-list/workflows-list.tsx | 5 +- .../logs/components/dashboard/dashboard.tsx | 2 +- .../execution-snapshot/execution-snapshot.tsx | 8 +- .../file-download/file-download.tsx | 4 +- .../components/trace-view/trace-view.tsx | 30 +-- .../components/log-details/log-details.tsx | 18 +- .../log-row-context-menu.tsx | 2 +- .../[workspaceId]/logs/error.test.tsx | 2 +- .../workspace/[workspaceId]/logs/loading.tsx | 4 +- .../app/workspace/[workspaceId]/logs/logs.tsx | 16 +- .../app/workspace/[workspaceId]/logs/utils.ts | 2 +- .../app/workspace/[workspaceId]/not-found.tsx | 4 +- .../workspace-permissions-provider.tsx | 2 +- .../calendar-event-chip.tsx | 4 +- .../calendar-toolbar/calendar-toolbar.tsx | 6 +- .../components/month-grid/month-grid.tsx | 4 +- .../components/time-grid/time-grid.tsx | 3 +- .../schedule-list-context-menu.tsx | 9 +- .../task-context-menu/task-context-menu.tsx | 4 +- .../task-delete-dialog/task-delete-dialog.tsx | 2 +- .../task-details-modal/task-details-modal.tsx | 9 +- .../task-modal/recurrence-section.tsx | 4 +- .../components/task-modal/task-modal.tsx | 6 +- .../[workspaceId]/scheduled-tasks/loading.tsx | 2 +- .../scheduled-tasks/scheduled-tasks.tsx | 2 +- .../settings/components/admin/admin.tsx | 3 +- .../settings/components/api-keys/api-keys.tsx | 2 +- .../create-api-key-modal.tsx | 6 +- .../settings/components/billing/billing.tsx | 15 +- .../usage-limit-field/usage-limit-field.tsx | 2 +- .../components/byok/byok-key-manager.tsx | 10 +- .../byok/byok-provider-keys-modal.tsx | 2 +- .../components/byok/byok-skeleton.tsx | 2 +- .../settings/components/copilot/copilot.tsx | 8 +- .../credential-sets/credential-sets.tsx | 10 +- .../components/custom-tools/custom-tools.tsx | 2 +- .../settings/components/general/general.tsx | 12 +- .../inbox-enable-toggle.tsx | 6 +- .../inbox-settings-tab/inbox-settings-tab.tsx | 8 +- .../inbox-task-list/inbox-task-list.tsx | 2 +- .../settings/components/inbox/inbox.tsx | 2 +- .../mcp-server-form-modal.tsx | 10 +- .../settings/components/mcp/mcp.tsx | 5 +- .../components/mothership/mothership.tsx | 3 +- .../recently-deleted/recently-deleted.tsx | 4 +- .../row-actions-menu/row-actions-menu.tsx | 4 +- .../save-discard-actions.tsx | 2 +- .../secret-value-field/secret-value-field.tsx | 2 +- .../secrets-manager/secrets-manager.tsx | 3 +- .../secrets/hooks/use-secret-value.ts | 2 +- .../settings-empty-state.tsx | 2 +- .../settings-panel/settings-panel.tsx | 3 +- .../manage-credits-modal.tsx | 4 +- .../no-organization-view.tsx | 2 +- .../organization-invite-modal.tsx | 9 +- .../organization-member-lists.tsx | 2 +- .../remove-member-dialog.tsx | 2 +- .../team-seats-overview.tsx | 3 +- .../transfer-ownership-dialog.tsx | 4 +- .../team-management/team-management.tsx | 2 +- .../components/teammates/teammates.tsx | 2 +- .../create-workflow-mcp-server-modal.tsx | 4 +- .../workflow-mcp-servers.tsx | 12 +- .../[workspaceId]/settings/navigation.ts | 2 +- .../secrets/[credentialId]/secret-detail.tsx | 4 +- .../components/skill-import/skill-import.tsx | 2 +- .../components/skill-modal/skill-modal.tsx | 8 +- .../workspace/[workspaceId]/skills/skills.tsx | 2 +- .../column-config-sidebar.tsx | 13 +- .../column-config-sidebar/column-types.ts | 2 +- .../components/context-menu/context-menu.tsx | 4 +- .../enrichment-details/enrichment-details.tsx | 3 +- .../enrichments-sidebar/enrichment-config.tsx | 8 +- .../enrichments-sidebar.tsx | 5 +- .../new-column-dropdown.tsx | 4 +- .../components/row-modal/row-modal.tsx | 8 +- .../run-status-control/run-status-control.tsx | 4 +- .../sidebar-fields/sidebar-fields.tsx | 2 +- .../table-action-bar/table-action-bar.tsx | 5 +- .../components/table-filter/table-filter.tsx | 4 +- .../table-grid/cells/cell-render.tsx | 3 +- .../cells/expanded-cell-popover.tsx | 2 +- .../table-grid/cells/inline-editors.tsx | 4 +- .../table-grid/cells/sim-resource-cell.tsx | 2 +- .../components/table-grid/data-row.tsx | 6 +- .../table-grid/headers/column-header-menu.tsx | 4 +- .../table-grid/headers/column-type-icon.tsx | 4 +- .../headers/workflow-group-meta-cell.tsx | 6 +- .../components/table-grid/table-find.tsx | 4 +- .../components/table-grid/table-grid.tsx | 5 +- .../table-grid/table-primitives.tsx | 5 +- .../input-mapping-section.tsx | 2 +- .../workflow-sidebar/run-settings-section.tsx | 2 +- .../workflow-sidebar/workflow-sidebar.tsx | 14 +- .../[workspaceId]/tables/[tableId]/error.tsx | 4 +- .../[tableId]/hooks/use-table-event-stream.ts | 2 +- .../tables/[tableId]/loading.tsx | 2 +- .../[workspaceId]/tables/[tableId]/table.tsx | 4 +- .../import-csv-dialog/import-csv-dialog.tsx | 6 +- .../import-progress-menu.tsx | 6 +- .../use-workspace-imports.ts | 2 +- .../table-context-menu/table-context-menu.tsx | 4 +- .../tables-list-context-menu.tsx | 4 +- .../[workspaceId]/tables/loading.tsx | 4 +- .../workspace/[workspaceId]/tables/tables.tsx | 6 +- .../billing-period-toggle.tsx | 2 +- .../comparison-table/comparison-table.tsx | 4 +- .../components/plan-card/plan-card.tsx | 4 +- .../upgrade/hooks/use-upgrade-state.ts | 2 +- .../[workspaceId]/upgrade/upgrade.tsx | 2 +- .../components/action-bar/action-bar.tsx | 3 +- .../components/block-menu/block-menu.tsx | 8 +- .../components/canvas-menu/canvas-menu.tsx | 8 +- .../w/[workflowId]/components/chat/chat.tsx | 14 +- .../output-select/output-select.tsx | 3 +- .../components/command-list/command-list.tsx | 4 +- .../w/[workflowId]/components/error/index.tsx | 2 +- .../components/note-block/note-block.tsx | 3 +- .../user-input/hooks/use-file-attachments.ts | 2 +- .../deploy-modal/components/api/api.tsx | 4 +- .../deploy-modal/components/chat/chat.tsx | 10 +- .../deploy-upgrade-gate.tsx | 2 +- .../general/components/api-info-modal.tsx | 6 +- .../components/version-description-modal.tsx | 8 +- .../general/components/versions.tsx | 8 +- .../components/general/general.tsx | 6 +- .../deploy-modal/components/mcp/mcp.tsx | 8 +- .../components/deploy-modal/deploy-modal.tsx | 10 +- .../panel/components/deploy/deploy.tsx | 2 +- .../components/deploy/hooks/use-deployment.ts | 2 +- .../components/field-item/field-item.tsx | 3 +- .../connection-blocks/connection-blocks.tsx | 3 +- .../checkbox-list/checkbox-list.tsx | 2 +- .../sub-block/components/code/code.tsx | 8 +- .../components/combobox/combobox.tsx | 3 +- .../condition-input/condition-input.tsx | 14 +- .../credential-selector.tsx | 2 +- .../document-tag-entry/document-tag-entry.tsx | 10 +- .../components/dropdown/dropdown.tsx | 2 +- .../env-var-dropdown/env-var-dropdown.tsx | 6 +- .../components/eval-input/eval-input.tsx | 5 +- .../components/file-upload/file-upload.tsx | 3 +- .../components/filter-rule-row.tsx | 8 +- .../filter-builder/filter-builder.tsx | 2 +- .../grouped-checkbox-list.tsx | 6 +- .../input-mapping/input-mapping.tsx | 3 +- .../knowledge-base-selector.tsx | 2 +- .../knowledge-tag-filters.tsx | 10 +- .../components/long-input/long-input.tsx | 3 +- .../mcp-dynamic-args/mcp-dynamic-args.tsx | 2 +- .../mcp-server-modal/mcp-server-selector.tsx | 2 +- .../mcp-server-modal/mcp-tool-selector.tsx | 2 +- .../messages-input/messages-input.tsx | 5 +- .../schedule-info/schedule-info.tsx | 2 +- .../selector-combobox/selector-combobox.tsx | 2 +- .../selector-input/selector-input.tsx | 2 +- .../components/short-input/short-input.tsx | 3 +- .../components/skill-input/skill-input.tsx | 2 +- .../slack-setup-wizard/slack-setup-wizard.tsx | 3 +- .../components/slider-input/slider-input.tsx | 3 +- .../sort-builder/components/sort-rule-row.tsx | 13 +- .../components/sort-builder/sort-builder.tsx | 2 +- .../components/starter/input-format.tsx | 10 +- .../sub-block/components/switch/switch.tsx | 2 +- .../table-selector/table-selector.tsx | 2 +- .../sub-block/components/table/table.tsx | 5 +- .../keyboard-navigation-handler.tsx | 2 +- .../components/tag-dropdown/tag-dropdown.tsx | 12 +- .../components/time-input/time-input.tsx | 2 +- .../components/code-editor/code-editor.tsx | 8 +- .../custom-tool-modal/custom-tool-modal.tsx | 12 +- .../components/tools/credential-selector.tsx | 2 +- .../tool-input/components/tools/parameter.tsx | 3 +- .../components/tool-input/tool-input.tsx | 10 +- .../variables-input/variables-input.tsx | 14 +- .../editor/components/sub-block/sub-block.tsx | 3 +- .../subflow-editor/subflow-editor.tsx | 6 +- .../panel/components/editor/editor.tsx | 2 +- .../editor/hooks/use-subflow-editor.ts | 2 +- .../toolbar-item-context-menu.tsx | 2 +- .../panel/components/toolbar/toolbar.tsx | 12 +- .../w/[workflowId]/components/panel/panel.tsx | 18 +- .../replacement-controls.tsx | 2 +- .../workflow-search-replace.tsx | 3 +- .../components/subflows/subflow-node.tsx | 4 +- .../filter-popover/filter-popover.tsx | 6 +- .../log-row-context-menu.tsx | 8 +- .../components/output-context-menu.tsx | 8 +- .../components/structured-output.tsx | 3 +- .../components/output-panel/output-panel.tsx | 22 +-- .../status-display/status-display.tsx | 2 +- .../toggle-button/toggle-button.tsx | 2 +- .../components/terminal/terminal.tsx | 16 +- .../components/variables/variables.tsx | 12 +- .../wand-prompt-bar/wand-prompt-bar.tsx | 2 +- .../workflow-block/workflow-block.tsx | 4 +- .../workflow-controls/workflow-controls.tsx | 10 +- .../w/[workflowId]/hooks/use-wand.ts | 2 +- .../hooks/use-workflow-execution.ts | 2 +- .../w/[workflowId]/utils/block-ring-utils.ts | 2 +- .../[workspaceId]/w/[workflowId]/workflow.tsx | 2 +- .../preview-context-menu.tsx | 8 +- .../preview-editor/preview-editor.tsx | 26 +-- .../components/subflow/subflow.tsx | 3 +- .../preview-workflow/preview-workflow.tsx | 2 +- .../w/components/preview/preview.tsx | 3 +- .../collapsed-sidebar-menu.tsx | 10 +- .../components/file-list/file-list.tsx | 2 +- .../components/help-modal/help-modal.tsx | 14 +- .../nav-item-context-menu.tsx | 9 +- .../command-items/command-items.tsx | 4 +- .../search-groups/search-groups.tsx | 2 +- .../components/search-modal/search-modal.tsx | 19 +- .../settings-sidebar/settings-sidebar.tsx | 3 +- .../components/context-menu/context-menu.tsx | 6 +- .../components/delete-modal/delete-modal.tsx | 2 +- .../empty-area-context-menu.tsx | 2 +- .../components/folder-item/folder-item.tsx | 5 +- .../workflow-item/avatars/avatars.tsx | 2 +- .../workflow-item/workflow-item.tsx | 5 +- .../create-workspace-modal.tsx | 2 +- .../fork-activity-panel.tsx | 3 +- .../fork-workspace-modal.tsx | 10 +- .../components/invite-modal/invite-modal.tsx | 11 +- .../components/dependent-field-selector.tsx | 2 +- .../components/resource-reconfigure.tsx | 3 +- .../promote-workspace-modal.tsx | 6 +- .../workspace-header/workspace-header.tsx | 10 +- .../w/components/sidebar/sidebar.tsx | 16 +- apps/sim/blocks/blocks/apollo.ts | 2 +- apps/sim/blocks/blocks/circleback.ts | 2 +- apps/sim/blocks/blocks/clickhouse.ts | 11 +- apps/sim/blocks/blocks/confluence.ts | 2 +- apps/sim/blocks/blocks/github.ts | 2 +- apps/sim/blocks/blocks/gmail.ts | 2 +- apps/sim/blocks/blocks/google_drive.ts | 2 +- apps/sim/blocks/blocks/google_vault.ts | 2 +- apps/sim/blocks/blocks/greptile.ts | 2 +- apps/sim/blocks/blocks/imap.ts | 2 +- apps/sim/blocks/blocks/logs.ts | 2 +- apps/sim/blocks/blocks/mailchimp.ts | 2 +- apps/sim/blocks/blocks/mothership.ts | 2 +- apps/sim/blocks/blocks/notion.ts | 2 +- apps/sim/blocks/blocks/rss.ts | 2 +- apps/sim/blocks/blocks/sentry.ts | 2 +- apps/sim/blocks/blocks/slack.ts | 2 +- apps/sim/components/emcn/index.ts | 19 -- .../permissions/permission-selector.tsx | 3 +- apps/sim/components/permissions/role-lock.tsx | 2 +- apps/sim/components/ui/button.tsx | 2 +- .../ui/generated-password-input.tsx | 2 +- apps/sim/components/ui/progress.tsx | 2 +- apps/sim/components/ui/select.tsx | 2 +- .../components/access-control.tsx | 8 +- .../components/group-detail.tsx | 12 +- .../components/workspace-select.tsx | 2 +- .../ee/audit-logs/components/audit-logs.tsx | 14 +- apps/sim/ee/audit-logs/constants.ts | 2 +- apps/sim/ee/components/setting-row.tsx | 2 +- .../components/data-drains-settings.tsx | 12 +- .../ee/data-drains/destinations/registry.tsx | 9 +- .../components/data-retention-settings.tsx | 12 +- apps/sim/ee/sso/components/sso-auth.tsx | 3 +- apps/sim/ee/sso/components/sso-form.tsx | 3 +- apps/sim/ee/sso/components/sso-settings.tsx | 10 +- .../components/whitelabeling-settings.tsx | 3 +- .../email-verification/email-verification.ts | 2 +- apps/sim/enrichments/work-email/work-email.ts | 2 +- apps/sim/hooks/mcp/use-mcp-oauth-popup.ts | 2 +- apps/sim/hooks/queries/kb/knowledge.ts | 2 +- apps/sim/hooks/queries/public-shares.ts | 2 +- apps/sim/hooks/queries/schedules.ts | 2 +- apps/sim/hooks/queries/tables.test.ts | 2 +- apps/sim/hooks/queries/tables.ts | 2 +- .../hooks/queries/workspace-file-folders.ts | 2 +- apps/sim/hooks/queries/workspace-files.ts | 2 +- apps/sim/hooks/use-collaborative-workflow.ts | 2 +- apps/sim/hooks/use-oauth-return.ts | 2 +- .../billing/client/use-limit-upgrade-toast.ts | 2 +- apps/sim/lib/blog/code.tsx | 2 +- .../lib/copilot/tools/client/store-utils.ts | 2 +- apps/sim/lib/core/utils.test.ts | 2 +- apps/sim/next.config.ts | 2 + apps/sim/package.json | 1 + apps/sim/stores/terminal/console/store.ts | 2 +- bun.lock | 57 +++++- packages/emcn/package.json | 66 +++++++ .../emcn => packages/emcn/src}/AGENTS.md | 2 +- .../emcn/src}/components/avatar/avatar.tsx | 4 +- .../emcn/src}/components/badge/badge.tsx | 2 +- .../emcn/src}/components/banner/banner.tsx | 4 +- .../components/button-group/button-group.tsx | 2 +- .../emcn/src}/components/button/button.tsx | 2 +- .../components/calendar/calendar-day-cell.tsx | 4 +- .../src}/components/calendar/calendar.test.ts | 6 +- .../src}/components/calendar/calendar.tsx | 10 +- .../src}/components/checkbox/checkbox.tsx | 2 +- .../chip-combobox/chip-combobox.tsx | 4 +- .../chip-copy-input/chip-copy-input.tsx | 14 +- .../chip-date-picker/chip-date-picker.tsx | 16 +- .../chip-dropdown/chip-dropdown.tsx | 10 +- .../src}/components/chip-input/chip-input.tsx | 9 +- .../src}/components/chip-modal/chip-modal.tsx | 56 +++--- .../components/chip-select/chip-select.tsx | 8 +- .../components/chip-switch/chip-switch.tsx | 4 +- .../emcn/src}/components/chip-switch/index.ts | 0 .../src}/components/chip-tag/chip-tag.tsx | 2 +- .../emcn/src}/components/chip-tag/index.ts | 0 .../chip-textarea/chip-textarea.tsx | 9 +- .../chip-time-picker/chip-time-picker.tsx | 4 +- .../src}/components/chip/chip-chevron.tsx | 4 +- .../emcn/src}/components/chip/chip-chrome.ts | 0 .../emcn/src}/components/chip/chip.tsx | 4 +- .../emcn/src}/components/code/code.css | 0 .../emcn/src}/components/code/code.tsx | 4 +- .../src}/components/code/copy-code-button.tsx | 6 +- .../emcn/src}/components/code/prism.ts | 2 +- .../collapsible-card/collapsible-card.tsx | 4 +- .../src}/components/combobox/combobox.tsx | 2 +- .../dropdown-menu/dropdown-menu.tsx | 6 +- .../src}/components/expandable/expandable.tsx | 2 +- .../field-divider/field-divider.tsx | 2 +- .../emcn/src}/components/index.ts | 12 +- .../src}/components/info-card/info-card.tsx | 2 +- .../emcn/src}/components/info/info.tsx | 4 +- .../src}/components/input-otp/input-otp.tsx | 4 +- .../emcn/src}/components/input/input.tsx | 4 +- .../emcn/src}/components/label/label.tsx | 2 +- .../emcn/src}/components/modal/auto-focus.ts | 0 .../emcn/src}/components/modal/modal.tsx | 2 +- .../components/popover/popover-animation.ts | 0 .../emcn/src}/components/popover/popover.tsx | 4 +- .../progress-item/progress-item.tsx | 4 +- .../components/secret-input/secret-input.tsx | 2 +- .../secret-reveal/secret-reveal.tsx | 8 +- .../src}/components/skeleton/skeleton.tsx | 2 +- .../emcn/src}/components/slider/slider.tsx | 2 +- .../emcn/src}/components/switch/switch.tsx | 2 +- .../emcn/src}/components/table/table.tsx | 2 +- .../src}/components/tag-input/tag-input.tsx | 10 +- .../src}/components/textarea/textarea.tsx | 2 +- .../components/time-picker/time-picker.tsx | 8 +- .../emcn/src}/components/toast/toast.tsx | 23 +-- .../emcn/src}/components/tooltip/tooltip.tsx | 2 +- .../emcn/src}/components/wizard/wizard.tsx | 2 +- packages/emcn/src/css-modules.d.ts | 8 + .../emcn/src}/hooks/use-copy-to-clipboard.ts | 0 .../src}/icons/animate/download.module.css | 0 .../emcn/src}/icons/animate/layout.module.css | 0 .../emcn/src}/icons/animate/loader.module.css | 0 .../src}/icons/animate/pills-ring.module.css | 0 .../emcn/src}/icons/arrow-down.tsx | 0 .../emcn/src}/icons/arrow-left.tsx | 0 .../emcn/src}/icons/arrow-right.tsx | 0 .../emcn/src}/icons/arrow-up-down.tsx | 0 .../emcn/src}/icons/arrow-up.tsx | 0 .../emcn/src}/icons/asterisk.tsx | 0 .../emcn => packages/emcn/src}/icons/bell.tsx | 0 .../emcn/src}/icons/blimp.tsx | 0 .../emcn/src}/icons/book-open.tsx | 0 .../emcn/src}/icons/bubble-chat-close.tsx | 0 .../emcn/src}/icons/bubble-chat-preview.tsx | 0 .../emcn => packages/emcn/src}/icons/bug.tsx | 0 .../emcn/src}/icons/calendar.tsx | 0 .../emcn => packages/emcn/src}/icons/card.tsx | 0 .../emcn/src}/icons/check.tsx | 0 .../emcn/src}/icons/chevron-down.tsx | 0 .../emcn/src}/icons/circle-alert.tsx | 0 .../emcn/src}/icons/circle-check.tsx | 0 .../emcn/src}/icons/circle-info.tsx | 0 .../emcn/src}/icons/clipboard-list.tsx | 0 .../emcn/src}/icons/clipboard.tsx | 0 .../emcn/src}/icons/clock.tsx | 0 .../emcn/src}/icons/columns2.tsx | 0 .../emcn/src}/icons/columns3.tsx | 0 .../emcn/src}/icons/connections.tsx | 0 .../emcn/src}/icons/credit.tsx | 0 .../emcn/src}/icons/cursor.tsx | 0 .../emcn/src}/icons/database-x.tsx | 0 .../emcn/src}/icons/database.tsx | 0 .../emcn/src}/icons/document-attachment.tsx | 0 .../emcn/src}/icons/download.tsx | 4 +- .../emcn/src}/icons/duplicate.tsx | 0 .../emcn/src}/icons/expand.tsx | 0 .../emcn/src}/icons/eye-off.tsx | 0 .../emcn => packages/emcn/src}/icons/eye.tsx | 0 .../emcn/src}/icons/file-x.tsx | 0 .../emcn => packages/emcn/src}/icons/file.tsx | 0 .../emcn/src}/icons/files.tsx | 0 .../emcn/src}/icons/fingerprint.tsx | 0 .../emcn/src}/icons/folder-code.tsx | 0 .../emcn/src}/icons/folder-input.tsx | 0 .../emcn/src}/icons/folder-plus.tsx | 0 .../emcn/src}/icons/folder.tsx | 0 .../emcn/src}/icons/hammer.tsx | 0 .../emcn => packages/emcn/src}/icons/hand.tsx | 0 .../emcn/src}/icons/help-circle.tsx | 0 .../emcn/src}/icons/hex-simple.tsx | 0 .../emcn => packages/emcn/src}/icons/home.tsx | 0 .../emcn/src}/icons/image-up.tsx | 0 .../emcn => packages/emcn/src}/icons/index.ts | 0 .../emcn/src}/icons/integration.tsx | 0 .../emcn/src}/icons/key-square.tsx | 0 .../emcn => packages/emcn/src}/icons/key.tsx | 0 .../emcn/src}/icons/layout.tsx | 4 +- .../emcn/src}/icons/library.tsx | 0 .../emcn => packages/emcn/src}/icons/link.tsx | 0 .../emcn/src}/icons/list-filter.tsx | 0 .../emcn/src}/icons/loader.tsx | 4 +- .../emcn => packages/emcn/src}/icons/lock.tsx | 0 .../emcn/src}/icons/log-in.tsx | 0 .../emcn/src}/icons/log-out.tsx | 0 .../emcn => packages/emcn/src}/icons/mail.tsx | 0 .../emcn/src}/icons/manage-workspace.tsx | 0 .../emcn => packages/emcn/src}/icons/mic.tsx | 0 .../emcn/src}/icons/more-horizontal.tsx | 0 .../emcn/src}/icons/no-wrap.tsx | 0 .../emcn/src}/icons/palette.tsx | 0 .../emcn/src}/icons/panel-left.tsx | 0 .../emcn/src}/icons/paperclip.tsx | 0 .../emcn/src}/icons/pause.tsx | 0 .../emcn/src}/icons/pencil.tsx | 0 .../emcn/src}/icons/pills-ring.tsx | 4 +- .../emcn/src}/icons/pin-off.tsx | 0 .../emcn => packages/emcn/src}/icons/pin.tsx | 0 .../emcn => packages/emcn/src}/icons/play.tsx | 0 .../emcn => packages/emcn/src}/icons/plus.tsx | 0 .../emcn => packages/emcn/src}/icons/redo.tsx | 0 .../emcn/src}/icons/refresh-cw.tsx | 4 +- .../emcn/src}/icons/rocket.tsx | 0 .../emcn/src}/icons/rows3.tsx | 0 .../emcn/src}/icons/search.tsx | 0 .../emcn/src}/icons/select-all.tsx | 0 .../emcn => packages/emcn/src}/icons/send.tsx | 0 .../emcn/src}/icons/server.tsx | 0 .../emcn/src}/icons/settings.tsx | 0 .../emcn/src}/icons/shield-check.tsx | 0 .../emcn/src}/icons/shuffle.tsx | 0 .../emcn => packages/emcn/src}/icons/sim.tsx | 0 .../emcn/src}/icons/slash.tsx | 0 .../emcn/src}/icons/square-arrow-up-right.tsx | 0 .../emcn/src}/icons/square.tsx | 0 .../emcn/src}/icons/table-x.tsx | 0 .../emcn/src}/icons/table.tsx | 0 .../emcn => packages/emcn/src}/icons/tag.tsx | 0 .../emcn => packages/emcn/src}/icons/task.tsx | 0 .../emcn/src}/icons/terminal-window.tsx | 0 .../emcn/src}/icons/thumbs-down.tsx | 0 .../emcn/src}/icons/thumbs-up.tsx | 0 .../emcn/src}/icons/trash-outline.tsx | 0 .../emcn/src}/icons/trash.tsx | 0 .../emcn/src}/icons/trash2.tsx | 0 .../emcn/src}/icons/triangle-alert.tsx | 0 .../emcn/src}/icons/type-boolean.tsx | 0 .../emcn/src}/icons/type-json.tsx | 0 .../emcn/src}/icons/type-number.tsx | 0 .../emcn/src}/icons/type-text.tsx | 0 .../emcn => packages/emcn/src}/icons/undo.tsx | 0 .../emcn/src}/icons/unlock.tsx | 0 .../emcn/src}/icons/upload.tsx | 0 .../emcn/src}/icons/user-plus.tsx | 0 .../emcn => packages/emcn/src}/icons/user.tsx | 0 .../emcn/src}/icons/users.tsx | 0 .../emcn/src}/icons/wordmark.tsx | 0 .../emcn/src}/icons/workflow-x.tsx | 0 .../emcn/src}/icons/workflow.tsx | 0 .../emcn => packages/emcn/src}/icons/wrap.tsx | 0 .../emcn/src}/icons/wrench.tsx | 0 .../emcn => packages/emcn/src}/icons/x.tsx | 0 .../emcn/src}/icons/zoom-in.tsx | 0 .../emcn/src}/icons/zoom-out.tsx | 0 packages/emcn/src/index.ts | 28 +++ .../utils => packages/emcn/src/lib}/cn.ts | 0 .../emcn/src/lib}/keyboard.ts | 0 packages/emcn/tsconfig.json | 9 + packages/emcn/vitest.config.ts | 9 + 692 files changed, 1349 insertions(+), 1771 deletions(-) delete mode 100644 apps/docs/components/ui/chip-dropdown.tsx delete mode 100644 apps/docs/components/ui/chip.tsx delete mode 100644 apps/docs/components/ui/dropdown-menu.tsx delete mode 100644 apps/sim/components/emcn/index.ts create mode 100644 packages/emcn/package.json rename {apps/sim/components/emcn => packages/emcn/src}/AGENTS.md (91%) rename {apps/sim/components/emcn => packages/emcn/src}/components/avatar/avatar.tsx (97%) rename {apps/sim/components/emcn => packages/emcn/src}/components/badge/badge.tsx (99%) rename {apps/sim/components/emcn => packages/emcn/src}/components/banner/banner.tsx (93%) rename {apps/sim/components/emcn => packages/emcn/src}/components/button-group/button-group.tsx (99%) rename {apps/sim/components/emcn => packages/emcn/src}/components/button/button.tsx (98%) rename {apps/sim/components/emcn => packages/emcn/src}/components/calendar/calendar-day-cell.tsx (94%) rename {apps/sim/components/emcn => packages/emcn/src}/components/calendar/calendar.test.ts (95%) rename {apps/sim/components/emcn => packages/emcn/src}/components/calendar/calendar.tsx (97%) rename {apps/sim/components/emcn => packages/emcn/src}/components/checkbox/checkbox.tsx (98%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-combobox/chip-combobox.tsx (90%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-copy-input/chip-copy-input.tsx (81%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-date-picker/chip-date-picker.tsx (91%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-dropdown/chip-dropdown.tsx (97%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-input/chip-input.tsx (93%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-modal/chip-modal.tsx (96%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-select/chip-select.tsx (97%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-switch/chip-switch.tsx (96%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-switch/index.ts (100%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-tag/chip-tag.tsx (99%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-tag/index.ts (100%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-textarea/chip-textarea.tsx (91%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip-time-picker/chip-time-picker.tsx (97%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip/chip-chevron.tsx (91%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip/chip-chrome.ts (100%) rename {apps/sim/components/emcn => packages/emcn/src}/components/chip/chip.tsx (98%) rename {apps/sim/components/emcn => packages/emcn/src}/components/code/code.css (100%) rename {apps/sim/components/emcn => packages/emcn/src}/components/code/code.tsx (99%) rename {apps/sim/components/emcn => packages/emcn/src}/components/code/copy-code-button.tsx (75%) rename {apps/sim/components/emcn => packages/emcn/src}/components/code/prism.ts (92%) rename {apps/sim/components/emcn => packages/emcn/src}/components/collapsible-card/collapsible-card.tsx (94%) rename {apps/sim/components/emcn => packages/emcn/src}/components/combobox/combobox.tsx (99%) rename {apps/sim/components/emcn => packages/emcn/src}/components/dropdown-menu/dropdown-menu.tsx (98%) rename {apps/sim/components/emcn => packages/emcn/src}/components/expandable/expandable.tsx (97%) rename {apps/sim/components/emcn => packages/emcn/src}/components/field-divider/field-divider.tsx (97%) rename {apps/sim/components/emcn => packages/emcn/src}/components/index.ts (96%) rename {apps/sim/components/emcn => packages/emcn/src}/components/info-card/info-card.tsx (98%) rename {apps/sim/components/emcn => packages/emcn/src}/components/info/info.tsx (94%) rename {apps/sim/components/emcn => packages/emcn/src}/components/input-otp/input-otp.tsx (96%) rename {apps/sim/components/emcn => packages/emcn/src}/components/input/input.tsx (92%) rename {apps/sim/components/emcn => packages/emcn/src}/components/label/label.tsx (96%) rename {apps/sim/components/emcn => packages/emcn/src}/components/modal/auto-focus.ts (100%) rename {apps/sim/components/emcn => packages/emcn/src}/components/modal/modal.tsx (99%) rename {apps/sim/components/emcn => packages/emcn/src}/components/popover/popover-animation.ts (100%) rename {apps/sim/components/emcn => packages/emcn/src}/components/popover/popover.tsx (99%) rename {apps/sim/components/emcn => packages/emcn/src}/components/progress-item/progress-item.tsx (97%) rename {apps/sim/components/emcn => packages/emcn/src}/components/secret-input/secret-input.tsx (97%) rename {apps/sim/components/emcn => packages/emcn/src}/components/secret-reveal/secret-reveal.tsx (90%) rename {apps/sim/components/emcn => packages/emcn/src}/components/skeleton/skeleton.tsx (91%) rename {apps/sim/components/emcn => packages/emcn/src}/components/slider/slider.tsx (97%) rename {apps/sim/components/emcn => packages/emcn/src}/components/switch/switch.tsx (97%) rename {apps/sim/components/emcn => packages/emcn/src}/components/table/table.tsx (98%) rename {apps/sim/components/emcn => packages/emcn/src}/components/tag-input/tag-input.tsx (98%) rename {apps/sim/components/emcn => packages/emcn/src}/components/textarea/textarea.tsx (96%) rename {apps/sim/components/emcn => packages/emcn/src}/components/time-picker/time-picker.tsx (98%) rename {apps/sim/components/emcn => packages/emcn/src}/components/toast/toast.tsx (97%) rename {apps/sim/components/emcn => packages/emcn/src}/components/tooltip/tooltip.tsx (99%) rename {apps/sim/components/emcn => packages/emcn/src}/components/wizard/wizard.tsx (99%) create mode 100644 packages/emcn/src/css-modules.d.ts rename {apps/sim => packages/emcn/src}/hooks/use-copy-to-clipboard.ts (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/animate/download.module.css (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/animate/layout.module.css (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/animate/loader.module.css (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/animate/pills-ring.module.css (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/arrow-down.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/arrow-left.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/arrow-right.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/arrow-up-down.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/arrow-up.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/asterisk.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/bell.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/blimp.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/book-open.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/bubble-chat-close.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/bubble-chat-preview.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/bug.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/calendar.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/card.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/check.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/chevron-down.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/circle-alert.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/circle-check.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/circle-info.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/clipboard-list.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/clipboard.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/clock.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/columns2.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/columns3.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/connections.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/credit.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/cursor.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/database-x.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/database.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/document-attachment.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/download.tsx (91%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/duplicate.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/expand.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/eye-off.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/eye.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/file-x.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/file.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/files.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/fingerprint.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/folder-code.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/folder-input.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/folder-plus.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/folder.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/hammer.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/hand.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/help-circle.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/hex-simple.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/home.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/image-up.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/index.ts (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/integration.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/key-square.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/key.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/layout.tsx (94%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/library.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/link.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/list-filter.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/loader.tsx (91%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/lock.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/log-in.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/log-out.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/mail.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/manage-workspace.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/mic.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/more-horizontal.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/no-wrap.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/palette.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/panel-left.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/paperclip.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/pause.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/pencil.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/pills-ring.tsx (92%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/pin-off.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/pin.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/play.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/plus.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/redo.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/refresh-cw.tsx (87%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/rocket.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/rows3.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/search.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/select-all.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/send.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/server.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/settings.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/shield-check.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/shuffle.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/sim.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/slash.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/square-arrow-up-right.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/square.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/table-x.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/table.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/tag.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/task.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/terminal-window.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/thumbs-down.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/thumbs-up.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/trash-outline.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/trash.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/trash2.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/triangle-alert.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/type-boolean.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/type-json.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/type-number.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/type-text.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/undo.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/unlock.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/upload.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/user-plus.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/user.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/users.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/wordmark.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/workflow-x.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/workflow.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/wrap.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/wrench.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/x.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/zoom-in.tsx (100%) rename {apps/sim/components/emcn => packages/emcn/src}/icons/zoom-out.tsx (100%) create mode 100644 packages/emcn/src/index.ts rename {apps/sim/lib/core/utils => packages/emcn/src/lib}/cn.ts (100%) rename {apps/sim/lib/core/utils => packages/emcn/src/lib}/keyboard.ts (100%) create mode 100644 packages/emcn/tsconfig.json create mode 100644 packages/emcn/vitest.config.ts diff --git a/.claude/rules/emcn-components.md b/.claude/rules/emcn-components.md index 9e096c2a9bd..23491d6aaaf 100644 --- a/.claude/rules/emcn-components.md +++ b/.claude/rules/emcn-components.md @@ -5,13 +5,13 @@ paths: # EMCN Components -Import from `@/components/emcn`, never from subpaths (except CSS files). The **chip family** is the platform's primary chrome — always reach for it over the legacy primitives it is progressively replacing (`Input`→`ChipInput`, `Textarea`→`ChipTextarea`, `Modal`→`ChipModal`, `Select`/`Combobox`→`ChipSelect`/`ChipCombobox`/`ChipDropdown`, `Switch`→`ChipSwitch`, date field→`ChipDatePicker`). For context/action menus the canonical control is `DropdownMenu` — the standard menu (not a chip, and never a hand-rolled popover). +Import components, `cn`, and tokens from the `@sim/emcn` barrel; icons come from the `@sim/emcn/icons` subpath, and CSS modules from their file path. Never deep-import other component subpaths. The **chip family** is the platform's primary chrome — always reach for it over the legacy primitives it is progressively replacing (`Input`→`ChipInput`, `Textarea`→`ChipTextarea`, `Modal`→`ChipModal`, `Select`/`Combobox`→`ChipSelect`/`ChipCombobox`/`ChipDropdown`, `Switch`→`ChipSwitch`, date field→`ChipDatePicker`). For context/action menus the canonical control is `DropdownMenu` — the standard menu (not a chip, and never a hand-rolled popover). ## Chip chrome — single source of truth Never hand-roll the chip pill from raw class strings (they go stale). Compose from the canonical sources: -- **Surface, typography + content tokens:** `chip/chip-chrome.ts` — `chipFilledSurfaceTokens`, `chipFieldSurfaceClass`, `chipFieldTextClass` (text fields and the dropdown search box build on these), plus the chip-content chrome `chipContentGap`, `chipGeometryClass`, `chipContentIconClass`, `chipContentLabelClass`, and `cellIconNodeClass` (non-chip surfaces that must visually match chip content, e.g. resource table cells). All are re-exported from the `@/components/emcn` barrel — no subpath import needed. +- **Surface, typography + content tokens:** `chip/chip-chrome.ts` — `chipFilledSurfaceTokens`, `chipFieldSurfaceClass`, `chipFieldTextClass` (text fields and the dropdown search box build on these), plus the chip-content chrome `chipContentGap`, `chipGeometryClass`, `chipContentIconClass`, `chipContentLabelClass`, and `cellIconNodeClass` (non-chip surfaces that must visually match chip content, e.g. resource table cells). All are re-exported from the `@sim/emcn` barrel — no subpath import needed. - **Pill geometry:** `chip/chip.tsx` — `chipVariants` (30px tall, `rounded-lg`, `px-2`, icon↔text `gap-1.5`). Every pill-shaped trigger (`ChipDropdown`, `ChipSelect`, `ChipSwitch`) reuses it for visual parity. Canonical look: normal font-weight (never `font-medium`/`font-semibold`), value text `--text-body`, icons `--text-icon` at `size-[14px]`, placeholder `--text-muted`, `transition-colors`, **no focus ring** (the caret marks focus). Filled surface is `--surface-5` light / `--surface-4` dark with a `--border-1` border. diff --git a/.claude/rules/sim-imports.md b/.claude/rules/sim-imports.md index b1f1926cd9d..74bf556db4d 100644 --- a/.claude/rules/sim-imports.md +++ b/.claude/rules/sim-imports.md @@ -47,7 +47,7 @@ import { CORE_TRIGGER_TYPES } from '@/app/workspace/.../utils' 1. React/core libraries 2. External libraries -3. UI components (`@/components/emcn`, `@/components/ui`) +3. UI components (`@sim/emcn`, `@/components/ui`) 4. Utilities (`@/lib/...`) 5. Stores (`@/stores/...`) 6. Feature imports diff --git a/.claude/rules/sim-styling.md b/.claude/rules/sim-styling.md index 61e4c5d1967..3f926b78828 100644 --- a/.claude/rules/sim-styling.md +++ b/.claude/rules/sim-styling.md @@ -16,7 +16,7 @@ paths: ## Conditional Classes ```typescript -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn'
@@ -391,7 +391,7 @@ On chip components (see "EMCN Components"), drive chrome through PROPS, not `cla ## EMCN Components -Import from `@/components/emcn`, never from subpaths (except CSS files). Use CVA only when 2+ genuine variants exist; otherwise plain `cn()`. +Import components, `cn`, and tokens from the `@sim/emcn` barrel; icons come from the `@sim/emcn/icons` subpath, and CSS modules from their file path. Never deep-import other component subpaths. Use CVA only when 2+ genuine variants exist; otherwise plain `cn()`. The chip family is the canonical UI chrome and is progressively replacing the legacy EMCN primitives — always reach for the chip equivalent: `ChipInput` over `Input`, `ChipTextarea` over `Textarea`, `ChipModal`/`ChipModalField` over `Modal`, `ChipSelect`/`ChipCombobox` (searchable) or `ChipDropdown` (simple menu-select) over `Select`/`Combobox`, `ChipSwitch` over `Switch`, `ChipDatePicker` over a raw date field, `Chip`/`ChipLink` for pill buttons/links, `ChipTag` for inline tags/badges. For context/action menus the canonical control is `DropdownMenu` (not a chip, but the standard menu — not a hand-rolled popover). Components OWN their chrome (single source of truth) — consumers pass props, not class overrides. Authoring rules in `.claude/rules/emcn-components.md`; consumer rules in `.claude/rules/sim-styling.md`. diff --git a/apps/docs/app/[lang]/not-found.tsx b/apps/docs/app/[lang]/not-found.tsx index af647ec4cf2..c0c60878855 100644 --- a/apps/docs/app/[lang]/not-found.tsx +++ b/apps/docs/app/[lang]/not-found.tsx @@ -1,5 +1,5 @@ +import { ChipLink } from '@sim/emcn' import { DocsPage } from 'fumadocs-ui/page' -import { ChipLink } from '@/components/ui/chip' export const metadata = { title: 'Page Not Found', diff --git a/apps/docs/app/global.css b/apps/docs/app/global.css index 2c24e2867eb..3ce55e3cf48 100644 --- a/apps/docs/app/global.css +++ b/apps/docs/app/global.css @@ -59,8 +59,14 @@ body { --text-icon: #525252; --text-inverse: #ffffff; --text-error: #ef4444; + --text-muted-inverse: #a0a0a0; --brand-accent: #33c482; --brand-accent-hover: #2dac72; + --brand-secondary: #33b4ff; + --surface-inverted: #1b1b1b; + --surface-inverted-hover: #363636; + --border-inverted: #363636; + --border-muted: #e4e4e4; --badge-success-bg: #bbf7d0; --badge-success-text: #15803d; --badge-blue-bg: #bfdbfe; @@ -102,8 +108,14 @@ body { --text-icon: #a0a0a0; --text-inverse: #1b1b1b; --text-error: #ef4444; + --text-muted-inverse: #b3b3b3; --brand-accent: #33c482; --brand-accent-hover: #2dac72; + --brand-secondary: #33b4ff; + --surface-inverted: #242424; + --surface-inverted-hover: #363636; + --border-inverted: #3d3d3d; + --border-muted: #424242; --badge-success-bg: rgba(34, 197, 94, 0.2); --badge-success-text: #86efac; --badge-blue-bg: rgba(59, 130, 246, 0.2); diff --git a/apps/docs/components/navbar/navbar.tsx b/apps/docs/components/navbar/navbar.tsx index 749742c0d6e..186210dd0db 100644 --- a/apps/docs/components/navbar/navbar.tsx +++ b/apps/docs/components/navbar/navbar.tsx @@ -1,8 +1,8 @@ 'use client' +import { ChipLink } from '@sim/emcn' import Link from 'next/link' import { usePathname } from 'next/navigation' -import { ChipLink } from '@/components/ui/chip' import { LanguageDropdown } from '@/components/ui/language-dropdown' import { SearchTrigger } from '@/components/ui/search-trigger' import { SimLogoFull } from '@/components/ui/sim-logo' diff --git a/apps/docs/components/page-actions.tsx b/apps/docs/components/page-actions.tsx index 60651d2a2c7..fe65e08e386 100644 --- a/apps/docs/components/page-actions.tsx +++ b/apps/docs/components/page-actions.tsx @@ -1,8 +1,8 @@ 'use client' +import { Chip } from '@sim/emcn' import { useCopyButton } from 'fumadocs-ui/utils/use-copy-button' import { Check, Copy } from 'lucide-react' -import { Chip } from '@/components/ui/chip' export function LLMCopyButton({ content }: { content: string }) { const [checked, onClick] = useCopyButton(() => navigator.clipboard.writeText(content)) diff --git a/apps/docs/components/ui/chip-dropdown.tsx b/apps/docs/components/ui/chip-dropdown.tsx deleted file mode 100644 index 68b9d161910..00000000000 --- a/apps/docs/components/ui/chip-dropdown.tsx +++ /dev/null @@ -1,140 +0,0 @@ -'use client' - -import { type ComponentType, forwardRef, type ReactNode } from 'react' -import { Check } from 'lucide-react' -import { ChipChevronDown, chipVariants, TRIGGER_BORDER_CLASS } from '@/components/ui/chip' -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from '@/components/ui/dropdown-menu' -import { cn } from '@/lib/utils' - -type ChipIcon = ComponentType<{ className?: string }> - -/** - * Single option rendered inside a {@link ChipDropdown}. - */ -interface ChipDropdownOption { - /** Stable identifier returned via `onChange`. */ - value: string - /** Visual label rendered both inside the trigger (when selected) and in the menu. */ - label: ReactNode - /** Optional leading icon rendered inside the menu item. */ - icon?: ChipIcon - /** Pre-rendered leading element (e.g. a flag) — takes precedence over `icon`. */ - iconElement?: ReactNode -} - -interface ChipDropdownProps { - /** Options to render in the menu. */ - options: ReadonlyArray - /** Currently selected value. */ - value?: string - /** Called when the user picks a different option from the menu. */ - onChange?: (value: string) => void - /** Shown in the trigger when nothing is selected. */ - placeholder?: string - /** Aligns the dropdown popover relative to the trigger. */ - align?: 'start' | 'center' | 'end' - /** - * Whether the menu width should match the trigger's. When `true` (default), - * the menu pins to `--radix-dropdown-menu-trigger-width`. Set `false` to let - * the menu size to its widest item. - */ - matchTriggerWidth?: boolean - /** Forwarded to the inner `DropdownMenuContent`. */ - contentClassName?: string - /** Disables the trigger. */ - disabled?: boolean - /** Optional icon rendered before the label. */ - leftIcon?: ChipIcon - /** Forwarded class for the trigger button — layout/sizing only. */ - className?: string -} - -/** - * Docs-local mirror of the emcn `ChipDropdown` - * (`apps/sim/components/emcn/components/chip-dropdown/chip-dropdown.tsx`) — a - * 30px filled chip pill that opens a menu of options. The trigger reuses - * `chipVariants` for visual parity with `Chip`; the chevron is owned by the - * component and rendered in a 16px slot so the label's trailing gap matches a - * leading icon's. - * - * @example - * - */ -const ChipDropdown = forwardRef(function ChipDropdown( - { - options, - value, - onChange, - placeholder, - align = 'end', - matchTriggerWidth = true, - contentClassName, - disabled, - leftIcon: LeftIcon, - className, - }, - ref -) { - const selected = options.find((option) => option.value === value) - const displayLabel = selected?.label ?? placeholder ?? 'Select...' - const isPlaceholder = selected == null - - return ( - - - - - - {options.map((option) => { - const isSelected = option.value === value - const OptionIcon = option.icon - return ( - onChange?.(option.value)}> - {option.iconElement ?? (OptionIcon ? : null)} - {option.label} - {isSelected ? : null} - - ) - })} - - - ) -}) - -export { ChipDropdown } -export type { ChipDropdownOption, ChipDropdownProps } diff --git a/apps/docs/components/ui/chip.tsx b/apps/docs/components/ui/chip.tsx deleted file mode 100644 index 6a51533df10..00000000000 --- a/apps/docs/components/ui/chip.tsx +++ /dev/null @@ -1,175 +0,0 @@ -'use client' - -import { - type AnchorHTMLAttributes, - type ButtonHTMLAttributes, - type ComponentType, - forwardRef, - type ReactNode, -} from 'react' -import { cva, type VariantProps } from 'class-variance-authority' -import Link, { type LinkProps } from 'next/link' -import { cn } from '@/lib/utils' - -/** - * Docs-local mirror of the platform chip chrome - * (`apps/sim/components/emcn/components/chip/chip-chrome.ts`). The docs app - * cannot import from `apps/sim`, so the canonical tokens are replicated here — - * keep them in sync with the emcn source. - */ -export const chipContentGap = 'gap-1.5' -/** Chip pill geometry — height, centering, gap, radius, padding, text size. */ -export const chipGeometryClass = `h-[30px] items-center ${chipContentGap} rounded-lg px-2 text-left text-sm` -/** Chip-content icon (non-inverse): 16px, non-shrinking, `--text-icon`. */ -export const chipContentIconClass = 'size-[16px] flex-shrink-0 text-[var(--text-icon)]' -/** Chip-content label (non-inverse): truncating `--text-body` at `text-sm`. */ -export const chipContentLabelClass = 'min-w-0 truncate text-[var(--text-body)] text-sm' -/** The filled FILL (surface only, no border) — `--surface-5` light / `--surface-4` dark. */ -export const chipFilledFillTokens = 'bg-[var(--surface-5)] dark:bg-[var(--surface-4)]' -/** The inverse/primary FILL — dark surface + inverse text in light, white + `--bg` text in dark. */ -const chipPrimaryFillTokens = - 'bg-[var(--text-primary)] text-[var(--text-inverse)] dark:bg-white dark:text-[var(--bg)]' -/** 1px `--border-1` border applied to chip triggers so they read as controls. */ -export const TRIGGER_BORDER_CLASS = 'border border-[var(--border-1)]' - -/** - * 30px pill — the platform's most common chrome pattern, mirrored for the docs. - * - * @remarks - * The implicit default variant is the bare pill — transparent, `--surface-active` - * on hover. `filled` adds the filled surface; `primary` is the canonical inverse - * CTA surface (dark in light mode, white in dark mode) used for the "Get started" - * link. - */ -const chipVariants = cva( - `group cursor-pointer font-season ${chipGeometryClass} transition-colors disabled:cursor-not-allowed disabled:opacity-60`, - { - variants: { - variant: { - default: 'hover:bg-[var(--surface-active)]', - filled: `${chipFilledFillTokens} hover:bg-[var(--surface-active)]`, - primary: `${chipPrimaryFillTokens} hover:bg-[var(--text-body)] dark:hover:bg-[var(--text-secondary)]`, - }, - fullWidth: { true: 'flex', false: 'inline-flex' }, - }, - defaultVariants: { variant: 'default', fullWidth: false }, - } -) - -type ChipIcon = ComponentType<{ className?: string }> - -type ChipVariant = VariantProps['variant'] - -interface ChipBaseProps extends VariantProps { - /** Icon component rendered before the label. */ - leftIcon?: ChipIcon - /** Icon component rendered after the label. */ - rightIcon?: ChipIcon - children?: ReactNode -} - -/** - * `primary` sets text color on the chip itself — its icon and label inherit via - * `currentColor`. The default and `filled` chips use explicit icon - * (`--text-icon`) and label (`--text-body`) colors. - */ -function ChipContent({ - variant, - leftIcon: LeftIcon, - rightIcon: RightIcon, - children, -}: ChipBaseProps) { - const isInverse = variant === 'primary' - const iconClass = cn(chipContentIconClass, isInverse && 'text-current') - const labelClass = cn(chipContentLabelClass, 'flex-1', isInverse && 'text-current') - return ( - <> - {LeftIcon ? : null} - {children != null && children !== false ? ( - {children} - ) : null} - {RightIcon ? : null} - - ) -} - -interface ChipProps - extends Omit, 'children'>, - ChipBaseProps {} - -/** - * @example Copy page - */ -const Chip = forwardRef(function Chip( - { className, variant, fullWidth, leftIcon, rightIcon, children, type, ...props }, - ref -) { - return ( - - ) -}) - -interface ChipLinkProps - extends Omit, - Omit, keyof LinkProps | 'children'>, - ChipBaseProps {} - -/** - * @example Get started - */ -const ChipLink = forwardRef(function ChipLink( - { className, variant, fullWidth, leftIcon, rightIcon, children, ...props }, - ref -) { - return ( - - - {children} - - - ) -}) - -interface ChipChevronDownProps { - /** Layout-only extras (e.g. `ml-auto` to push the chevron flush right). Never chrome. */ - className?: string -} - -/** - * Canonical trailing chevron adornment for chip-style dropdown triggers — a - * 16px hidden-from-AT slot centering the 10×6 chevron glyph in `--text-icon`, - * matching the chevron `ChipDropdown` owns in the main app. - */ -export function ChipChevronDown({ className }: ChipChevronDownProps) { - return ( - - - - - - ) -} - -export { Chip, ChipLink, chipVariants } -export type { ChipLinkProps, ChipProps, ChipVariant } diff --git a/apps/docs/components/ui/dropdown-menu.tsx b/apps/docs/components/ui/dropdown-menu.tsx deleted file mode 100644 index 01d3312ef37..00000000000 --- a/apps/docs/components/ui/dropdown-menu.tsx +++ /dev/null @@ -1,61 +0,0 @@ -'use client' - -import type { ComponentPropsWithRef } from 'react' -import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu' -import { cn } from '@/lib/utils' - -const ANIMATION_CLASSES = - '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 data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none' - -/** - * Menu surface mirrored from the emcn `DropdownMenu` - * (`apps/sim/components/emcn/components/dropdown-menu/dropdown-menu.tsx`) — - * `--bg` surface, `--border` outline, `rounded-xl`, `p-1.5`. - */ -const CONTENT_BASE_CLASSES = - 'z-50 max-h-[240px] min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-y-auto overflow-x-hidden overscroll-none border border-[var(--border)] bg-[var(--bg)] p-1.5 font-season text-[var(--text-body)] shadow-sm' - -const DropdownMenu = DropdownMenuPrimitive.Root -const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger - -function DropdownMenuContent({ - className, - sideOffset = 6, - ref, - ...props -}: ComponentPropsWithRef) { - return ( - - - - ) -} - -function DropdownMenuItem({ - className, - ref, - ...props -}: ComponentPropsWithRef) { - return ( - span]:min-w-0 [&>span]:truncate [&_svg]:pointer-events-none [&_svg]:size-[14px] [&_svg]:shrink-0 [&_svg]:text-[var(--text-icon)]', - className - )} - {...props} - /> - ) -} - -export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } diff --git a/apps/docs/components/ui/language-dropdown.tsx b/apps/docs/components/ui/language-dropdown.tsx index 7d3319e2ff0..fab29829f7c 100644 --- a/apps/docs/components/ui/language-dropdown.tsx +++ b/apps/docs/components/ui/language-dropdown.tsx @@ -1,7 +1,7 @@ 'use client' +import { ChipDropdown } from '@sim/emcn' import { useParams, usePathname, useRouter } from 'next/navigation' -import { ChipDropdown } from '@/components/ui/chip-dropdown' const languages = { en: { name: 'English', flag: '🇺🇸' }, diff --git a/apps/docs/components/ui/search-trigger.tsx b/apps/docs/components/ui/search-trigger.tsx index 33a29133212..7e222fac26b 100644 --- a/apps/docs/components/ui/search-trigger.tsx +++ b/apps/docs/components/ui/search-trigger.tsx @@ -1,12 +1,12 @@ 'use client' -import { Search } from 'lucide-react' import { chipContentIconClass, chipFilledFillTokens, chipGeometryClass, TRIGGER_BORDER_CLASS, -} from '@/components/ui/chip' +} from '@sim/emcn' +import { Search } from 'lucide-react' import { cn } from '@/lib/utils' export function SearchTrigger() { diff --git a/apps/docs/next.config.ts b/apps/docs/next.config.ts index 5c91879d91f..1993869f285 100644 --- a/apps/docs/next.config.ts +++ b/apps/docs/next.config.ts @@ -5,6 +5,7 @@ const withMDX = createMDX() const config: NextConfig = { reactStrictMode: true, + transpilePackages: ['@sim/emcn'], images: { unoptimized: true, }, diff --git a/apps/docs/package.json b/apps/docs/package.json index 9a575cd7105..e1bf0b4ebb6 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -18,6 +18,7 @@ "@ai-sdk/openai": "2.0.107", "@ai-sdk/react": "2.0.205", "@sim/db": "workspace:*", + "@sim/emcn": "workspace:*", "@vercel/og": "^0.6.5", "ai": "5.0.203", "class-variance-authority": "^0.7.1", diff --git a/apps/sim/app/(auth)/components/auth-background.tsx b/apps/sim/app/(auth)/components/auth-background.tsx index dc284dbd66e..fedca77f536 100644 --- a/apps/sim/app/(auth)/components/auth-background.tsx +++ b/apps/sim/app/(auth)/components/auth-background.tsx @@ -1,4 +1,4 @@ -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' import AuthBackgroundSVG from '@/app/(auth)/components/auth-background-svg' type AuthBackgroundProps = { diff --git a/apps/sim/app/(auth)/components/social-login-buttons.tsx b/apps/sim/app/(auth)/components/social-login-buttons.tsx index ed46b9413aa..feaf4889940 100644 --- a/apps/sim/app/(auth)/components/social-login-buttons.tsx +++ b/apps/sim/app/(auth)/components/social-login-buttons.tsx @@ -1,7 +1,7 @@ 'use client' import { type ReactNode, useState } from 'react' -import { Button } from '@/components/emcn' +import { Button } from '@sim/emcn' import { GithubIcon, GoogleIcon, MicrosoftIcon } from '@/components/icons' import { client } from '@/lib/auth/auth-client' diff --git a/apps/sim/app/(auth)/components/sso-login-button.tsx b/apps/sim/app/(auth)/components/sso-login-button.tsx index d3f50852e91..851fd1bf993 100644 --- a/apps/sim/app/(auth)/components/sso-login-button.tsx +++ b/apps/sim/app/(auth)/components/sso-login-button.tsx @@ -1,9 +1,7 @@ 'use client' - +import { Button, cn } from '@sim/emcn' import { useRouter } from 'next/navigation' -import { Button } from '@/components/emcn' import { getEnv, isTruthy } from '@/lib/core/config/env' -import { cn } from '@/lib/core/utils/cn' import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes' interface SSOLoginButtonProps { diff --git a/apps/sim/app/(auth)/login/loading.tsx b/apps/sim/app/(auth)/login/loading.tsx index c21272e110d..74f7bece6c9 100644 --- a/apps/sim/app/(auth)/login/loading.tsx +++ b/apps/sim/app/(auth)/login/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function LoginLoading() { return ( diff --git a/apps/sim/app/(auth)/login/login-form.tsx b/apps/sim/app/(auth)/login/login-form.tsx index de314167c7e..8f102308bc0 100644 --- a/apps/sim/app/(auth)/login/login-form.tsx +++ b/apps/sim/app/(auth)/login/login-form.tsx @@ -1,11 +1,6 @@ 'use client' import { useEffect, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' -import { Eye, EyeOff } from 'lucide-react' -import Link from 'next/link' -import { useRouter, useSearchParams } from 'next/navigation' import { ChipModal, ChipModalBody, @@ -13,16 +8,21 @@ import { ChipModalField, ChipModalFooter, ChipModalHeader, + cn, Input, Label, Loader, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { Eye, EyeOff } from 'lucide-react' +import Link from 'next/link' +import { useRouter, useSearchParams } from 'next/navigation' import { requestJson } from '@/lib/api/client/request' import { forgetPasswordContract } from '@/lib/api/contracts' import { client } from '@/lib/auth/auth-client' import { getEnv, isFalsy, isTruthy } from '@/lib/core/config/env' import { validateCallbackUrl } from '@/lib/core/security/input-validation' -import { cn } from '@/lib/core/utils/cn' import { getBaseUrl } from '@/lib/core/utils/urls' import { quickValidateEmail } from '@/lib/messaging/email/validation' import { captureClientEvent } from '@/lib/posthog/client' diff --git a/apps/sim/app/(auth)/reset-password/loading.tsx b/apps/sim/app/(auth)/reset-password/loading.tsx index 02a11005e1b..d1910ac0425 100644 --- a/apps/sim/app/(auth)/reset-password/loading.tsx +++ b/apps/sim/app/(auth)/reset-password/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function ResetPasswordLoading() { return ( diff --git a/apps/sim/app/(auth)/reset-password/reset-password-form.tsx b/apps/sim/app/(auth)/reset-password/reset-password-form.tsx index f1627b8397d..301a804d849 100644 --- a/apps/sim/app/(auth)/reset-password/reset-password-form.tsx +++ b/apps/sim/app/(auth)/reset-password/reset-password-form.tsx @@ -1,9 +1,8 @@ 'use client' import { useState } from 'react' +import { cn, Input, Label, Loader } from '@sim/emcn' import { Eye, EyeOff } from 'lucide-react' -import { Input, Label, Loader } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes' interface RequestResetFormProps { diff --git a/apps/sim/app/(auth)/signup/loading.tsx b/apps/sim/app/(auth)/signup/loading.tsx index 21e15d9f713..c1190c8385e 100644 --- a/apps/sim/app/(auth)/signup/loading.tsx +++ b/apps/sim/app/(auth)/signup/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function SignupLoading() { return ( diff --git a/apps/sim/app/(auth)/signup/signup-form.tsx b/apps/sim/app/(auth)/signup/signup-form.tsx index ae73e36cb5a..62be1b98958 100644 --- a/apps/sim/app/(auth)/signup/signup-form.tsx +++ b/apps/sim/app/(auth)/signup/signup-form.tsx @@ -2,16 +2,15 @@ import { Suspense, useEffect, useMemo, useRef, useState } from 'react' import { Turnstile, type TurnstileInstance } from '@marsidev/react-turnstile' +import { cn, Input, Label, Loader } from '@sim/emcn' import { createLogger } from '@sim/logger' import { Eye, EyeOff } from 'lucide-react' import Link from 'next/link' import { useRouter, useSearchParams } from 'next/navigation' import { usePostHog } from 'posthog-js/react' -import { Input, Label, Loader } from '@/components/emcn' import { client, useSession } from '@/lib/auth/auth-client' import { getEnv, isFalsy, isTruthy } from '@/lib/core/config/env' import { validateCallbackUrl } from '@/lib/core/security/input-validation' -import { cn } from '@/lib/core/utils/cn' import { quickValidateEmail } from '@/lib/messaging/email/validation' import { captureClientEvent, captureEvent } from '@/lib/posthog/client' import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes' diff --git a/apps/sim/app/(auth)/sso/loading.tsx b/apps/sim/app/(auth)/sso/loading.tsx index 76209c2f50e..116e47c136b 100644 --- a/apps/sim/app/(auth)/sso/loading.tsx +++ b/apps/sim/app/(auth)/sso/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function SSOLoading() { return ( diff --git a/apps/sim/app/(auth)/verify/loading.tsx b/apps/sim/app/(auth)/verify/loading.tsx index 7460e3295a9..d884048905a 100644 --- a/apps/sim/app/(auth)/verify/loading.tsx +++ b/apps/sim/app/(auth)/verify/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function VerifyLoading() { return ( diff --git a/apps/sim/app/(auth)/verify/verify-content.tsx b/apps/sim/app/(auth)/verify/verify-content.tsx index 284af360a11..11e68bbf32a 100644 --- a/apps/sim/app/(auth)/verify/verify-content.tsx +++ b/apps/sim/app/(auth)/verify/verify-content.tsx @@ -1,9 +1,8 @@ 'use client' import { Suspense, useEffect, useState } from 'react' +import { cn, InputOTP, InputOTPGroup, InputOTPSlot, Loader } from '@sim/emcn' import { useRouter } from 'next/navigation' -import { InputOTP, InputOTPGroup, InputOTPSlot, Loader } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes' import { useVerification } from '@/app/(auth)/verify/use-verification' diff --git a/apps/sim/app/(landing)/blog/[slug]/loading.tsx b/apps/sim/app/(landing)/blog/[slug]/loading.tsx index b8bfdcdbc4d..a9dffd0957e 100644 --- a/apps/sim/app/(landing)/blog/[slug]/loading.tsx +++ b/apps/sim/app/(landing)/blog/[slug]/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function BlogPostLoading() { return ( diff --git a/apps/sim/app/(landing)/blog/[slug]/page.tsx b/apps/sim/app/(landing)/blog/[slug]/page.tsx index cce6ee8dfb4..750bbed5126 100644 --- a/apps/sim/app/(landing)/blog/[slug]/page.tsx +++ b/apps/sim/app/(landing)/blog/[slug]/page.tsx @@ -1,7 +1,7 @@ +import { Avatar, AvatarFallback, AvatarImage } from '@sim/emcn' import type { Metadata } from 'next' import Image from 'next/image' import Link from 'next/link' -import { Avatar, AvatarFallback, AvatarImage } from '@/components/emcn' import { FAQ } from '@/lib/blog/faq' import { getAllPostMeta, getPostBySlug, getRelatedPosts } from '@/lib/blog/registry' import { buildPostGraphJsonLd, buildPostMetadata } from '@/lib/blog/seo' diff --git a/apps/sim/app/(landing)/blog/[slug]/share-button.tsx b/apps/sim/app/(landing)/blog/[slug]/share-button.tsx index 679c6f44c6e..8372db5a55c 100644 --- a/apps/sim/app/(landing)/blog/[slug]/share-button.tsx +++ b/apps/sim/app/(landing)/blog/[slug]/share-button.tsx @@ -1,14 +1,9 @@ 'use client' import { useState } from 'react' +import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@sim/emcn' +import { Duplicate } from '@sim/emcn/icons' import { Share2 } from 'lucide-react' -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from '@/components/emcn' -import { Duplicate } from '@/components/emcn/icons' import { LinkedInIcon, xIcon as XIcon } from '@/components/icons' interface ShareButtonProps { diff --git a/apps/sim/app/(landing)/blog/authors/[id]/loading.tsx b/apps/sim/app/(landing)/blog/authors/[id]/loading.tsx index e3bbc060f9d..a1da67b964e 100644 --- a/apps/sim/app/(landing)/blog/authors/[id]/loading.tsx +++ b/apps/sim/app/(landing)/blog/authors/[id]/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' const SKELETON_POST_COUNT = 4 diff --git a/apps/sim/app/(landing)/blog/components/blog-image.tsx b/apps/sim/app/(landing)/blog/components/blog-image.tsx index 84be2e6b2f5..bbb41e22cc4 100644 --- a/apps/sim/app/(landing)/blog/components/blog-image.tsx +++ b/apps/sim/app/(landing)/blog/components/blog-image.tsx @@ -1,8 +1,8 @@ 'use client' import { useState } from 'react' +import { cn } from '@sim/emcn' import NextImage from 'next/image' -import { cn } from '@/lib/core/utils/cn' import { Lightbox } from '@/app/(landing)/blog/components/lightbox' interface BlogImageProps { diff --git a/apps/sim/app/(landing)/blog/loading.tsx b/apps/sim/app/(landing)/blog/loading.tsx index 616fa609709..d7a7e4a2f3a 100644 --- a/apps/sim/app/(landing)/blog/loading.tsx +++ b/apps/sim/app/(landing)/blog/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function BlogLoading() { return ( diff --git a/apps/sim/app/(landing)/blog/page.tsx b/apps/sim/app/(landing)/blog/page.tsx index 417fc0b276b..56e40341ee8 100644 --- a/apps/sim/app/(landing)/blog/page.tsx +++ b/apps/sim/app/(landing)/blog/page.tsx @@ -1,7 +1,7 @@ +import { Badge } from '@sim/emcn' import type { Metadata } from 'next' import Image from 'next/image' import Link from 'next/link' -import { Badge } from '@/components/emcn' import { getAllPostMeta } from '@/lib/blog/registry' import { buildCollectionPageJsonLd } from '@/lib/blog/seo' import { SITE_URL } from '@/lib/core/utils/urls' diff --git a/apps/sim/app/(landing)/blog/tags/loading.tsx b/apps/sim/app/(landing)/blog/tags/loading.tsx index 9d47cdc8062..358a577dceb 100644 --- a/apps/sim/app/(landing)/blog/tags/loading.tsx +++ b/apps/sim/app/(landing)/blog/tags/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' const SKELETON_TAG_COUNT = 12 diff --git a/apps/sim/app/(landing)/components/auth-modal/auth-modal.tsx b/apps/sim/app/(landing)/components/auth-modal/auth-modal.tsx index d0a1a985ac0..501b40cd408 100644 --- a/apps/sim/app/(landing)/components/auth-modal/auth-modal.tsx +++ b/apps/sim/app/(landing)/components/auth-modal/auth-modal.tsx @@ -1,10 +1,6 @@ 'use client' import { useEffect, useMemo, useState } from 'react' -import { createLogger } from '@sim/logger' -import { X } from 'lucide-react' -import Image from 'next/image' -import { useRouter } from 'next/navigation' import { Loader, Modal, @@ -13,7 +9,11 @@ import { ModalDescription, ModalTitle, ModalTrigger, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { X } from 'lucide-react' +import Image from 'next/image' +import { useRouter } from 'next/navigation' import { GithubIcon, GoogleIcon, MicrosoftIcon } from '@/components/icons' import { requestJson } from '@/lib/api/client/request' import { type AuthProviderStatusResponse, getAuthProvidersContract } from '@/lib/api/contracts/auth' diff --git a/apps/sim/app/(landing)/components/collaboration/collaboration.tsx b/apps/sim/app/(landing)/components/collaboration/collaboration.tsx index 2667c14a3df..52ee20bcc56 100644 --- a/apps/sim/app/(landing)/components/collaboration/collaboration.tsx +++ b/apps/sim/app/(landing)/components/collaboration/collaboration.tsx @@ -1,10 +1,10 @@ 'use client' import { useCallback, useId, useRef, useState } from 'react' +import { Badge } from '@sim/emcn' import dynamic from 'next/dynamic' import Image from 'next/image' import Link from 'next/link' -import { Badge } from '@/components/emcn' import { trackLandingCta } from '@/app/(landing)/landing-analytics' const AuthModal = dynamic( diff --git a/apps/sim/app/(landing)/components/contact/contact-form.tsx b/apps/sim/app/(landing)/components/contact/contact-form.tsx index b866b9e42cd..4f351884fd0 100644 --- a/apps/sim/app/(landing)/components/contact/contact-form.tsx +++ b/apps/sim/app/(landing)/components/contact/contact-form.tsx @@ -2,11 +2,11 @@ import { useRef, useState } from 'react' import { Turnstile, type TurnstileInstance } from '@marsidev/react-turnstile' +import { Combobox, Input, Textarea } from '@sim/emcn' +import { Check } from '@sim/emcn/icons' import { toError } from '@sim/utils/errors' import { useMutation } from '@tanstack/react-query' import Link from 'next/link' -import { Combobox, Input, Textarea } from '@/components/emcn' -import { Check } from '@/components/emcn/icons' import { requestJson } from '@/lib/api/client/request' import { CONTACT_TOPIC_OPTIONS, diff --git a/apps/sim/app/(landing)/components/demo-request/demo-request-modal.tsx b/apps/sim/app/(landing)/components/demo-request/demo-request-modal.tsx index 755f5eb9911..cacef962fd7 100644 --- a/apps/sim/app/(landing)/components/demo-request/demo-request-modal.tsx +++ b/apps/sim/app/(landing)/components/demo-request/demo-request-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { useState } from 'react' -import { getErrorMessage } from '@sim/utils/errors' -import { useMutation } from '@tanstack/react-query' import { ChipCombobox, ChipInput, @@ -14,8 +12,10 @@ import { ModalFooter, ModalHeader, ModalTrigger, -} from '@/components/emcn' -import { Check } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Check } from '@sim/emcn/icons' +import { getErrorMessage } from '@sim/utils/errors' +import { useMutation } from '@tanstack/react-query' import { requestJson } from '@/lib/api/client/request' import { DEMO_REQUEST_COMPANY_SIZE_OPTIONS, diff --git a/apps/sim/app/(landing)/components/features/components/features-preview.tsx b/apps/sim/app/(landing)/components/features/components/features-preview.tsx index 1db87f478e2..a1a5af32264 100644 --- a/apps/sim/app/(landing)/components/features/components/features-preview.tsx +++ b/apps/sim/app/(landing)/components/features/components/features-preview.tsx @@ -4,8 +4,8 @@ import { type SVGProps, useEffect, useRef, useState } from 'react' import { AnimatePresence, domAnimation, LazyMotion, m, useInView } from 'framer-motion' import { Streamdown } from 'streamdown' import 'streamdown/styles.css' -import { ChevronDown } from '@/components/emcn' -import { Database, File, Library, Table, Workflow } from '@/components/emcn/icons' +import { ChevronDown, cn } from '@sim/emcn' +import { Database, File, Library, Table, Workflow } from '@sim/emcn/icons' import { AnthropicIcon, GeminiIcon, @@ -17,7 +17,6 @@ import { SlackIcon, xAIIcon, } from '@/components/icons' -import { cn } from '@/lib/core/utils/cn' interface FeaturesPreviewProps { activeTab: number diff --git a/apps/sim/app/(landing)/components/features/features.tsx b/apps/sim/app/(landing)/components/features/features.tsx index abca2c74d9f..350d868d262 100644 --- a/apps/sim/app/(landing)/components/features/features.tsx +++ b/apps/sim/app/(landing)/components/features/features.tsx @@ -1,6 +1,7 @@ 'use client' import { useRef, useState } from 'react' +import { Badge } from '@sim/emcn' import { domAnimation, LazyMotion, @@ -11,7 +12,6 @@ import { } from 'framer-motion' import dynamic from 'next/dynamic' import Image from 'next/image' -import { Badge } from '@/components/emcn' import { FeaturesPreview } from '@/app/(landing)/components/features/components/features-preview' import { trackLandingCta } from '@/app/(landing)/landing-analytics' diff --git a/apps/sim/app/(landing)/components/footer/footer-cta.tsx b/apps/sim/app/(landing)/components/footer/footer-cta.tsx index 31355a75f35..c28b76ade4c 100644 --- a/apps/sim/app/(landing)/components/footer/footer-cta.tsx +++ b/apps/sim/app/(landing)/components/footer/footer-cta.tsx @@ -1,10 +1,9 @@ 'use client' import { useCallback, useRef, useState } from 'react' +import { cn, handleKeyboardActivation } from '@sim/emcn' import { ArrowUp } from 'lucide-react' import dynamic from 'next/dynamic' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { captureClientEvent } from '@/lib/posthog/client' import { useLandingSubmit } from '@/app/(landing)/components/landing-preview/components/landing-preview-panel/landing-preview-panel' import { trackLandingCta } from '@/app/(landing)/landing-analytics' diff --git a/apps/sim/app/(landing)/components/footer/footer.tsx b/apps/sim/app/(landing)/components/footer/footer.tsx index 9e06300511c..723d9456a00 100644 --- a/apps/sim/app/(landing)/components/footer/footer.tsx +++ b/apps/sim/app/(landing)/components/footer/footer.tsx @@ -1,6 +1,6 @@ +import { cn } from '@sim/emcn' import Image from 'next/image' import Link from 'next/link' -import { cn } from '@/lib/core/utils/cn' import { FooterCTA } from '@/app/(landing)/components/footer/footer-cta' const LINK_CLASS = diff --git a/apps/sim/app/(landing)/components/hero/hero.tsx b/apps/sim/app/(landing)/components/hero/hero.tsx index 512630ecb1a..193795a4d2c 100644 --- a/apps/sim/app/(landing)/components/hero/hero.tsx +++ b/apps/sim/app/(landing)/components/hero/hero.tsx @@ -1,7 +1,7 @@ 'use client' +import { cn } from '@sim/emcn' import dynamic from 'next/dynamic' -import { cn } from '@/lib/core/utils/cn' import { trackLandingCta } from '@/app/(landing)/landing-analytics' const AuthModal = dynamic( diff --git a/apps/sim/app/(landing)/components/landing-faq.tsx b/apps/sim/app/(landing)/components/landing-faq.tsx index 3cebc334081..bd8afbafecd 100644 --- a/apps/sim/app/(landing)/components/landing-faq.tsx +++ b/apps/sim/app/(landing)/components/landing-faq.tsx @@ -1,9 +1,8 @@ 'use client' import { useId, useState } from 'react' +import { ChevronDown, cn } from '@sim/emcn' import { domAnimation, LazyMotion, m } from 'framer-motion' -import { ChevronDown } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' interface LandingFAQItem { question: string diff --git a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-files/landing-preview-files.tsx b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-files/landing-preview-files.tsx index 8d3ecc0a309..e481772ac5f 100644 --- a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-files/landing-preview-files.tsx +++ b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-files/landing-preview-files.tsx @@ -1,4 +1,4 @@ -import { File } from '@/components/emcn/icons' +import { File } from '@sim/emcn/icons' import { DocxIcon, PdfIcon } from '@/components/icons/document-icons' import type { PreviewColumn, diff --git a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-home/landing-preview-home.tsx b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-home/landing-preview-home.tsx index 249ddaea85f..bc46cc13e33 100644 --- a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-home/landing-preview-home.tsx +++ b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-home/landing-preview-home.tsx @@ -1,10 +1,10 @@ 'use client' import { memo, useCallback, useEffect, useRef, useState } from 'react' +import { Blimp, Checkbox, ChevronDown } from '@sim/emcn' +import { TypeBoolean, TypeNumber, TypeText } from '@sim/emcn/icons' import { AnimatePresence, domAnimation, LazyMotion, m } from 'framer-motion' import { ArrowUp, Table } from 'lucide-react' -import { Blimp, Checkbox, ChevronDown } from '@/components/emcn' -import { TypeBoolean, TypeNumber, TypeText } from '@/components/emcn/icons' import { captureClientEvent } from '@/lib/posthog/client' import { useLandingSubmit } from '@/app/(landing)/components/landing-preview/components/landing-preview-panel/landing-preview-panel' import { EASE_OUT } from '@/app/(landing)/components/landing-preview/components/landing-preview-workflow/workflow-data' diff --git a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-knowledge/landing-preview-knowledge.tsx b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-knowledge/landing-preview-knowledge.tsx index 8bfa219ec41..64d18fdfb71 100644 --- a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-knowledge/landing-preview-knowledge.tsx +++ b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-knowledge/landing-preview-knowledge.tsx @@ -1,4 +1,4 @@ -import { Database } from '@/components/emcn/icons' +import { Database } from '@sim/emcn/icons' import { AirtableIcon, AsanaIcon, diff --git a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-logs/landing-preview-logs.tsx b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-logs/landing-preview-logs.tsx index b20c7fba7b3..99cace4497c 100644 --- a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-logs/landing-preview-logs.tsx +++ b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-logs/landing-preview-logs.tsx @@ -1,10 +1,9 @@ 'use client' import { useMemo, useState } from 'react' -import { ArrowUpDown, Badge, Library, ListFilter, Search } from '@/components/emcn' -import type { BadgeProps } from '@/components/emcn/components/badge/badge' -import { Download, Workflow } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +import type { BadgeProps } from '@sim/emcn' +import { ArrowUpDown, Badge, cn, Library, ListFilter, Search } from '@sim/emcn' +import { Download, Workflow } from '@sim/emcn/icons' interface LogRow { id: string diff --git a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-panel/landing-preview-panel.tsx b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-panel/landing-preview-panel.tsx index b421f05fcb4..fa744b9bde7 100644 --- a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-panel/landing-preview-panel.tsx +++ b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-panel/landing-preview-panel.tsx @@ -1,12 +1,12 @@ 'use client' import { memo, useCallback, useEffect, useRef, useState } from 'react' +import { Blimp, BubbleChatPreview, ChevronDown, MoreHorizontal, Play } from '@sim/emcn' import { AnimatePresence, domMax, LazyMotion, m } from 'framer-motion' import { ArrowUp } from 'lucide-react' import dynamic from 'next/dynamic' import { useRouter } from 'next/navigation' import { createPortal } from 'react-dom' -import { Blimp, BubbleChatPreview, ChevronDown, MoreHorizontal, Play } from '@/components/emcn' import { AgentIcon, HubspotIcon, OpenAIIcon, SalesforceIcon } from '@/components/icons' import { LandingPromptStorage } from '@/lib/core/utils/browser-storage' import { captureClientEvent } from '@/lib/posthog/client' diff --git a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-resource/landing-preview-resource.tsx b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-resource/landing-preview-resource.tsx index 4ed7728f3ab..a726f053298 100644 --- a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-resource/landing-preview-resource.tsx +++ b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-resource/landing-preview-resource.tsx @@ -2,8 +2,7 @@ import type { ReactNode } from 'react' import { useMemo, useState } from 'react' -import { ArrowUpDown, ListFilter, Plus, Search } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +import { ArrowUpDown, cn, ListFilter, Plus, Search } from '@sim/emcn' export interface PreviewColumn { id: string diff --git a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-scheduled-tasks/landing-preview-scheduled-tasks.tsx b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-scheduled-tasks/landing-preview-scheduled-tasks.tsx index 0519cc8b7c4..c512f3985bc 100644 --- a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-scheduled-tasks/landing-preview-scheduled-tasks.tsx +++ b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-scheduled-tasks/landing-preview-scheduled-tasks.tsx @@ -1,4 +1,4 @@ -import { Calendar } from '@/components/emcn/icons' +import { Calendar } from '@sim/emcn/icons' import type { PreviewColumn, PreviewRow, diff --git a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-sidebar/landing-preview-sidebar.tsx b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-sidebar/landing-preview-sidebar.tsx index 85f12f9bd00..5cd946007a1 100644 --- a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-sidebar/landing-preview-sidebar.tsx +++ b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-sidebar/landing-preview-sidebar.tsx @@ -1,6 +1,5 @@ 'use client' - -import { ChevronDown, Home, Library } from '@/components/emcn' +import { ChevronDown, cn, Home, Library } from '@sim/emcn' import { Calendar, Database, @@ -10,8 +9,7 @@ import { Settings, Table, Workflow, -} from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn/icons' import type { PreviewWorkflow } from '@/app/(landing)/components/landing-preview/components/landing-preview-workflow/workflow-data' export type SidebarView = diff --git a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-tables/landing-preview-tables.tsx b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-tables/landing-preview-tables.tsx index 4d9c5bcef30..7e7fa86e727 100644 --- a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-tables/landing-preview-tables.tsx +++ b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-tables/landing-preview-tables.tsx @@ -1,8 +1,7 @@ 'use client' import { useEffect, useState } from 'react' -import { AnimatePresence, domAnimation, LazyMotion, m } from 'framer-motion' -import { Checkbox } from '@/components/emcn' +import { Checkbox, cn } from '@sim/emcn' import { ChevronDown, Columns3, @@ -11,8 +10,8 @@ import { TypeBoolean, TypeNumber, TypeText, -} from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn/icons' +import { AnimatePresence, domAnimation, LazyMotion, m } from 'framer-motion' import type { PreviewColumn, PreviewRow, diff --git a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-workflow/preview-block-node.tsx b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-workflow/preview-block-node.tsx index 0e2af73d5da..0c9d9612bde 100644 --- a/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-workflow/preview-block-node.tsx +++ b/apps/sim/app/(landing)/components/landing-preview/components/landing-preview-workflow/preview-block-node.tsx @@ -1,10 +1,10 @@ 'use client' import { memo } from 'react' +import { Blimp } from '@sim/emcn' import { domAnimation, LazyMotion, m } from 'framer-motion' import { Database } from 'lucide-react' import { Handle, type NodeProps, Position } from 'reactflow' -import { Blimp } from '@/components/emcn' import { AgentIcon, AnthropicIcon, diff --git a/apps/sim/app/(landing)/components/navbar/components/blog-dropdown.tsx b/apps/sim/app/(landing)/components/navbar/components/blog-dropdown.tsx index dca4a4c131f..cb45223479e 100644 --- a/apps/sim/app/(landing)/components/navbar/components/blog-dropdown.tsx +++ b/apps/sim/app/(landing)/components/navbar/components/blog-dropdown.tsx @@ -1,6 +1,6 @@ +import { cn } from '@sim/emcn' import Image from 'next/image' import Link from 'next/link' -import { cn } from '@/lib/core/utils/cn' export interface NavBlogPost { slug: string diff --git a/apps/sim/app/(landing)/components/navbar/navbar.tsx b/apps/sim/app/(landing)/components/navbar/navbar.tsx index aade5db8c8d..c5d76a2e0d2 100644 --- a/apps/sim/app/(landing)/components/navbar/navbar.tsx +++ b/apps/sim/app/(landing)/components/navbar/navbar.tsx @@ -1,11 +1,11 @@ 'use client' import { useCallback, useContext, useEffect, useRef, useState, useSyncExternalStore } from 'react' +import { cn } from '@sim/emcn' import dynamic from 'next/dynamic' import Image from 'next/image' import Link from 'next/link' import { GithubOutlineIcon } from '@/components/icons' -import { cn } from '@/lib/core/utils/cn' import { SessionContext } from '@/app/_shell/providers/session-provider' import { BlogDropdown, diff --git a/apps/sim/app/(landing)/components/pricing/pricing.tsx b/apps/sim/app/(landing)/components/pricing/pricing.tsx index b3d417ffba0..ebd906bcfaf 100644 --- a/apps/sim/app/(landing)/components/pricing/pricing.tsx +++ b/apps/sim/app/(landing)/components/pricing/pricing.tsx @@ -1,7 +1,7 @@ 'use client' +import { Badge } from '@sim/emcn' import dynamic from 'next/dynamic' -import { Badge } from '@/components/emcn' import { trackLandingCta } from '@/app/(landing)/landing-analytics' const AuthModal = dynamic( diff --git a/apps/sim/app/(landing)/components/templates/templates.tsx b/apps/sim/app/(landing)/components/templates/templates.tsx index d8acf137c94..33ffccfb3e4 100644 --- a/apps/sim/app/(landing)/components/templates/templates.tsx +++ b/apps/sim/app/(landing)/components/templates/templates.tsx @@ -1,13 +1,12 @@ 'use client' import { useCallback, useEffect, useState } from 'react' +import { Badge, ChevronDown, cn } from '@sim/emcn' import { createLogger } from '@sim/logger' import { AnimatePresence, domAnimation, LazyMotion, m } from 'framer-motion' import dynamic from 'next/dynamic' import { useRouter } from 'next/navigation' -import { Badge, ChevronDown } from '@/components/emcn' import { LandingWorkflowSeedStorage } from '@/lib/core/utils/browser-storage' -import { cn } from '@/lib/core/utils/cn' import { TEMPLATE_WORKFLOWS } from '@/app/(landing)/components/templates/template-workflows' import { trackLandingCta } from '@/app/(landing)/landing-analytics' diff --git a/apps/sim/app/(landing)/integrations/(shell)/[slug]/components/template-card-button.tsx b/apps/sim/app/(landing)/integrations/(shell)/[slug]/components/template-card-button.tsx index b7d8dc85593..ee562d80d4b 100644 --- a/apps/sim/app/(landing)/integrations/(shell)/[slug]/components/template-card-button.tsx +++ b/apps/sim/app/(landing)/integrations/(shell)/[slug]/components/template-card-button.tsx @@ -1,8 +1,8 @@ 'use client' +import { cn } from '@sim/emcn' import { useRouter } from 'next/navigation' import { LandingPromptStorage } from '@/lib/core/utils/browser-storage' -import { cn } from '@/lib/core/utils/cn' import { trackLandingCta } from '@/app/(landing)/landing-analytics' interface TemplateCardButtonProps { diff --git a/apps/sim/app/(landing)/integrations/(shell)/[slug]/loading.tsx b/apps/sim/app/(landing)/integrations/(shell)/[slug]/loading.tsx index f2c2fb44d6e..79d9305ca4c 100644 --- a/apps/sim/app/(landing)/integrations/(shell)/[slug]/loading.tsx +++ b/apps/sim/app/(landing)/integrations/(shell)/[slug]/loading.tsx @@ -1,4 +1,4 @@ -import { Loader } from '@/components/emcn' +import { Loader } from '@sim/emcn' export default function IntegrationDetailLoading() { return ( diff --git a/apps/sim/app/(landing)/integrations/(shell)/page.tsx b/apps/sim/app/(landing)/integrations/(shell)/page.tsx index b311e3f315f..7a6df9f5e4e 100644 --- a/apps/sim/app/(landing)/integrations/(shell)/page.tsx +++ b/apps/sim/app/(landing)/integrations/(shell)/page.tsx @@ -1,5 +1,5 @@ +import { Badge } from '@sim/emcn' import type { Metadata } from 'next' -import { Badge } from '@/components/emcn' import { SITE_URL } from '@/lib/core/utils/urls' import { blockTypeToIconMap, diff --git a/apps/sim/app/(landing)/integrations/[slug]/loading.tsx b/apps/sim/app/(landing)/integrations/[slug]/loading.tsx index f2c2fb44d6e..79d9305ca4c 100644 --- a/apps/sim/app/(landing)/integrations/[slug]/loading.tsx +++ b/apps/sim/app/(landing)/integrations/[slug]/loading.tsx @@ -1,4 +1,4 @@ -import { Loader } from '@/components/emcn' +import { Loader } from '@sim/emcn' export default function IntegrationDetailLoading() { return ( diff --git a/apps/sim/app/(landing)/integrations/components/integration-grid.tsx b/apps/sim/app/(landing)/integrations/components/integration-grid.tsx index b1f3b0bb547..5e2225dc866 100644 --- a/apps/sim/app/(landing)/integrations/components/integration-grid.tsx +++ b/apps/sim/app/(landing)/integrations/components/integration-grid.tsx @@ -1,7 +1,7 @@ 'use client' import { useState } from 'react' -import { ChipInput, Search } from '@/components/emcn' +import { ChipInput, Search } from '@sim/emcn' import { blockTypeToIconMap, formatIntegrationType, type Integration } from '@/lib/integrations' import { IntegrationRow } from '@/app/(landing)/integrations/components/integration-card' diff --git a/apps/sim/app/(landing)/integrations/components/integration-icon.tsx b/apps/sim/app/(landing)/integrations/components/integration-icon.tsx index fb9c1219419..ec1b7932740 100644 --- a/apps/sim/app/(landing)/integrations/components/integration-icon.tsx +++ b/apps/sim/app/(landing)/integrations/components/integration-icon.tsx @@ -1,5 +1,5 @@ import type { ComponentType, ElementType, HTMLAttributes, SVGProps } from 'react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' interface IntegrationIconProps extends HTMLAttributes { bgColor: string diff --git a/apps/sim/app/(landing)/integrations/components/request-integration-modal.tsx b/apps/sim/app/(landing)/integrations/components/request-integration-modal.tsx index d8fd42e9410..e6634ee275e 100644 --- a/apps/sim/app/(landing)/integrations/components/request-integration-modal.tsx +++ b/apps/sim/app/(landing)/integrations/components/request-integration-modal.tsx @@ -8,7 +8,7 @@ import { ChipModalField, ChipModalFooter, ChipModalHeader, -} from '@/components/emcn' +} from '@sim/emcn' import { requestJson } from '@/lib/api/client/request' import { integrationRequestContract } from '@/lib/api/contracts/common' diff --git a/apps/sim/app/(landing)/models/(shell)/[provider]/[model]/loading.tsx b/apps/sim/app/(landing)/models/(shell)/[provider]/[model]/loading.tsx index 30b4f6216f6..87c2a835b23 100644 --- a/apps/sim/app/(landing)/models/(shell)/[provider]/[model]/loading.tsx +++ b/apps/sim/app/(landing)/models/(shell)/[provider]/[model]/loading.tsx @@ -1,4 +1,4 @@ -import { Loader } from '@/components/emcn' +import { Loader } from '@sim/emcn' export default function ModelDetailLoading() { return ( diff --git a/apps/sim/app/(landing)/models/(shell)/[provider]/loading.tsx b/apps/sim/app/(landing)/models/(shell)/[provider]/loading.tsx index b6afc017c9c..47f35d2b2be 100644 --- a/apps/sim/app/(landing)/models/(shell)/[provider]/loading.tsx +++ b/apps/sim/app/(landing)/models/(shell)/[provider]/loading.tsx @@ -1,4 +1,4 @@ -import { Loader } from '@/components/emcn' +import { Loader } from '@sim/emcn' export default function ModelProviderLoading() { return ( diff --git a/apps/sim/app/(landing)/models/(shell)/[provider]/page.tsx b/apps/sim/app/(landing)/models/(shell)/[provider]/page.tsx index 76139ce8421..e5e44ed0910 100644 --- a/apps/sim/app/(landing)/models/(shell)/[provider]/page.tsx +++ b/apps/sim/app/(landing)/models/(shell)/[provider]/page.tsx @@ -1,7 +1,7 @@ +import { Badge } from '@sim/emcn' import type { Metadata } from 'next' import Link from 'next/link' import { notFound } from 'next/navigation' -import { Badge } from '@/components/emcn' import { SITE_URL } from '@/lib/core/utils/urls' import { LandingFAQ } from '@/app/(landing)/components/landing-faq' import { diff --git a/apps/sim/app/(landing)/models/(shell)/page.tsx b/apps/sim/app/(landing)/models/(shell)/page.tsx index 002237c6feb..a324245c4c2 100644 --- a/apps/sim/app/(landing)/models/(shell)/page.tsx +++ b/apps/sim/app/(landing)/models/(shell)/page.tsx @@ -1,5 +1,5 @@ +import { Badge } from '@sim/emcn' import type { Metadata } from 'next' -import { Badge } from '@/components/emcn' import { SITE_URL } from '@/lib/core/utils/urls' import { LandingFAQ } from '@/app/(landing)/components/landing-faq' import { ModelComparisonCharts } from '@/app/(landing)/models/components/model-comparison-charts' diff --git a/apps/sim/app/(landing)/models/[provider]/[model]/loading.tsx b/apps/sim/app/(landing)/models/[provider]/[model]/loading.tsx index 30b4f6216f6..87c2a835b23 100644 --- a/apps/sim/app/(landing)/models/[provider]/[model]/loading.tsx +++ b/apps/sim/app/(landing)/models/[provider]/[model]/loading.tsx @@ -1,4 +1,4 @@ -import { Loader } from '@/components/emcn' +import { Loader } from '@sim/emcn' export default function ModelDetailLoading() { return ( diff --git a/apps/sim/app/(landing)/models/[provider]/loading.tsx b/apps/sim/app/(landing)/models/[provider]/loading.tsx index b6afc017c9c..47f35d2b2be 100644 --- a/apps/sim/app/(landing)/models/[provider]/loading.tsx +++ b/apps/sim/app/(landing)/models/[provider]/loading.tsx @@ -1,4 +1,4 @@ -import { Loader } from '@/components/emcn' +import { Loader } from '@sim/emcn' export default function ModelProviderLoading() { return ( diff --git a/apps/sim/app/(landing)/models/components/model-directory.tsx b/apps/sim/app/(landing)/models/components/model-directory.tsx index c0c1c46f44c..a55573f93be 100644 --- a/apps/sim/app/(landing)/models/components/model-directory.tsx +++ b/apps/sim/app/(landing)/models/components/model-directory.tsx @@ -1,8 +1,8 @@ 'use client' import { useMemo, useState } from 'react' +import { Input } from '@sim/emcn' import Link from 'next/link' -import { Input } from '@/components/emcn' import { ChevronArrow, ProviderIcon } from '@/app/(landing)/models/components/model-primitives' import { type CatalogModel, diff --git a/apps/sim/app/(landing)/models/components/model-primitives.tsx b/apps/sim/app/(landing)/models/components/model-primitives.tsx index 56d352a1a57..22cb43182a2 100644 --- a/apps/sim/app/(landing)/models/components/model-primitives.tsx +++ b/apps/sim/app/(landing)/models/components/model-primitives.tsx @@ -1,5 +1,5 @@ +import { Badge } from '@sim/emcn' import Link from 'next/link' -import { Badge } from '@/components/emcn' import { type CatalogModel, type CatalogProvider, diff --git a/apps/sim/app/(landing)/privacy/loading.tsx b/apps/sim/app/(landing)/privacy/loading.tsx index 962c436464f..8f6679ad27a 100644 --- a/apps/sim/app/(landing)/privacy/loading.tsx +++ b/apps/sim/app/(landing)/privacy/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function PrivacyLoading() { return ( diff --git a/apps/sim/app/(landing)/terms/loading.tsx b/apps/sim/app/(landing)/terms/loading.tsx index 90391b4e239..81a8e2f7a87 100644 --- a/apps/sim/app/(landing)/terms/loading.tsx +++ b/apps/sim/app/(landing)/terms/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function TermsLoading() { return ( diff --git a/apps/sim/app/_shell/providers/tooltip-provider.tsx b/apps/sim/app/_shell/providers/tooltip-provider.tsx index 84274ddb8c2..efd659a812c 100644 --- a/apps/sim/app/_shell/providers/tooltip-provider.tsx +++ b/apps/sim/app/_shell/providers/tooltip-provider.tsx @@ -1,6 +1,6 @@ 'use client' -import { Tooltip } from '@/components/emcn' +import { Tooltip } from '@sim/emcn' interface TooltipProviderProps { children: React.ReactNode diff --git a/apps/sim/app/academy/(catalog)/[courseSlug]/components/course-progress.tsx b/apps/sim/app/academy/(catalog)/[courseSlug]/components/course-progress.tsx index 4dd486620e3..81e88055f63 100644 --- a/apps/sim/app/academy/(catalog)/[courseSlug]/components/course-progress.tsx +++ b/apps/sim/app/academy/(catalog)/[courseSlug]/components/course-progress.tsx @@ -1,9 +1,9 @@ 'use client' import { useMemo, useSyncExternalStore } from 'react' +import { Loader } from '@sim/emcn' import { CheckCircle2, Circle, ExternalLink, GraduationCap } from 'lucide-react' import Link from 'next/link' -import { Loader } from '@/components/emcn' import { getCompletedLessonsFromSnapshot, getCompletedLessonsSnapshot, diff --git a/apps/sim/app/academy/[courseSlug]/[lessonSlug]/components/lesson-quiz.tsx b/apps/sim/app/academy/[courseSlug]/[lessonSlug]/components/lesson-quiz.tsx index 045993db67a..c8c7fd6316e 100644 --- a/apps/sim/app/academy/[courseSlug]/[lessonSlug]/components/lesson-quiz.tsx +++ b/apps/sim/app/academy/[courseSlug]/[lessonSlug]/components/lesson-quiz.tsx @@ -1,10 +1,10 @@ 'use client' import { useState } from 'react' +import { cn } from '@sim/emcn' import { CheckCircle2, XCircle } from 'lucide-react' import { markLessonComplete } from '@/lib/academy/local-progress' import type { QuizDefinition, QuizQuestion } from '@/lib/academy/types' -import { cn } from '@/lib/core/utils/cn' interface LessonQuizProps { lessonId: string diff --git a/apps/sim/app/academy/components/sandbox-canvas-provider.tsx b/apps/sim/app/academy/components/sandbox-canvas-provider.tsx index 4a283225547..33dfca9ab61 100644 --- a/apps/sim/app/academy/components/sandbox-canvas-provider.tsx +++ b/apps/sim/app/academy/components/sandbox-canvas-provider.tsx @@ -1,6 +1,7 @@ 'use client' import { useCallback, useEffect, useRef, useState } from 'react' +import { cn } from '@sim/emcn' import { createLogger } from '@sim/logger' import { sleep } from '@sim/utils/helpers' import type { Edge } from 'reactflow' @@ -12,7 +13,6 @@ import type { ValidationResult, } from '@/lib/academy/types' import { validateExercise } from '@/lib/academy/validation' -import { cn } from '@/lib/core/utils/cn' import { getEffectiveBlockOutputs } from '@/lib/workflows/blocks/block-outputs' import { getQueryClient } from '@/app/_shell/providers/get-query-client' import { GlobalCommandsProvider } from '@/app/workspace/[workspaceId]/providers/global-commands-provider' diff --git a/apps/sim/app/academy/components/validation-checklist.tsx b/apps/sim/app/academy/components/validation-checklist.tsx index 977da84afaa..2f892f56f6f 100644 --- a/apps/sim/app/academy/components/validation-checklist.tsx +++ b/apps/sim/app/academy/components/validation-checklist.tsx @@ -1,8 +1,8 @@ 'use client' +import { cn } from '@sim/emcn' import { CheckCircle2, Circle } from 'lucide-react' import type { ValidationRuleResult } from '@/lib/academy/types' -import { cn } from '@/lib/core/utils/cn' interface ValidationChecklistProps { results: ValidationRuleResult[] diff --git a/apps/sim/app/changelog/components/timeline-list.tsx b/apps/sim/app/changelog/components/timeline-list.tsx index 703731c1e17..abcb1945ab7 100644 --- a/apps/sim/app/changelog/components/timeline-list.tsx +++ b/apps/sim/app/changelog/components/timeline-list.tsx @@ -3,7 +3,7 @@ import React from 'react' import { Streamdown } from 'streamdown' import 'streamdown/styles.css' -import { Avatar, AvatarFallback, AvatarImage } from '@/components/emcn' +import { Avatar, AvatarFallback, AvatarImage } from '@sim/emcn' import type { ChangelogEntry } from '@/app/changelog/components/changelog-content' type Props = { initialEntries: ChangelogEntry[] } diff --git a/apps/sim/app/changelog/loading.tsx b/apps/sim/app/changelog/loading.tsx index 695c11a3a42..47334b9f3b0 100644 --- a/apps/sim/app/changelog/loading.tsx +++ b/apps/sim/app/changelog/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function ChangelogLoading() { return ( diff --git a/apps/sim/app/chat/[identifier]/loading.tsx b/apps/sim/app/chat/[identifier]/loading.tsx index 921e5a801cc..9b032730a1c 100644 --- a/apps/sim/app/chat/[identifier]/loading.tsx +++ b/apps/sim/app/chat/[identifier]/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function ChatLoading() { return ( diff --git a/apps/sim/app/chat/components/auth/email/email-auth.tsx b/apps/sim/app/chat/components/auth/email/email-auth.tsx index 3224e0bb4bb..0ad33ab3d4f 100644 --- a/apps/sim/app/chat/components/auth/email/email-auth.tsx +++ b/apps/sim/app/chat/components/auth/email/email-auth.tsx @@ -1,10 +1,9 @@ 'use client' import { useEffect, useState } from 'react' +import { cn, Input, InputOTP, InputOTPGroup, InputOTPSlot, Label, Loader } from '@sim/emcn' import { createLogger } from '@sim/logger' import { toError } from '@sim/utils/errors' -import { Input, InputOTP, InputOTPGroup, InputOTPSlot, Label, Loader } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { quickValidateEmail } from '@/lib/messaging/email/validation' import AuthBackground from '@/app/(auth)/components/auth-background' import { AUTH_SUBMIT_BTN, AUTH_TEXT_LINK } from '@/app/(auth)/components/auth-button-classes' diff --git a/apps/sim/app/chat/components/auth/password/password-auth.tsx b/apps/sim/app/chat/components/auth/password/password-auth.tsx index d8eca769951..563faa7c308 100644 --- a/apps/sim/app/chat/components/auth/password/password-auth.tsx +++ b/apps/sim/app/chat/components/auth/password/password-auth.tsx @@ -1,11 +1,10 @@ 'use client' import { useState } from 'react' +import { cn, Input, Label, Loader } from '@sim/emcn' import { createLogger } from '@sim/logger' import { toError } from '@sim/utils/errors' import { Eye, EyeOff } from 'lucide-react' -import { Input, Label, Loader } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import AuthBackground from '@/app/(auth)/components/auth-background' import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes' import { SupportFooter } from '@/app/(auth)/components/support-footer' diff --git a/apps/sim/app/chat/components/input/input.tsx b/apps/sim/app/chat/components/input/input.tsx index c31342c1e64..72aa99fb9d0 100644 --- a/apps/sim/app/chat/components/input/input.tsx +++ b/apps/sim/app/chat/components/input/input.tsx @@ -2,12 +2,10 @@ import type React from 'react' import { useCallback, useLayoutEffect, useRef, useState } from 'react' +import { Badge, cn, handleKeyboardActivation, Tooltip } from '@sim/emcn' import { createLogger } from '@sim/logger' import { generateId } from '@sim/utils/id' import { ArrowUp, Mic, Paperclip, X } from 'lucide-react' -import { Badge, Tooltip } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { CHAT_ACCEPT_ATTRIBUTE } from '@/lib/uploads/utils/validation' import { VoiceInput } from '@/app/chat/components/input/voice-input' diff --git a/apps/sim/app/chat/components/loading-state/loading-state.tsx b/apps/sim/app/chat/components/loading-state/loading-state.tsx index 146aa8680c4..6d8a73e4601 100644 --- a/apps/sim/app/chat/components/loading-state/loading-state.tsx +++ b/apps/sim/app/chat/components/loading-state/loading-state.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export function ChatLoadingState() { return ( diff --git a/apps/sim/app/chat/components/message/components/file-download.test.tsx b/apps/sim/app/chat/components/message/components/file-download.test.tsx index a707bbd55b5..423cdc78731 100644 --- a/apps/sim/app/chat/components/message/components/file-download.test.tsx +++ b/apps/sim/app/chat/components/message/components/file-download.test.tsx @@ -3,7 +3,7 @@ */ import { describe, expect, it, vi } from 'vitest' -vi.mock('@/components/emcn', () => ({ +vi.mock('@sim/emcn', () => ({ Button: () => null, Download: () => null, Loader: () => null, diff --git a/apps/sim/app/chat/components/message/components/file-download.tsx b/apps/sim/app/chat/components/message/components/file-download.tsx index 4ba289b1ec1..8dfb200b61b 100644 --- a/apps/sim/app/chat/components/message/components/file-download.tsx +++ b/apps/sim/app/chat/components/message/components/file-download.tsx @@ -1,10 +1,10 @@ 'use client' import { useState } from 'react' +import { Button, Download, Loader } from '@sim/emcn' import { createLogger } from '@sim/logger' import { sleep } from '@sim/utils/helpers' import { Music } from 'lucide-react' -import { Button, Download, Loader } from '@/components/emcn' import { DefaultFileIcon, getDocumentIcon } from '@/components/icons/document-icons' import { getBrowserOrigin } from '@/lib/core/utils/urls' import type { ChatFile } from '@/app/chat/components/message/message' diff --git a/apps/sim/app/chat/components/message/components/markdown-renderer.tsx b/apps/sim/app/chat/components/message/components/markdown-renderer.tsx index 84b60eea794..00cfcd31ee2 100644 --- a/apps/sim/app/chat/components/message/components/markdown-renderer.tsx +++ b/apps/sim/app/chat/components/message/components/markdown-renderer.tsx @@ -1,7 +1,7 @@ import React, { type HTMLAttributes, memo, type ReactNode } from 'react' import { Streamdown } from 'streamdown' import 'streamdown/styles.css' -import { CopyCodeButton, Tooltip } from '@/components/emcn' +import { CopyCodeButton, Tooltip } from '@sim/emcn' import { extractTextContent } from '@/lib/core/utils/react-node-text' function LinkWithPreview({ href, children }: { href: string; children: React.ReactNode }) { diff --git a/apps/sim/app/chat/components/message/message.test.tsx b/apps/sim/app/chat/components/message/message.test.tsx index 50f0323b3f7..a6428d5188c 100644 --- a/apps/sim/app/chat/components/message/message.test.tsx +++ b/apps/sim/app/chat/components/message/message.test.tsx @@ -3,7 +3,7 @@ */ import { describe, expect, it, vi } from 'vitest' -vi.mock('@/components/emcn', () => ({ +vi.mock('@sim/emcn', () => ({ Duplicate: () => null, Tooltip: {}, })) diff --git a/apps/sim/app/chat/components/message/message.tsx b/apps/sim/app/chat/components/message/message.tsx index 661dd4e1657..12181e0f300 100644 --- a/apps/sim/app/chat/components/message/message.tsx +++ b/apps/sim/app/chat/components/message/message.tsx @@ -1,8 +1,8 @@ 'use client' import { memo, useState } from 'react' +import { Duplicate, Tooltip } from '@sim/emcn' import { Check, File as FileIcon, FileText, Image as ImageIcon } from 'lucide-react' -import { Duplicate, Tooltip } from '@/components/emcn' import { ChatFileDownload, ChatFileDownloadAll, diff --git a/apps/sim/app/chat/components/voice-interface/voice-interface.tsx b/apps/sim/app/chat/components/voice-interface/voice-interface.tsx index f313b24046e..7a7f8ec70f1 100644 --- a/apps/sim/app/chat/components/voice-interface/voice-interface.tsx +++ b/apps/sim/app/chat/components/voice-interface/voice-interface.tsx @@ -1,13 +1,13 @@ 'use client' import { type RefObject, useCallback, useEffect, useRef, useState } from 'react' +import { cn } from '@sim/emcn' import { createLogger } from '@sim/logger' import { Mic, MicOff, Phone } from 'lucide-react' import dynamic from 'next/dynamic' import { Button } from '@/components/ui/button' import { requestJson } from '@/lib/api/client/request' import { speechTokenContract } from '@/lib/api/contracts/media/speech' -import { cn } from '@/lib/core/utils/cn' import { arrayBufferToBase64, floatTo16BitPCM } from '@/lib/speech/audio' import { CHUNK_SEND_INTERVAL_MS, diff --git a/apps/sim/app/credential-account/[token]/loading.tsx b/apps/sim/app/credential-account/[token]/loading.tsx index f4574e877a9..275aa3b854d 100644 --- a/apps/sim/app/credential-account/[token]/loading.tsx +++ b/apps/sim/app/credential-account/[token]/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function CredentialAccountLoading() { return ( diff --git a/apps/sim/app/f/[token]/public-file-auth.tsx b/apps/sim/app/f/[token]/public-file-auth.tsx index fa7d57dd05a..cc665e3758f 100644 --- a/apps/sim/app/f/[token]/public-file-auth.tsx +++ b/apps/sim/app/f/[token]/public-file-auth.tsx @@ -1,11 +1,10 @@ 'use client' import { useState } from 'react' +import { cn, Input, Label, Loader } from '@sim/emcn' import { getErrorMessage } from '@sim/utils/errors' import { Eye, EyeOff } from 'lucide-react' import { useRouter } from 'next/navigation' -import { Input, Label, Loader } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes' import { PublicFileAuthShell } from '@/app/f/[token]/public-file-auth-shell' import { usePublicFileAuth } from '@/hooks/queries/public-shares' diff --git a/apps/sim/app/f/[token]/public-file-email-auth.tsx b/apps/sim/app/f/[token]/public-file-email-auth.tsx index b05b487574c..f6b01a6b7f5 100644 --- a/apps/sim/app/f/[token]/public-file-email-auth.tsx +++ b/apps/sim/app/f/[token]/public-file-email-auth.tsx @@ -1,10 +1,9 @@ 'use client' import { useEffect, useState } from 'react' +import { cn, Input, InputOTP, InputOTPGroup, InputOTPSlot, Label, Loader } from '@sim/emcn' import { getErrorMessage } from '@sim/utils/errors' import { useRouter } from 'next/navigation' -import { Input, InputOTP, InputOTPGroup, InputOTPSlot, Label, Loader } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { quickValidateEmail } from '@/lib/messaging/email/validation' import { AUTH_SUBMIT_BTN, AUTH_TEXT_LINK } from '@/app/(auth)/components/auth-button-classes' import { PublicFileAuthShell } from '@/app/f/[token]/public-file-auth-shell' diff --git a/apps/sim/app/f/[token]/public-file-sso-auth.tsx b/apps/sim/app/f/[token]/public-file-sso-auth.tsx index 247975a4b29..a5f09fc9170 100644 --- a/apps/sim/app/f/[token]/public-file-sso-auth.tsx +++ b/apps/sim/app/f/[token]/public-file-sso-auth.tsx @@ -1,12 +1,11 @@ 'use client' import { useState } from 'react' +import { cn, Input, Label, Loader } from '@sim/emcn' import { getErrorMessage } from '@sim/utils/errors' import { useRouter } from 'next/navigation' -import { Input, Label, Loader } from '@/components/emcn' import { requestJson } from '@/lib/api/client/request' import { publicFileSSOContract } from '@/lib/api/contracts/public-shares' -import { cn } from '@/lib/core/utils/cn' import { quickValidateEmail } from '@/lib/messaging/email/validation' import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes' import { PublicFileAuthShell } from '@/app/f/[token]/public-file-auth-shell' diff --git a/apps/sim/app/f/[token]/public-file-view.tsx b/apps/sim/app/f/[token]/public-file-view.tsx index 360119e4945..3f61b66e3f9 100644 --- a/apps/sim/app/f/[token]/public-file-view.tsx +++ b/apps/sim/app/f/[token]/public-file-view.tsx @@ -1,10 +1,10 @@ 'use client' import { useMemo } from 'react' +import { Chip } from '@sim/emcn' +import { Download } from '@sim/emcn/icons' import Image from 'next/image' import Link from 'next/link' -import { Chip } from '@/components/emcn' -import { Download } from '@/components/emcn/icons' import type { WorkspaceFileRecord } from '@/lib/uploads/contexts/workspace' import { buildProvenance } from '@/app/f/[token]/utils' import { FileViewer } from '@/app/workspace/[workspaceId]/files/components/file-viewer' diff --git a/apps/sim/app/invite/[id]/loading.tsx b/apps/sim/app/invite/[id]/loading.tsx index b72ba19f4f5..b26abbbaf59 100644 --- a/apps/sim/app/invite/[id]/loading.tsx +++ b/apps/sim/app/invite/[id]/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function InviteLoading() { return ( diff --git a/apps/sim/app/invite/components/status-card.tsx b/apps/sim/app/invite/components/status-card.tsx index 920efb43abb..b067c0716e6 100644 --- a/apps/sim/app/invite/components/status-card.tsx +++ b/apps/sim/app/invite/components/status-card.tsx @@ -1,8 +1,6 @@ 'use client' - +import { cn, Loader } from '@sim/emcn' import { useRouter } from 'next/navigation' -import { Loader } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { AUTH_PRIMARY_CTA_BASE } from '@/app/(auth)/components/auth-button-classes' interface InviteStatusCardProps { diff --git a/apps/sim/app/playground/page.tsx b/apps/sim/app/playground/page.tsx index 9a44722b250..9acd0f74367 100644 --- a/apps/sim/app/playground/page.tsx +++ b/apps/sim/app/playground/page.tsx @@ -1,8 +1,6 @@ 'use client' import { useState, useSyncExternalStore } from 'react' -import { ArrowLeft, Folder, Moon, Sun } from 'lucide-react' -import { notFound, useRouter } from 'next/navigation' import { Avatar, AvatarFallback, @@ -86,7 +84,9 @@ import { Wrap, ZoomIn, ZoomOut, -} from '@/components/emcn' +} from '@sim/emcn' +import { ArrowLeft, Folder, Moon, Sun } from 'lucide-react' +import { notFound, useRouter } from 'next/navigation' import { env, isTruthy } from '@/lib/core/config/env' function Section({ title, children }: { title: string; children: React.ReactNode }) { diff --git a/apps/sim/app/resume/[workflowId]/[executionId]/loading.tsx b/apps/sim/app/resume/[workflowId]/[executionId]/loading.tsx index 3c7197a7e96..81a63358934 100644 --- a/apps/sim/app/resume/[workflowId]/[executionId]/loading.tsx +++ b/apps/sim/app/resume/[workflowId]/[executionId]/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function ResumeLoading() { return ( diff --git a/apps/sim/app/resume/[workflowId]/[executionId]/resume-page-client.tsx b/apps/sim/app/resume/[workflowId]/[executionId]/resume-page-client.tsx index a802d6ebe3b..b8aa82792f8 100644 --- a/apps/sim/app/resume/[workflowId]/[executionId]/resume-page-client.tsx +++ b/apps/sim/app/resume/[workflowId]/[executionId]/resume-page-client.tsx @@ -1,9 +1,6 @@ 'use client' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { useQueryClient } from '@tanstack/react-query' -import { RefreshCw } from 'lucide-react' -import { useRouter } from 'next/navigation' import { Badge, Button, @@ -18,7 +15,10 @@ import { TableRow, Textarea, Tooltip, -} from '@/components/emcn' +} from '@sim/emcn' +import { useQueryClient } from '@tanstack/react-query' +import { RefreshCw } from 'lucide-react' +import { useRouter } from 'next/navigation' import { Select, SelectContent, diff --git a/apps/sim/app/unsubscribe/loading.tsx b/apps/sim/app/unsubscribe/loading.tsx index 6ae94a8b934..5f625c75bbd 100644 --- a/apps/sim/app/unsubscribe/loading.tsx +++ b/apps/sim/app/unsubscribe/loading.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' export default function UnsubscribeLoading() { return ( diff --git a/apps/sim/app/unsubscribe/unsubscribe.tsx b/apps/sim/app/unsubscribe/unsubscribe.tsx index c7fac2f9aa4..1ace40a9b74 100644 --- a/apps/sim/app/unsubscribe/unsubscribe.tsx +++ b/apps/sim/app/unsubscribe/unsubscribe.tsx @@ -1,9 +1,9 @@ 'use client' import { Suspense } from 'react' +import { Loader } from '@sim/emcn' import { getErrorMessage } from '@sim/utils/errors' import { useSearchParams } from 'next/navigation' -import { Loader } from '@/components/emcn' import type { UnsubscribeType } from '@/lib/api/contracts/user' import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes' import { InviteLayout } from '@/app/invite/components' diff --git a/apps/sim/app/workspace/[workspaceId]/components/connect-oauth-modal/connect-oauth-modal.tsx b/apps/sim/app/workspace/[workspaceId]/components/connect-oauth-modal/connect-oauth-modal.tsx index 3ab1ee6ec03..fa55168db32 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/connect-oauth-modal/connect-oauth-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/connect-oauth-modal/connect-oauth-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { type ComponentType, type KeyboardEvent, useEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' import { Badge, ChipModal, @@ -14,7 +12,9 @@ import { InfoCard, InfoCardItem, InfoCardList, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' import { useSession } from '@/lib/auth/auth-client' import type { OAuthReturnContext } from '@/lib/credentials/client-state' import { ADD_CONNECTOR_SEARCH_PARAM, writeOAuthReturnContext } from '@/lib/credentials/client-state' diff --git a/apps/sim/app/workspace/[workspaceId]/components/conversation-list-item/conversation-list-item.tsx b/apps/sim/app/workspace/[workspaceId]/components/conversation-list-item/conversation-list-item.tsx index 57dfeb989af..0cc2baa0d99 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/conversation-list-item/conversation-list-item.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/conversation-list-item/conversation-list-item.tsx @@ -1,5 +1,5 @@ import type { ReactNode } from 'react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' interface ConversationListItemProps { title: string diff --git a/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/add-people-modal.tsx b/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/add-people-modal.tsx index 305489df046..f66a45b2335 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/add-people-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/add-people-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { useCallback, useMemo, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' import { ChipModal, ChipModalBody, @@ -10,7 +8,9 @@ import { ChipModalField, ChipModalFooter, ChipModalHeader, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' import { useWorkspacePermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' import { useUpsertWorkspaceCredentialMember, diff --git a/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/chip-field.ts b/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/chip-field.ts index 7afd46637ae..d416af43b67 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/chip-field.ts +++ b/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/chip-field.ts @@ -1,17 +1,4 @@ -/** - * Shared chip-field chrome for the credential and secret detail surfaces. - * - * These mirror {@link ChipInput} exactly (30px tall, - * `rounded-lg`, `border-1`, `surface-5`/`surface-4`, normal-weight body text, - * and no focus ring) but as a wrapper + inner-input pair, so a field can host a - * borderless input alongside a trailing slot (a copy button, a reveal toggle). - * Using one definition keeps every chip field — list rows, - * copyable IDs, secret values, display-name/description editors — pixel-identical - * to the canonical chip input instead of each re-deriving the tokens. - */ - -import { chipFieldSurfaceClass, chipFieldTextClass } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +import { chipFieldSurfaceClass, chipFieldTextClass, cn } from '@sim/emcn' /** Pill wrapper. Override height/alignment (e.g. a textarea) via `cn`. */ export const CHIP_FIELD_SHELL = cn('flex h-[30px] items-center gap-1.5 px-2', chipFieldSurfaceClass) diff --git a/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/credential-members-section.tsx b/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/credential-members-section.tsx index a9067b55f1d..2d8a0e9c548 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/credential-members-section.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/credential-members-section.tsx @@ -1,9 +1,7 @@ 'use client' - +import { Avatar, AvatarFallback, Chip, ChipDropdown, cn } from '@sim/emcn' import { createLogger } from '@sim/logger' -import { Avatar, AvatarFallback, Chip, ChipDropdown } from '@/components/emcn' import { credentialRoleLockReason, RoleLockTooltip } from '@/components/permissions' -import { cn } from '@/lib/core/utils/cn' import { getUserColor } from '@/lib/workspaces/colors' import { useRemoveWorkspaceCredentialMember, diff --git a/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/unsaved-changes-modal.tsx b/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/unsaved-changes-modal.tsx index e13c3ce7685..e9f9ae68528 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/unsaved-changes-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/credential-detail/components/unsaved-changes-modal.tsx @@ -1,4 +1,4 @@ -import { ChipConfirmModal } from '@/components/emcn' +import { ChipConfirmModal } from '@sim/emcn' interface UnsavedChangesModalProps { open: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/components/credential-detail/hooks/use-credential-detail-form.ts b/apps/sim/app/workspace/[workspaceId]/components/credential-detail/hooks/use-credential-detail-form.ts index f945d9c18ea..7bd0e1375d0 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/credential-detail/hooks/use-credential-detail-form.ts +++ b/apps/sim/app/workspace/[workspaceId]/components/credential-detail/hooks/use-credential-detail-form.ts @@ -1,9 +1,9 @@ 'use client' import { useCallback, useEffect, useState } from 'react' +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' -import { toast } from '@/components/emcn' import { useUpdateWorkspaceCredential, type WorkspaceCredential } from '@/hooks/queries/credentials' import { useUnsavedChangesGuard } from './use-unsaved-changes-guard' diff --git a/apps/sim/app/workspace/[workspaceId]/components/error/error.tsx b/apps/sim/app/workspace/[workspaceId]/components/error/error.tsx index f6279b6f9f3..461ab2e9473 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/error/error.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/error/error.tsx @@ -1,9 +1,9 @@ 'use client' import { type ReactNode, useEffect } from 'react' +import { Button } from '@sim/emcn' import { createLogger } from '@sim/logger' import { TriangleAlert } from 'lucide-react' -import { Button } from '@/components/emcn' /** Props shape required by Next.js error boundary files (`error.tsx`). */ export interface ErrorBoundaryProps { diff --git a/apps/sim/app/workspace/[workspaceId]/components/impersonation-banner/impersonation-banner.tsx b/apps/sim/app/workspace/[workspaceId]/components/impersonation-banner/impersonation-banner.tsx index a4a23572e25..8a995752b33 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/impersonation-banner/impersonation-banner.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/impersonation-banner/impersonation-banner.tsx @@ -1,7 +1,7 @@ 'use client' import { useState } from 'react' -import { Banner } from '@/components/emcn' +import { Banner } from '@sim/emcn' import { useSession } from '@/lib/auth/auth-client' import { useStopImpersonating } from '@/hooks/queries/admin-users' diff --git a/apps/sim/app/workspace/[workspaceId]/components/message-actions/message-actions.tsx b/apps/sim/app/workspace/[workspaceId]/components/message-actions/message-actions.tsx index 74cf5990e2a..91ebc37ea42 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/message-actions/message-actions.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/message-actions/message-actions.tsx @@ -1,8 +1,6 @@ 'use client' import { memo, useEffect, useRef, useState } from 'react' -import { GitBranch } from 'lucide-react' -import { useParams, useRouter } from 'next/navigation' import { Check, ChipModal, @@ -10,13 +8,15 @@ import { ChipModalField, ChipModalFooter, ChipModalHeader, + cn, Duplicate, ThumbsDown, ThumbsUp, Tooltip, toast, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { GitBranch } from 'lucide-react' +import { useParams, useRouter } from 'next/navigation' import { useChatSurface } from '@/app/workspace/[workspaceId]/home/components/chat-surface-context' import { useSubmitCopilotFeedback } from '@/hooks/queries/copilot-feedback' import { useForkMothershipChat } from '@/hooks/queries/mothership-chats' diff --git a/apps/sim/app/workspace/[workspaceId]/components/resource/components/floating-overflow-text.tsx b/apps/sim/app/workspace/[workspaceId]/components/resource/components/floating-overflow-text.tsx index c05757d2fb2..dc7a9dcaf35 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/resource/components/floating-overflow-text.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/resource/components/floating-overflow-text.tsx @@ -2,13 +2,7 @@ import type React from 'react' import { memo } from 'react' -import { - FloatingTooltip, - isTextClipped, - useFloatingTooltip, - useIsOverflowing, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +import { cn, FloatingTooltip, isTextClipped, useFloatingTooltip, useIsOverflowing } from '@sim/emcn' interface FloatingOverflowTextProps { /** Full text shown in the tooltip and used as the default visible content. */ diff --git a/apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-header/resource-header.tsx b/apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-header/resource-header.tsx index f03a8cdcdf2..f6b464404cd 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-header/resource-header.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-header/resource-header.tsx @@ -8,14 +8,13 @@ import { useRef, useState, } from 'react' -import { ArrowUpLeft } from 'lucide-react' -import { createPortal } from 'react-dom' import { Chip, ChipChevronDown, chipContentIconClass, chipGeometryClass, chipVariants, + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, @@ -29,8 +28,9 @@ import { PopoverSection, useFloatingTooltip, useIsOverflowing, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { ArrowUpLeft } from 'lucide-react' +import { createPortal } from 'react-dom' import { InlineRenameInput } from '@/app/workspace/[workspaceId]/components/inline-rename-input' import { FloatingOverflowText } from '@/app/workspace/[workspaceId]/components/resource/components/floating-overflow-text' diff --git a/apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-options/resource-options.tsx b/apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-options/resource-options.tsx index 0926fb31ba8..af98a4ccfbf 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-options/resource-options.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-options/resource-options.tsx @@ -5,6 +5,7 @@ import { ArrowUp, ArrowUpDown, Chip, + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, @@ -14,8 +15,7 @@ import { POPOVER_ANIMATION_CLASSES, Search, X, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' import { FloatingOverflowText } from '@/app/workspace/[workspaceId]/components/resource/components/floating-overflow-text' const SEARCH_ICON = ( diff --git a/apps/sim/app/workspace/[workspaceId]/components/resource/resource.tsx b/apps/sim/app/workspace/[workspaceId]/components/resource/resource.tsx index e8a313dc997..ed960210aa6 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/resource/resource.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/resource/resource.tsx @@ -12,17 +12,17 @@ import { useRef, useState, } from 'react' -import { useVirtualizer } from '@tanstack/react-virtual' -import { ChevronLeft, ChevronRight } from 'lucide-react' import { Button, Checkbox, cellIconNodeClass, chipContentGap, chipContentLabelClass, + cn, Loader, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { useVirtualizer } from '@tanstack/react-virtual' +import { ChevronLeft, ChevronRight } from 'lucide-react' import { InlineRenameInput } from '@/app/workspace/[workspaceId]/components/inline-rename-input' import { FloatingOverflowText } from '@/app/workspace/[workspaceId]/components/resource/components/floating-overflow-text' import { ResourceHeader } from '@/app/workspace/[workspaceId]/components/resource/components/resource-header' diff --git a/apps/sim/app/workspace/[workspaceId]/components/workspace-chrome/workspace-chrome.tsx b/apps/sim/app/workspace/[workspaceId]/components/workspace-chrome/workspace-chrome.tsx index f463da30949..3f6a9fa9fe5 100644 --- a/apps/sim/app/workspace/[workspaceId]/components/workspace-chrome/workspace-chrome.tsx +++ b/apps/sim/app/workspace/[workspaceId]/components/workspace-chrome/workspace-chrome.tsx @@ -1,8 +1,8 @@ 'use client' import { useEffect, useLayoutEffect } from 'react' +import { cn } from '@sim/emcn' import { usePathname } from 'next/navigation' -import { cn } from '@/lib/core/utils/cn' import { Sidebar } from '@/app/workspace/[workspaceId]/w/components/sidebar/sidebar' import { useFullscreenOriginStore } from '@/stores/fullscreen-origin' import { useSidebarStore } from '@/stores/sidebar/store' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/action-bar/action-bar.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/action-bar/action-bar.tsx index 9a2ae9b93d1..f818286ff26 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/action-bar/action-bar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/action-bar/action-bar.tsx @@ -1,8 +1,7 @@ 'use client' - -import { AnimatePresence, domAnimation, LazyMotion, m } from 'framer-motion' import { Button, + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, @@ -11,9 +10,9 @@ import { Folder, Tooltip, Trash, -} from '@/components/emcn' -import { Download } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { Download } from '@sim/emcn/icons' +import { AnimatePresence, domAnimation, LazyMotion, m } from 'framer-motion' import type { MoveOptionNode } from '@/app/workspace/[workspaceId]/files/move-options' import { renderMoveOption } from '@/app/workspace/[workspaceId]/files/move-options' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/delete-confirm-modal/delete-confirm-modal.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/delete-confirm-modal/delete-confirm-modal.tsx index edc10b62f5e..8e02ebfcd69 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/delete-confirm-modal/delete-confirm-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/delete-confirm-modal/delete-confirm-modal.tsx @@ -1,7 +1,7 @@ 'use client' import { memo } from 'react' -import { ChipConfirmModal } from '@/components/emcn' +import { ChipConfirmModal } from '@sim/emcn' interface DeleteConfirmModalProps { open: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-row-context-menu/file-row-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-row-context-menu/file-row-context-menu.tsx index 83b4defd0c6..f7639dde029 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-row-context-menu/file-row-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-row-context-menu/file-row-context-menu.tsx @@ -14,8 +14,8 @@ import { Folder, FolderInput, Pencil, -} from '@/components/emcn' -import { Download, Link, Trash } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Download, Link, Trash } from '@sim/emcn/icons' import type { MoveOptionNode } from '@/app/workspace/[workspaceId]/files/move-options' import { renderMoveOption } from '@/app/workspace/[workspaceId]/files/move-options' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/csv-import.ts b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/csv-import.ts index eae5e438133..b91d1b99318 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/csv-import.ts +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/csv-import.ts @@ -1,9 +1,9 @@ 'use client' import { useCallback, useEffect, useRef } from 'react' +import { toast } from '@sim/emcn' import { generateId } from '@sim/utils/id' import { useRouter } from 'next/navigation' -import { toast } from '@/components/emcn' import { CSV_PREVIEW_MAX_ROWS } from '@/lib/api/contracts/workspace-file-table' import type { WorkspaceFileRecord } from '@/lib/uploads/contexts/workspace' import { useImportFileAsTable } from '@/hooks/queries/tables' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/data-table.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/data-table.tsx index 672811de475..12a3d72a794 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/data-table.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/data-table.tsx @@ -1,7 +1,7 @@ 'use client' import { forwardRef, memo, useCallback, useImperativeHandle, useRef, useState } from 'react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' interface EditConfig { onCellChange: (row: number, col: number, value: string) => void diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/docx-preview.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/docx-preview.tsx index 4d0d4b8583d..6f1e8f75df0 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/docx-preview.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/docx-preview.tsx @@ -1,9 +1,9 @@ 'use client' import { memo, useCallback, useEffect, useRef, useState } from 'react' +import { cn } from '@sim/emcn' import { createLogger } from '@sim/logger' import { toError } from '@sim/utils/errors' -import { cn } from '@/lib/core/utils/cn' import type { WorkspaceFileRecord } from '@/lib/uploads/contexts/workspace' import { PREVIEW_LOADING_OVERLAY, PreviewError, resolvePreviewError } from './preview-shared' import { PreviewToolbar } from './preview-toolbar' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/editor-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/editor-context-menu.tsx index 27ed6d8464c..904d3c06a11 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/editor-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/editor-context-menu.tsx @@ -1,6 +1,5 @@ 'use client' -import { Scissors } from 'lucide-react' import { DropdownMenu, DropdownMenuContent, @@ -8,8 +7,9 @@ import { DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger, -} from '@/components/emcn' -import { Clipboard, Duplicate, Search, SelectAll } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Clipboard, Duplicate, Search, SelectAll } from '@sim/emcn/icons' +import { Scissors } from 'lucide-react' interface EditorContextMenuProps { isOpen: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx index c9971ad7be0..764349c42ad 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-panel.tsx @@ -1,7 +1,7 @@ 'use client' import { memo, useEffect, useMemo, useRef, useState } from 'react' -import '@/components/emcn/components/code/code.css' +import '@sim/emcn/components/code/code.css' import { CSV_PREVIEW_MAX_ROWS } from '@/lib/api/contracts/workspace-file-table' import { getFileExtension } from '@/lib/uploads/utils/file-utils' import { type CsvImportFileDescriptor, useCsvTruncationImport } from './csv-import' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-shared.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-shared.tsx index f72d71a9a81..4796ae6bb1e 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-shared.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-shared.tsx @@ -1,8 +1,8 @@ 'use client' import { Component, type ErrorInfo, type ReactNode } from 'react' +import { cn } from '@sim/emcn' import { createLogger } from '@sim/logger' -import { cn } from '@/lib/core/utils/cn' const logger = createLogger('FilePreview') diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-toolbar.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-toolbar.tsx index 005218e7aff..0d8a326a881 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-toolbar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/preview-toolbar.tsx @@ -1,6 +1,5 @@ +import { Chip, cn } from '@sim/emcn' import { ChevronLeft, ChevronRight, ZoomIn, ZoomOut } from 'lucide-react' -import { Chip } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' interface PreviewNavigationControls { current: number diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/code-block.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/code-block.tsx index 16e38ea987e..c17577c917b 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/code-block.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/code-block.tsx @@ -1,18 +1,18 @@ import { useEffect, useState } from 'react' -import type { JSONContent } from '@tiptap/core' -import { CodeBlock } from '@tiptap/extension-code-block' -import type { ReactNodeViewProps } from '@tiptap/react' -import { NodeViewContent, NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react' -import { Check, ChevronDown, Code, Copy, Eye, WrapText } from 'lucide-react' import { chipVariants, + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard' + useCopyToClipboard, +} from '@sim/emcn' +import type { JSONContent } from '@tiptap/core' +import { CodeBlock } from '@tiptap/extension-code-block' +import type { ReactNodeViewProps } from '@tiptap/react' +import { NodeViewContent, NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react' +import { Check, ChevronDown, Code, Copy, Eye, WrapText } from 'lucide-react' import { looksLikeMermaid, MermaidDiagram } from '../mermaid-diagram' import { detectLanguage } from './detect-language' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/image.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/image.tsx index 187d4c81f4a..0e4f1dbb69b 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/image.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/image.tsx @@ -1,9 +1,9 @@ import { useEffect, useRef, useState } from 'react' +import { cn } from '@sim/emcn' import type { JSONContent } from '@tiptap/core' import { Image } from '@tiptap/extension-image' import type { ReactNodeViewProps } from '@tiptap/react' import { NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react' -import { cn } from '@/lib/core/utils/cn' import { useFileContentSource } from '@/hooks/use-file-content-source' import { normalizeLinkHref } from './markdown-fidelity' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/mention/mention-chip.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/mention/mention-chip.tsx index 3ebff0132a3..d64d5e4958e 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/mention/mention-chip.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/mention/mention-chip.tsx @@ -1,8 +1,8 @@ import type { MouseEvent } from 'react' +import { cn } from '@sim/emcn' import type { ReactNodeViewProps } from '@tiptap/react' import { NodeViewWrapper, ReactNodeViewRenderer } from '@tiptap/react' import { useParams, useRouter } from 'next/navigation' -import { cn } from '@/lib/core/utils/cn' import { getBareIconStyle, type StyleableIcon } from '@/blocks/icon-color' import { mentionIcon } from './mention-icon' import { MarkdownMention, type MentionAttrs } from './mention-node' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/link-hover-card.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/link-hover-card.tsx index 600f5b6c9ba..b56094f2e0b 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/link-hover-card.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/link-hover-card.tsx @@ -1,10 +1,10 @@ import { useCallback, useEffect, useRef, useState } from 'react' import { autoUpdate, computePosition, flip, offset, shift } from '@floating-ui/dom' +import { useCopyToClipboard } from '@sim/emcn' import { getMarkRange } from '@tiptap/core' import type { Editor } from '@tiptap/react' import { Check, Copy, Pencil, Unlink } from 'lucide-react' import { createPortal } from 'react-dom' -import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard' import { normalizeLinkHref } from '../markdown-fidelity' import { applyLink, LinkUrlInput } from './link-editing' import { ToolbarButton } from './toolbar-button' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/suggestion-list.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/suggestion-list.tsx index 5a34b513ae4..c446e011fa0 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/suggestion-list.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/suggestion-list.tsx @@ -1,6 +1,6 @@ import { type ReactNode, type RefObject, useEffect } from 'react' +import { cn } from '@sim/emcn' import type { Editor } from '@tiptap/core' -import { cn } from '@/lib/core/utils/cn' import { SUGGESTION_GROUP_LABEL_CLASS, SUGGESTION_ITEM_CLASS, diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/toolbar-button.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/toolbar-button.tsx index f2c9a4a1b51..7802b3197f4 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/toolbar-button.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/menus/toolbar-button.tsx @@ -1,6 +1,5 @@ +import { cn, Tooltip } from '@sim/emcn' import type { LucideIcon } from 'lucide-react' -import { Tooltip } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' interface ToolbarButtonProps { icon: LucideIcon diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.tsx index a1f49048b84..f8a8286d221 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.tsx @@ -1,12 +1,11 @@ 'use client' import { memo, useEffect, useRef, useState } from 'react' +import { cn, toast } from '@sim/emcn' import type { JSONContent } from '@tiptap/core' import type { Editor } from '@tiptap/react' import { EditorContent, useEditor } from '@tiptap/react' import { useRouter } from 'next/navigation' -import { toast } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import type { WorkspaceFileRecord } from '@/lib/uploads/contexts/workspace' import { useUploadWorkspaceFile } from '@/hooks/queries/workspace-files' import type { SaveStatus } from '@/hooks/use-autosave' @@ -27,7 +26,7 @@ import { EditorBubbleMenu } from './menus/bubble-menu' import { LinkHoverCard } from './menus/link-hover-card' import { normalizeMarkdownContent } from './normalize-content' import { isRoundTripSafe } from './round-trip-safety' -import '@/components/emcn/components/code/code.css' +import '@sim/emcn/components/code/code.css' import './rich-markdown-editor.css' const EXTENSIONS = createMarkdownEditorExtensions({ diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-field.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-field.tsx index a109a4cb2ed..0df1030a7a8 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-field.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-field.tsx @@ -1,10 +1,9 @@ 'use client' import { useEffect, useRef, useState } from 'react' +import { ChipTextarea, chipFieldSurfaceClass, cn } from '@sim/emcn' import type { JSONContent } from '@tiptap/core' import { EditorContent, useEditor } from '@tiptap/react' -import { ChipTextarea, chipFieldSurfaceClass } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { createMarkdownEditorExtensions } from './editor-extensions' import { applyFrontmatter, @@ -17,7 +16,7 @@ import { EditorBubbleMenu } from './menus/bubble-menu' import { LinkHoverCard } from './menus/link-hover-card' import { normalizeMarkdownContent } from './normalize-content' import { isRoundTripSafe } from './round-trip-safety' -import '@/components/emcn/components/code/code.css' +import '@sim/emcn/components/code/code.css' import './rich-markdown-editor.css' interface RichMarkdownFieldProps { diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor.tsx index ca3a2e27e2b..d0fa0369a1a 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor.tsx @@ -2,9 +2,9 @@ import { memo, useCallback, useEffect, useRef, useState } from 'react' import type { OnMount } from '@monaco-editor/react' +import { cn } from '@sim/emcn' import type { editor as MonacoEditorTypes } from 'monaco-editor' import dynamic from 'next/dynamic' -import { cn } from '@/lib/core/utils/cn' import type { WorkspaceFileRecord } from '@/lib/uploads/contexts/workspace' import { getFileExtension } from '@/lib/uploads/utils/file-utils' import { EditorContextMenu } from './editor-context-menu' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/xlsx-preview.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/xlsx-preview.tsx index 3962aaf038d..6e15f70cde2 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/xlsx-preview.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/xlsx-preview.tsx @@ -1,10 +1,10 @@ 'use client' import { memo, useEffect, useRef, useState } from 'react' +import { Chip } from '@sim/emcn' import { createLogger } from '@sim/logger' import { toError } from '@sim/utils/errors' import type { WorkBook } from 'xlsx' -import { Chip } from '@/components/emcn' import type { WorkspaceFileRecord } from '@/lib/uploads/contexts/workspace' import { DataTable } from './data-table' import { PreviewError, PreviewLoadingFrame, resolvePreviewError } from './preview-shared' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/zoomable-preview.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/zoomable-preview.tsx index a0a6acbbb5c..327e2808393 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/zoomable-preview.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/zoomable-preview.tsx @@ -2,7 +2,7 @@ import type { MouseEvent, ReactNode } from 'react' import { useCallback, useLayoutEffect, useRef, useState } from 'react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' import { PreviewToolbar } from './preview-toolbar' import { bindPreviewWheelZoom } from './preview-wheel-zoom' diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/files-list-context-menu/files-list-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/files-list-context-menu/files-list-context-menu.tsx index 1954a1fcb05..9d6308e761a 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/files-list-context-menu/files-list-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/files-list-context-menu/files-list-context-menu.tsx @@ -1,13 +1,8 @@ 'use client' import { memo } from 'react' -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from '@/components/emcn' -import { FolderPlus, Plus, Upload } from '@/components/emcn/icons' +import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@sim/emcn' +import { FolderPlus, Plus, Upload } from '@sim/emcn/icons' interface FilesListContextMenuProps { isOpen: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/share-modal/share-modal.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/share-modal/share-modal.tsx index c485697230c..d4e1105e087 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/share-modal/share-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/share-modal/share-modal.tsx @@ -1,7 +1,6 @@ 'use client' import { useState } from 'react' -import { generateShortId } from '@sim/utils/id' import { ButtonGroup, ButtonGroupItem, @@ -12,8 +11,9 @@ import { ChipModalHeader, TagInput, type TagItem, -} from '@/components/emcn' -import { Send } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Send } from '@sim/emcn/icons' +import { generateShortId } from '@sim/utils/id' import { GeneratedPasswordInput } from '@/components/ui' import type { ShareAuthType, ShareRecord } from '@/lib/api/contracts/public-shares' import { getEnv, isTruthy } from '@/lib/core/config/env' diff --git a/apps/sim/app/workspace/[workspaceId]/files/files.tsx b/apps/sim/app/workspace/[workspaceId]/files/files.tsx index c120b973a93..cbc9828cd53 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/files.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/files.tsx @@ -1,11 +1,6 @@ 'use client' import { type DragEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage, toError } from '@sim/utils/errors' -import { useParams, useRouter } from 'next/navigation' -import { useQueryStates } from 'nuqs' -import { usePostHog } from 'posthog-js/react' import { Button, ChipCombobox, @@ -22,8 +17,13 @@ import { Trash, toast, Upload, -} from '@/components/emcn' -import { Download, Send } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Download, Send } from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { getErrorMessage, toError } from '@sim/utils/errors' +import { useParams, useRouter } from 'next/navigation' +import { useQueryStates } from 'nuqs' +import { usePostHog } from 'posthog-js/react' import { getDocumentIcon } from '@/components/icons/document-icons' import { useLimitUpgradeToast } from '@/lib/billing/client' import { captureEvent } from '@/lib/posthog/client' diff --git a/apps/sim/app/workspace/[workspaceId]/files/loading.tsx b/apps/sim/app/workspace/[workspaceId]/files/loading.tsx index 486b03004f9..0cae5e550d0 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/loading.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/loading.tsx @@ -1,6 +1,6 @@ 'use client' -import { File as FilesIcon, FolderPlus, Plus, Upload } from '@/components/emcn' +import { File as FilesIcon, FolderPlus, Plus, Upload } from '@sim/emcn' import { type ChromeActionSpec, ResourceChromeFallback, diff --git a/apps/sim/app/workspace/[workspaceId]/files/move-options.tsx b/apps/sim/app/workspace/[workspaceId]/files/move-options.tsx index 3909673616e..c58d842c5e0 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/move-options.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/move-options.tsx @@ -5,8 +5,8 @@ import { DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, -} from '@/components/emcn' -import { Folder } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Folder } from '@sim/emcn/icons' export interface MoveOptionNode { value: string diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/chat-context-kind-registry/chat-context-kind-registry.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/chat-context-kind-registry/chat-context-kind-registry.tsx index e01cbc5f80d..fde79283857 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/chat-context-kind-registry/chat-context-kind-registry.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/chat-context-kind-registry/chat-context-kind-registry.tsx @@ -7,7 +7,7 @@ import { Table as TableIcon, Task, Workflow, -} from '@/components/emcn/icons' +} from '@sim/emcn/icons' import { AgentSkillsIcon } from '@/components/icons' import { getDocumentIcon } from '@/components/icons/document-icons' import type { ChatContextKind, ChatMessageContext } from '@/app/workspace/[workspaceId]/home/types' diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/chat-message-attachments/chat-message-attachments.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/chat-message-attachments/chat-message-attachments.tsx index df922d9715e..c4626ad23d0 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/chat-message-attachments/chat-message-attachments.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/chat-message-attachments/chat-message-attachments.tsx @@ -1,5 +1,5 @@ +import { cn } from '@sim/emcn' import { getDocumentIcon } from '@/components/icons/document-icons' -import { cn } from '@/lib/core/utils/cn' import type { ChatMessageAttachment } from '@/app/workspace/[workspaceId]/home/types' function FileAttachmentPill(props: { mediaType: string; filename: string }) { diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/credits-chip/credits-chip.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/credits-chip/credits-chip.tsx index ad314077b99..2cf39ea8b49 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/credits-chip/credits-chip.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/credits-chip/credits-chip.tsx @@ -1,10 +1,10 @@ 'use client' import { useCallback } from 'react' +import { Chip } from '@sim/emcn' +import { Credit } from '@sim/emcn/icons' import { useQueryClient } from '@tanstack/react-query' import { useParams, useRouter } from 'next/navigation' -import { Chip } from '@/components/emcn' -import { Credit } from '@/components/emcn/icons' import { ON_DEMAND_UNLIMITED } from '@/lib/billing/constants' import { formatCredits } from '@/lib/billing/credits/conversion' import { buildUpgradeHref } from '@/lib/billing/upgrade-reasons' diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/agent-group.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/agent-group.tsx index 4ac5bd3533f..ce8d57b6dcd 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/agent-group.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/agent-group.tsx @@ -1,8 +1,7 @@ 'use client' import { useEffect, useLayoutEffect, useRef, useState } from 'react' -import { ChevronDown, Expandable, ExpandableContent, PillsRing } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +import { ChevronDown, cn, Expandable, ExpandableContent, PillsRing } from '@sim/emcn' import type { ToolCallData } from '../../../../types' import { getAgentIcon, isToolDone } from '../../utils' import { ToolCallItem } from './tool-call-item' diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/tool-call-item.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/tool-call-item.tsx index 6b8baa463fa..c671fc3a593 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/tool-call-item.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/agent-group/tool-call-item.tsx @@ -1,5 +1,5 @@ import { useMemo } from 'react' -import { PillsRing } from '@/components/emcn' +import { PillsRing } from '@sim/emcn' import { WorkspaceFile } from '@/lib/copilot/generated/tool-catalog-v1' import type { ToolCallStatus } from '../../../../types' import { getToolIcon, resolveToolDisplayState } from '../../utils' diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx index 3075698e179..ce91dd27165 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/chat-content/chat-content.tsx @@ -7,9 +7,8 @@ import 'prismjs/components/prism-typescript' import 'prismjs/components/prism-bash' import 'prismjs/components/prism-css' import 'prismjs/components/prism-markup' -import '@/components/emcn/components/code/code.css' -import { Checkbox, CopyCodeButton, highlight, languages } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +import '@sim/emcn/components/code/code.css' +import { Checkbox, CopyCodeButton, cn, highlight, languages } from '@sim/emcn' import { extractTextContent } from '@/lib/core/utils/react-node-text' import { type ContentSegment, diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/special-tags/special-tags.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/special-tags/special-tags.tsx index f434d983c1c..dd45bd23ccd 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/special-tags/special-tags.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/components/special-tags/special-tags.tsx @@ -1,16 +1,9 @@ 'use client' import { createElement, useMemo, useState } from 'react' +import { ArrowRight, ChevronDown, cn, Expandable, ExpandableContent, SecretReveal } from '@sim/emcn' import { useParams } from 'next/navigation' -import { - ArrowRight, - ChevronDown, - Expandable, - ExpandableContent, - SecretReveal, -} from '@/components/emcn' import { canonicalWorkspaceFilePath } from '@/lib/copilot/vfs/path-utils' -import { cn } from '@/lib/core/utils/cn' import { OAUTH_PROVIDERS } from '@/lib/oauth/oauth' import { ContextMentionIcon } from '@/app/workspace/[workspaceId]/home/components/context-mention-icon' import type { diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/utils.ts b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/utils.ts index 7cf99bbf16e..6a06125c07a 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/message-content/utils.ts +++ b/apps/sim/app/workspace/[workspaceId]/home/components/message-content/utils.ts @@ -18,8 +18,8 @@ import { Settings, TerminalWindow, Wrench, -} from '@/components/emcn' -import { Calendar, Table as TableIcon } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Calendar, Table as TableIcon } from '@sim/emcn/icons' import { AgentIcon, ImageIcon, TTSIcon, VideoIcon } from '@/components/icons' import type { ToolCallStatus } from '@/app/workspace/[workspaceId]/home/types' diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/components/mothership-chat-skeleton/mothership-chat-skeleton.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/components/mothership-chat-skeleton/mothership-chat-skeleton.tsx index 9e543a57e6e..3e8838e2cee 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/components/mothership-chat-skeleton/mothership-chat-skeleton.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/components/mothership-chat-skeleton/mothership-chat-skeleton.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' const LAYOUT_SKELETON_STYLES = { 'mothership-view': { diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/mothership-chat.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/mothership-chat.tsx index 3eb686cb883..841538b2e17 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/mothership-chat.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-chat/mothership-chat.tsx @@ -10,8 +10,8 @@ import { useRef, useState, } from 'react' +import { cn } from '@sim/emcn' import { defaultRangeExtractor, type Range, useVirtualizer } from '@tanstack/react-virtual' -import { cn } from '@/lib/core/utils/cn' import { MessageActions } from '@/app/workspace/[workspaceId]/components' import { ChatMessageAttachments } from '@/app/workspace/[workspaceId]/home/components/chat-message-attachments' import { ChatSurfaceProvider } from '@/app/workspace/[workspaceId]/home/components/chat-surface-context' diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/add-resource-dropdown/add-resource-dropdown.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/add-resource-dropdown/add-resource-dropdown.tsx index 2f3283aa245..7f67d25704f 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/add-resource-dropdown/add-resource-dropdown.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/add-resource-dropdown/add-resource-dropdown.tsx @@ -1,9 +1,9 @@ 'use client' import { useMemo, useState } from 'react' -import { truncate } from '@sim/utils/string' import { Button, + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, @@ -13,9 +13,9 @@ import { DropdownMenuSubTrigger, DropdownMenuTrigger, Tooltip, -} from '@/components/emcn' -import { Folder, Plus, Workflow } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { Folder, Plus, Workflow } from '@sim/emcn/icons' +import { truncate } from '@sim/utils/string' import { getResourceConfig } from '@/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-registry' import { RESOURCE_TAB_ICON_BUTTON_CLASS, diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/components/generic-resource-content/generic-resource-content.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/components/generic-resource-content/generic-resource-content.tsx index 6e9f5935543..e4616e5fb99 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/components/generic-resource-content/generic-resource-content.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/components/generic-resource-content/generic-resource-content.tsx @@ -1,7 +1,7 @@ 'use client' import { useEffect, useRef } from 'react' -import { PillsRing } from '@/components/emcn' +import { PillsRing } from '@sim/emcn' import type { GenericResourceData } from '@/app/workspace/[workspaceId]/home/types' interface GenericResourceContentProps { diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx index 549aff3d046..0bfe6bdb233 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-content/resource-content.tsx @@ -1,10 +1,7 @@ 'use client' import { lazy, memo, Suspense, useEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { format } from 'date-fns' -import { useRouter } from 'next/navigation' -import { Button, PlayOutline, Skeleton, Tooltip } from '@/components/emcn' +import { Button, PlayOutline, Skeleton, Tooltip } from '@sim/emcn' import { Calendar, Download, @@ -15,7 +12,10 @@ import { SquareArrowUpRight, Workflow as WorkflowIcon, WorkflowX, -} from '@/components/emcn/icons' +} from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { format } from 'date-fns' +import { useRouter } from 'next/navigation' import { isApiClientError } from '@/lib/api/client/errors' import type { FilePreviewSession } from '@/lib/copilot/request/session' import { diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-registry/resource-registry.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-registry/resource-registry.tsx index 7c3f6a4db5e..5fbf767a4c0 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-registry/resource-registry.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-registry/resource-registry.tsx @@ -1,7 +1,7 @@ 'use client' import type { ElementType, ReactNode } from 'react' -import type { QueryClient } from '@tanstack/react-query' +import { cn } from '@sim/emcn' import { Calendar, Connections, @@ -13,9 +13,9 @@ import { Task, TerminalWindow, Workflow, -} from '@/components/emcn/icons' +} from '@sim/emcn/icons' +import type { QueryClient } from '@tanstack/react-query' import { getDocumentIcon } from '@/components/icons/document-icons' -import { cn } from '@/lib/core/utils/cn' import type { MothershipResource, MothershipResourceType, diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tabs.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tabs.tsx index dfab22cc4fd..a99416db8de 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tabs.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tabs.tsx @@ -10,11 +10,10 @@ import { useRef, useState, } from 'react' -import { Button, Tooltip } from '@/components/emcn' -import { Columns3, Eye, PanelLeft, Pencil } from '@/components/emcn/icons' +import { Button, cn, Tooltip } from '@sim/emcn' +import { Columns3, Eye, PanelLeft, Pencil } from '@sim/emcn/icons' import { SIM_RESOURCE_DRAG_TYPE, SIM_RESOURCES_DRAG_TYPE } from '@/lib/copilot/resource-types' import { isEphemeralResource } from '@/lib/copilot/resources/types' -import { cn } from '@/lib/core/utils/cn' import type { PreviewMode } from '@/app/workspace/[workspaceId]/files/components/file-viewer' import { useMothershipResources } from '@/app/workspace/[workspaceId]/home/components/mothership-resources-context' import { AddResourceDropdown } from '@/app/workspace/[workspaceId]/home/components/mothership-view/components/add-resource-dropdown' diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/mothership-view.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/mothership-view.tsx index e65c96e96df..57f133daf14 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/mothership-view.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/mothership-view.tsx @@ -1,8 +1,8 @@ 'use client' import { forwardRef, memo, useState } from 'react' +import { cn } from '@sim/emcn' import type { FilePreviewSession } from '@/lib/copilot/request/session' -import { cn } from '@/lib/core/utils/cn' import { getFileExtension } from '@/lib/uploads/utils/file-utils' import type { PreviewMode } from '@/app/workspace/[workspaceId]/files/components/file-viewer' import { diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/queued-messages/queued-messages.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/queued-messages/queued-messages.tsx index 95be7793ae5..ee45c1a1aa9 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/queued-messages/queued-messages.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/queued-messages/queued-messages.tsx @@ -1,9 +1,8 @@ 'use client' import { useCallback, useRef, useState } from 'react' +import { cn, Tooltip } from '@sim/emcn' import { ArrowUp, ChevronDown, ChevronRight, Paperclip, Pencil, Trash2, X } from 'lucide-react' -import { Tooltip } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { UserMessageContent } from '@/app/workspace/[workspaceId]/home/components/user-message-content' import type { QueuedMessage } from '@/app/workspace/[workspaceId]/home/types' diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/suggested-actions/suggested-actions.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/suggested-actions/suggested-actions.tsx index e71c4ed5fae..234289967b0 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/suggested-actions/suggested-actions.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/suggested-actions/suggested-actions.tsx @@ -1,19 +1,12 @@ 'use client' import { type ComponentType, type CSSProperties, useMemo, useState } from 'react' +import { ArrowRight, ChevronDown, chipVariants, cn, Expandable, ExpandableContent } from '@sim/emcn' +import { Shuffle, Table } from '@sim/emcn/icons' import { stripVersionSuffix } from '@sim/utils/string' import { useParams } from 'next/navigation' import { usePostHog } from 'posthog-js/react' -import { - ArrowRight, - ChevronDown, - chipVariants, - Expandable, - ExpandableContent, -} from '@/components/emcn' -import { Shuffle, Table } from '@/components/emcn/icons' import { GmailIcon, SlackIcon } from '@/components/icons' -import { cn } from '@/lib/core/utils/cn' import { getAllBlockMeta, INTEGRATIONS, diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/attached-files-list/attached-files-list.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/attached-files-list/attached-files-list.tsx index 36690900b35..1d917779162 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/attached-files-list/attached-files-list.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/attached-files-list/attached-files-list.tsx @@ -1,8 +1,8 @@ 'use client' import React from 'react' +import { Loader, Tooltip } from '@sim/emcn' import { X } from 'lucide-react' -import { Loader, Tooltip } from '@/components/emcn' import { getDocumentIcon } from '@/components/icons/document-icons' import type { AttachedFile } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/hooks/use-file-attachments' diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/constants.ts b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/constants.ts index 645ace30c60..1e7ee30ce22 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/constants.ts +++ b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/constants.ts @@ -1,4 +1,4 @@ -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' import type { MothershipResource, MothershipResourceType, diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/mic-button/mic-button.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/mic-button/mic-button.tsx index b57abf29cb3..a4e25129823 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/mic-button/mic-button.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/mic-button/mic-button.tsx @@ -1,8 +1,7 @@ 'use client' import React from 'react' -import { Mic, Tooltip } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +import { cn, Mic, Tooltip } from '@sim/emcn' interface MicButtonProps { isListening: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown/plus-menu-dropdown.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown/plus-menu-dropdown.tsx index 530379f1dbb..a29c59b28b3 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown/plus-menu-dropdown.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown/plus-menu-dropdown.tsx @@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, @@ -10,9 +11,8 @@ import { DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, -} from '@/components/emcn' -import { Workflow } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { Workflow } from '@sim/emcn/icons' import { buildFileFolderTree, buildWorkflowFolderTree, diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/prompt-editor/prompt-editor.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/prompt-editor/prompt-editor.tsx index 46bd57d17ea..d716c1d32ba 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/prompt-editor/prompt-editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/prompt-editor/prompt-editor.tsx @@ -1,7 +1,7 @@ 'use client' import { useCallback, useEffect, useLayoutEffect, useMemo } from 'react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' import { ContextMentionIcon } from '@/app/workspace/[workspaceId]/home/components/context-mention-icon' import { OVERLAY_CLASSES, diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/send-button/send-button.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/send-button/send-button.tsx index 3eedfd22d3f..1a3fa5f1195 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/send-button/send-button.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/send-button/send-button.tsx @@ -1,8 +1,7 @@ 'use client' import React from 'react' -import { ArrowUp, Button } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +import { ArrowUp, Button, cn } from '@sim/emcn' import { SEND_BUTTON_ACTIVE, SEND_BUTTON_BASE, diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/skills-menu-dropdown/skills-menu-dropdown.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/skills-menu-dropdown/skills-menu-dropdown.tsx index c5e586b850a..9d43b5bd773 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/skills-menu-dropdown/skills-menu-dropdown.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/skills-menu-dropdown/skills-menu-dropdown.tsx @@ -1,9 +1,8 @@ 'use client' import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@/components/emcn' +import { cn, DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from '@sim/emcn' import { AgentSkillsIcon } from '@/components/icons' -import { cn } from '@/lib/core/utils/cn' import type { SkillDefinition } from '@/hooks/queries/skills' /** diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx index 906dbc9b0d5..188ad323b3c 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/user-input/user-input.tsx @@ -10,12 +10,11 @@ import { useRef, useState, } from 'react' +import { Button, cn, Paperclip, Plus, Slash, Tooltip, toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { useParams } from 'next/navigation' -import { Button, Paperclip, Plus, Slash, Tooltip, toast } from '@/components/emcn' import { getMothershipAttachmentPreviewUrl } from '@/lib/copilot/chat/attachment-preview' import { SIM_RESOURCE_DRAG_TYPE, SIM_RESOURCES_DRAG_TYPE } from '@/lib/copilot/resource-types' -import { cn } from '@/lib/core/utils/cn' import { CHAT_ACCEPT_ATTRIBUTE } from '@/lib/uploads/utils/validation' import { useChatSurface } from '@/app/workspace/[workspaceId]/home/components/chat-surface-context' import { diff --git a/apps/sim/app/workspace/[workspaceId]/home/components/user-message-content/user-message-content.tsx b/apps/sim/app/workspace/[workspaceId]/home/components/user-message-content/user-message-content.tsx index 95b6c809009..77e90582205 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/components/user-message-content/user-message-content.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/components/user-message-content/user-message-content.tsx @@ -1,7 +1,7 @@ 'use client' import { useMemo } from 'react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' import { ContextMentionIcon } from '@/app/workspace/[workspaceId]/home/components/context-mention-icon' import type { ChatMessageContext } from '@/app/workspace/[workspaceId]/home/types' import { getIntegrationMatcher } from '@/blocks/integration-matcher' diff --git a/apps/sim/app/workspace/[workspaceId]/home/home.tsx b/apps/sim/app/workspace/[workspaceId]/home/home.tsx index 9b85fefbec8..6e75925b9a9 100644 --- a/apps/sim/app/workspace/[workspaceId]/home/home.tsx +++ b/apps/sim/app/workspace/[workspaceId]/home/home.tsx @@ -9,12 +9,12 @@ import { useRef, useState, } from 'react' +import { Button } from '@sim/emcn' +import { PanelLeft } from '@sim/emcn/icons' import { createLogger } from '@sim/logger' import { useParams, useRouter } from 'next/navigation' import { useQueryState } from 'nuqs' import { usePostHog } from 'posthog-js/react' -import { Button } from '@/components/emcn' -import { PanelLeft } from '@/components/emcn/icons' import { requestJson } from '@/lib/api/client/request' import { createWorkflowContract } from '@/lib/api/contracts' import { canonicalWorkspaceFilePath } from '@/lib/copilot/vfs/path-utils' diff --git a/apps/sim/app/workspace/[workspaceId]/integrations/[block]/integration-block-detail.tsx b/apps/sim/app/workspace/[workspaceId]/integrations/[block]/integration-block-detail.tsx index 3a2d73cf79a..0647775fafd 100644 --- a/apps/sim/app/workspace/[workspaceId]/integrations/[block]/integration-block-detail.tsx +++ b/apps/sim/app/workspace/[workspaceId]/integrations/[block]/integration-block-detail.tsx @@ -1,12 +1,11 @@ 'use client' import { useEffect, useMemo, useRef, useState } from 'react' +import { Chip, ChipDropdown, ChipLink, cn } from '@sim/emcn' import { ArrowLeft, ArrowRight, Plus } from 'lucide-react' import Link from 'next/link' import { useRouter } from 'next/navigation' import { useQueryState } from 'nuqs' -import { Chip, ChipDropdown, ChipLink } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { blockTypeToIconMap, type Integration, diff --git a/apps/sim/app/workspace/[workspaceId]/integrations/[block]/integration-skills-section.tsx b/apps/sim/app/workspace/[workspaceId]/integrations/[block]/integration-skills-section.tsx index 8b40a489734..734d4a14c85 100644 --- a/apps/sim/app/workspace/[workspaceId]/integrations/[block]/integration-skills-section.tsx +++ b/apps/sim/app/workspace/[workspaceId]/integrations/[block]/integration-skills-section.tsx @@ -1,9 +1,9 @@ 'use client' import { useMemo, useRef, useState } from 'react' +import { Chip, toast } from '@sim/emcn' import { Check, Plus } from 'lucide-react' import { usePostHog } from 'posthog-js/react' -import { Chip, toast } from '@/components/emcn' import { captureEvent } from '@/lib/posthog/client' import { SkillTile } from '@/app/workspace/[workspaceId]/components' import type { SuggestedSkill } from '@/blocks/types' diff --git a/apps/sim/app/workspace/[workspaceId]/integrations/[block]/page.tsx b/apps/sim/app/workspace/[workspaceId]/integrations/[block]/page.tsx index d8baabd34ea..e3472de9b1a 100644 --- a/apps/sim/app/workspace/[workspaceId]/integrations/[block]/page.tsx +++ b/apps/sim/app/workspace/[workspaceId]/integrations/[block]/page.tsx @@ -1,8 +1,8 @@ import { Suspense } from 'react' +import { ChipLink } from '@sim/emcn' import { ArrowLeft } from 'lucide-react' import type { Metadata } from 'next' import { notFound } from 'next/navigation' -import { ChipLink } from '@/components/emcn' import { INTEGRATIONS } from '@/lib/integrations' import { IntegrationBlockDetail } from '@/app/workspace/[workspaceId]/integrations/[block]/integration-block-detail' diff --git a/apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/connect-service-account-modal.tsx b/apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/connect-service-account-modal.tsx index 5a8391bf787..d28b84bdb35 100644 --- a/apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/connect-service-account-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/connect-service-account-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { type ComponentType, useEffect, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' import { ChipModal, ChipModalBody, @@ -11,7 +9,9 @@ import { ChipModalFooter, ChipModalHeader, SecretInput, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' import { isApiClientError } from '@/lib/api/client/errors' import { serviceAccountJsonSchema } from '@/lib/api/contracts/credentials' import { ATLASSIAN_SERVICE_ACCOUNT_PROVIDER_ID } from '@/lib/oauth/types' diff --git a/apps/sim/app/workspace/[workspaceId]/integrations/components/integration-tabs-header/integration-tabs-header.tsx b/apps/sim/app/workspace/[workspaceId]/integrations/components/integration-tabs-header/integration-tabs-header.tsx index 95ef5a0ccd7..66fc7fb2f22 100644 --- a/apps/sim/app/workspace/[workspaceId]/integrations/components/integration-tabs-header/integration-tabs-header.tsx +++ b/apps/sim/app/workspace/[workspaceId]/integrations/components/integration-tabs-header/integration-tabs-header.tsx @@ -1,5 +1,5 @@ import type { ReactNode } from 'react' -import { ChipLink } from '@/components/emcn' +import { ChipLink } from '@sim/emcn' interface IntegrationTabsHeaderProps { active: 'integrations' | 'skills' diff --git a/apps/sim/app/workspace/[workspaceId]/integrations/components/showcase-with-explore/showcase-with-explore.tsx b/apps/sim/app/workspace/[workspaceId]/integrations/components/showcase-with-explore/showcase-with-explore.tsx index 73666025dec..892ccb598b2 100644 --- a/apps/sim/app/workspace/[workspaceId]/integrations/components/showcase-with-explore/showcase-with-explore.tsx +++ b/apps/sim/app/workspace/[workspaceId]/integrations/components/showcase-with-explore/showcase-with-explore.tsx @@ -1,8 +1,8 @@ 'use client' +import { Chip } from '@sim/emcn' import { ArrowRight } from 'lucide-react' import { useParams, useRouter } from 'next/navigation' -import { Chip } from '@/components/emcn' import { IntegrationsShowcase } from '@/app/workspace/[workspaceId]/integrations/components/integrations-showcase' import { storeCuratedPrompt } from '@/blocks/integration-matcher' diff --git a/apps/sim/app/workspace/[workspaceId]/integrations/connected/[credentialId]/connected-credential-detail.tsx b/apps/sim/app/workspace/[workspaceId]/integrations/connected/[credentialId]/connected-credential-detail.tsx index 1253d6f3dd1..0082e066f16 100644 --- a/apps/sim/app/workspace/[workspaceId]/integrations/connected/[credentialId]/connected-credential-detail.tsx +++ b/apps/sim/app/workspace/[workspaceId]/integrations/connected/[credentialId]/connected-credential-detail.tsx @@ -1,9 +1,6 @@ 'use client' import { type ComponentType, useCallback, useMemo, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' -import { useRouter } from 'next/navigation' import { Chip, ChipConfirmModal, @@ -13,8 +10,11 @@ import { ChipTextarea, Send, toast, -} from '@/components/emcn' -import { ArrowLeft } from '@/components/emcn/icons' +} from '@sim/emcn' +import { ArrowLeft } from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { useRouter } from 'next/navigation' import { writeOAuthReturnContext } from '@/lib/credentials/client-state' import { INTEGRATIONS, resolveOAuthServiceForIntegration } from '@/lib/integrations' import { getServiceConfigByProviderId } from '@/lib/oauth' diff --git a/apps/sim/app/workspace/[workspaceId]/integrations/integrations.tsx b/apps/sim/app/workspace/[workspaceId]/integrations/integrations.tsx index 43e4331d17e..f75f01164d5 100644 --- a/apps/sim/app/workspace/[workspaceId]/integrations/integrations.tsx +++ b/apps/sim/app/workspace/[workspaceId]/integrations/integrations.tsx @@ -1,9 +1,6 @@ 'use client' import { type ComponentType, useCallback, useMemo } from 'react' -import Link from 'next/link' -import { useParams } from 'next/navigation' -import { debounce, useQueryStates } from 'nuqs' import { ArrowRight, ChevronDown, @@ -14,7 +11,10 @@ import { DropdownMenuItem, DropdownMenuTrigger, Search, -} from '@/components/emcn' +} from '@sim/emcn' +import Link from 'next/link' +import { useParams } from 'next/navigation' +import { debounce, useQueryStates } from 'nuqs' import { blockTypeToIconMap, formatIntegrationType, diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/chunk-context-menu/chunk-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/chunk-context-menu/chunk-context-menu.tsx index ae7e9d0c89e..605dfa1f53a 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/chunk-context-menu/chunk-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/chunk-context-menu/chunk-context-menu.tsx @@ -6,8 +6,8 @@ import { DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, -} from '@/components/emcn' -import { Duplicate, Eye, Pencil, Plus, SquareArrowUpRight, Trash } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Duplicate, Eye, Pencil, Plus, SquareArrowUpRight, Trash } from '@sim/emcn/icons' interface ChunkContextMenuProps { isOpen: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/chunk-editor/chunk-editor.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/chunk-editor/chunk-editor.tsx index 0656d632bf5..cc194295460 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/chunk-editor/chunk-editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/chunk-editor/chunk-editor.tsx @@ -1,11 +1,10 @@ 'use client' import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react' -import { Label, Switch } from '@/components/emcn' +import { handleKeyboardActivation, Label, Switch } from '@sim/emcn' import { isApiClientError } from '@/lib/api/client/errors' import { requestJson } from '@/lib/api/client/request' import { getKnowledgeChunkContract } from '@/lib/api/contracts/knowledge' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import type { ChunkData, DocumentData } from '@/lib/knowledge/types' import { getAccurateTokenCount, getTokenStrings } from '@/lib/tokenization/estimators' import { useCreateChunk, useUpdateChunk } from '@/hooks/queries/kb/knowledge' diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/delete-chunk-modal/delete-chunk-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/delete-chunk-modal/delete-chunk-modal.tsx index 265a3820914..e6026d604d6 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/delete-chunk-modal/delete-chunk-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/delete-chunk-modal/delete-chunk-modal.tsx @@ -1,6 +1,6 @@ 'use client' -import { ChipConfirmModal } from '@/components/emcn' +import { ChipConfirmModal } from '@sim/emcn' import type { ChunkData } from '@/lib/knowledge/types' import { useDeleteChunk } from '@/hooks/queries/kb/knowledge' diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/document-tags-modal/document-tags-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/document-tags-modal/document-tags-modal.tsx index e5b9081f207..77f7e904539 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/document-tags-modal/document-tags-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/document-tags-modal/document-tags-modal.tsx @@ -1,7 +1,6 @@ 'use client' import { useCallback, useEffect, useState } from 'react' -import { createLogger } from '@sim/logger' import { Badge, Button, @@ -13,10 +12,11 @@ import { ChipModalField, ChipModalFooter, ChipModalHeader, + handleKeyboardActivation, Label, Trash, -} from '@/components/emcn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' import { ALL_TAG_SLOTS, type AllTagSlot, MAX_TAG_SLOTS } from '@/lib/knowledge/constants' import type { DocumentTag } from '@/lib/knowledge/tags/types' import type { DocumentData } from '@/lib/knowledge/types' diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/document.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/document.tsx index 2e2cb52e2cc..cabe6a73332 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/document.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/document.tsx @@ -1,12 +1,12 @@ 'use client' import { useCallback, useEffect, useEffectEvent, useMemo, useRef, useState } from 'react' +import { Badge, ChipCombobox, ChipConfirmModal, Plus, Trash } from '@sim/emcn' +import { Database } from '@sim/emcn/icons' import { createLogger } from '@sim/logger' import { ChevronDown, ChevronUp, FileText, Pencil, Tag } from 'lucide-react' import { useParams, useRouter } from 'next/navigation' import { useQueryStates } from 'nuqs' -import { Badge, ChipCombobox, ChipConfirmModal, Plus, Trash } from '@/components/emcn' -import { Database } from '@/components/emcn/icons' import { SearchHighlight } from '@/components/ui/search-highlight' import type { ChunkData } from '@/lib/knowledge/types' import { formatTokenCount } from '@/lib/tokenization' diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/loading.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/loading.tsx index 14d6fc5fb81..a0df3250449 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/loading.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/loading.tsx @@ -1,8 +1,8 @@ 'use client' +import { Plus } from '@sim/emcn' +import { Database } from '@sim/emcn/icons' import { FileText } from 'lucide-react' -import { Plus } from '@/components/emcn' -import { Database } from '@/components/emcn/icons' import { type BreadcrumbItem, type ChromeActionSpec, diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/base.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/base.tsx index 1cd64272bb0..2f7bfa3b140 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/base.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/base.tsx @@ -1,14 +1,6 @@ 'use client' import { type ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' -import { generateId } from '@sim/utils/id' -import { format } from 'date-fns' -import { AlertCircle, Pencil, Plus, Tag, X } from 'lucide-react' -import { useParams, useRouter } from 'next/navigation' -import { debounce, useQueryState, useQueryStates } from 'nuqs' -import { usePostHog } from 'posthog-js/react' import { Badge, Button, @@ -25,13 +17,21 @@ import { chipContentGap, chipContentLabelClass, chipVariants, + cn, Loader, Tooltip, Trash, -} from '@/components/emcn' -import { Database, DatabaseX } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Database, DatabaseX } from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { generateId } from '@sim/utils/id' +import { format } from 'date-fns' +import { AlertCircle, Pencil, Plus, Tag, X } from 'lucide-react' +import { useParams, useRouter } from 'next/navigation' +import { debounce, useQueryState, useQueryStates } from 'nuqs' +import { usePostHog } from 'posthog-js/react' import { SearchHighlight } from '@/components/ui/search-highlight' -import { cn } from '@/lib/core/utils/cn' import { ALL_TAG_SLOTS, type AllTagSlot, getFieldTypeForSlot } from '@/lib/knowledge/constants' import type { DocumentSortField, SortOrder } from '@/lib/knowledge/documents/types' import { type FilterFieldType, getOperatorsForFieldType } from '@/lib/knowledge/filters/types' diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/action-bar/action-bar.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/action-bar/action-bar.tsx index f82e10a7ea8..052cd60622b 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/action-bar/action-bar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/action-bar/action-bar.tsx @@ -1,7 +1,6 @@ +import { Button, cn, Tooltip, Trash2 } from '@sim/emcn' import { domAnimation, LazyMotion, m } from 'framer-motion' import { Circle, CircleOff } from 'lucide-react' -import { Button, Tooltip, Trash2 } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' interface ActionBarProps { diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-connector-modal/add-connector-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-connector-modal/add-connector-modal.tsx index c32f75b5ec9..c3eb6292a23 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-connector-modal/add-connector-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-connector-modal/add-connector-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { useMemo, useState } from 'react' -import { ArrowLeft, Plus } from 'lucide-react' -import { useParams } from 'next/navigation' import { ArrowRight, Button, @@ -18,11 +16,13 @@ import { ChipModalFooter, ChipModalHeader, type ComboboxOption, + cn, + handleKeyboardActivation, Search, -} from '@/components/emcn' +} from '@sim/emcn' +import { ArrowLeft, Plus } from 'lucide-react' +import { useParams } from 'next/navigation' import { getSubscriptionAccessState } from '@/lib/billing/client' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { consumeOAuthReturnContext } from '@/lib/credentials/client-state' import { getCanonicalScopesForProvider, diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-documents-modal/add-documents-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-documents-modal/add-documents-modal.tsx index 4b6967a3552..cfdc62d32af 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-documents-modal/add-documents-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/add-documents-modal/add-documents-modal.tsx @@ -1,9 +1,6 @@ 'use client' import { useCallback, useEffect, useState } from 'react' -import { createLogger } from '@sim/logger' -import { RotateCcw, X } from 'lucide-react' -import { useParams } from 'next/navigation' import { Button, ChipModal, @@ -12,9 +9,12 @@ import { ChipModalField, ChipModalFooter, ChipModalHeader, + cn, Loader, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { RotateCcw, X } from 'lucide-react' +import { useParams } from 'next/navigation' import { formatFileSize, validateKnowledgeBaseFile } from '@/lib/uploads/utils/file-utils' import { ACCEPT_ATTRIBUTE } from '@/lib/uploads/utils/validation' import { useKnowledgeUpload } from '@/app/workspace/[workspaceId]/knowledge/hooks/use-knowledge-upload' diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/base-tags-modal/base-tags-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/base-tags-modal/base-tags-modal.tsx index dc1a1a51f0b..f0faed182c4 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/base-tags-modal/base-tags-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/base-tags-modal/base-tags-modal.tsx @@ -1,7 +1,6 @@ 'use client' import { useMemo, useState } from 'react' -import { createLogger } from '@sim/logger' import { Button, ChipCombobox, @@ -13,10 +12,11 @@ import { ChipModalFooter, ChipModalHeader, type ComboboxOption, + handleKeyboardActivation, Trash, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' import type { TagUsageData } from '@/lib/api/contracts/knowledge' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { SUPPORTED_FIELD_TYPES, TAG_SLOT_CONFIG } from '@/lib/knowledge/constants' import { getDocumentIcon } from '@/app/workspace/[workspaceId]/knowledge/components' import { diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connector-config-fields/connector-config-fields.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connector-config-fields/connector-config-fields.tsx index e593f728927..340a9992d7e 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connector-config-fields/connector-config-fields.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connector-config-fields/connector-config-fields.tsx @@ -1,7 +1,7 @@ 'use client' +import { Button, ChipCombobox, ChipInput, ChipModalField, Tooltip } from '@sim/emcn' import { ArrowLeftRight, Info } from 'lucide-react' -import { Button, ChipCombobox, ChipInput, ChipModalField, Tooltip } from '@/components/emcn' import { ConnectorSelectorField } from '@/app/workspace/[workspaceId]/knowledge/[id]/components/connector-selector-field' import type { ConfigFieldMap, diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connector-selector-field/connector-selector-field.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connector-selector-field/connector-selector-field.tsx index ac16b24c93a..f0b855bb229 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connector-selector-field/connector-selector-field.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connector-selector-field/connector-selector-field.tsx @@ -1,7 +1,7 @@ 'use client' import { useMemo } from 'react' -import { ChipCombobox, type ComboboxOption, Loader } from '@/components/emcn' +import { ChipCombobox, type ComboboxOption, Loader } from '@sim/emcn' import { SELECTOR_CONTEXT_FIELDS } from '@/lib/workflows/subblocks/context' import type { ConfigFieldMap, diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connectors-section/connectors-section.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connectors-section/connectors-section.tsx index 81769e2aa91..49c852eb666 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connectors-section/connectors-section.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/connectors-section/connectors-section.tsx @@ -1,6 +1,7 @@ 'use client' import { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react' +import { Badge, Button, Checkbox, ChipConfirmModal, cn, Loader, Tooltip } from '@sim/emcn' import { createLogger } from '@sim/logger' import { format, formatDistanceToNow, isPast } from 'date-fns' import { @@ -15,8 +16,6 @@ import { Trash, XCircle, } from 'lucide-react' -import { Badge, Button, Checkbox, ChipConfirmModal, Loader, Tooltip } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { consumeOAuthReturnContext, writeOAuthReturnContext } from '@/lib/credentials/client-state' import { getCanonicalScopesForProvider, getProviderIdFromServiceId } from '@/lib/oauth' import { getMissingRequiredScopes } from '@/lib/oauth/utils' diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/document-context-menu/document-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/document-context-menu/document-context-menu.tsx index 04b17c69f4c..bb751cf2502 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/document-context-menu/document-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/document-context-menu/document-context-menu.tsx @@ -6,8 +6,8 @@ import { DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, -} from '@/components/emcn' -import { Eye, Pencil, Plus, SquareArrowUpRight, TagIcon, Trash } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Eye, Pencil, Plus, SquareArrowUpRight, TagIcon, Trash } from '@sim/emcn/icons' interface DocumentContextMenuProps { isOpen: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/edit-connector-modal/edit-connector-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/edit-connector-modal/edit-connector-modal.tsx index ab1233f0ed7..35f7a667b60 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/edit-connector-modal/edit-connector-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/edit-connector-modal/edit-connector-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { useMemo, useState } from 'react' -import { createLogger } from '@sim/logger' -import { ExternalLink, RotateCcw } from 'lucide-react' import { Button, ButtonGroup, @@ -16,7 +14,9 @@ import { ChipModalTabs, Skeleton, Tooltip, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { ExternalLink, RotateCcw } from 'lucide-react' import { getSubscriptionAccessState } from '@/lib/billing/client' import { ConnectorConfigFields } from '@/app/workspace/[workspaceId]/knowledge/[id]/components/connector-config-fields' import { SYNC_INTERVALS } from '@/app/workspace/[workspaceId]/knowledge/[id]/components/consts' diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/rename-document-modal/rename-document-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/rename-document-modal/rename-document-modal.tsx index 1295da05029..5825d796b87 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/rename-document-modal/rename-document-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/components/rename-document-modal/rename-document-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' import { ChipModal, ChipModalBody, @@ -10,7 +8,9 @@ import { ChipModalField, ChipModalFooter, ChipModalHeader, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' const logger = createLogger('RenameDocumentModal') diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/loading.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/loading.tsx index 0a79d94c593..975b4ab9560 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/loading.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/loading.tsx @@ -1,7 +1,7 @@ 'use client' -import { Plus } from '@/components/emcn' -import { Database } from '@/components/emcn/icons' +import { Plus } from '@sim/emcn' +import { Database } from '@sim/emcn/icons' import { type BreadcrumbItem, type ChromeActionSpec, diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/components/base-card/base-card.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/components/base-card/base-card.tsx index 5c15066b600..47a33dd0a2a 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/components/base-card/base-card.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/components/base-card/base-card.tsx @@ -1,9 +1,9 @@ 'use client' import { useCallback, useMemo, useState } from 'react' +import { Badge, DocumentAttachment, Tooltip } from '@sim/emcn' import { formatAbsoluteDate, formatRelativeTime } from '@sim/utils/formatting' import { useParams, useRouter } from 'next/navigation' -import { Badge, DocumentAttachment, Tooltip } from '@/components/emcn' import { BaseTagsModal } from '@/app/workspace/[workspaceId]/knowledge/[id]/components' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' import { useContextMenu } from '@/app/workspace/[workspaceId]/w/components/sidebar/hooks' diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/components/create-base-modal/create-base-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/components/create-base-modal/create-base-modal.tsx index e1d4c1814ca..915b2b69e38 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/components/create-base-modal/create-base-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/components/create-base-modal/create-base-modal.tsx @@ -2,12 +2,6 @@ import { memo, useEffect, useState } from 'react' import { zodResolver } from '@hookform/resolvers/zod' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' -import { X } from 'lucide-react' -import { useParams } from 'next/navigation' -import { useForm } from 'react-hook-form' -import { z } from 'zod' import { Button, Checkbox, @@ -21,10 +15,16 @@ import { ChipModalHeader, ChipTextarea, type ComboboxOption, + cn, Loader, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { X } from 'lucide-react' +import { useParams } from 'next/navigation' +import { useForm } from 'react-hook-form' +import { z } from 'zod' import type { StrategyOptions } from '@/lib/chunkers/types' -import { cn } from '@/lib/core/utils/cn' import { formatFileSize, validateKnowledgeBaseFile } from '@/lib/uploads/utils/file-utils' import { ACCEPT_ATTRIBUTE } from '@/lib/uploads/utils/validation' import { useKnowledgeUpload } from '@/app/workspace/[workspaceId]/knowledge/hooks/use-knowledge-upload' diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/components/delete-knowledge-base-modal/delete-knowledge-base-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/components/delete-knowledge-base-modal/delete-knowledge-base-modal.tsx index 23f24f3fb9c..5d99ed22be3 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/components/delete-knowledge-base-modal/delete-knowledge-base-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/components/delete-knowledge-base-modal/delete-knowledge-base-modal.tsx @@ -1,7 +1,7 @@ 'use client' import { memo } from 'react' -import { ChipConfirmModal } from '@/components/emcn' +import { ChipConfirmModal } from '@sim/emcn' interface DeleteKnowledgeBaseModalProps { /** diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/components/edit-knowledge-base-modal/edit-knowledge-base-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/components/edit-knowledge-base-modal/edit-knowledge-base-modal.tsx index 0a0192b5b61..8cb0833c1c6 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/components/edit-knowledge-base-modal/edit-knowledge-base-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/components/edit-knowledge-base-modal/edit-knowledge-base-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { memo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' import { ChipModal, ChipModalBody, @@ -10,7 +8,9 @@ import { ChipModalField, ChipModalFooter, ChipModalHeader, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' import type { ChunkingConfig } from '@/lib/knowledge/types' const logger = createLogger('EditKnowledgeBaseModal') diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/components/knowledge-base-context-menu/knowledge-base-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/components/knowledge-base-context-menu/knowledge-base-context-menu.tsx index dc2702ce252..5aead1ae911 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/components/knowledge-base-context-menu/knowledge-base-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/components/knowledge-base-context-menu/knowledge-base-context-menu.tsx @@ -7,8 +7,8 @@ import { DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, -} from '@/components/emcn' -import { Duplicate, Pencil, SquareArrowUpRight, TagIcon, Trash } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Duplicate, Pencil, SquareArrowUpRight, TagIcon, Trash } from '@sim/emcn/icons' interface KnowledgeBaseContextMenuProps { isOpen: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/components/knowledge-list-context-menu/knowledge-list-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/components/knowledge-list-context-menu/knowledge-list-context-menu.tsx index 1a257be1236..9c5037bfade 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/components/knowledge-list-context-menu/knowledge-list-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/components/knowledge-list-context-menu/knowledge-list-context-menu.tsx @@ -1,13 +1,8 @@ 'use client' import { memo } from 'react' -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from '@/components/emcn' -import { Plus } from '@/components/emcn/icons' +import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@sim/emcn' +import { Plus } from '@sim/emcn/icons' interface KnowledgeListContextMenuProps { isOpen: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/knowledge.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/knowledge.tsx index 583737615c3..be7b5ccd801 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/knowledge.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/knowledge.tsx @@ -1,11 +1,11 @@ 'use client' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import type { ChipDropdownOption } from '@sim/emcn' +import { Button, ChipDropdown, Plus, Tooltip } from '@sim/emcn' +import { Database } from '@sim/emcn/icons' import { createLogger } from '@sim/logger' import { useParams, useRouter } from 'next/navigation' -import type { ChipDropdownOption } from '@/components/emcn' -import { Button, ChipDropdown, Plus, Tooltip } from '@/components/emcn' -import { Database } from '@/components/emcn/icons' import type { KnowledgeBaseData } from '@/lib/knowledge/types' import type { FilterTag, diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/loading.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/loading.tsx index aba09ccb463..0f788bda4e6 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/loading.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/loading.tsx @@ -1,7 +1,7 @@ 'use client' -import { Plus } from '@/components/emcn' -import { Database } from '@/components/emcn/icons' +import { Plus } from '@sim/emcn' +import { Database } from '@sim/emcn/icons' import { type ChromeActionSpec, ResourceChromeFallback, diff --git a/apps/sim/app/workspace/[workspaceId]/layout.tsx b/apps/sim/app/workspace/[workspaceId]/layout.tsx index ddafee4e91c..adbaa7d368a 100644 --- a/apps/sim/app/workspace/[workspaceId]/layout.tsx +++ b/apps/sim/app/workspace/[workspaceId]/layout.tsx @@ -1,7 +1,7 @@ +import { ToastProvider } from '@sim/emcn' import { dehydrate, HydrationBoundary } from '@tanstack/react-query' import { cookies } from 'next/headers' import { redirect } from 'next/navigation' -import { ToastProvider } from '@/components/emcn' import { getSession } from '@/lib/auth' import { getQueryClient } from '@/app/_shell/providers/get-query-client' import { ImpersonationBanner } from '@/app/workspace/[workspaceId]/components/impersonation-banner' diff --git a/apps/sim/app/workspace/[workspaceId]/lib/prefetch.test.ts b/apps/sim/app/workspace/[workspaceId]/lib/prefetch.test.ts index 2f8375c836f..4784cf778e9 100644 --- a/apps/sim/app/workspace/[workspaceId]/lib/prefetch.test.ts +++ b/apps/sim/app/workspace/[workspaceId]/lib/prefetch.test.ts @@ -12,7 +12,7 @@ vi.mock('@/app/workspace/[workspaceId]/lib/prefetch-internal-fetch', () => ({ prefetchInternalJson: mockPrefetchInternalJson, })) -vi.mock('@/components/emcn', () => ({ +vi.mock('@sim/emcn', () => ({ toast: { success: vi.fn(), error: vi.fn() }, })) diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/line-chart/line-chart.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/line-chart/line-chart.tsx index 5faf30a5872..5067b579835 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/line-chart/line-chart.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/line-chart/line-chart.tsx @@ -1,7 +1,6 @@ import { memo, useEffect, useMemo, useRef, useState } from 'react' +import { Button, cn } from '@sim/emcn' import { generateShortId } from '@sim/utils/id' -import { Button } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { formatDate, formatLatency } from '@/app/workspace/[workspaceId]/logs/utils' export interface LineChartPoint { diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/status-bar/status-bar.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/status-bar/status-bar.tsx index d78102a019a..0cac86a2ec7 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/status-bar/status-bar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/status-bar/status-bar.tsx @@ -1,5 +1,5 @@ import { memo, useMemo, useState } from 'react' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' +import { handleKeyboardActivation } from '@sim/emcn' import { type SegmentSelectionMode, useDashboardSegments, diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/workflows-list/workflows-list.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/workflows-list/workflows-list.tsx index 52b0ac60ec7..0fb57df945d 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/workflows-list/workflows-list.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/workflows-list/workflows-list.tsx @@ -1,7 +1,6 @@ import { memo } from 'react' -import { Workflow } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' +import { cn, handleKeyboardActivation } from '@sim/emcn' +import { Workflow } from '@sim/emcn/icons' import { FloatingOverflowText } from '@/app/workspace/[workspaceId]/components' import { DELETED_WORKFLOW_LABEL } from '@/app/workspace/[workspaceId]/logs/utils' import { StatusBar, type StatusBarSegment } from '..' diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/dashboard.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/dashboard.tsx index ce53588e763..af9aae6d90d 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/dashboard.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/dashboard.tsx @@ -1,8 +1,8 @@ 'use client' import { memo, useCallback, useMemo, useRef, useState } from 'react' +import { Loader } from '@sim/emcn' import { useParams } from 'next/navigation' -import { Loader } from '@/components/emcn' import { DashboardSegmentsContext, type SegmentSelectionMode, diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx index 955955e8c4d..c1eb4880f7a 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/execution-snapshot/execution-snapshot.tsx @@ -2,9 +2,8 @@ import type React from 'react' import { useState } from 'react' -import { AlertCircle } from 'lucide-react' -import { createPortal } from 'react-dom' import { + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, @@ -16,8 +15,9 @@ import { ModalContent, ModalDescription, ModalHeader, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { AlertCircle } from 'lucide-react' +import { createPortal } from 'react-dom' import { Preview } from '@/app/workspace/[workspaceId]/w/components/preview' import { useExecutionSnapshot } from '@/hooks/queries/logs' import type { WorkflowState } from '@/stores/workflows/workflow/types' diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/file-download/file-download.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/file-download/file-download.tsx index ca40674b3ef..f898833b891 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/file-download/file-download.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/file-download/file-download.tsx @@ -1,9 +1,9 @@ 'use client' +import { Button } from '@sim/emcn' +import { Download } from '@sim/emcn/icons' import { createLogger } from '@sim/logger' import { useRouter } from 'next/navigation' -import { Button } from '@/components/emcn' -import { Download } from '@/components/emcn/icons' import { extractWorkspaceIdFromExecutionKey, getViewerUrl } from '@/lib/uploads/utils/file-utils' const logger = createLogger('FileCards') diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/trace-view/trace-view.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/trace-view/trace-view.tsx index f1f9fe02558..bacca64af3b 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/trace-view/trace-view.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/components/trace-view/trace-view.tsx @@ -2,24 +2,13 @@ import type React from 'react' import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { formatDuration } from '@sim/utils/formatting' -import { - ArrowDown, - ArrowUp, - Check, - ChevronsDownUp, - ChevronsUpDown, - Clipboard, - Search, - X, -} from 'lucide-react' -import { createPortal } from 'react-dom' import { Badge, Button, ChevronDown, ChipInput, Code, + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, @@ -28,8 +17,20 @@ import { Duplicate, Search as SearchIcon, Tooltip, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' + useCopyToClipboard, +} from '@sim/emcn' +import { formatDuration } from '@sim/utils/formatting' +import { + ArrowDown, + ArrowUp, + Check, + ChevronsDownUp, + ChevronsUpDown, + Clipboard, + Search, + X, +} from 'lucide-react' +import { createPortal } from 'react-dom' import type { TraceSpan } from '@/lib/logs/types' import { adjustBgForContrast, @@ -46,7 +47,6 @@ import { parseTime, } from '@/app/workspace/[workspaceId]/logs/components/log-details/utils' import { useCodeViewerFeatures } from '@/hooks/use-code-viewer' -import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard' const DEFAULT_TREE_PANE_WIDTH = 240 const MIN_TREE_PANE_WIDTH = 200 diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx index 37a63dd28dd..e28a8036242 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/log-details/log-details.tsx @@ -1,15 +1,12 @@ 'use client' import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react' -import { formatDuration } from '@sim/utils/formatting' -import { ArrowDown, ArrowUp, Check, ChevronUp, Clipboard, Search, X } from 'lucide-react' -import { useQueryState } from 'nuqs' -import { createPortal } from 'react-dom' import { Button, ChipInput, ChipModalTabs, Code, + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, @@ -17,16 +14,20 @@ import { DropdownMenuTrigger, Duplicate, Eye, + handleKeyboardActivation, Redo, Search as SearchIcon, Tooltip, -} from '@/components/emcn' -import { Workflow } from '@/components/emcn/icons' + useCopyToClipboard, +} from '@sim/emcn' +import { Workflow } from '@sim/emcn/icons' +import { formatDuration } from '@sim/utils/formatting' +import { ArrowDown, ArrowUp, Check, ChevronUp, Clipboard, Search, X } from 'lucide-react' +import { useQueryState } from 'nuqs' +import { createPortal } from 'react-dom' import type { WorkflowLogRow } from '@/lib/api/contracts/logs' import { BASE_EXECUTION_CHARGE } from '@/lib/billing/constants' import { apportionCredits, dollarsToCredits } from '@/lib/billing/credits/conversion' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { filterHiddenOutputKeys } from '@/lib/logs/execution/trace-spans/trace-spans' import type { TraceSpan } from '@/lib/logs/types' import { @@ -47,7 +48,6 @@ import { TriggerBadge, } from '@/app/workspace/[workspaceId]/logs/utils' import { useCodeViewerFeatures } from '@/hooks/use-code-viewer' -import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard' import { usePermissionConfig } from '@/hooks/use-permission-config' import { formatCost } from '@/providers/utils' import { useLogDetailsUIStore } from '@/stores/logs/store' diff --git a/apps/sim/app/workspace/[workspaceId]/logs/components/log-row-context-menu/log-row-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/logs/components/log-row-context-menu/log-row-context-menu.tsx index f9c4d743538..0b2f7c11a2b 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/components/log-row-context-menu/log-row-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/components/log-row-context-menu/log-row-context-menu.tsx @@ -14,7 +14,7 @@ import { Redo, SquareArrowUpRight, X, -} from '@/components/emcn' +} from '@sim/emcn' import type { WorkflowLogSummary } from '@/lib/api/contracts/logs' interface LogRowContextMenuProps { diff --git a/apps/sim/app/workspace/[workspaceId]/logs/error.test.tsx b/apps/sim/app/workspace/[workspaceId]/logs/error.test.tsx index 4b1c259bf74..4e0adcf8390 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/error.test.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/error.test.tsx @@ -5,7 +5,7 @@ import { act, type ReactNode } from 'react' import { createRoot, type Root } from 'react-dom/client' import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -vi.mock('@/components/emcn', () => ({ +vi.mock('@sim/emcn', () => ({ Button: ({ children, ...props }: { children: ReactNode } & Record) => ( ), diff --git a/apps/sim/app/workspace/[workspaceId]/logs/loading.tsx b/apps/sim/app/workspace/[workspaceId]/logs/loading.tsx index c885da5666a..2b25d77ca74 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/loading.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/loading.tsx @@ -1,7 +1,7 @@ 'use client' -import { Library, RefreshCw } from '@/components/emcn' -import { Download } from '@/components/emcn/icons' +import { Library, RefreshCw } from '@sim/emcn' +import { Download } from '@sim/emcn/icons' import { type ChromeActionSpec, ResourceChromeFallback, diff --git a/apps/sim/app/workspace/[workspaceId]/logs/logs.tsx b/apps/sim/app/workspace/[workspaceId]/logs/logs.tsx index 86040119fa4..cfdeeaad72d 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/logs.tsx +++ b/apps/sim/app/workspace/[workspaceId]/logs/logs.tsx @@ -9,30 +9,30 @@ import { useRef, useState, } from 'react' -import { formatDuration } from '@sim/utils/formatting' -import { useQueryClient } from '@tanstack/react-query' -import { useParams } from 'next/navigation' -import { useQueryState } from 'nuqs' import { Button, + Calendar, ChipCombobox, type ComboboxOption, + cn, Library, Popover, PopoverAnchor, PopoverContent, RefreshCw, toast, -} from '@/components/emcn' -import { Calendar } from '@/components/emcn/components/calendar/calendar' -import { Download, Workflow } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Download, Workflow } from '@sim/emcn/icons' +import { formatDuration } from '@sim/utils/formatting' +import { useQueryClient } from '@tanstack/react-query' +import { useParams } from 'next/navigation' +import { useQueryState } from 'nuqs' import type { WorkflowLogDetail, WorkflowLogRow, WorkflowLogSummary, } from '@/lib/api/contracts/logs' import { dollarsToCredits } from '@/lib/billing/credits/conversion' -import { cn } from '@/lib/core/utils/cn' import { getEndDateFromTimeRange, getStartDateFromTimeRange, diff --git a/apps/sim/app/workspace/[workspaceId]/logs/utils.ts b/apps/sim/app/workspace/[workspaceId]/logs/utils.ts index cedeb949c5d..a1553590097 100644 --- a/apps/sim/app/workspace/[workspaceId]/logs/utils.ts +++ b/apps/sim/app/workspace/[workspaceId]/logs/utils.ts @@ -1,7 +1,7 @@ import React from 'react' +import { Badge } from '@sim/emcn' import { formatDuration } from '@sim/utils/formatting' import { format } from 'date-fns' -import { Badge } from '@/components/emcn' import type { WorkflowLogDetail } from '@/lib/api/contracts/logs' import { getIntegrationMetadata } from '@/lib/logs/get-trigger-options' import { getBlock } from '@/blocks/registry' diff --git a/apps/sim/app/workspace/[workspaceId]/not-found.tsx b/apps/sim/app/workspace/[workspaceId]/not-found.tsx index ed65206a744..43dbfbaea36 100644 --- a/apps/sim/app/workspace/[workspaceId]/not-found.tsx +++ b/apps/sim/app/workspace/[workspaceId]/not-found.tsx @@ -1,10 +1,10 @@ 'use client' +import { Button, buttonVariants } from '@sim/emcn' +import { ArrowLeft, Home } from '@sim/emcn/icons' import { Compass } from 'lucide-react' import Link from 'next/link' import { useParams, useRouter } from 'next/navigation' -import { Button, buttonVariants } from '@/components/emcn' -import { ArrowLeft, Home } from '@/components/emcn/icons' import { ErrorShell } from '@/app/workspace/[workspaceId]/components' export default function WorkspaceNotFound() { diff --git a/apps/sim/app/workspace/[workspaceId]/providers/workspace-permissions-provider.tsx b/apps/sim/app/workspace/[workspaceId]/providers/workspace-permissions-provider.tsx index b6bcecf4054..ff28e7309a9 100644 --- a/apps/sim/app/workspace/[workspaceId]/providers/workspace-permissions-provider.tsx +++ b/apps/sim/app/workspace/[workspaceId]/providers/workspace-permissions-provider.tsx @@ -2,10 +2,10 @@ import type React from 'react' import { createContext, useCallback, useContext, useEffect, useMemo, useRef } from 'react' +import { useToast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { useQueryClient } from '@tanstack/react-query' import { useParams } from 'next/navigation' -import { useToast } from '@/components/emcn' import { useSocket } from '@/app/workspace/providers/socket-provider' import { useWorkspacePermissionsQuery, diff --git a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/calendar-event-chip/calendar-event-chip.tsx b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/calendar-event-chip/calendar-event-chip.tsx index 54198191861..785b0bb9d94 100644 --- a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/calendar-event-chip/calendar-event-chip.tsx +++ b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/calendar-event-chip/calendar-event-chip.tsx @@ -1,8 +1,6 @@ 'use client' - +import { chipContentGap, chipPrimaryFillTokens, cn } from '@sim/emcn' import { format } from 'date-fns' -import { chipContentGap, chipPrimaryFillTokens } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import type { CalendarEvent, ScheduledTask, diff --git a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/calendar-toolbar/calendar-toolbar.tsx b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/calendar-toolbar/calendar-toolbar.tsx index 4e51b99e730..f45d7490186 100644 --- a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/calendar-toolbar/calendar-toolbar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/calendar-toolbar/calendar-toolbar.tsx @@ -1,7 +1,5 @@ 'use client' -import { format, parseISO } from 'date-fns' -import { ChevronLeft, ChevronRight } from 'lucide-react' import { Check, Chip, @@ -10,7 +8,9 @@ import { DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, -} from '@/components/emcn' +} from '@sim/emcn' +import { format, parseISO } from 'date-fns' +import { ChevronLeft, ChevronRight } from 'lucide-react' import type { CalendarScope } from '@/app/workspace/[workspaceId]/scheduled-tasks/utils/calendar-grid' const SCOPE_OPTIONS: { value: CalendarScope; label: string }[] = [ diff --git a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/month-grid/month-grid.tsx b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/month-grid/month-grid.tsx index b5ce798812d..17cde723105 100644 --- a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/month-grid/month-grid.tsx +++ b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/month-grid/month-grid.tsx @@ -1,8 +1,6 @@ 'use client' - +import { chipPrimaryFillTokens, cn } from '@sim/emcn' import { format } from 'date-fns' -import { chipPrimaryFillTokens } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { CalendarEventChip } from '@/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/calendar-event-chip' import { type CalendarDayCell, diff --git a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/time-grid/time-grid.tsx b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/time-grid/time-grid.tsx index 63d4b64c88d..4f76fb5520e 100644 --- a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/time-grid/time-grid.tsx +++ b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/time-grid/time-grid.tsx @@ -1,9 +1,8 @@ 'use client' import { useEffect, useState } from 'react' +import { chipPrimaryFillTokens, cn } from '@sim/emcn' import { format } from 'date-fns' -import { chipPrimaryFillTokens } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { zonedClockDate } from '@/lib/core/utils/timezone' import { CalendarEventChip } from '@/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar/components/calendar-event-chip' import { diff --git a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-list-context-menu/schedule-list-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-list-context-menu/schedule-list-context-menu.tsx index f23ad12eb7d..dccceda7ac2 100644 --- a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-list-context-menu/schedule-list-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-list-context-menu/schedule-list-context-menu.tsx @@ -1,12 +1,7 @@ 'use client' -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from '@/components/emcn' -import { Plus } from '@/components/emcn/icons' +import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@sim/emcn' +import { Plus } from '@sim/emcn/icons' interface ScheduleListContextMenuProps { isOpen: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-context-menu/task-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-context-menu/task-context-menu.tsx index 9da810f20a0..f7bf16ba921 100644 --- a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-context-menu/task-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-context-menu/task-context-menu.tsx @@ -6,8 +6,8 @@ import { DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, -} from '@/components/emcn' -import { Duplicate as DuplicateIcon, Pause, Pencil, Play, Trash } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Duplicate as DuplicateIcon, Pause, Pencil, Play, Trash } from '@sim/emcn/icons' import type { ScheduledTask } from '@/app/workspace/[workspaceId]/scheduled-tasks/utils/schedule-events' interface TaskContextMenuProps { diff --git a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-delete-dialog/task-delete-dialog.tsx b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-delete-dialog/task-delete-dialog.tsx index c1ecaadd4fb..d4dcbc3f2d3 100644 --- a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-delete-dialog/task-delete-dialog.tsx +++ b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-delete-dialog/task-delete-dialog.tsx @@ -7,7 +7,7 @@ import { ChipModalBody, ChipModalFooter, ChipModalHeader, -} from '@/components/emcn' +} from '@sim/emcn' import type { ScheduledTask } from '@/app/workspace/[workspaceId]/scheduled-tasks/utils/schedule-events' interface TaskDeleteDialogProps { diff --git a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-details-modal/task-details-modal.tsx b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-details-modal/task-details-modal.tsx index 2674622703a..7c2f0103be8 100644 --- a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-details-modal/task-details-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-details-modal/task-details-modal.tsx @@ -1,7 +1,4 @@ 'use client' - -import { format } from 'date-fns' -import { useParams } from 'next/navigation' import { Calendar, ChipModal, @@ -10,8 +7,10 @@ import { ChipModalFooter, ChipModalHeader, chipFieldSurfaceClass, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' + cn, +} from '@sim/emcn' +import { format } from 'date-fns' +import { useParams } from 'next/navigation' import { PromptEditor, usePromptEditor, diff --git a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-modal/recurrence-section.tsx b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-modal/recurrence-section.tsx index bc7fdf2094f..3453b88a958 100644 --- a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-modal/recurrence-section.tsx +++ b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-modal/recurrence-section.tsx @@ -1,14 +1,14 @@ 'use client' import { useRef } from 'react' -import { format } from 'date-fns' import { CalendarDayCell, ChipDatePicker, ChipModalField, ChipModalSeparator, Switch, -} from '@/components/emcn' +} from '@sim/emcn' +import { format } from 'date-fns' import type { MonthlyMode, Recurrence, diff --git a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-modal/task-modal.tsx b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-modal/task-modal.tsx index 0d05b31fdd9..4862bcc0739 100644 --- a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-modal/task-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/components/task-modal/task-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { useEffect, useRef, useState } from 'react' -import { format } from 'date-fns' -import { useParams } from 'next/navigation' import { Calendar, ChipDatePicker, @@ -12,7 +10,9 @@ import { ChipModalHeader, ChipModalPromptBody, ChipTimePicker, -} from '@/components/emcn' +} from '@sim/emcn' +import { format } from 'date-fns' +import { useParams } from 'next/navigation' import { wallClockNow, zonedWallClockToUtc } from '@/lib/core/utils/timezone' import { PromptEditor, diff --git a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/loading.tsx b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/loading.tsx index d6850e44e2e..cc55388d8a7 100644 --- a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/loading.tsx +++ b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/loading.tsx @@ -1,6 +1,6 @@ 'use client' -import { Calendar, Plus } from '@/components/emcn' +import { Calendar, Plus } from '@sim/emcn' import { type ChromeActionSpec, ResourceChromeFallback, diff --git a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/scheduled-tasks.tsx b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/scheduled-tasks.tsx index 9acdf7cf835..e671c9e4e8f 100644 --- a/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/scheduled-tasks.tsx +++ b/apps/sim/app/workspace/[workspaceId]/scheduled-tasks/scheduled-tasks.tsx @@ -1,8 +1,8 @@ 'use client' import { useCallback, useMemo, useState } from 'react' +import { Calendar, Plus } from '@sim/emcn' import { useParams } from 'next/navigation' -import { Calendar, Plus } from '@/components/emcn' import type { ResourceAction } from '@/app/workspace/[workspaceId]/components' import { Resource } from '@/app/workspace/[workspaceId]/components' import { ScheduleCalendar } from '@/app/workspace/[workspaceId]/scheduled-tasks/components/schedule-calendar' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/admin/admin.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/admin/admin.tsx index bca74138132..56e5a9e33aa 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/admin/admin.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/admin/admin.tsx @@ -1,13 +1,12 @@ 'use client' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { Badge, Button, ChipInput, ChipSelect, cn, Label, Search, Switch } from '@sim/emcn' import { getErrorMessage } from '@sim/utils/errors' import { useParams } from 'next/navigation' import { useQueryStates } from 'nuqs' -import { Badge, Button, ChipInput, ChipSelect, Label, Search, Switch } from '@/components/emcn' import type { MothershipEnvironment } from '@/lib/api/contracts' import { useSession } from '@/lib/auth/auth-client' -import { cn } from '@/lib/core/utils/cn' import { adminParsers, adminUrlKeys, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/api-keys/api-keys.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/api-keys/api-keys.tsx index 8c388d89a48..fa68f11d028 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/api-keys/api-keys.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/api-keys/api-keys.tsx @@ -1,11 +1,11 @@ 'use client' import { useMemo, useState } from 'react' +import { Chip, ChipConfirmModal, Switch, Tooltip, toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { formatDate } from '@sim/utils/formatting' import { Info, Plus } from 'lucide-react' import { useParams } from 'next/navigation' -import { Chip, ChipConfirmModal, Switch, Tooltip, toast } from '@/components/emcn' import { useSession } from '@/lib/auth/auth-client' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' import { RowActionsMenu } from '@/app/workspace/[workspaceId]/settings/components/row-actions-menu' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/api-keys/components/create-api-key-modal/create-api-key-modal.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/api-keys/components/create-api-key-modal/create-api-key-modal.tsx index 3bd2d1df658..b8dfb6d975b 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/api-keys/components/create-api-key-modal/create-api-key-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/api-keys/components/create-api-key-modal/create-api-key-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' import { ButtonGroup, ButtonGroupItem, @@ -13,7 +11,9 @@ import { ChipModalFooter, ChipModalHeader, SecretReveal, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' import { type ApiKey, useCreateApiKey } from '@/hooks/queries/api-keys' const logger = createLogger('CreateApiKeyModal') diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/billing/billing.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/billing/billing.tsx index 36dde10900e..9887f5bd729 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/billing/billing.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/billing/billing.tsx @@ -1,10 +1,4 @@ 'use client' - -import { createLogger } from '@sim/logger' -import { isOrgAdminRole } from '@sim/platform-authz/predicates' -import { getErrorMessage } from '@sim/utils/errors' -import { useQueryClient } from '@tanstack/react-query' -import { useParams, useRouter } from 'next/navigation' import { ArrowRight, Badge, @@ -12,9 +6,15 @@ import { ChipLink, Credit, chipVariants, + cn, Switch, toast, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { isOrgAdminRole } from '@sim/platform-authz/predicates' +import { getErrorMessage } from '@sim/utils/errors' +import { useQueryClient } from '@tanstack/react-query' +import { useParams, useRouter } from 'next/navigation' import { useSession, useSubscription } from '@/lib/auth/auth-client' import { ON_DEMAND_UNLIMITED } from '@/lib/billing/constants' import { CREDIT_MULTIPLIER } from '@/lib/billing/credits/conversion' @@ -34,7 +34,6 @@ import { hasUsableSubscriptionAccess, } from '@/lib/billing/subscriptions/utils' import { buildUpgradeHref } from '@/lib/billing/upgrade-reasons' -import { cn } from '@/lib/core/utils/cn' import { getBaseUrl } from '@/lib/core/utils/urls' import { UsageLimitField } from '@/app/workspace/[workspaceId]/settings/components/billing/components/usage-limit-field/usage-limit-field' import { getSubscriptionPermissions } from '@/app/workspace/[workspaceId]/settings/components/billing/subscription-permissions' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/billing/components/usage-limit-field/usage-limit-field.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/billing/components/usage-limit-field/usage-limit-field.tsx index eb347435dff..fd56bcd442c 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/billing/components/usage-limit-field/usage-limit-field.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/billing/components/usage-limit-field/usage-limit-field.tsx @@ -1,8 +1,8 @@ 'use client' import { useEffect, useRef, useState } from 'react' +import { ChipInput, Info, toast } from '@sim/emcn' import { getErrorMessage } from '@sim/utils/errors' -import { ChipInput, Info, toast } from '@/components/emcn' import { ON_DEMAND_UNLIMITED } from '@/lib/billing/constants' import { creditsToDollars, dollarsToCredits } from '@/lib/billing/credits/conversion' import { SettingsSection } from '@/app/workspace/[workspaceId]/settings/components/settings-section/settings-section' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-key-manager.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-key-manager.tsx index 23e8837e451..8751e926383 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-key-manager.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-key-manager.tsx @@ -1,9 +1,6 @@ 'use client' import { useMemo, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' -import { Eye, EyeOff, Search } from 'lucide-react' import { Button, Chip, @@ -14,8 +11,11 @@ import { ChipModalField, ChipModalFooter, ChipModalHeader, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' + cn, +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { Eye, EyeOff, Search } from 'lucide-react' import { CHIP_FIELD_INPUT, CHIP_FIELD_SHELL, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-provider-keys-modal.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-provider-keys-modal.tsx index 46d2fda615d..f60805706c9 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-provider-keys-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-provider-keys-modal.tsx @@ -1,6 +1,6 @@ 'use client' -import { Chip, ChipModal, ChipModalBody, ChipModalFooter, ChipModalHeader } from '@/components/emcn' +import { Chip, ChipModal, ChipModalBody, ChipModalFooter, ChipModalHeader } from '@sim/emcn' import type { BYOKManagerKey, BYOKManagerProvider, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-skeleton.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-skeleton.tsx index 7a69eb52bf3..71d220b9c37 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-skeleton.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/byok/byok-skeleton.tsx @@ -1,4 +1,4 @@ -import { Skeleton } from '@/components/emcn' +import { Skeleton } from '@sim/emcn' /** * Skeleton component for BYOK provider key items. diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/copilot/copilot.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/copilot/copilot.tsx index 7082bbcba29..d824ffe865f 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/copilot/copilot.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/copilot/copilot.tsx @@ -1,9 +1,6 @@ 'use client' import { useMemo, useState } from 'react' -import { createLogger } from '@sim/logger' -import { formatDate } from '@sim/utils/formatting' -import { Plus } from 'lucide-react' import { Chip, ChipConfirmModal, @@ -14,7 +11,10 @@ import { ChipModalFooter, ChipModalHeader, SecretReveal, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { formatDate } from '@sim/utils/formatting' +import { Plus } from 'lucide-react' import { SettingsEmptyState } from '@/app/workspace/[workspaceId]/settings/components/settings-empty-state' import { SettingsPanel } from '@/app/workspace/[workspaceId]/settings/components/settings-panel' import { diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/credential-sets/credential-sets.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/credential-sets/credential-sets.tsx index 8664283de10..ecc76dc6198 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/credential-sets/credential-sets.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/credential-sets/credential-sets.tsx @@ -1,9 +1,6 @@ 'use client' import { useCallback, useMemo, useState } from 'react' -import { createLogger } from '@sim/logger' -import { isOrgAdminRole } from '@sim/platform-authz/predicates' -import { Plus } from 'lucide-react' import { Avatar, AvatarFallback, @@ -22,8 +19,11 @@ import { type FileInputOptions, TagInput, type TagItem, -} from '@/components/emcn' -import { ArrowLeft } from '@/components/emcn/icons' +} from '@sim/emcn' +import { ArrowLeft } from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { isOrgAdminRole } from '@sim/platform-authz/predicates' +import { Plus } from 'lucide-react' import { GmailIcon, OutlookIcon } from '@/components/icons' import { useSession } from '@/lib/auth/auth-client' import { getSubscriptionAccessState } from '@/lib/billing/client' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/custom-tools/custom-tools.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/custom-tools/custom-tools.tsx index 65411990e73..c81fd6a8992 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/custom-tools/custom-tools.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/custom-tools/custom-tools.tsx @@ -1,11 +1,11 @@ 'use client' import { useState } from 'react' +import { Chip, ChipConfirmModal } from '@sim/emcn' import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' import { Plus } from 'lucide-react' import { useParams } from 'next/navigation' -import { Chip, ChipConfirmModal } from '@/components/emcn' import { RowActionsMenu } from '@/app/workspace/[workspaceId]/settings/components/row-actions-menu' import { SettingsEmptyState } from '@/app/workspace/[workspaceId]/settings/components/settings-empty-state' import { SettingsPanel } from '@/app/workspace/[workspaceId]/settings/components/settings-panel' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/general/general.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/general/general.tsx index cd0418410d3..cb66db4945f 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/general/general.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/general/general.tsx @@ -1,10 +1,6 @@ 'use client' import { useEffect, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { Camera, Check, Info, Pencil } from 'lucide-react' -import Image from 'next/image' -import { useRouter } from 'next/navigation' import { Button, Chip, @@ -15,18 +11,22 @@ import { ChipModalFooter, ChipModalHeader, ChipSelect, + handleKeyboardActivation, Input, Label, Switch, Tooltip, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { Camera, Check, Info, Pencil } from 'lucide-react' +import Image from 'next/image' +import { useRouter } from 'next/navigation' import { requestJson } from '@/lib/api/client/request' import { telemetryContract } from '@/lib/api/contracts/telemetry' import { signOut, useSession } from '@/lib/auth/auth-client' import { ANONYMOUS_USER_ID } from '@/lib/auth/constants' import { getEnv, isTruthy } from '@/lib/core/config/env' import { isHosted } from '@/lib/core/config/env-flags' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { getBrowserTimezone, getTimezoneOptions } from '@/lib/core/utils/timezone' import { getBaseUrl } from '@/lib/core/utils/urls' import { SettingsPanel } from '@/app/workspace/[workspaceId]/settings/components/settings-panel' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-enable-toggle/inbox-enable-toggle.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-enable-toggle/inbox-enable-toggle.tsx index c49e6564ce4..f3976f33415 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-enable-toggle/inbox-enable-toggle.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-enable-toggle/inbox-enable-toggle.tsx @@ -1,8 +1,6 @@ 'use client' import { useCallback, useState } from 'react' -import { createLogger } from '@sim/logger' -import { useParams } from 'next/navigation' import { ChipConfirmModal, ChipModal, @@ -11,7 +9,9 @@ import { ChipModalFooter, ChipModalHeader, Switch, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { useParams } from 'next/navigation' import { useInboxConfig, useToggleInbox } from '@/hooks/queries/inbox' const logger = createLogger('InboxEnableToggle') diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-settings-tab/inbox-settings-tab.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-settings-tab/inbox-settings-tab.tsx index c711a497fae..942fd5d8acd 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-settings-tab/inbox-settings-tab.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-settings-tab/inbox-settings-tab.tsx @@ -1,9 +1,6 @@ 'use client' import { useCallback, useState } from 'react' -import { getErrorMessage } from '@sim/utils/errors' -import { Check, Clipboard, Pencil, Plus, Trash2 } from 'lucide-react' -import { useParams } from 'next/navigation' import { Badge, Chip, @@ -15,7 +12,10 @@ import { ChipModalFooter, ChipModalHeader, Tooltip, -} from '@/components/emcn' +} from '@sim/emcn' +import { getErrorMessage } from '@sim/utils/errors' +import { Check, Clipboard, Pencil, Plus, Trash2 } from 'lucide-react' +import { useParams } from 'next/navigation' import { SettingsSection } from '@/app/workspace/[workspaceId]/settings/components/settings-section/settings-section' import { useAddInboxSender, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-task-list/inbox-task-list.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-task-list/inbox-task-list.tsx index f734ffd5a72..c96f587ccea 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-task-list/inbox-task-list.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/components/inbox-task-list/inbox-task-list.tsx @@ -1,10 +1,10 @@ 'use client' import { useCallback, useMemo, useState } from 'react' +import { Badge, ChipInput, ChipSelect, Search } from '@sim/emcn' import { formatRelativeTime } from '@sim/utils/formatting' import { ArrowRight, Paperclip } from 'lucide-react' import { useParams, useRouter } from 'next/navigation' -import { Badge, ChipInput, ChipSelect, Search } from '@/components/emcn' import { SettingsEmptyState } from '@/app/workspace/[workspaceId]/settings/components/settings-empty-state' import type { InboxTaskItem } from '@/hooks/queries/inbox' import { useInboxConfig, useInboxTasks } from '@/hooks/queries/inbox' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/inbox.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/inbox.tsx index 728c01c7017..fd8b348cac7 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/inbox.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/inbox/inbox.tsx @@ -1,8 +1,8 @@ 'use client' +import { Chip } from '@sim/emcn' import { ArrowRight } from 'lucide-react' import { useParams, useRouter } from 'next/navigation' -import { Chip } from '@/components/emcn' import { getSubscriptionAccessState } from '@/lib/billing/client' import { InboxEnableToggle, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-form-modal.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-form-modal.tsx index d92caf069b0..a7bbfc7d4a0 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-form-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/components/mcp-server-form-modal/mcp-server-form-modal.tsx @@ -1,9 +1,6 @@ 'use client' import { useEffect, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' -import { ChevronDown, ChevronRight } from 'lucide-react' import { Button, ChipInput, @@ -14,9 +11,12 @@ import { ChipModalFooter, type ChipModalFooterAction, ChipModalHeader, + cn, SecretInput, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { ChevronDown, ChevronRight } from 'lucide-react' import type { McpAuthType, McpTransport } from '@/lib/mcp/types' import { checkEnvVarTrigger, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/mcp.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/mcp.tsx index a1f60a9e2fc..bd6049de24b 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/mcp.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/mcp/mcp.tsx @@ -1,16 +1,15 @@ 'use client' import { useEffect, useRef, useState } from 'react' +import { Badge, Button, Chip, ChipConfirmModal, cn, Tooltip } from '@sim/emcn' +import { ArrowLeft } from '@sim/emcn/icons' import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' import { ChevronDown, Plus } from 'lucide-react' import { useParams } from 'next/navigation' import { useQueryState } from 'nuqs' -import { Badge, Button, Chip, ChipConfirmModal, Tooltip } from '@/components/emcn' -import { ArrowLeft } from '@/components/emcn/icons' import { requestJson } from '@/lib/api/client/request' import { getWorkflowStateContract } from '@/lib/api/contracts/workflows' -import { cn } from '@/lib/core/utils/cn' import { getIssueBadgeLabel, getIssueBadgeVariant, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/mothership/mothership.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/mothership/mothership.tsx index a2eab8cfb6c..273e9744ec4 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/mothership/mothership.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/mothership/mothership.tsx @@ -1,11 +1,10 @@ 'use client' import { useCallback, useMemo, useState } from 'react' +import { Badge, Button, ChipInput, ChipSelect, cn, Label, Skeleton } from '@sim/emcn' import { useParams } from 'next/navigation' import { useQueryStates } from 'nuqs' -import { Badge, Button, ChipInput, ChipSelect, Label, Skeleton } from '@/components/emcn' import { AnthropicIcon, OpenAIIcon } from '@/components/icons' -import { cn } from '@/lib/core/utils/cn' import { BYOKKeyManager, type BYOKManagerProvider, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/recently-deleted/recently-deleted.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/recently-deleted/recently-deleted.tsx index 8dc3b308813..b7f4661baaa 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/recently-deleted/recently-deleted.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/recently-deleted/recently-deleted.tsx @@ -1,12 +1,12 @@ 'use client' import { useCallback, useMemo, useState } from 'react' +import { Button, ChipInput, ChipModalTabs } from '@sim/emcn' +import { Folder, Search, Workflow } from '@sim/emcn/icons' import { toError } from '@sim/utils/errors' import { formatDate } from '@sim/utils/formatting' import { useParams, useRouter } from 'next/navigation' import { debounce, useQueryStates } from 'nuqs' -import { Button, ChipInput, ChipModalTabs } from '@/components/emcn' -import { Folder, Search, Workflow } from '@/components/emcn/icons' import { type ColumnOption, SortDropdown } from '@/app/workspace/[workspaceId]/components' import { RESOURCE_REGISTRY } from '@/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-registry' import type { MothershipResourceType } from '@/app/workspace/[workspaceId]/home/types' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/row-actions-menu/row-actions-menu.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/row-actions-menu/row-actions-menu.tsx index 288ccd1109f..90cf99b79c0 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/row-actions-menu/row-actions-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/row-actions-menu/row-actions-menu.tsx @@ -1,12 +1,12 @@ import { chipVariants, + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, MoreHorizontal, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' export interface RowAction { label: string diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/save-discard-actions/save-discard-actions.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/save-discard-actions/save-discard-actions.tsx index aadef26deae..e65657017f4 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/save-discard-actions/save-discard-actions.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/save-discard-actions/save-discard-actions.tsx @@ -1,4 +1,4 @@ -import { Chip } from '@/components/emcn' +import { Chip } from '@sim/emcn' interface SaveDiscardActionsProps { /** When false, renders nothing. */ diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secret-value-field/secret-value-field.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secret-value-field/secret-value-field.tsx index be6b14d6f9e..9c5e61c8df1 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secret-value-field/secret-value-field.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secret-value-field/secret-value-field.tsx @@ -2,7 +2,7 @@ import type { ComponentProps, CSSProperties } from 'react' import { useState } from 'react' -import { ChipInput } from '@/components/emcn' +import { ChipInput } from '@sim/emcn' const BULLET = '\u2022' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secrets-manager/secrets-manager.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secrets-manager/secrets-manager.tsx index 8b8a6432906..13122205697 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secrets-manager/secrets-manager.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/secrets/components/secrets-manager/secrets-manager.tsx @@ -1,12 +1,11 @@ 'use client' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { Chip, ChipInput, cn, Tooltip, toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { generateShortId } from '@sim/utils/id' import { useQueryClient } from '@tanstack/react-query' import { useParams, useRouter } from 'next/navigation' -import { Chip, ChipInput, Tooltip, toast } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { clearPendingCredentialCreateRequest, PENDING_CREDENTIAL_CREATE_REQUEST_EVENT, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/secrets/hooks/use-secret-value.ts b/apps/sim/app/workspace/[workspaceId]/settings/components/secrets/hooks/use-secret-value.ts index 7a4fca7c948..394aa641cab 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/secrets/hooks/use-secret-value.ts +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/secrets/hooks/use-secret-value.ts @@ -1,9 +1,9 @@ 'use client' import { useState } from 'react' +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' -import { toast } from '@/components/emcn' import { useSession } from '@/lib/auth/auth-client' import type { WorkspaceCredential } from '@/hooks/queries/credentials' import { diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/settings-empty-state/settings-empty-state.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/settings-empty-state/settings-empty-state.tsx index ab13443d66c..c63457a65d6 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/settings-empty-state/settings-empty-state.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/settings-empty-state/settings-empty-state.tsx @@ -1,5 +1,5 @@ import type { ReactNode } from 'react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' interface SettingsEmptyStateProps { children: ReactNode diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/settings-panel/settings-panel.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/settings-panel/settings-panel.tsx index 64a22a15e05..19bb8a7d5dc 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/settings-panel/settings-panel.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/settings-panel/settings-panel.tsx @@ -1,8 +1,7 @@ 'use client' import { createContext, type ReactNode, useContext } from 'react' -import { ChipInput, ChipLink, Search } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +import { ChipInput, ChipLink, cn, Search } from '@sim/emcn' import { getSettingsSectionMeta, type SettingsSection, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/manage-credits-modal/manage-credits-modal.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/manage-credits-modal/manage-credits-modal.tsx index 08b54211fa1..5a2f8f09b7e 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/manage-credits-modal/manage-credits-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/manage-credits-modal/manage-credits-modal.tsx @@ -1,7 +1,6 @@ 'use client' import { useEffect, useRef, useState } from 'react' -import { getErrorMessage } from '@sim/utils/errors' import { ChipModal, ChipModalBody, @@ -10,7 +9,8 @@ import { ChipModalFooter, ChipModalHeader, Info, -} from '@/components/emcn' +} from '@sim/emcn' +import { getErrorMessage } from '@sim/utils/errors' import { useOrganizationMemberUsageLimit, useUpdateOrganizationMemberUsageLimit, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/no-organization-view/no-organization-view.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/no-organization-view/no-organization-view.tsx index 32b7f6eb2be..f51fe878a99 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/no-organization-view/no-organization-view.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/no-organization-view/no-organization-view.tsx @@ -8,7 +8,7 @@ import { ChipModalFooter, ChipModalHeader, Label, -} from '@/components/emcn' +} from '@sim/emcn' import { useSettingsNavigation } from '@/hooks/use-settings-navigation' interface NoOrganizationViewProps { diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/organization-invite-modal/organization-invite-modal.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/organization-invite-modal/organization-invite-modal.tsx index 50cd2d2d5b8..79c64a81d0b 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/organization-invite-modal/organization-invite-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/organization-invite-modal/organization-invite-modal.tsx @@ -1,7 +1,6 @@ 'use client' import { useCallback, useMemo, useState } from 'react' -import { createLogger } from '@sim/logger' import { ChipDropdown, type ChipDropdownOption, @@ -11,8 +10,10 @@ import { ChipModalFooter, ChipModalHeader, toast, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' import { useSession } from '@/lib/auth/auth-client' +import { quickValidateEmail } from '@/lib/messaging/email/validation' import type { PermissionType } from '@/lib/workspaces/permissions/utils' import { useInviteMember } from '@/hooks/queries/organization' @@ -82,6 +83,10 @@ export function OrganizationInviteModal({ const validateEmail = useCallback( (email: string): string | null => { + const formatResult = quickValidateEmail(email) + if (!formatResult.isValid) { + return formatResult.reason ?? 'Invalid email' + } if (session?.user?.email && session.user.email.toLowerCase() === email) { return 'You cannot invite yourself' } diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/organization-member-lists/organization-member-lists.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/organization-member-lists/organization-member-lists.tsx index 33d2cf2efb5..1ae42a9543f 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/organization-member-lists/organization-member-lists.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/organization-member-lists/organization-member-lists.tsx @@ -1,10 +1,10 @@ 'use client' import { useMemo, useState } from 'react' +import { ChipDropdown, ChipInput, Search, toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { isOrgAdminRole } from '@sim/platform-authz/predicates' import { getErrorMessage } from '@sim/utils/errors' -import { ChipDropdown, ChipInput, Search, toast } from '@/components/emcn' import { type OrgRole, type PermissionType, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/remove-member-dialog/remove-member-dialog.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/remove-member-dialog/remove-member-dialog.tsx index a2aaa7127ac..23c8860e883 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/remove-member-dialog/remove-member-dialog.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/remove-member-dialog/remove-member-dialog.tsx @@ -1,4 +1,4 @@ -import { ChipConfirmModal } from '@/components/emcn' +import { ChipConfirmModal } from '@sim/emcn' interface RemoveMemberDialogProps { open: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/team-seats-overview/team-seats-overview.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/team-seats-overview/team-seats-overview.tsx index 86e3c0f0d4f..0d371d78fff 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/team-seats-overview/team-seats-overview.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/team-seats-overview/team-seats-overview.tsx @@ -1,7 +1,6 @@ +import { Badge, Chip, cn } from '@sim/emcn' import { useParams, useRouter } from 'next/navigation' -import { Badge, Chip } from '@/components/emcn' import { checkEnterprisePlan } from '@/lib/billing/subscriptions/utils' -import { cn } from '@/lib/core/utils/cn' import { SettingsSection } from '@/app/workspace/[workspaceId]/settings/components/settings-section/settings-section' type Subscription = { diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/transfer-ownership-dialog/transfer-ownership-dialog.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/transfer-ownership-dialog/transfer-ownership-dialog.tsx index e6eb903c449..6c486442f2d 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/transfer-ownership-dialog/transfer-ownership-dialog.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/components/transfer-ownership-dialog/transfer-ownership-dialog.tsx @@ -9,10 +9,10 @@ import { Banner, ChipConfirmModal, ChipInput, + cn, Search, Skeleton, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' import { getUserColor } from '@/lib/workspaces/colors' import type { RosterMember } from '@/hooks/queries/organization' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/team-management.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/team-management.tsx index a6c1b6f6e5b..31d968cc279 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/team-management.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/team-management/team-management.tsx @@ -1,8 +1,8 @@ 'use client' import { useCallback, useEffect, useMemo, useState } from 'react' +import { Chip, Plus } from '@sim/emcn' import { createLogger } from '@sim/logger' -import { Chip, Plus } from '@/components/emcn' import { useSession } from '@/lib/auth/auth-client' import { getSubscriptionAccessState } from '@/lib/billing/client/utils' import { getBaseUrl } from '@/lib/core/utils/urls' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/teammates/teammates.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/teammates/teammates.tsx index 8b915775821..8ffe2ef35fd 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/teammates/teammates.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/teammates/teammates.tsx @@ -1,10 +1,10 @@ 'use client' import { useCallback, useMemo, useState } from 'react' +import { Chip, ChipDropdown, Plus, toast } from '@sim/emcn' import { getErrorMessage } from '@sim/utils/errors' import { useQueryClient } from '@tanstack/react-query' import { useParams, useRouter } from 'next/navigation' -import { Chip, ChipDropdown, Plus, toast } from '@/components/emcn' import { RoleLockTooltip, type WorkspaceRoleSource, diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/workflow-mcp-servers/components/create-workflow-mcp-server-modal/create-workflow-mcp-server-modal.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/workflow-mcp-servers/components/create-workflow-mcp-server-modal/create-workflow-mcp-server-modal.tsx index 51b1a33a46c..59805c404b7 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/workflow-mcp-servers/components/create-workflow-mcp-server-modal/create-workflow-mcp-server-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/workflow-mcp-servers/components/create-workflow-mcp-server-modal/create-workflow-mcp-server-modal.tsx @@ -1,7 +1,6 @@ 'use client' import { useCallback, useEffect, useState } from 'react' -import { createLogger } from '@sim/logger' import { ButtonGroup, ButtonGroupItem, @@ -13,7 +12,8 @@ import { ChipModalHeader, ChipSelect, type ComboboxOption, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' import { useCreateWorkflowMcpServer } from '@/hooks/queries/workflow-mcp-servers' const logger = createLogger('CreateWorkflowMcpServerModal') diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/workflow-mcp-servers/workflow-mcp-servers.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/workflow-mcp-servers/workflow-mcp-servers.tsx index 8eb0681115e..f33b66e1b3f 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/workflow-mcp-servers/workflow-mcp-servers.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/workflow-mcp-servers/workflow-mcp-servers.tsx @@ -1,10 +1,6 @@ 'use client' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' -import { Check, Clipboard, Plus, Server } from 'lucide-react' -import { useParams, useSearchParams } from 'next/navigation' import { Badge, Button, @@ -25,8 +21,12 @@ import { type ComboboxOption, Label, Tooltip, -} from '@/components/emcn' -import { ArrowLeft } from '@/components/emcn/icons' +} from '@sim/emcn' +import { ArrowLeft } from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { Check, Clipboard, Plus, Server } from 'lucide-react' +import { useParams, useSearchParams } from 'next/navigation' import { getBaseUrl } from '@/lib/core/utils/urls' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' import { RowActionsMenu } from '@/app/workspace/[workspaceId]/settings/components/row-actions-menu' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/navigation.ts b/apps/sim/app/workspace/[workspaceId]/settings/navigation.ts index 267741c1746..d2d9ff3e7b9 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/navigation.ts +++ b/apps/sim/app/workspace/[workspaceId]/settings/navigation.ts @@ -18,7 +18,7 @@ import { User, Users, Wrench, -} from '@/components/emcn' +} from '@sim/emcn' import { McpIcon } from '@/components/icons' import { getEnv, isTruthy } from '@/lib/core/config/env' diff --git a/apps/sim/app/workspace/[workspaceId]/settings/secrets/[credentialId]/secret-detail.tsx b/apps/sim/app/workspace/[workspaceId]/settings/secrets/[credentialId]/secret-detail.tsx index e55da113389..7aca00a8c7f 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/secrets/[credentialId]/secret-detail.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/secrets/[credentialId]/secret-detail.tsx @@ -1,8 +1,8 @@ 'use client' import { useState } from 'react' -import { Chip, ChipCopyInput, ChipLink, Send } from '@/components/emcn' -import { ArrowLeft, Key } from '@/components/emcn/icons' +import { Chip, ChipCopyInput, ChipLink, Send } from '@sim/emcn' +import { ArrowLeft, Key } from '@sim/emcn/icons' import { AddPeopleModal, CredentialDetailHeading, diff --git a/apps/sim/app/workspace/[workspaceId]/skills/components/skill-import/skill-import.tsx b/apps/sim/app/workspace/[workspaceId]/skills/components/skill-import/skill-import.tsx index 6f3a332db51..a49e5c2280a 100644 --- a/apps/sim/app/workspace/[workspaceId]/skills/components/skill-import/skill-import.tsx +++ b/apps/sim/app/workspace/[workspaceId]/skills/components/skill-import/skill-import.tsx @@ -1,8 +1,8 @@ 'use client' import { useCallback, useState } from 'react' +import { Chip, ChipInput, ChipModalField, Loader } from '@sim/emcn' import { getErrorMessage } from '@sim/utils/errors' -import { Chip, ChipInput, ChipModalField, Loader } from '@/components/emcn' import { requestJson } from '@/lib/api/client/request' import { importSkillContract } from '@/lib/api/contracts' import { diff --git a/apps/sim/app/workspace/[workspaceId]/skills/components/skill-modal/skill-modal.tsx b/apps/sim/app/workspace/[workspaceId]/skills/components/skill-modal/skill-modal.tsx index c7d8b6ce8a7..a8b6e2fb4dd 100644 --- a/apps/sim/app/workspace/[workspaceId]/skills/components/skill-modal/skill-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/skills/components/skill-modal/skill-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { useState } from 'react' -import dynamic from 'next/dynamic' -import { useParams } from 'next/navigation' import { ChipModal, ChipModalBody, @@ -12,8 +10,10 @@ import { ChipModalHeader, ChipModalTabs, chipFieldSurfaceClass, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' + cn, +} from '@sim/emcn' +import dynamic from 'next/dynamic' +import { useParams } from 'next/navigation' import { SkillImport } from '@/app/workspace/[workspaceId]/skills/components/skill-import' import { parseSkillMarkdown } from '@/app/workspace/[workspaceId]/skills/components/utils' import type { SkillDefinition } from '@/hooks/queries/skills' diff --git a/apps/sim/app/workspace/[workspaceId]/skills/skills.tsx b/apps/sim/app/workspace/[workspaceId]/skills/skills.tsx index 110de117857..182cc48af45 100644 --- a/apps/sim/app/workspace/[workspaceId]/skills/skills.tsx +++ b/apps/sim/app/workspace/[workspaceId]/skills/skills.tsx @@ -1,12 +1,12 @@ 'use client' import { useState } from 'react' +import { Chip, ChipConfirmModal, ChipInput, Search } from '@sim/emcn' import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' import { ArrowRight, Plus } from 'lucide-react' import { useParams } from 'next/navigation' import { useQueryState } from 'nuqs' -import { Chip, ChipConfirmModal, ChipInput, Search } from '@/components/emcn' import { SkillTile } from '@/app/workspace/[workspaceId]/components' import { IntegrationTabsHeader } from '@/app/workspace/[workspaceId]/integrations/components/integration-tabs-header' import { ShowcaseWithExplore } from '@/app/workspace/[workspaceId]/integrations/components/showcase-with-explore' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-config-sidebar/column-config-sidebar.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-config-sidebar/column-config-sidebar.tsx index 003680668d0..0f21afa12cc 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-config-sidebar/column-config-sidebar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-config-sidebar/column-config-sidebar.tsx @@ -1,19 +1,10 @@ 'use client' import { useState } from 'react' +import { Button, ChipCombobox, ChipInput, cn, FieldDivider, Label, Switch, toast } from '@sim/emcn' +import { X } from '@sim/emcn/icons' import { toError } from '@sim/utils/errors' -import { - Button, - ChipCombobox, - ChipInput, - FieldDivider, - Label, - Switch, - toast, -} from '@/components/emcn' -import { X } from '@/components/emcn/icons' import { findValidationIssue, isValidationError } from '@/lib/api/client/errors' -import { cn } from '@/lib/core/utils/cn' import type { ColumnDefinition } from '@/lib/table' import { FieldError, diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-config-sidebar/column-types.ts b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-config-sidebar/column-types.ts index 6c9f31ade67..9b4a7af4790 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-config-sidebar/column-types.ts +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/column-config-sidebar/column-types.ts @@ -6,7 +6,7 @@ import { TypeJson, TypeNumber, TypeText, -} from '@/components/emcn/icons' +} from '@sim/emcn/icons' import type { ColumnDefinition } from '@/lib/table' /** diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/context-menu/context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/context-menu/context-menu.tsx index de00999f35d..997d1943627 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/context-menu/context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/context-menu/context-menu.tsx @@ -4,7 +4,7 @@ import { DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, -} from '@/components/emcn' +} from '@sim/emcn' import { ArrowDown, ArrowUp, @@ -15,7 +15,7 @@ import { RefreshCw, Square, Trash, -} from '@/components/emcn/icons' +} from '@sim/emcn/icons' import type { ContextMenuState } from '../../types' interface ContextMenuProps { diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichment-details/enrichment-details.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichment-details/enrichment-details.tsx index 559d8858cbf..e964a276987 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichment-details/enrichment-details.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichment-details/enrichment-details.tsx @@ -1,9 +1,8 @@ 'use client' import { useEffect, useState } from 'react' +import { Badge, Button, ChipModalTabs, cn, X } from '@sim/emcn' import { formatDuration } from '@sim/utils/formatting' -import { Badge, Button, ChipModalTabs, X } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import type { EnrichmentProviderOutcome, EnrichmentRunDetail } from '@/lib/table' import { adjustBgForContrast, diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichments-sidebar/enrichment-config.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichments-sidebar/enrichment-config.tsx index ea0ffdb43d4..d7ace26b0ef 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichments-sidebar/enrichment-config.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichments-sidebar/enrichment-config.tsx @@ -1,8 +1,6 @@ 'use client' import { useState } from 'react' -import { toError } from '@sim/utils/errors' -import { generateId } from '@sim/utils/id' import { Badge, Button, @@ -13,8 +11,10 @@ import { Label, Switch, toast, -} from '@/components/emcn' -import { ArrowLeft, X } from '@/components/emcn/icons' +} from '@sim/emcn' +import { ArrowLeft, X } from '@sim/emcn/icons' +import { toError } from '@sim/utils/errors' +import { generateId } from '@sim/utils/id' import type { AddWorkflowGroupBodyInput } from '@/lib/api/contracts/tables' import type { ColumnDefinition, WorkflowGroup, WorkflowGroupOutput } from '@/lib/table' import { deriveOutputColumnName } from '@/lib/table/column-naming' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichments-sidebar/enrichments-sidebar.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichments-sidebar/enrichments-sidebar.tsx index 6b50989f05f..eb6661bbe7e 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichments-sidebar/enrichments-sidebar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/enrichments-sidebar/enrichments-sidebar.tsx @@ -1,9 +1,8 @@ 'use client' import { useState } from 'react' -import { Button, ChipInput } from '@/components/emcn' -import { Search, X } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +import { Button, ChipInput, cn } from '@sim/emcn' +import { Search, X } from '@sim/emcn/icons' import type { ColumnDefinition, WorkflowGroup } from '@/lib/table' import { ALL_ENRICHMENTS } from '@/enrichments' import { getEnrichment } from '@/enrichments/registry' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/new-column-dropdown/new-column-dropdown.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/new-column-dropdown/new-column-dropdown.tsx index 3e85dade1bc..2886aad2921 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/new-column-dropdown/new-column-dropdown.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/new-column-dropdown/new-column-dropdown.tsx @@ -1,6 +1,5 @@ 'use client' -import { Sparkles } from 'lucide-react' import { ChipChevronDown, chipContentIconClass, @@ -12,7 +11,8 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, Plus, -} from '@/components/emcn' +} from '@sim/emcn' +import { Sparkles } from 'lucide-react' import type { ColumnDefinition } from '@/lib/table' import { COLUMN_TYPE_OPTIONS } from '../column-config-sidebar' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/row-modal/row-modal.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/row-modal/row-modal.tsx index 0aee6946a8a..d0045f4f40a 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/row-modal/row-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/row-modal/row-modal.tsx @@ -1,9 +1,6 @@ 'use client' import { useId, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' -import { useParams } from 'next/navigation' import { Checkbox, ChipConfirmModal, @@ -15,7 +12,10 @@ import { ChipModalFooter, ChipModalHeader, Label, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { useParams } from 'next/navigation' import type { ColumnDefinition, TableInfo, TableRow } from '@/lib/table' import { useDeleteTableRow, useDeleteTableRows, useUpdateTableRow } from '@/hooks/queries/tables' import { cleanCellValue, formatValueForInput } from '../../utils' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/run-status-control/run-status-control.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/run-status-control/run-status-control.tsx index 9283959ffdc..3ef2db128c7 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/run-status-control/run-status-control.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/run-status-control/run-status-control.tsx @@ -1,8 +1,8 @@ 'use client' import { memo } from 'react' -import { Button } from '@/components/emcn' -import { Loader, Square } from '@/components/emcn/icons' +import { Button } from '@sim/emcn' +import { Loader, Square } from '@sim/emcn/icons' interface RunStatusControlProps { running: number diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/sidebar-fields/sidebar-fields.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/sidebar-fields/sidebar-fields.tsx index d08ad20bbfc..02871d4820e 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/sidebar-fields/sidebar-fields.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/sidebar-fields/sidebar-fields.tsx @@ -1,7 +1,7 @@ 'use client' import type React from 'react' -import { Label } from '@/components/emcn' +import { Label } from '@sim/emcn' /** * Field label with a trailing required marker, matching the sidebar field diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-action-bar/table-action-bar.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-action-bar/table-action-bar.tsx index eff97d3e890..301658acb1e 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-action-bar/table-action-bar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-action-bar/table-action-bar.tsx @@ -1,10 +1,9 @@ 'use client' import type React from 'react' +import { Button, cn, Tooltip } from '@sim/emcn' +import { Eye, PlayOutline, RefreshCw, Square } from '@sim/emcn/icons' import { AnimatePresence, domAnimation, LazyMotion, m } from 'framer-motion' -import { Button, Tooltip } from '@/components/emcn' -import { Eye, PlayOutline, RefreshCw, Square } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' interface TableActionBarProps { /** Number of (row × group) cells the run/stop buttons would target. Drives diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-filter/table-filter.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-filter/table-filter.tsx index 9d9800bffe3..4073f24e098 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-filter/table-filter.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-filter/table-filter.tsx @@ -1,9 +1,9 @@ 'use client' import { memo, useCallback, useMemo, useRef, useState } from 'react' +import { Button, ChipDropdown, ChipInput } from '@sim/emcn' +import { Plus, X } from '@sim/emcn/icons' import { generateShortId } from '@sim/utils/id' -import { Button, ChipDropdown, ChipInput } from '@/components/emcn' -import { Plus, X } from '@/components/emcn/icons' import type { ColumnDefinition, Filter, FilterRule } from '@/lib/table' import { getColumnId } from '@/lib/table/column-keys' import { COMPARISON_OPERATORS, VALUELESS_OPERATORS } from '@/lib/table/query-builder/constants' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/cell-render.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/cell-render.tsx index c4c7904a711..b5bdccd21db 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/cell-render.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/cell-render.tsx @@ -2,9 +2,8 @@ import type React from 'react' import { useEffect, useRef, useState } from 'react' +import { Badge, Checkbox, cn, Tooltip } from '@sim/emcn' import { parse } from 'tldts' -import { Badge, Checkbox, Tooltip } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import type { RowExecutionMetadata } from '@/lib/table' import { StatusBadge } from '@/app/workspace/[workspaceId]/logs/utils' import { storageToDisplay } from '../../../utils' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/expanded-cell-popover.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/expanded-cell-popover.tsx index d610d99bc60..4e51cef0a82 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/expanded-cell-popover.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/expanded-cell-popover.tsx @@ -2,7 +2,7 @@ import type React from 'react' import { useEffect, useEffectEvent, useLayoutEffect, useMemo, useRef, useState } from 'react' -import { Button } from '@/components/emcn' +import { Button } from '@sim/emcn' import type { TableRow as TableRowType } from '@/lib/table' import type { EditingCell, SaveReason } from '../../../types' import { cleanCellValue, displayToStorage, formatValueForInput } from '../../../utils' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/inline-editors.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/inline-editors.tsx index 01318637e15..77f5521a8b7 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/inline-editors.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/inline-editors.tsx @@ -1,9 +1,7 @@ 'use client' import { useCallback, useEffect, useRef, useState } from 'react' -import { Popover, PopoverAnchor, PopoverContent } from '@/components/emcn' -import { Calendar } from '@/components/emcn/components/calendar/calendar' -import { cn } from '@/lib/core/utils/cn' +import { Calendar, cn, Popover, PopoverAnchor, PopoverContent } from '@sim/emcn' import type { ColumnDefinition } from '@/lib/table' import type { SaveReason } from '../../../types' import { diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/sim-resource-cell.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/sim-resource-cell.tsx index 00950b6f5fe..fdbd2776e97 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/sim-resource-cell.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/cells/sim-resource-cell.tsx @@ -1,7 +1,7 @@ 'use client' import { useMemo } from 'react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' import { ContextMentionIcon } from '@/app/workspace/[workspaceId]/home/components/context-mention-icon' import type { ChatMessageContext } from '@/app/workspace/[workspaceId]/home/types' import { useKnowledgeBasesQuery } from '@/hooks/queries/kb/knowledge' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/data-row.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/data-row.tsx index 82114fc3985..b73bf68dc49 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/data-row.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/data-row.tsx @@ -1,11 +1,9 @@ 'use client' import React from 'react' -import { Button, Checkbox } from '@/components/emcn' -import { PlayOutline, Square } from '@/components/emcn/icons' +import { Button, Checkbox, cn, handleKeyboardActivation } from '@sim/emcn' +import { PlayOutline, Square } from '@sim/emcn/icons' import type { ActiveDispatch } from '@/lib/api/contracts/tables' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import type { TableRow as TableRowType, WorkflowGroup } from '@/lib/table' import { getUnmetGroupDeps } from '@/lib/table/deps' import type { SaveReason } from '../../types' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-header-menu.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-header-menu.tsx index 223dddeb6e6..8d775e8b8ac 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-header-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-header-menu.tsx @@ -1,8 +1,8 @@ 'use client' import React, { useCallback, useEffect, useRef, useState } from 'react' -import { ChevronDown } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' +import { ChevronDown } from '@sim/emcn/icons' import type { WorkflowGroup } from '@/lib/table' import type { WorkflowMetadata } from '@/stores/workflows/registry/types' import { COL_WIDTH, SELECTION_TINT_BG } from '../constants' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-type-icon.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-type-icon.tsx index d8c7bbded1e..a1d747c463d 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-type-icon.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/column-type-icon.tsx @@ -1,7 +1,7 @@ 'use client' import type React from 'react' -import { Tooltip } from '@/components/emcn' +import { Tooltip } from '@sim/emcn' import { Calendar as CalendarIcon, PlayOutline, @@ -10,7 +10,7 @@ import { TypeNumber, TypeText, WorkflowX, -} from '@/components/emcn/icons' +} from '@sim/emcn/icons' import type { BlockIconInfo } from '../types' export const COLUMN_TYPE_ICONS: Record = { diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/workflow-group-meta-cell.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/workflow-group-meta-cell.tsx index 321ea035292..0f760fff8e1 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/workflow-group-meta-cell.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/headers/workflow-group-meta-cell.tsx @@ -3,6 +3,7 @@ import type React from 'react' import { useRef, useState } from 'react' import { + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, @@ -11,7 +12,7 @@ import { DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, -} from '@/components/emcn' +} from '@sim/emcn' import { ArrowLeft, ArrowRight, @@ -23,9 +24,8 @@ import { PlayOutline, Trash, Workflow, -} from '@/components/emcn/icons' +} from '@sim/emcn/icons' import type { RunLimit, RunMode } from '@/lib/api/contracts/tables' -import { cn } from '@/lib/core/utils/cn' import type { WorkflowGroupType } from '@/lib/table' import { getEnrichment } from '@/enrichments/registry' import type { WorkflowMetadata } from '@/stores/workflows/registry/types' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-find.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-find.tsx index 4e8b124c6d6..d8d176406a8 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-find.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-find.tsx @@ -1,9 +1,9 @@ 'use client' import type React from 'react' +import { Button, ChipInput } from '@sim/emcn' +import { Loader, X } from '@sim/emcn/icons' import { ChevronDown, ChevronUp } from 'lucide-react' -import { Button, ChipInput } from '@/components/emcn' -import { Loader, X } from '@/components/emcn/icons' export interface TableFindProps { query: string diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx index 1dc09fdfd51..7521df83ecb 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-grid.tsx @@ -2,14 +2,13 @@ import type React from 'react' import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react' +import { cn, toast, useToast } from '@sim/emcn' +import { Loader, TableX } from '@sim/emcn/icons' import { createLogger } from '@sim/logger' import { useVirtualizer } from '@tanstack/react-virtual' import { useParams } from 'next/navigation' import { usePostHog } from 'posthog-js/react' -import { toast, useToast } from '@/components/emcn' -import { Loader, TableX } from '@/components/emcn/icons' import type { RunLimit, RunMode, TableFindMatch } from '@/lib/api/contracts/tables' -import { cn } from '@/lib/core/utils/cn' import { captureEvent } from '@/lib/posthog/client' import type { ColumnDefinition, Filter, TableRow as TableRowType, WorkflowGroup } from '@/lib/table' import { getColumnId } from '@/lib/table/column-keys' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-primitives.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-primitives.tsx index 79730174d9e..068923eaafa 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-primitives.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/table-grid/table-primitives.tsx @@ -1,9 +1,8 @@ 'use client' import React from 'react' -import { Button, Checkbox } from '@/components/emcn' -import { Plus } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +import { Button, Checkbox, cn } from '@sim/emcn' +import { Plus } from '@sim/emcn/icons' import { ADD_COL_WIDTH, CELL_HEADER_CHECKBOX, COL_WIDTH } from './constants' import type { DisplayColumn } from './types' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/workflow-sidebar/input-mapping-section.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/workflow-sidebar/input-mapping-section.tsx index 94af5b3cda2..06dd6bb98bc 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/workflow-sidebar/input-mapping-section.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/workflow-sidebar/input-mapping-section.tsx @@ -1,7 +1,7 @@ 'use client' import { useState } from 'react' -import { Badge, ChipCombobox, CollapsibleCard, Label } from '@/components/emcn' +import { Badge, ChipCombobox, CollapsibleCard, Label } from '@sim/emcn' import type { ColumnDefinition } from '@/lib/table' import { getColumnId } from '@/lib/table/column-keys' import type { InputFormatField } from '@/lib/workflows/types' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/workflow-sidebar/run-settings-section.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/workflow-sidebar/run-settings-section.tsx index 05322b64836..8390396c1fe 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/workflow-sidebar/run-settings-section.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/workflow-sidebar/run-settings-section.tsx @@ -1,6 +1,6 @@ 'use client' -import { ChipCombobox, Label } from '@/components/emcn' +import { ChipCombobox, Label } from '@sim/emcn' import type { ColumnDefinition } from '@/lib/table' import { getColumnId } from '@/lib/table/column-keys' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/workflow-sidebar/workflow-sidebar.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/workflow-sidebar/workflow-sidebar.tsx index 48038f3e1db..0143ae0c062 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/workflow-sidebar/workflow-sidebar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/components/workflow-sidebar/workflow-sidebar.tsx @@ -2,10 +2,6 @@ import type React from 'react' import { useMemo, useState } from 'react' -import { toError } from '@sim/utils/errors' -import { generateId } from '@sim/utils/id' -import { useMutation, useQueryClient } from '@tanstack/react-query' -import { ExternalLink, RepeatIcon, SplitIcon } from 'lucide-react' import { Button, ButtonGroup, @@ -13,6 +9,7 @@ import { ChipCombobox, ChipInput, type ComboboxOptionGroup, + cn, DashedDividerLine, FieldDivider, Label, @@ -20,8 +17,12 @@ import { Switch, Tooltip, toast, -} from '@/components/emcn' -import { ArrowLeft, ChevronDown, X } from '@/components/emcn/icons' +} from '@sim/emcn' +import { ArrowLeft, ChevronDown, X } from '@sim/emcn/icons' +import { toError } from '@sim/utils/errors' +import { generateId } from '@sim/utils/id' +import { useMutation, useQueryClient } from '@tanstack/react-query' +import { ExternalLink, RepeatIcon, SplitIcon } from 'lucide-react' import { findValidationIssue, isValidationError } from '@/lib/api/client/errors' import { requestJson } from '@/lib/api/client/request' import type { @@ -32,7 +33,6 @@ import { putWorkflowNormalizedStateContract, type WorkflowStateContractInput, } from '@/lib/api/contracts/workflows' -import { cn } from '@/lib/core/utils/cn' import type { ColumnDefinition, WorkflowGroup, diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/error.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/error.tsx index ea8d04d530b..d17ae78e43d 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/error.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/error.tsx @@ -1,8 +1,8 @@ 'use client' +import { Button } from '@sim/emcn' +import { ArrowLeft } from '@sim/emcn/icons' import { useParams, useRouter } from 'next/navigation' -import { Button } from '@/components/emcn' -import { ArrowLeft } from '@/components/emcn/icons' import { type ErrorBoundaryProps, ErrorState } from '@/app/workspace/[workspaceId]/components' export default function TableError({ error, reset }: ErrorBoundaryProps) { diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/hooks/use-table-event-stream.ts b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/hooks/use-table-event-stream.ts index 6a0efe9695d..45200624ff8 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/hooks/use-table-event-stream.ts +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/hooks/use-table-event-stream.ts @@ -1,9 +1,9 @@ 'use client' import { useEffect, useRef } from 'react' +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { useQueryClient } from '@tanstack/react-query' -import { toast } from '@/components/emcn' import type { ActiveDispatch } from '@/lib/api/contracts/tables' import type { RowData, RowExecutionMetadata, RowExecutions, TableDefinition } from '@/lib/table' import { isExecInFlight } from '@/lib/table/deps' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/loading.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/loading.tsx index 2d07d4e540c..ac349574e79 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/loading.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/loading.tsx @@ -1,6 +1,6 @@ 'use client' -import { Table as TableIcon } from '@/components/emcn/icons' +import { Table as TableIcon } from '@sim/emcn/icons' import { type BreadcrumbItem, ResourceChromeFallback, diff --git a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/table.tsx b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/table.tsx index a44d2c72678..199ec81ed82 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/table.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/[tableId]/table.tsx @@ -1,12 +1,12 @@ 'use client' import { useCallback, useMemo, useReducer, useRef, useState } from 'react' +import { Chip, ChipConfirmModal, toast } from '@sim/emcn' +import { Download, Pencil, Table as TableIcon, Trash, Upload } from '@sim/emcn/icons' import { createLogger } from '@sim/logger' import { useParams, useRouter } from 'next/navigation' import { useQueryStates } from 'nuqs' import { usePostHog } from 'posthog-js/react' -import { Chip, ChipConfirmModal, toast } from '@/components/emcn' -import { Download, Pencil, Table as TableIcon, Trash, Upload } from '@/components/emcn/icons' import type { RunLimit, RunMode } from '@/lib/api/contracts/tables' import { captureEvent } from '@/lib/posthog/client' import type { diff --git a/apps/sim/app/workspace/[workspaceId]/tables/components/import-csv-dialog/import-csv-dialog.tsx b/apps/sim/app/workspace/[workspaceId]/tables/components/import-csv-dialog/import-csv-dialog.tsx index f042447a7a8..ca080f19307 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/components/import-csv-dialog/import-csv-dialog.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/components/import-csv-dialog/import-csv-dialog.tsx @@ -1,8 +1,6 @@ 'use client' import { useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' import { Button, ButtonGroup, @@ -22,7 +20,9 @@ import { TableHeader, TableRow, toast, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' import { CSV_ASYNC_IMPORT_THRESHOLD_BYTES } from '@/lib/table/constants' import { buildAutoMapping, parseCsvBuffer } from '@/lib/table/import' import type { TableDefinition } from '@/lib/table/types' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/components/import-progress-menu/import-progress-menu.tsx b/apps/sim/app/workspace/[workspaceId]/tables/components/import-progress-menu/import-progress-menu.tsx index 238e3f0f7f4..46deda65b1c 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/components/import-progress-menu/import-progress-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/components/import-progress-menu/import-progress-menu.tsx @@ -1,6 +1,5 @@ 'use client' -import { createLogger } from '@sim/logger' import { Button, DropdownMenu, @@ -8,8 +7,9 @@ import { DropdownMenuTrigger, ProgressItem, toast, -} from '@/components/emcn' -import { CircleAlert, CircleCheck, Loader } from '@/components/emcn/icons' +} from '@sim/emcn' +import { CircleAlert, CircleCheck, Loader } from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' import { cancelTableJob, downloadExportResult } from '@/hooks/queries/tables' import { useImportTrayStore } from '@/stores/table/import-tray/store' import { getImportStage } from './import-stage' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/components/import-progress-menu/use-workspace-imports.ts b/apps/sim/app/workspace/[workspaceId]/tables/components/import-progress-menu/use-workspace-imports.ts index e5227ab2665..a89483fc9e7 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/components/import-progress-menu/use-workspace-imports.ts +++ b/apps/sim/app/workspace/[workspaceId]/tables/components/import-progress-menu/use-workspace-imports.ts @@ -1,8 +1,8 @@ 'use client' import { useEffect, useMemo, useRef } from 'react' +import { toast } from '@sim/emcn' import { useShallow } from 'zustand/react/shallow' -import { toast } from '@/components/emcn' import { useTablesList, useWorkspaceExportJobs } from '@/hooks/queries/tables' import { useImportTrayStore } from '@/stores/table/import-tray/store' diff --git a/apps/sim/app/workspace/[workspaceId]/tables/components/table-context-menu/table-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/tables/components/table-context-menu/table-context-menu.tsx index f8de937720e..b8064ef6627 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/components/table-context-menu/table-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/components/table-context-menu/table-context-menu.tsx @@ -7,8 +7,8 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, Upload, -} from '@/components/emcn' -import { Database, Download, Duplicate, Pencil, Trash } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Database, Download, Duplicate, Pencil, Trash } from '@sim/emcn/icons' interface TableContextMenuProps { isOpen: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/tables/components/tables-list-context-menu/tables-list-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/tables/components/tables-list-context-menu/tables-list-context-menu.tsx index d3fa890ad04..f0925f7cc6c 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/components/tables-list-context-menu/tables-list-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/components/tables-list-context-menu/tables-list-context-menu.tsx @@ -6,8 +6,8 @@ import { DropdownMenuItem, DropdownMenuTrigger, Upload, -} from '@/components/emcn' -import { Plus } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Plus } from '@sim/emcn/icons' interface TablesListContextMenuProps { isOpen: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/tables/loading.tsx b/apps/sim/app/workspace/[workspaceId]/tables/loading.tsx index 2af5787728c..b6e01e9d0aa 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/loading.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/loading.tsx @@ -1,7 +1,7 @@ 'use client' -import { Plus, Upload } from '@/components/emcn' -import { Table as TableIcon } from '@/components/emcn/icons' +import { Plus, Upload } from '@sim/emcn' +import { Table as TableIcon } from '@sim/emcn/icons' import { type ChromeActionSpec, ResourceChromeFallback, diff --git a/apps/sim/app/workspace/[workspaceId]/tables/tables.tsx b/apps/sim/app/workspace/[workspaceId]/tables/tables.tsx index 23d00ef0a70..c88ae332b2b 100644 --- a/apps/sim/app/workspace/[workspaceId]/tables/tables.tsx +++ b/apps/sim/app/workspace/[workspaceId]/tables/tables.tsx @@ -1,13 +1,13 @@ 'use client' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import type { ComboboxOption } from '@sim/emcn' +import { ChipCombobox, ChipConfirmModal, Plus, toast, Upload } from '@sim/emcn' +import { Columns3, Rows3, Table as TableIcon } from '@sim/emcn/icons' import { createLogger } from '@sim/logger' import { generateId } from '@sim/utils/id' import { useParams, useRouter } from 'next/navigation' import { debounce, useQueryStates } from 'nuqs' -import type { ComboboxOption } from '@/components/emcn' -import { ChipCombobox, ChipConfirmModal, Plus, toast, Upload } from '@/components/emcn' -import { Columns3, Rows3, Table as TableIcon } from '@/components/emcn/icons' import type { TableDefinition } from '@/lib/table' import { CSV_ASYNC_IMPORT_THRESHOLD_BYTES, generateUniqueTableName } from '@/lib/table/constants' import type { diff --git a/apps/sim/app/workspace/[workspaceId]/upgrade/components/billing-period-toggle/billing-period-toggle.tsx b/apps/sim/app/workspace/[workspaceId]/upgrade/components/billing-period-toggle/billing-period-toggle.tsx index 32af8f71b39..148e0561c65 100644 --- a/apps/sim/app/workspace/[workspaceId]/upgrade/components/billing-period-toggle/billing-period-toggle.tsx +++ b/apps/sim/app/workspace/[workspaceId]/upgrade/components/billing-period-toggle/billing-period-toggle.tsx @@ -1,6 +1,6 @@ 'use client' -import { ChipSwitch, ChipTag } from '@/components/emcn' +import { ChipSwitch, ChipTag } from '@sim/emcn' import { ANNUAL_DISCOUNT_RATE } from '@/lib/billing/constants' /** diff --git a/apps/sim/app/workspace/[workspaceId]/upgrade/components/comparison-table/comparison-table.tsx b/apps/sim/app/workspace/[workspaceId]/upgrade/components/comparison-table/comparison-table.tsx index f6277392811..90e060302f0 100644 --- a/apps/sim/app/workspace/[workspaceId]/upgrade/components/comparison-table/comparison-table.tsx +++ b/apps/sim/app/workspace/[workspaceId]/upgrade/components/comparison-table/comparison-table.tsx @@ -1,8 +1,6 @@ 'use client' - -import { chipVariants } from '@/components/emcn' +import { chipVariants, cn } from '@sim/emcn' import { SlackIcon } from '@/components/icons' -import { cn } from '@/lib/core/utils/cn' import { BillingPeriodToggle } from '@/app/workspace/[workspaceId]/upgrade/components/billing-period-toggle/billing-period-toggle' import { type CellValue, diff --git a/apps/sim/app/workspace/[workspaceId]/upgrade/components/plan-card/plan-card.tsx b/apps/sim/app/workspace/[workspaceId]/upgrade/components/plan-card/plan-card.tsx index 872702b5ad6..808be0af4a0 100644 --- a/apps/sim/app/workspace/[workspaceId]/upgrade/components/plan-card/plan-card.tsx +++ b/apps/sim/app/workspace/[workspaceId]/upgrade/components/plan-card/plan-card.tsx @@ -1,7 +1,5 @@ 'use client' - -import { Check, ChipTag, Credit, chipVariants, Info, RefreshCw } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +import { Check, ChipTag, Credit, chipVariants, cn, Info, RefreshCw } from '@sim/emcn' /** * Props for {@link UpgradePlanCard}. diff --git a/apps/sim/app/workspace/[workspaceId]/upgrade/hooks/use-upgrade-state.ts b/apps/sim/app/workspace/[workspaceId]/upgrade/hooks/use-upgrade-state.ts index bf9eeafe42f..548471e86ef 100644 --- a/apps/sim/app/workspace/[workspaceId]/upgrade/hooks/use-upgrade-state.ts +++ b/apps/sim/app/workspace/[workspaceId]/upgrade/hooks/use-upgrade-state.ts @@ -1,8 +1,8 @@ 'use client' import { useCallback, useEffect, useRef, useState } from 'react' +import { toast } from '@sim/emcn' import { isOrgAdminRole } from '@sim/platform-authz/predicates' import { getErrorMessage } from '@sim/utils/errors' -import { toast } from '@/components/emcn' import { requestJson } from '@/lib/api/client/request' import { billingSwitchPlanContract } from '@/lib/api/contracts/subscription' import { useSubscriptionUpgrade } from '@/lib/billing/client/upgrade' diff --git a/apps/sim/app/workspace/[workspaceId]/upgrade/upgrade.tsx b/apps/sim/app/workspace/[workspaceId]/upgrade/upgrade.tsx index 500a7aa4512..62261094dc3 100644 --- a/apps/sim/app/workspace/[workspaceId]/upgrade/upgrade.tsx +++ b/apps/sim/app/workspace/[workspaceId]/upgrade/upgrade.tsx @@ -1,10 +1,10 @@ 'use client' import { useCallback, useEffect, useState } from 'react' +import { ArrowLeft, Chip, toast } from '@sim/emcn' import { getErrorMessage } from '@sim/utils/errors' import { useRouter } from 'next/navigation' import { useQueryState } from 'nuqs' -import { ArrowLeft, Chip, toast } from '@/components/emcn' import { getUpgradeCardCta, type PlanCardCta, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar.tsx index 37b9f8c145f..08bde247dbc 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar.tsx @@ -1,8 +1,7 @@ import { memo, useCallback } from 'react' +import { Button, cn, Duplicate, PlayOutline, Tooltip, Trash2, toast } from '@sim/emcn' import { ArrowLeftRight, ArrowUpDown, Circle, CircleOff, Lock, LogOut, Unlock } from 'lucide-react' import { useShallow } from 'zustand/react/shallow' -import { Button, Duplicate, PlayOutline, Tooltip, Trash2, toast } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { isInputDefinitionTrigger } from '@/lib/workflows/triggers/input-definition-triggers' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' import { useWorkflowExecution } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/block-menu/block-menu.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/block-menu/block-menu.tsx index f77a76394c7..acc8e422da7 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/block-menu/block-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/block-menu/block-menu.tsx @@ -1,13 +1,7 @@ 'use client' import type { RefObject } from 'react' -import { - Popover, - PopoverAnchor, - PopoverContent, - PopoverDivider, - PopoverItem, -} from '@/components/emcn' +import { Popover, PopoverAnchor, PopoverContent, PopoverDivider, PopoverItem } from '@sim/emcn' import { TriggerUtils } from '@/lib/workflows/triggers/triggers' /** diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/canvas-menu/canvas-menu.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/canvas-menu/canvas-menu.tsx index 3d6cb1c77df..a4cbe515e0c 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/canvas-menu/canvas-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/canvas-menu/canvas-menu.tsx @@ -1,13 +1,7 @@ 'use client' import type { RefObject } from 'react' -import { - Popover, - PopoverAnchor, - PopoverContent, - PopoverDivider, - PopoverItem, -} from '@/components/emcn' +import { Popover, PopoverAnchor, PopoverContent, PopoverDivider, PopoverItem } from '@sim/emcn' /** * Props for CanvasMenu component diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/chat.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/chat.tsx index fe3892ec05c..bb5a4180da8 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/chat.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/chat.tsx @@ -1,13 +1,10 @@ 'use client' import { type KeyboardEvent, useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { generateId } from '@sim/utils/id' -import { AlertCircle, ArrowUp, MoreVertical, Paperclip, Square, X } from 'lucide-react' -import { useShallow } from 'zustand/react/shallow' import { Badge, Button, + cn, Input, Popover, PopoverContent, @@ -16,10 +13,13 @@ import { PopoverTrigger, Tooltip, Trash, -} from '@/components/emcn' -import { Download } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Download } from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { generateId } from '@sim/utils/id' +import { AlertCircle, ArrowUp, MoreVertical, Paperclip, Square, X } from 'lucide-react' +import { useShallow } from 'zustand/react/shallow' import { useSession } from '@/lib/auth/auth-client' -import { cn } from '@/lib/core/utils/cn' import { extractBlockIdFromOutputId, extractPathFromOutputId, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select.tsx index 41c5962628c..8ad659a4535 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select.tsx @@ -2,10 +2,9 @@ import type React from 'react' import { useMemo } from 'react' +import { Combobox, type ComboboxOptionGroup, cn } from '@sim/emcn' import { RepeatIcon, SplitIcon } from 'lucide-react' import { useShallow } from 'zustand/react/shallow' -import { Combobox, type ComboboxOptionGroup } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { type FlattenOutputsBlockInput, flattenWorkflowOutputs, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/command-list/command-list.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/command-list/command-list.tsx index 6b53eab1f3b..cac027c4a73 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/command-list/command-list.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/command-list/command-list.tsx @@ -1,14 +1,12 @@ 'use client' import { useCallback } from 'react' +import { Button, cn, handleKeyboardActivation, Library } from '@sim/emcn' import { createLogger } from '@sim/logger' import { Search } from 'lucide-react' import Image from 'next/image' import { useParams, useRouter } from 'next/navigation' -import { Button, Library } from '@/components/emcn' import { AgentIcon } from '@/components/icons' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { usePreventZoom } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks' import { useSearchModalStore } from '@/stores/modals/search/store' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/error/index.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/error/index.tsx index c262d9ea264..c236ee2e5b6 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/error/index.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/error/index.tsx @@ -1,10 +1,10 @@ 'use client' import { Component, type ReactNode, useEffect } from 'react' +import { Button } from '@sim/emcn' import { createLogger } from '@sim/logger' import { RefreshCw } from 'lucide-react' import { ReactFlowProvider } from 'reactflow' -import { Button } from '@/components/emcn' import { Panel } from '@/app/workspace/[workspaceId]/w/[workflowId]/components' import { usePreventZoom } from '@/app/workspace/[workspaceId]/w/[workflowId]/hooks' import { Sidebar } from '@/app/workspace/[workspaceId]/w/components/sidebar/sidebar' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx index 2c24056ca5c..b8550484950 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/note-block/note-block.tsx @@ -3,8 +3,7 @@ import type { NodeProps } from 'reactflow' import remarkBreaks from 'remark-breaks' import { Streamdown } from 'streamdown' import 'streamdown/styles.css' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' +import { cn, handleKeyboardActivation } from '@sim/emcn' import { BLOCK_DIMENSIONS } from '@/lib/workflows/blocks/block-dimensions' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' import { ActionBar } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/hooks/use-file-attachments.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/hooks/use-file-attachments.ts index 57d808c1f03..4c40839d27b 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/hooks/use-file-attachments.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/hooks/use-file-attachments.ts @@ -1,10 +1,10 @@ 'use client' import { useCallback, useEffect, useRef, useState } from 'react' +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { toError } from '@sim/utils/errors' import { generateId } from '@sim/utils/id' -import { toast } from '@/components/emcn' import { uploadViaApiFallback } from '@/lib/uploads/client/api-fallback' import { DirectUploadError, runUploadStrategy } from '@/lib/uploads/client/direct-upload' import { resolveFileType } from '@/lib/uploads/utils/file-utils' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/api/api.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/api/api.tsx index d79cee99f51..d7e0ad2ec7c 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/api/api.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/api/api.tsx @@ -1,7 +1,6 @@ 'use client' import { useState } from 'react' -import { Check, Clipboard } from 'lucide-react' import { Button, ButtonGroup, @@ -11,7 +10,8 @@ import { Label, Skeleton, Tooltip, -} from '@/components/emcn' +} from '@sim/emcn' +import { Check, Clipboard } from 'lucide-react' import { OutputSelect } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select' interface WorkflowDeploymentInfo { diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx index 12fe7164ce6..eee7671bcb7 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/chat/chat.tsx @@ -1,14 +1,12 @@ 'use client' import { useEffect, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' -import { AlertTriangle, Check } from 'lucide-react' import { ButtonGroup, ButtonGroupItem, ChipConfirmModal, ChipInput, + cn, Input, Label, Loader, @@ -17,10 +15,12 @@ import { type TagItem, Textarea, Tooltip, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { AlertTriangle, Check } from 'lucide-react' import { GeneratedPasswordInput } from '@/components/ui' import { getEnv, isTruthy } from '@/lib/core/config/env' -import { cn } from '@/lib/core/utils/cn' import { getBaseUrl, getEmailDomain } from '@/lib/core/utils/urls' import { quickValidateEmail } from '@/lib/messaging/email/validation' import { OutputSelect } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/chat/components/output-select/output-select' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/deploy-upgrade-gate/deploy-upgrade-gate.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/deploy-upgrade-gate/deploy-upgrade-gate.tsx index 988fbd48564..8f580283a51 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/deploy-upgrade-gate/deploy-upgrade-gate.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/deploy-upgrade-gate/deploy-upgrade-gate.tsx @@ -1,9 +1,9 @@ 'use client' +import { ChipLink } from '@sim/emcn' import { useQueryClient } from '@tanstack/react-query' import { ArrowRight } from 'lucide-react' import { useParams, useRouter } from 'next/navigation' -import { ChipLink } from '@/components/emcn' import { buildUpgradeHref } from '@/lib/billing/upgrade-reasons' import { prefetchUpgradeBillingData } from '@/hooks/queries/subscription' import { prefetchWorkspaceSettings } from '@/hooks/queries/workspace' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/api-info-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/api-info-modal.tsx index a997946e344..9bca6377595 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/api-info-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/api-info-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { useEffect, useMemo, useRef, useState } from 'react' -import { getErrorMessage } from '@sim/utils/errors' -import { useParams } from 'next/navigation' import { Badge, ButtonGroup, @@ -16,7 +14,9 @@ import { ChipModalHeader, Input, Label, -} from '@/components/emcn' +} from '@sim/emcn' +import { getErrorMessage } from '@sim/utils/errors' +import { useParams } from 'next/navigation' import { normalizeInputFormatValue } from '@/lib/workflows/input-format' import { isInputDefinitionTrigger } from '@/lib/workflows/triggers/input-definition-triggers' import type { InputFormatField } from '@/lib/workflows/types' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/version-description-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/version-description-modal.tsx index 1a5cb845219..c8c0ede6138 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/version-description-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/version-description-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { useEffect, useRef, useState } from 'react' -import dynamic from 'next/dynamic' -import { useParams } from 'next/navigation' import { ChipConfirmModal, ChipModal, @@ -12,8 +10,10 @@ import { ChipModalFooter, ChipModalHeader, chipFieldSurfaceClass, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' + cn, +} from '@sim/emcn' +import dynamic from 'next/dynamic' +import { useParams } from 'next/navigation' import { useGenerateVersionDescription, useUpdateDeploymentVersion, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/versions.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/versions.tsx index 055d3b0ae48..14781118029 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/versions.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/components/versions.tsx @@ -1,10 +1,9 @@ 'use client' import { useEffect, useRef, useState } from 'react' -import { formatDateTime } from '@sim/utils/formatting' -import { FileText, MoreVertical, Pencil, RotateCcw, SendToBack } from 'lucide-react' import { Button, + cn, Input, Popover, PopoverContent, @@ -12,8 +11,9 @@ import { PopoverTrigger, Skeleton, Tooltip, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { formatDateTime } from '@sim/utils/formatting' +import { FileText, MoreVertical, Pencil, RotateCcw, SendToBack } from 'lucide-react' import type { WorkflowDeploymentVersionResponse } from '@/lib/workflows/persistence/utils' import { formatVersionLabel } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/format-version-label' import { useUpdateDeploymentVersion } from '@/hooks/queries/deployments' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/general.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/general.tsx index 5e7a258b8cc..e45d51bed99 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/general.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/general/general.tsx @@ -1,12 +1,12 @@ 'use client' import { useEffect, useState } from 'react' -import { createLogger } from '@sim/logger' import { Button, ButtonGroup, ButtonGroupItem, ChipConfirmModal, + cn, Expand, Label, Modal, @@ -16,8 +16,8 @@ import { ModalHeader, Skeleton, Tooltip, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' import type { WorkflowDeploymentVersionResponse } from '@/lib/workflows/persistence/utils' import type { DeployReadiness } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/hooks/use-deploy-readiness' import { Preview, PreviewWorkflow } from '@/app/workspace/[workspaceId]/w/components/preview' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/mcp/mcp.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/mcp/mcp.tsx index 38b7b8841ac..618870fb2c7 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/mcp/mcp.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/components/mcp/mcp.tsx @@ -1,20 +1,20 @@ 'use client' import { useCallback, useEffect, useMemo, useState } from 'react' -import { createLogger } from '@sim/logger' -import { useParams } from 'next/navigation' import { Badge, Button, ChipCombobox, ChipInput, type ComboboxOption, + cn, Label, Skeleton, Textarea, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { useParams } from 'next/navigation' import { ApiClientError } from '@/lib/api/client/errors' -import { cn } from '@/lib/core/utils/cn' import { extractDescriptionOverrides, extractInputFormatFromBlocks, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal.tsx index 2e3579d9f66..8bd6cba84e7 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal.tsx @@ -1,10 +1,6 @@ 'use client' import { type ReactNode, useEffect, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { toError } from '@sim/utils/errors' -import { useQueryClient } from '@tanstack/react-query' -import { useParams } from 'next/navigation' import { Badge, Button, @@ -21,7 +17,11 @@ import { ModalTabsList, ModalTabsTrigger, Tooltip, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { toError } from '@sim/utils/errors' +import { useQueryClient } from '@tanstack/react-query' +import { useParams } from 'next/navigation' import { getBaseUrl } from '@/lib/core/utils/urls' import { getInputFormatExample as getInputFormatExampleUtil } from '@/lib/workflows/operations/deployment-utils' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/deploy.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/deploy.tsx index cc5a65825f0..598207320da 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/deploy.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/deploy.tsx @@ -1,7 +1,7 @@ 'use client' import { useState } from 'react' -import { Button, Tooltip } from '@/components/emcn' +import { Button, Tooltip } from '@sim/emcn' import { DeployModal } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/components/deploy-modal/deploy-modal' import { useChangeDetection, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/hooks/use-deployment.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/hooks/use-deployment.ts index b411a22d8a9..d0e0b867bfe 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/hooks/use-deployment.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/hooks/use-deployment.ts @@ -1,7 +1,7 @@ import { useCallback, useState } from 'react' +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { toError } from '@sim/utils/errors' -import { toast } from '@/components/emcn' import { runPreDeployChecks } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/deploy/hooks/use-predeploy-checks' import { useDeployWorkflow } from '@/hooks/queries/deployments' import { useWorkflowRegistry } from '@/stores/workflows/registry/store' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/connection-blocks/components/field-item/field-item.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/connection-blocks/components/field-item/field-item.tsx index 42c4c734aee..916c284eb9b 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/connection-blocks/components/field-item/field-item.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/connection-blocks/components/field-item/field-item.tsx @@ -1,11 +1,10 @@ 'use client' import { useCallback } from 'react' +import { Badge, handleKeyboardActivation } from '@sim/emcn' import { createLogger } from '@sim/logger' import clsx from 'clsx' import { ChevronDown } from 'lucide-react' -import { Badge } from '@/components/emcn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import type { ConnectedBlock } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-block-connections' import { normalizeName } from '@/executor/constants' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/connection-blocks/connection-blocks.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/connection-blocks/connection-blocks.tsx index fd09b25097e..66778d5f15d 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/connection-blocks/connection-blocks.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/connection-blocks/connection-blocks.tsx @@ -1,12 +1,11 @@ 'use client' import { useCallback, useRef, useState } from 'react' +import { ChevronDown, handleKeyboardActivation } from '@sim/emcn' import { createLogger } from '@sim/logger' import clsx from 'clsx' import { RepeatIcon, SplitIcon } from 'lucide-react' import { useShallow } from 'zustand/react/shallow' -import { ChevronDown } from '@/components/emcn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { FieldItem, type SchemaField, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/checkbox-list/checkbox-list.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/checkbox-list/checkbox-list.tsx index b982c4b3ff9..992aeeb0164 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/checkbox-list/checkbox-list.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/checkbox-list/checkbox-list.tsx @@ -1,5 +1,5 @@ +import { Checkbox, Label, Tooltip } from '@sim/emcn' import { Info } from 'lucide-react' -import { Checkbox, Label, Tooltip } from '@/components/emcn' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/code/code.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/code/code.tsx index cf85680b0f9..6fe84a9ae1a 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/code/code.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/code/code.tsx @@ -3,19 +3,19 @@ import { memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, use import { Check, Wand2 } from 'lucide-react' import { useParams } from 'next/navigation' import 'prismjs/components/prism-python' -import { createLogger } from '@sim/logger' -import Editor from 'react-simple-code-editor' import { CODE_LINE_HEIGHT_PX, Code as CodeEditor, calculateGutterWidth, + cn, Duplicate, getCodeEditorProps, highlight, languages, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import Editor from 'react-simple-code-editor' import { Button } from '@/components/ui/button' -import { cn } from '@/lib/core/utils/cn' import { CodeLanguage } from '@/lib/execution/languages' import { isLikelyReferenceSegment, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx index b3b4db6c579..ef09dc6ffac 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/combobox/combobox.tsx @@ -1,10 +1,9 @@ import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { Combobox, type ComboboxOption, cn } from '@sim/emcn' import { getErrorMessage } from '@sim/utils/errors' import { isEqual } from 'es-toolkit' import { useReactFlow } from 'reactflow' import { useStoreWithEqualityFn } from 'zustand/traditional' -import { Combobox, type ComboboxOption } from '@/components/emcn/components' -import { cn } from '@/lib/core/utils/cn' import { buildCanonicalIndex, resolveDependencyValue } from '@/lib/workflows/subblocks/visibility' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { SubBlockInputController } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sub-block-input-controller' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx index 5b72c9b1302..3b52f3a96b6 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx @@ -1,21 +1,21 @@ import type { ReactElement } from 'react' import { useEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { ChevronDown, ChevronsUpDown, ChevronUp, Plus } from 'lucide-react' -import { useParams } from 'next/navigation' -import Editor from 'react-simple-code-editor' import { Button, Code, calculateGutterWidth, + cn, getCodeEditorProps, highlight, languages, Textarea, Tooltip, -} from '@/components/emcn' -import { Trash } from '@/components/emcn/icons/trash' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { Trash } from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { ChevronDown, ChevronsUpDown, ChevronUp, Plus } from 'lucide-react' +import { useParams } from 'next/navigation' +import Editor from 'react-simple-code-editor' import { isLikelyReferenceSegment, SYSTEM_REFERENCE_PREFIXES, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/credential-selector.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/credential-selector.tsx index 02653ddb4ca..a58ac7c5e25 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/credential-selector.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/credential-selector/credential-selector.tsx @@ -1,9 +1,9 @@ 'use client' import { useCallback, useMemo, useState } from 'react' +import { Button, Combobox } from '@sim/emcn' import { ExternalLink, KeyRound, Users } from 'lucide-react' import { useParams } from 'next/navigation' -import { Button, Combobox } from '@/components/emcn/components' import { getSubscriptionAccessState } from '@/lib/billing/client' import { getPollingProviderFromOAuth } from '@/lib/credential-sets/providers' import { consumeOAuthReturnContext, writeOAuthReturnContext } from '@/lib/credentials/client-state' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx index bf97e818bbf..a61e9e35f3a 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/document-tag-entry/document-tag-entry.tsx @@ -1,19 +1,19 @@ 'use client' import { useMemo, useRef } from 'react' -import { generateId } from '@sim/utils/id' -import { Plus } from 'lucide-react' import { Badge, Button, Combobox, type ComboboxOption, + cn, + handleKeyboardActivation, Input, Label, Trash, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' +} from '@sim/emcn' +import { generateId } from '@sim/utils/id' +import { Plus } from 'lucide-react' import { FIELD_TYPE_LABELS, getPlaceholderForFieldType } from '@/lib/knowledge/constants' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/dropdown/dropdown.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/dropdown/dropdown.tsx index edf87395914..d4f831d559f 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/dropdown/dropdown.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/dropdown/dropdown.tsx @@ -1,10 +1,10 @@ import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { ChipTag, Combobox, type ComboboxOption } from '@sim/emcn' import { getErrorMessage } from '@sim/utils/errors' import { generateId } from '@sim/utils/id' import { isRecordLike } from '@sim/utils/object' import { isEqual } from 'es-toolkit' import { useStoreWithEqualityFn } from 'zustand/traditional' -import { ChipTag, Combobox, type ComboboxOption } from '@/components/emcn' import { buildCanonicalIndex, resolveDependencyValue } from '@/lib/workflows/subblocks/visibility' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/env-var-dropdown/env-var-dropdown.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/env-var-dropdown/env-var-dropdown.tsx index b534fc63bed..dfa0412e510 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/env-var-dropdown/env-var-dropdown.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/env-var-dropdown/env-var-dropdown.tsx @@ -1,14 +1,14 @@ import { useCallback, useEffect, useState } from 'react' -import { Plus } from 'lucide-react' import { + cn, Popover, PopoverAnchor, PopoverContent, PopoverItem, PopoverScrollArea, PopoverSection, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { Plus } from 'lucide-react' import { writePendingCredentialCreateRequest } from '@/lib/credentials/client-state' import type { WorkspaceEnvironmentData } from '@/lib/environment/api' import { usePersonalEnvironment, useWorkspaceEnvironment } from '@/hooks/queries/environment' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/eval-input/eval-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/eval-input/eval-input.tsx index 7c70f729bfb..621e07b38e9 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/eval-input/eval-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/eval-input/eval-input.tsx @@ -1,9 +1,8 @@ import { useMemo, useRef } from 'react' +import { Button, cn, Input, Label, Textarea, Tooltip } from '@sim/emcn' +import { Trash } from '@sim/emcn/icons' import { generateId } from '@sim/utils/id' import { Plus } from 'lucide-react' -import { Button, Input, Label, Textarea, Tooltip } from '@/components/emcn' -import { Trash } from '@/components/emcn/icons/trash' -import { cn } from '@/lib/core/utils/cn' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown' import { getActiveWorkflowSearchHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/file-upload/file-upload.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/file-upload/file-upload.tsx index dc6d65c9382..59261e1001d 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/file-upload/file-upload.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/file-upload/file-upload.tsx @@ -1,6 +1,7 @@ 'use client' import { useMemo, useRef, useState } from 'react' +import { Button, Combobox, cn } from '@sim/emcn' import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' import { generateShortId } from '@sim/utils/id' @@ -8,12 +9,10 @@ import { randomFloat } from '@sim/utils/random' import { useQueryClient } from '@tanstack/react-query' import { X } from 'lucide-react' import { useParams } from 'next/navigation' -import { Button, Combobox } from '@/components/emcn/components' import { Progress } from '@/components/ui/progress' import { isApiClientError } from '@/lib/api/client/errors' import { requestJson } from '@/lib/api/client/request' import { fileDeleteContract } from '@/lib/api/contracts/storage-transfer' -import { cn } from '@/lib/core/utils/cn' import { getExtensionFromMimeType } from '@/lib/uploads/utils/file-utils' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/filter-builder/components/filter-rule-row.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/filter-builder/components/filter-rule-row.tsx index 0b50458e6b0..9cf97b73144 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/filter-builder/components/filter-rule-row.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/filter-builder/components/filter-rule-row.tsx @@ -1,16 +1,16 @@ import { useRef } from 'react' -import { Plus } from 'lucide-react' import { Badge, Button, Combobox, type ComboboxOption, + cn, + handleKeyboardActivation, Input, Label, Trash, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' +} from '@sim/emcn' +import { Plus } from 'lucide-react' import type { FilterRule } from '@/lib/table/query-builder/constants' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/filter-builder/filter-builder.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/filter-builder/filter-builder.tsx index 52fc56e7a41..4075a2f72de 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/filter-builder/filter-builder.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/filter-builder/filter-builder.tsx @@ -1,8 +1,8 @@ 'use client' import { useCallback, useMemo } from 'react' +import { Button } from '@sim/emcn' import { Plus } from 'lucide-react' -import { Button } from '@/components/emcn' import { useTableColumns } from '@/lib/table/hooks' import type { FilterRule } from '@/lib/table/query-builder/constants' import { useFilterBuilder } from '@/lib/table/query-builder/use-query-builder' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/grouped-checkbox-list/grouped-checkbox-list.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/grouped-checkbox-list/grouped-checkbox-list.tsx index 9d0113b6a49..ac2673216a3 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/grouped-checkbox-list/grouped-checkbox-list.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/grouped-checkbox-list/grouped-checkbox-list.tsx @@ -1,7 +1,6 @@ 'use client' import { useEffect, useMemo, useRef, useState } from 'react' -import { Settings2 } from 'lucide-react' import { Button, Checkbox, @@ -9,8 +8,9 @@ import { ChipModalBody, ChipModalField, ChipModalHeader, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' + cn, +} from '@sim/emcn' +import { Settings2 } from 'lucide-react' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/input-mapping/input-mapping.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/input-mapping/input-mapping.tsx index fba9b69f820..721e657cefc 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/input-mapping/input-mapping.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/input-mapping/input-mapping.tsx @@ -1,6 +1,5 @@ import { useEffect, useMemo, useRef, useState } from 'react' -import { Badge, CollapsibleCard, Input, Label } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +import { Badge, CollapsibleCard, cn, Input, Label } from '@sim/emcn' import { extractInputFieldsFromBlocks } from '@/lib/workflows/input-format' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-base-selector/knowledge-base-selector.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-base-selector/knowledge-base-selector.tsx index f6cbd3160ca..7500e739274 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-base-selector/knowledge-base-selector.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-base-selector/knowledge-base-selector.tsx @@ -1,10 +1,10 @@ 'use client' import { useCallback, useMemo } from 'react' +import { Combobox, type ComboboxOption } from '@sim/emcn' import { useQueries } from '@tanstack/react-query' import { X } from 'lucide-react' import { useParams } from 'next/navigation' -import { Combobox, type ComboboxOption } from '@/components/emcn' import { PackageSearchIcon } from '@/components/icons' import type { KnowledgeBaseData } from '@/lib/knowledge/types' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-tag-filters/knowledge-tag-filters.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-tag-filters/knowledge-tag-filters.tsx index ba305820fc3..db9ee31e574 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-tag-filters/knowledge-tag-filters.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/knowledge-tag-filters/knowledge-tag-filters.tsx @@ -1,19 +1,19 @@ 'use client' import { useRef } from 'react' -import { generateId } from '@sim/utils/id' -import { Plus } from 'lucide-react' import { Badge, Button, Combobox, type ComboboxOption, + cn, + handleKeyboardActivation, Input, Label, Trash, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' +} from '@sim/emcn' +import { generateId } from '@sim/utils/id' +import { Plus } from 'lucide-react' import { FIELD_TYPE_LABELS, getPlaceholderForFieldType } from '@/lib/knowledge/constants' import { type FilterFieldType, getOperatorsForFieldType } from '@/lib/knowledge/filters/types' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input.tsx index 63cf306a1e1..4614a496560 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input.tsx @@ -7,11 +7,10 @@ import { useRef, useState, } from 'react' +import { cn, Textarea } from '@sim/emcn' import { createLogger } from '@sim/logger' import { ChevronsUpDown, Wand2 } from 'lucide-react' -import { Textarea } from '@/components/emcn' import { Button } from '@/components/ui/button' -import { cn } from '@/lib/core/utils/cn' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { SubBlockInputController } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sub-block-input-controller' import { getActiveWorkflowSearchHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-dynamic-args/mcp-dynamic-args.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-dynamic-args/mcp-dynamic-args.tsx index c9fdb47e0ab..5fa807b3f73 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-dynamic-args/mcp-dynamic-args.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-dynamic-args/mcp-dynamic-args.tsx @@ -1,7 +1,7 @@ import { useCallback } from 'react' +import { Combobox, FieldDivider, Label, Slider, Switch } from '@sim/emcn' import { createLogger } from '@sim/logger' import { useParams } from 'next/navigation' -import { Combobox, FieldDivider, Label, Slider, Switch } from '@/components/emcn/components' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { LongInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/long-input/long-input' import { ShortInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-server-modal/mcp-server-selector.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-server-modal/mcp-server-selector.tsx index 4d7096571ab..ac65ed2eb68 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-server-modal/mcp-server-selector.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-server-modal/mcp-server-selector.tsx @@ -1,8 +1,8 @@ 'use client' import { useEffect, useMemo, useState } from 'react' +import { Combobox } from '@sim/emcn' import { useParams } from 'next/navigation' -import { Combobox } from '@/components/emcn/components' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-server-modal/mcp-tool-selector.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-server-modal/mcp-tool-selector.tsx index d92e1979df6..10739b60484 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-server-modal/mcp-tool-selector.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/mcp-server-modal/mcp-tool-selector.tsx @@ -1,8 +1,8 @@ 'use client' import { useEffect, useMemo, useState } from 'react' +import { Combobox } from '@sim/emcn' import { useParams } from 'next/navigation' -import { Combobox } from '@/components/emcn/components' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/messages-input/messages-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/messages-input/messages-input.tsx index 9ce81112ad5..6f1367e2141 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/messages-input/messages-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/messages-input/messages-input.tsx @@ -7,12 +7,11 @@ import { useRef, useState, } from 'react' +import { Button, cn, Popover, PopoverContent, PopoverItem, PopoverTrigger } from '@sim/emcn' +import { Trash } from '@sim/emcn/icons' import { generateShortId } from '@sim/utils/id' import { isEqual } from 'es-toolkit' import { ChevronDown, ChevronsUpDown, ChevronUp, Plus } from 'lucide-react' -import { Button, Popover, PopoverContent, PopoverItem, PopoverTrigger } from '@/components/emcn' -import { Trash } from '@/components/emcn/icons/trash' -import { cn } from '@/lib/core/utils/cn' import { EnvVarDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/env-var-dropdown' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/schedule-info/schedule-info.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/schedule-info/schedule-info.tsx index 90500e6ff1a..1a704ad6a77 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/schedule-info/schedule-info.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/schedule-info/schedule-info.tsx @@ -1,5 +1,5 @@ +import { Badge } from '@sim/emcn' import { useParams } from 'next/navigation' -import { Badge } from '@/components/emcn' import { parseCronToHumanReadable } from '@/lib/workflows/schedules/utils' import { useRedeployWorkflowSchedule, useScheduleQuery } from '@/hooks/queries/schedules' import { useSubBlockStore } from '@/stores/workflows/subblock/store' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-combobox/selector-combobox.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-combobox/selector-combobox.tsx index c8f7bfe7e75..e52684555d9 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-combobox/selector-combobox.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-combobox/selector-combobox.tsx @@ -1,7 +1,7 @@ import type React from 'react' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { Button, Combobox as EditableCombobox } from '@sim/emcn' import { X } from 'lucide-react' -import { Button, Combobox as EditableCombobox } from '@/components/emcn/components' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { SubBlockInputController } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sub-block-input-controller' import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-input/selector-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-input/selector-input.tsx index de6c1df71d5..864a65caf68 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-input/selector-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-input/selector-input.tsx @@ -1,7 +1,7 @@ 'use client' import { useEffect, useRef } from 'react' -import { Tooltip } from '@/components/emcn' +import { Tooltip } from '@sim/emcn' import { SelectorCombobox } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/selector-combobox/selector-combobox' import { useSelectorSetup } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-selector-setup' import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx index 64c0dc3579b..d6befd56167 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input/short-input.tsx @@ -1,9 +1,8 @@ import { memo, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react' +import { cn, Input } from '@sim/emcn' import { Wand2 } from 'lucide-react' import { useReactFlow } from 'reactflow' -import { Input } from '@/components/emcn' import { Button } from '@/components/ui/button' -import { cn } from '@/lib/core/utils/cn' import { formatDisplayText, getValidWorkflowSearchRange, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/skill-input/skill-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/skill-input/skill-input.tsx index 4f355f65c6f..80be87af9ea 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/skill-input/skill-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/skill-input/skill-input.tsx @@ -1,9 +1,9 @@ 'use client' import { useCallback, useMemo, useState } from 'react' +import { Combobox, type ComboboxOptionGroup } from '@sim/emcn' import { Plus, XIcon } from 'lucide-react' import { useParams } from 'next/navigation' -import { Combobox, type ComboboxOptionGroup } from '@/components/emcn' import { AgentSkillsIcon } from '@/components/icons' import { SkillModal } from '@/app/workspace/[workspaceId]/skills/components/skill-modal' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/slack-setup-wizard/slack-setup-wizard.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/slack-setup-wizard/slack-setup-wizard.tsx index a79c512efc4..3d3745abb4c 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/slack-setup-wizard/slack-setup-wizard.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/slack-setup-wizard/slack-setup-wizard.tsx @@ -1,10 +1,9 @@ 'use client' import { type ReactNode, useCallback, useMemo, useState } from 'react' +import { Checkbox, cn, Input, Label, SecretInput, Tooltip, Wizard } from '@sim/emcn' import { Check, ChevronRight, Clipboard, Info } from 'lucide-react' import { useShallow } from 'zustand/react/shallow' -import { Checkbox, Input, Label, SecretInput, Tooltip, Wizard } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value' import { useWebhookManagement } from '@/hooks/use-webhook-management' import { useWorkflowRegistry } from '@/stores/workflows/registry/store' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/slider-input/slider-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/slider-input/slider-input.tsx index 673669356ed..7a5cb41d9cb 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/slider-input/slider-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/slider-input/slider-input.tsx @@ -1,6 +1,5 @@ import { useEffect } from 'react' -import { Slider } from '@/components/emcn/components/slider/slider' -import { cn } from '@/lib/core/utils/cn' +import { cn, Slider } from '@sim/emcn' import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value' interface SliderInputProps { diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sort-builder/components/sort-rule-row.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sort-builder/components/sort-rule-row.tsx index 75bb1999e94..35c68663cde 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sort-builder/components/sort-rule-row.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sort-builder/components/sort-rule-row.tsx @@ -1,7 +1,14 @@ +import { + Badge, + Button, + Combobox, + type ComboboxOption, + cn, + handleKeyboardActivation, + Label, + Trash, +} from '@sim/emcn' import { Plus } from 'lucide-react' -import { Badge, Button, Combobox, type ComboboxOption, Label, Trash } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import type { SortRule } from '@/lib/table/query-builder/constants' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sort-builder/sort-builder.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sort-builder/sort-builder.tsx index 6095ada1df3..d11ec546900 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sort-builder/sort-builder.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/sort-builder/sort-builder.tsx @@ -1,9 +1,9 @@ 'use client' import { useCallback, useMemo } from 'react' +import { Button, type ComboboxOption } from '@sim/emcn' import { generateId } from '@sim/utils/id' import { Plus } from 'lucide-react' -import { Button, type ComboboxOption } from '@/components/emcn' import { useTableColumns } from '@/lib/table/hooks' import { SORT_DIRECTIONS, type SortRule } from '@/lib/table/query-builder/constants' import { useCanonicalSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-canonical-sub-block-value' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx index f63cb9ff978..5657c65739d 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/starter/input-format.tsx @@ -1,8 +1,7 @@ import { useCallback, useRef } from 'react' +import { Trash } from '@sim/emcn/icons' import { Plus } from 'lucide-react' -import { Trash } from '@/components/emcn/icons/trash' import 'prismjs/components/prism-json' -import Editor from 'react-simple-code-editor' import { Badge, Button, @@ -10,16 +9,17 @@ import { Combobox, type ComboboxOption, calculateGutterWidth, + cn, Expandable, ExpandableContent, getCodeEditorProps, + handleKeyboardActivation, highlight, Input, Label, languages, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' +} from '@sim/emcn' +import Editor from 'react-simple-code-editor' import { createDefaultInputFormatField } from '@/lib/workflows/input-format' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/switch/switch.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/switch/switch.tsx index ffd7a3317c3..9c830c447c6 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/switch/switch.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/switch/switch.tsx @@ -1,4 +1,4 @@ -import { Label, Switch as UISwitch } from '@/components/emcn' +import { Label, Switch as UISwitch } from '@sim/emcn' import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value' interface SwitchProps { diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/table-selector/table-selector.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/table-selector/table-selector.tsx index 09c36fa040d..05c5f78d336 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/table-selector/table-selector.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/table-selector/table-selector.tsx @@ -1,8 +1,8 @@ 'use client' import { useCallback, useMemo } from 'react' +import { Combobox, type ComboboxOption } from '@sim/emcn' import { useParams } from 'next/navigation' -import { Combobox, type ComboboxOption } from '@/components/emcn' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/table/table.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/table/table.tsx index 66ca3da6239..80996a1adae 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/table/table.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/table/table.tsx @@ -1,10 +1,9 @@ import { useEffect, useMemo, useRef } from 'react' +import { Button, cn } from '@sim/emcn' +import { Trash } from '@sim/emcn/icons' import { createLogger } from '@sim/logger' import { generateId } from '@sim/utils/id' import { useParams } from 'next/navigation' -import { Button } from '@/components/emcn' -import { Trash } from '@/components/emcn/icons/trash' -import { cn } from '@/lib/core/utils/cn' import { EnvVarDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/env-var-dropdown' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { TagDropdown } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/components/keyboard-navigation-handler.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/components/keyboard-navigation-handler.tsx index a1b408e8eef..73e17424c91 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/components/keyboard-navigation-handler.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/components/keyboard-navigation-handler.tsx @@ -1,5 +1,5 @@ import { useEffect, useEffectEvent, useMemo } from 'react' -import { usePopoverContext } from '@/components/emcn' +import { usePopoverContext } from '@sim/emcn' import { useNestedNavigation } from '../tag-dropdown' import type { BlockTagGroup, NestedBlockTagGroup, NestedTag } from '../types' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx index 645078584ae..e113a9e9ac1 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tag-dropdown/tag-dropdown.tsx @@ -1,9 +1,6 @@ import React, { useCallback, useEffect, useEffectEvent, useMemo, useRef, useState } from 'react' -import { isEqual } from 'es-toolkit' -import { RepeatIcon, SplitIcon } from 'lucide-react' -import { useShallow } from 'zustand/react/shallow' -import { useStoreWithEqualityFn } from 'zustand/traditional' import { + cn, Popover, PopoverAnchor, PopoverContent, @@ -13,8 +10,11 @@ import { PopoverScrollArea, PopoverSection, usePopoverContext, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { isEqual } from 'es-toolkit' +import { RepeatIcon, SplitIcon } from 'lucide-react' +import { useShallow } from 'zustand/react/shallow' +import { useStoreWithEqualityFn } from 'zustand/traditional' import { getEffectiveBlockOutputType, getOutputPathsFromSchema, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/time-input/time-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/time-input/time-input.tsx index e55de081ed7..f450520b4c5 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/time-input/time-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/time-input/time-input.tsx @@ -1,6 +1,6 @@ 'use client' -import { TimePicker } from '@/components/emcn' +import { TimePicker } from '@sim/emcn' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { getWorkflowSearchLabelHighlight } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/workflow-search-highlight' import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/code-editor/code-editor.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/code-editor/code-editor.tsx index c96898a6483..80120122600 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/code-editor/code-editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/code-editor/code-editor.tsx @@ -1,18 +1,18 @@ import type { ReactElement } from 'react' import { useEffect, useRef, useState } from 'react' import 'prismjs/components/prism-json' -import { Wand2 } from 'lucide-react' -import Editor from 'react-simple-code-editor' import { CODE_LINE_HEIGHT_PX, Code, calculateGutterWidth, + cn, getCodeEditorProps, highlight, languages, -} from '@/components/emcn' +} from '@sim/emcn' +import { Wand2 } from 'lucide-react' +import Editor from 'react-simple-code-editor' import { Button } from '@/components/ui/button' -import { cn } from '@/lib/core/utils/cn' import { createEnvVarPattern, createWorkflowVariablePattern, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/custom-tool-modal/custom-tool-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/custom-tool-modal/custom-tool-modal.tsx index 9e27900d99c..0dca34ea4ce 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/custom-tool-modal/custom-tool-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/custom-tool-modal/custom-tool-modal.tsx @@ -1,8 +1,4 @@ import { useEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' -import { AlertCircle, ArrowUp } from 'lucide-react' -import { useParams } from 'next/navigation' import { Badge, Button, @@ -12,6 +8,7 @@ import { ChipModalFooter, ChipModalHeader, ChipModalTabs, + cn, Input, Label, Popover, @@ -20,8 +17,11 @@ import { PopoverItem, PopoverScrollArea, PopoverSection, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { AlertCircle, ArrowUp } from 'lucide-react' +import { useParams } from 'next/navigation' import { checkEnvVarTrigger, EnvVarDropdown, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/credential-selector.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/credential-selector.tsx index e341661bbd5..d11ab696cad 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/credential-selector.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/credential-selector.tsx @@ -1,9 +1,9 @@ 'use client' import { createElement, useCallback, useMemo, useRef, useState } from 'react' +import { Button, Combobox } from '@sim/emcn' import { ExternalLink } from 'lucide-react' import { useParams } from 'next/navigation' -import { Button, Combobox } from '@/components/emcn/components' import { consumeOAuthReturnContext, writeOAuthReturnContext } from '@/lib/credentials/client-state' import { getCanonicalScopesForProvider, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/parameter.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/parameter.tsx index a19a6c56699..f756c6d127e 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/parameter.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/parameter.tsx @@ -2,9 +2,8 @@ import type React from 'react' import { useRef, useState } from 'react' +import { Button, cn, Input, Label, Tooltip } from '@sim/emcn' import { ArrowLeftRight, ArrowUp } from 'lucide-react' -import { Button, Input, Label, Tooltip } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import type { WandControlHandlers } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block' /** diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx index 92bbc361c7e..d6470cac6bd 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx @@ -1,13 +1,11 @@ import type React from 'react' import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { ArrowLeft, ChevronRight, ServerIcon, WrenchIcon, XIcon } from 'lucide-react' -import { useParams } from 'next/navigation' import { Badge, Combobox, type ComboboxOption, type ComboboxOptionGroup, + cn, Loader, Popover, PopoverContent, @@ -15,9 +13,11 @@ import { PopoverTrigger, Switch, Tooltip, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { ArrowLeft, ChevronRight, ServerIcon, WrenchIcon, XIcon } from 'lucide-react' +import { useParams } from 'next/navigation' import { McpIcon, WorkflowIcon } from '@/components/icons' -import { cn } from '@/lib/core/utils/cn' import { getIssueBadgeLabel, getIssueBadgeVariant, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/variables-input/variables-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/variables-input/variables-input.tsx index d7fac7a6b4c..5f41a03537f 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/variables-input/variables-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/variables-input/variables-input.tsx @@ -1,19 +1,19 @@ import { useEffect, useRef, useState } from 'react' -import { generateId } from '@sim/utils/id' -import { Plus } from 'lucide-react' -import { useParams } from 'next/navigation' import { Badge, Button, Combobox, type ComboboxOption, + cn, + handleKeyboardActivation, Input, Label, Textarea, -} from '@/components/emcn' -import { Trash } from '@/components/emcn/icons/trash' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' +} from '@sim/emcn' +import { Trash } from '@sim/emcn/icons' +import { generateId } from '@sim/utils/id' +import { Plus } from 'lucide-react' +import { useParams } from 'next/navigation' import { formatDisplayText } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/formatted-text' import { checkTagTrigger, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx index 71c94d10337..01ea37d8706 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/sub-block.tsx @@ -1,4 +1,5 @@ import { type JSX, type MouseEvent, memo, useCallback, useMemo, useRef, useState } from 'react' +import { Button, cn, Input, Label, Tooltip } from '@sim/emcn' import { isEqual } from 'es-toolkit' import { AlertTriangle, @@ -9,8 +10,6 @@ import { ExternalLink, } from 'lucide-react' import { useParams } from 'next/navigation' -import { Button, Input, Label, Tooltip } from '@/components/emcn/components' -import { cn } from '@/lib/core/utils/cn' import type { FilterRule, SortRule } from '@/lib/table/query-builder/constants' import { CheckboxList, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/subflow-editor/subflow-editor.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/subflow-editor/subflow-editor.tsx index bba1d3cb829..d7f22cb3354 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/subflow-editor/subflow-editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/subflow-editor/subflow-editor.tsx @@ -1,7 +1,5 @@ 'use client' -import { ChevronUp } from 'lucide-react' -import SimpleCodeEditor from 'react-simple-code-editor' import { Code as CodeEditor, Combobox, @@ -9,7 +7,9 @@ import { getCodeEditorProps, Input, Label, -} from '@/components/emcn' +} from '@sim/emcn' +import { ChevronUp } from 'lucide-react' +import SimpleCodeEditor from 'react-simple-code-editor' import { WORKFLOW_SEARCH_SUBFLOW_FIELD_IDS } from '@/lib/workflows/search-replace/subflow-fields' import { formatDisplayText, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx index c0516b5c681..dbaa774a3af 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx @@ -1,6 +1,7 @@ 'use client' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { Button, DashedDividerLine, FieldDivider, Loader, Tooltip } from '@sim/emcn' import { isEqual } from 'es-toolkit' import { BookOpen, @@ -16,7 +17,6 @@ import { useParams } from 'next/navigation' import { usePostHog } from 'posthog-js/react' import { useShallow } from 'zustand/react/shallow' import { useStoreWithEqualityFn } from 'zustand/traditional' -import { Button, DashedDividerLine, FieldDivider, Loader, Tooltip } from '@/components/emcn' import { captureEvent } from '@/lib/posthog/client' import { buildCanonicalIndex, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-subflow-editor.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-subflow-editor.ts index 915e7fb77dd..3c65b9ee003 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-subflow-editor.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-subflow-editor.ts @@ -1,6 +1,6 @@ import { useCallback, useMemo, useRef, useState } from 'react' +import { highlight, languages } from '@sim/emcn' import { useParams } from 'next/navigation' -import { highlight, languages } from '@/components/emcn' import { isLikelyReferenceSegment, SYSTEM_REFERENCE_PREFIXES, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/components/toolbar-item-context-menu/toolbar-item-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/components/toolbar-item-context-menu/toolbar-item-context-menu.tsx index cadc5872fc7..02411222deb 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/components/toolbar-item-context-menu/toolbar-item-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/components/toolbar-item-context-menu/toolbar-item-context-menu.tsx @@ -1,6 +1,6 @@ 'use client' -import { Popover, PopoverAnchor, PopoverContent, PopoverItem } from '@/components/emcn' +import { Popover, PopoverAnchor, PopoverContent, PopoverItem } from '@sim/emcn' interface ToolbarItemContextMenuProps { /** diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/toolbar.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/toolbar.tsx index 174e5b43e3d..dcf0338c368 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/toolbar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/toolbar.tsx @@ -11,12 +11,18 @@ import { useRef, useState, } from 'react' +import { + Button, + chipVariants, + cn, + Expandable, + ExpandableContent, + handleKeyboardActivation, + Info, +} from '@sim/emcn' import clsx from 'clsx' import { ChevronDown, Search } from 'lucide-react' import { usePostHog } from 'posthog-js/react' -import { Button, chipVariants, Expandable, ExpandableContent, Info } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { captureEvent } from '@/lib/posthog/client' import { getTriggersForSidebar, hasTriggerCapability } from '@/lib/workflows/triggers/trigger-utils' import { ToolbarItemContextMenu } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/toolbar/components' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx index fcceb0c48dd..8233f1a4bc4 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx @@ -1,13 +1,6 @@ 'use client' import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { toError } from '@sim/utils/errors' -import { useQueryClient } from '@tanstack/react-query' -import { History, Plus, Square } from 'lucide-react' -import { useParams, useRouter } from 'next/navigation' -import { usePostHog } from 'posthog-js/react' -import { useShallow } from 'zustand/react/shallow' import { BubbleChatClose, BubbleChatPreview, @@ -29,8 +22,15 @@ import { PopoverTrigger, Trash, toast, -} from '@/components/emcn' -import { Download, Lock, Unlock } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Download, Lock, Unlock } from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { toError } from '@sim/utils/errors' +import { useQueryClient } from '@tanstack/react-query' +import { History, Plus, Square } from 'lucide-react' +import { useParams, useRouter } from 'next/navigation' +import { usePostHog } from 'posthog-js/react' +import { useShallow } from 'zustand/react/shallow' import { VariableIcon } from '@/components/icons' import { requestJson } from '@/lib/api/client/request' import { diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/search-replace/components/replacement-controls/replacement-controls.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/search-replace/components/replacement-controls/replacement-controls.tsx index 4841e05fce9..6b1ed9d1ed0 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/search-replace/components/replacement-controls/replacement-controls.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/search-replace/components/replacement-controls/replacement-controls.tsx @@ -1,6 +1,6 @@ 'use client' -import { Button, Combobox, Input } from '@/components/emcn' +import { Button, Combobox, Input } from '@sim/emcn' import type { WorkflowSearchReplacementOption } from '@/lib/workflows/search-replace/types' interface ReplacementControlsProps { diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/search-replace/workflow-search-replace.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/search-replace/workflow-search-replace.tsx index 7d0915e64ee..c5558e59807 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/search-replace/workflow-search-replace.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/search-replace/workflow-search-replace.tsx @@ -1,11 +1,10 @@ 'use client' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { Button, cn, Input, toast } from '@sim/emcn' import { ChevronDown, ChevronRight, ChevronUp, X } from 'lucide-react' import { useParams } from 'next/navigation' import { useShallow } from 'zustand/react/shallow' -import { Button, Input, toast } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { getWorkflowSearchDependentClears } from '@/lib/workflows/search-replace/dependencies' import { indexWorkflowSearchMatches } from '@/lib/workflows/search-replace/indexer' import { buildWorkflowSearchReplacePlan } from '@/lib/workflows/search-replace/replacements' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/subflows/subflow-node.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/subflows/subflow-node.tsx index 2a8b2ab989a..54b6a563c2a 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/subflows/subflow-node.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/subflows/subflow-node.tsx @@ -1,9 +1,7 @@ import { memo, useMemo } from 'react' +import { Badge, cn, handleKeyboardActivation } from '@sim/emcn' import { RepeatIcon, SplitIcon } from 'lucide-react' import { Handle, type NodeProps, Position, useReactFlow } from 'reactflow' -import { Badge } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { HANDLE_POSITIONS } from '@/lib/workflows/blocks/block-dimensions' import { type DiffStatus, hasDiffStatus } from '@/lib/workflows/diff/types' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/filter-popover/filter-popover.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/filter-popover/filter-popover.tsx index 1495bc999c0..06bb376eac6 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/filter-popover/filter-popover.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/filter-popover/filter-popover.tsx @@ -1,8 +1,6 @@ 'use client' import { memo } from 'react' -import clsx from 'clsx' -import { Filter } from 'lucide-react' import { Button, Popover, @@ -12,7 +10,9 @@ import { PopoverScrollArea, PopoverSection, PopoverTrigger, -} from '@/components/emcn' +} from '@sim/emcn' +import clsx from 'clsx' +import { Filter } from 'lucide-react' import type { BlockInfo, TerminalFilters, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/log-row-context-menu/log-row-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/log-row-context-menu/log-row-context-menu.tsx index d40cd119b6f..7df13785447 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/log-row-context-menu/log-row-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/log-row-context-menu/log-row-context-menu.tsx @@ -1,13 +1,7 @@ 'use client' import { memo, type RefObject } from 'react' -import { - Popover, - PopoverAnchor, - PopoverContent, - PopoverDivider, - PopoverItem, -} from '@/components/emcn' +import { Popover, PopoverAnchor, PopoverContent, PopoverDivider, PopoverItem } from '@sim/emcn' import type { ContextMenuPosition, TerminalFilters, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/components/output-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/components/output-context-menu.tsx index 0b3288cda9c..429ebf253e4 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/components/output-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/components/output-context-menu.tsx @@ -1,13 +1,7 @@ 'use client' import { memo, type RefObject } from 'react' -import { - Popover, - PopoverAnchor, - PopoverContent, - PopoverDivider, - PopoverItem, -} from '@/components/emcn' +import { Popover, PopoverAnchor, PopoverContent, PopoverDivider, PopoverItem } from '@sim/emcn' import type { ContextMenuPosition } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/types' export interface OutputContextMenuProps { diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/components/structured-output.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/components/structured-output.tsx index a8c5c6f25a7..e92ca7f0f3a 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/components/structured-output.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/components/structured-output.tsx @@ -11,9 +11,8 @@ import { useRef, useState, } from 'react' +import { Badge, ChevronDown, cn } from '@sim/emcn' import { useVirtualizer } from '@tanstack/react-virtual' -import { Badge, ChevronDown } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { isUserFileDisplayMetadata } from '@/lib/core/utils/user-file' import { isLargeArrayManifest, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/output-panel.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/output-panel.tsx index 47a14ce3147..7256230d994 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/output-panel.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/output-panel/output-panel.tsx @@ -1,6 +1,17 @@ 'use client' import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { + Button, + Code, + Input, + Popover, + PopoverContent, + PopoverItem, + PopoverTrigger, + Tooltip, +} from '@sim/emcn' +import { Download } from '@sim/emcn/icons' import clsx from 'clsx' import { ArrowDown, @@ -16,17 +27,6 @@ import { X, } from 'lucide-react' import Link from 'next/link' -import { - Button, - Code, - Input, - Popover, - PopoverContent, - PopoverItem, - PopoverTrigger, - Tooltip, -} from '@/components/emcn' -import { Download } from '@/components/emcn/icons' import { OutputContextMenu, StructuredOutput, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/status-display/status-display.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/status-display/status-display.tsx index fa54725e2ce..8388edc2acb 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/status-display/status-display.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/status-display/status-display.tsx @@ -1,7 +1,7 @@ 'use client' import { memo } from 'react' -import { Badge } from '@/components/emcn' +import { Badge } from '@sim/emcn' import { BADGE_STYLE } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/types' /** diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/toggle-button/toggle-button.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/toggle-button/toggle-button.tsx index 43b2c9dc3c6..edf4e0e8401 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/toggle-button/toggle-button.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/components/toggle-button/toggle-button.tsx @@ -2,9 +2,9 @@ import type React from 'react' import { memo } from 'react' +import { Button } from '@sim/emcn' import clsx from 'clsx' import { ChevronDown } from 'lucide-react' -import { Button } from '@/components/emcn' export interface ToggleButtonProps { isExpanded: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx index e5381ff35f5..103dcbb7139 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/terminal/terminal.tsx @@ -2,23 +2,23 @@ import type React from 'react' import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { formatDuration } from '@sim/utils/formatting' -import { useVirtualizer } from '@tanstack/react-virtual' -import clsx from 'clsx' -import { ArrowDown, ArrowUp, Database, MoreHorizontal, Palette, Pause, Trash2 } from 'lucide-react' -import Link from 'next/link' import { Button, ChevronDown, + handleKeyboardActivation, Popover, PopoverContent, PopoverItem, PopoverTrigger, Tooltip, -} from '@/components/emcn' -import { Download } from '@/components/emcn/icons' +} from '@sim/emcn' +import { Download } from '@sim/emcn/icons' +import { formatDuration } from '@sim/utils/formatting' +import { useVirtualizer } from '@tanstack/react-virtual' +import clsx from 'clsx' +import { ArrowDown, ArrowUp, Database, MoreHorizontal, Palette, Pause, Trash2 } from 'lucide-react' +import Link from 'next/link' import { getEnv, isTruthy } from '@/lib/core/config/env' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { sendMothershipMessage } from '@/lib/mothership/events' import { useRegisterGlobalCommands } from '@/app/workspace/[workspaceId]/providers/global-commands-provider' import { createCommands } from '@/app/workspace/[workspaceId]/utils/commands-utils' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/variables/variables.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/variables/variables.tsx index 3345e3859a8..eff41e09f82 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/variables/variables.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/variables/variables.tsx @@ -1,9 +1,6 @@ 'use client' import { useCallback, useEffect, useMemo, useState } from 'react' -import { Plus, X } from 'lucide-react' -import Editor from 'react-simple-code-editor' -import { useShallow } from 'zustand/react/shallow' import { Badge, Button, @@ -11,14 +8,17 @@ import { Combobox, type ComboboxOption, calculateGutterWidth, + cn, getCodeEditorProps, highlight, Input, Label, languages, -} from '@/components/emcn' -import { Trash } from '@/components/emcn/icons/trash' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { Trash } from '@sim/emcn/icons' +import { Plus, X } from 'lucide-react' +import Editor from 'react-simple-code-editor' +import { useShallow } from 'zustand/react/shallow' import { validateName } from '@/lib/core/utils/validation' import { useFloatBoundarySync, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/wand-prompt-bar/wand-prompt-bar.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/wand-prompt-bar/wand-prompt-bar.tsx index 093b0645c1a..89848f74c12 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/wand-prompt-bar/wand-prompt-bar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/wand-prompt-bar/wand-prompt-bar.tsx @@ -1,7 +1,7 @@ import { useEffect, useRef, useState } from 'react' +import { cn } from '@sim/emcn' import { SendIcon, XIcon } from 'lucide-react' import { Button } from '@/components/ui/button' -import { cn } from '@/lib/core/utils/cn' interface WandPromptBarProps { isVisible: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx index 385b81ecb7f..e7ab081e103 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx @@ -1,12 +1,10 @@ import { memo, useCallback, useEffect, useMemo, useRef } from 'react' +import { Badge, cn, handleKeyboardActivation, Tooltip } from '@sim/emcn' import { createLogger } from '@sim/logger' import { isEqual } from 'es-toolkit' import { useParams } from 'next/navigation' import { Handle, type NodeProps, Position, useUpdateNodeInternals } from 'reactflow' import { useStoreWithEqualityFn } from 'zustand/traditional' -import { Badge, Tooltip } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { getBaseUrl } from '@/lib/core/utils/urls' import { createMcpToolId } from '@/lib/mcp/shared' import { getProviderIdFromServiceId } from '@/lib/oauth' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-controls/workflow-controls.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-controls/workflow-controls.tsx index 39c97cb0b0f..bbdab26c41f 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-controls/workflow-controls.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-controls/workflow-controls.tsx @@ -1,10 +1,6 @@ 'use client' import { memo, useCallback, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { Scan } from 'lucide-react' -import { useReactFlow } from 'reactflow' -import { useShallow } from 'zustand/react/shallow' import { Button, ChevronDown, @@ -18,7 +14,11 @@ import { Redo, Tooltip, Undo, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { Scan } from 'lucide-react' +import { useReactFlow } from 'reactflow' +import { useShallow } from 'zustand/react/shallow' import { useSession } from '@/lib/auth/auth-client' import { useRegisterGlobalCommands } from '@/app/workspace/[workspaceId]/providers/global-commands-provider' import { createCommand } from '@/app/workspace/[workspaceId]/utils/commands-utils' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-wand.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-wand.ts index 239a70fa233..1ac9e042573 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-wand.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-wand.ts @@ -1,8 +1,8 @@ import { useCallback, useRef, useState } from 'react' +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { useQueryClient } from '@tanstack/react-query' import { useParams } from 'next/navigation' -import { toast } from '@/components/emcn' import { requestRaw } from '@/lib/api/client' import { isApiClientError } from '@/lib/api/client/errors' import { wandGenerateStreamContract } from '@/lib/api/contracts' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts index 58ab9fa7307..49069eac243 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts @@ -1,4 +1,5 @@ import { useCallback, useEffect, useRef, useState } from 'react' +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { getErrorMessage, toError } from '@sim/utils/errors' import { sleep } from '@sim/utils/helpers' @@ -6,7 +7,6 @@ import { generateId, generateShortId } from '@sim/utils/id' import { useQueryClient } from '@tanstack/react-query' import { useParams } from 'next/navigation' import { useShallow } from 'zustand/react/shallow' -import { toast } from '@/components/emcn' import { requestJson } from '@/lib/api/client/request' import { cancelWorkflowExecutionContract, workflowLogContract } from '@/lib/api/contracts/workflows' import { buildTraceSpans } from '@/lib/logs/execution/trace-spans/trace-spans' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/block-ring-utils.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/block-ring-utils.ts index 3fad6a20280..b4996dd90ad 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/block-ring-utils.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/utils/block-ring-utils.ts @@ -1,4 +1,4 @@ -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' export type BlockDiffStatus = 'new' | 'edited' | null | undefined diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx index 9f38b879e0d..dcf180f6f9f 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx @@ -13,10 +13,10 @@ import ReactFlow, { useReactFlow, } from 'reactflow' import 'reactflow/dist/style.css' +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { generateId } from '@sim/utils/id' import { useShallow } from 'zustand/react/shallow' -import { toast } from '@/components/emcn' import { useSession } from '@/lib/auth/auth-client' import type { OAuthConnectEventDetail } from '@/lib/copilot/tools/client/base-tool' import { consumeOAuthReturnContext, writeOAuthReturnContext } from '@/lib/credentials/client-state' diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-context-menu/preview-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-context-menu/preview-context-menu.tsx index 2e84146c31a..5ff50058b1a 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-context-menu/preview-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-context-menu/preview-context-menu.tsx @@ -1,14 +1,8 @@ 'use client' import type { RefObject } from 'react' +import { Popover, PopoverAnchor, PopoverContent, PopoverDivider, PopoverItem } from '@sim/emcn' import { createPortal } from 'react-dom' -import { - Popover, - PopoverAnchor, - PopoverContent, - PopoverDivider, - PopoverItem, -} from '@/components/emcn' interface PreviewContextMenuProps { isOpen: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx index 7c1e7588fe9..63c30769824 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx @@ -1,6 +1,19 @@ 'use client' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { + Badge, + Button, + ChevronDown, + Code, + Combobox, + cn, + FieldDivider, + handleKeyboardActivation, + Input, + Label, + Tooltip, +} from '@sim/emcn' import { formatDuration } from '@sim/utils/formatting' import { ArrowDown, @@ -18,19 +31,6 @@ import { } from 'lucide-react' import { useParams } from 'next/navigation' import { ReactFlowProvider } from 'reactflow' -import { - Badge, - Button, - ChevronDown, - Code, - Combobox, - FieldDivider, - Input, - Label, - Tooltip, -} from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' import { extractReferencePrefixes } from '@/lib/workflows/sanitization/references' import { buildCanonicalIndex, diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/components/subflow/subflow.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/components/subflow/subflow.tsx index 7cb8fa07a46..21ab8164aba 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/components/subflow/subflow.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/components/subflow/subflow.tsx @@ -1,10 +1,9 @@ 'use client' import { memo } from 'react' +import { Badge, cn } from '@sim/emcn' import { RepeatIcon, SplitIcon } from 'lucide-react' import { Handle, type NodeProps, Position } from 'reactflow' -import { Badge } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' import { HANDLE_POSITIONS } from '@/lib/workflows/blocks/block-dimensions' /** Execution status for subflows in preview mode */ diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/preview-workflow.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/preview-workflow.tsx index eb5a8fe2b81..96484163a96 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/preview-workflow.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/preview-workflow.tsx @@ -13,8 +13,8 @@ import ReactFlow, { } from 'reactflow' import 'reactflow/dist/style.css' +import { cn } from '@sim/emcn' import { createLogger } from '@sim/logger' -import { cn } from '@/lib/core/utils/cn' import { BLOCK_DIMENSIONS, CONTAINER_DIMENSIONS } from '@/lib/workflows/blocks/block-dimensions' import { WorkflowEdge } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-edge/workflow-edge' import { estimateBlockDimensions } from '@/app/workspace/[workspaceId]/w/[workflowId]/utils' diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx index adaab38e200..f4755c59241 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/preview/preview.tsx @@ -2,10 +2,9 @@ import type React from 'react' import { useEffect, useMemo, useRef, useState } from 'react' +import { Button, cn, Tooltip } from '@sim/emcn' import { ArrowLeft } from 'lucide-react' -import { Button, Tooltip } from '@/components/emcn' import { redactApiKeys } from '@/lib/core/security/redaction' -import { cn } from '@/lib/core/utils/cn' import { PreviewEditor } from '@/app/workspace/[workspaceId]/w/components/preview/components/preview-editor' import { getLeftmostBlockId, diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/collapsed-sidebar-menu/collapsed-sidebar-menu.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/collapsed-sidebar-menu/collapsed-sidebar-menu.tsx index 7cb4d877c4a..649b523f9bd 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/collapsed-sidebar-menu/collapsed-sidebar-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/collapsed-sidebar-menu/collapsed-sidebar-menu.tsx @@ -1,8 +1,7 @@ import { type MouseEvent as ReactMouseEvent, useState } from 'react' -import { Folder, MoreHorizontal, Plus } from 'lucide-react' -import Link from 'next/link' import { chipVariants, + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, @@ -12,9 +11,10 @@ import { DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, -} from '@/components/emcn' -import { Pencil, SquareArrowUpRight } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { Pencil, SquareArrowUpRight } from '@sim/emcn/icons' +import { Folder, MoreHorizontal, Plus } from 'lucide-react' +import Link from 'next/link' import type { WorkspaceFileRecord } from '@/lib/uploads/contexts/workspace' import { ConversationListItem } from '@/app/workspace/[workspaceId]/components' import type { useHoverMenu } from '@/app/workspace/[workspaceId]/w/components/sidebar/hooks' diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/file-list/file-list.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/file-list/file-list.tsx index 61f7f0236bc..bb162d2c44d 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/file-list/file-list.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/file-list/file-list.tsx @@ -1,9 +1,9 @@ 'use client' import { memo, useMemo, useState } from 'react' +import { cn } from '@sim/emcn' import { ChevronRight } from 'lucide-react' import Link from 'next/link' -import { cn } from '@/lib/core/utils/cn' import type { WorkspaceFileRecord } from '@/lib/uploads/contexts/workspace' import type { WorkspaceFileFolderApi } from '@/hooks/queries/workspace-file-folders' diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/help-modal/help-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/help-modal/help-modal.tsx index 4fa50c4dc63..41fe122cd38 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/help-modal/help-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/help-modal/help-modal.tsx @@ -2,6 +2,13 @@ import { useEffect, useRef, useState } from 'react' import { zodResolver } from '@hookform/resolvers/zod' +import { + ChipModal, + ChipModalBody, + ChipModalField, + ChipModalFooter, + ChipModalHeader, +} from '@sim/emcn' import { createLogger } from '@sim/logger' import { useMutation } from '@tanstack/react-query' import imageCompression from 'browser-image-compression' @@ -9,13 +16,6 @@ import { X } from 'lucide-react' import Image from 'next/image' import { Controller, useForm } from 'react-hook-form' import { z } from 'zod' -import { - ChipModal, - ChipModalBody, - ChipModalField, - ChipModalFooter, - ChipModalHeader, -} from '@/components/emcn' const logger = createLogger('HelpModal') diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/nav-item-context-menu/nav-item-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/nav-item-context-menu/nav-item-context-menu.tsx index bdc18cfab7b..e3abe0cd9c7 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/nav-item-context-menu/nav-item-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/nav-item-context-menu/nav-item-context-menu.tsx @@ -1,12 +1,7 @@ 'use client' -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from '@/components/emcn' -import { Duplicate, SquareArrowUpRight } from '@/components/emcn/icons' +import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@sim/emcn' +import { Duplicate, SquareArrowUpRight } from '@sim/emcn/icons' interface NavItemContextMenuProps { isOpen: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/command-items/command-items.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/command-items/command-items.tsx index 2c795057f7d..7acf9f9bcf0 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/command-items/command-items.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/command-items/command-items.tsx @@ -2,9 +2,9 @@ import type { ComponentType } from 'react' import { memo } from 'react' +import { cn } from '@sim/emcn' +import { File, Workflow } from '@sim/emcn/icons' import { Command } from 'cmdk' -import { File, Workflow } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' import type { CommandItemProps } from '@/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/utils' import { COMMAND_ITEM_CLASSNAME, diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/search-groups/search-groups.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/search-groups/search-groups.tsx index bf69aacea08..4a6eaed1524 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/search-groups/search-groups.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/components/search-groups/search-groups.tsx @@ -2,8 +2,8 @@ import type { ComponentType } from 'react' import { memo } from 'react' +import { Database, Table } from '@sim/emcn/icons' import { Command } from 'cmdk' -import { Database, Table } from '@/components/emcn/icons' import { MemoizedActionItem, MemoizedCommandItem, diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.tsx index 7466c52ece3..1c5b4fd32bc 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/search-modal/search-modal.tsx @@ -1,13 +1,7 @@ 'use client' import { useCallback, useDeferredValue, useEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { Command } from 'cmdk' -import { Scan } from 'lucide-react' -import { useParams, useRouter } from 'next/navigation' -import { usePostHog } from 'posthog-js/react' -import { createPortal } from 'react-dom' -import { Library } from '@/components/emcn' +import { cn, Library } from '@sim/emcn' import { Calendar, Database, @@ -20,13 +14,18 @@ import { Key, Play, Plus, + Search, Send, Settings, Table, Upload, -} from '@/components/emcn/icons' -import { Search } from '@/components/emcn/icons/search' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { Command } from 'cmdk' +import { Scan } from 'lucide-react' +import { useParams, useRouter } from 'next/navigation' +import { usePostHog } from 'posthog-js/react' +import { createPortal } from 'react-dom' import { captureEvent } from '@/lib/posthog/client' import { hasTriggerCapability } from '@/lib/workflows/triggers/trigger-utils' import { useInvokeGlobalCommand } from '@/app/workspace/[workspaceId]/providers/global-commands-provider' diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-sidebar/settings-sidebar.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-sidebar/settings-sidebar.tsx index 6c70c0bcf55..c2d9284665c 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-sidebar/settings-sidebar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/settings-sidebar/settings-sidebar.tsx @@ -1,14 +1,13 @@ 'use client' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' +import { ChevronDown, ChipConfirmModal, chipVariants, cn } from '@sim/emcn' import { useQueryClient } from '@tanstack/react-query' import { useParams, usePathname, useRouter } from 'next/navigation' -import { ChevronDown, ChipConfirmModal, chipVariants } from '@/components/emcn' import { useSession } from '@/lib/auth/auth-client' import { getSubscriptionAccessState } from '@/lib/billing/client' import { isEnterprise } from '@/lib/billing/plan-helpers' import { isHosted } from '@/lib/core/config/env-flags' -import { cn } from '@/lib/core/utils/cn' import { getUserRole } from '@/lib/workspaces/organization' import type { SettingsSection } from '@/app/workspace/[workspaceId]/settings/navigation' import { diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/context-menu/context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/context-menu/context-menu.tsx index 9b20bee8cf5..47e19a1bc5a 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/context-menu/context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/context-menu/context-menu.tsx @@ -1,13 +1,12 @@ 'use client' -import { Pin, PinOff } from 'lucide-react' import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger, -} from '@/components/emcn' +} from '@sim/emcn' import { Download, Duplicate, @@ -24,7 +23,8 @@ import { SquareArrowUpRight, Trash, Unlock, -} from '@/components/emcn/icons' +} from '@sim/emcn/icons' +import { Pin, PinOff } from 'lucide-react' interface ContextMenuProps { isOpen: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/delete-modal/delete-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/delete-modal/delete-modal.tsx index 374c46b8455..a2b6d234379 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/delete-modal/delete-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/delete-modal/delete-modal.tsx @@ -1,7 +1,7 @@ 'use client' import { useState } from 'react' -import { ChipConfirmModal, type ChipConfirmTextSegment, ChipModalField } from '@/components/emcn' +import { ChipConfirmModal, type ChipConfirmTextSegment, ChipModalField } from '@sim/emcn' interface DeleteModalProps { /** diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/empty-area-context-menu/empty-area-context-menu.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/empty-area-context-menu/empty-area-context-menu.tsx index 16b32c9d509..2bf3de56327 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/empty-area-context-menu/empty-area-context-menu.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/empty-area-context-menu/empty-area-context-menu.tsx @@ -1,6 +1,6 @@ 'use client' -import { Popover, PopoverAnchor, PopoverContent, PopoverItem } from '@/components/emcn' +import { Popover, PopoverAnchor, PopoverContent, PopoverItem } from '@sim/emcn' interface EmptyAreaContextMenuProps { /** diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/folder-item/folder-item.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/folder-item/folder-item.tsx index 4a5d9c78084..66c4e8b8517 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/folder-item/folder-item.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/folder-item/folder-item.tsx @@ -1,15 +1,14 @@ 'use client' import { useCallback, useMemo, useRef, useState } from 'react' +import { chipVariants, cn } from '@sim/emcn' +import { Lock } from '@sim/emcn/icons' import { createLogger } from '@sim/logger' import { generateId } from '@sim/utils/id' import clsx from 'clsx' import { ChevronRight, Folder, FolderOpen, MoreHorizontal } from 'lucide-react' import { useParams, useRouter } from 'next/navigation' -import { chipVariants } from '@/components/emcn' -import { Lock } from '@/components/emcn/icons' import { SIM_RESOURCES_DRAG_TYPE } from '@/lib/copilot/resource-types' -import { cn } from '@/lib/core/utils/cn' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' import { ContextMenu } from '@/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/context-menu/context-menu' import { DeleteModal } from '@/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/delete-modal/delete-modal' diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/workflow-item/avatars/avatars.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/workflow-item/avatars/avatars.tsx index 6304f8dcabf..8626149a174 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/workflow-item/avatars/avatars.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/workflow-item/avatars/avatars.tsx @@ -1,7 +1,7 @@ 'use client' import { type CSSProperties, useMemo } from 'react' -import { Avatar, AvatarFallback, AvatarImage, Tooltip } from '@/components/emcn' +import { Avatar, AvatarFallback, AvatarImage, Tooltip } from '@sim/emcn' import { getUserColor } from '@/lib/workspaces/colors' import { useSocket } from '@/app/workspace/providers/socket-provider' import { SIDEBAR_WIDTH } from '@/stores/constants' diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/workflow-item/workflow-item.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/workflow-item/workflow-item.tsx index f05b9666f89..72b5f373482 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/workflow-item/workflow-item.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/workflow-item/workflow-item.tsx @@ -1,14 +1,13 @@ 'use client' import { useCallback, useMemo, useRef, useState } from 'react' +import { chipVariants, cn } from '@sim/emcn' +import { Lock } from '@sim/emcn/icons' import clsx from 'clsx' import { MoreHorizontal } from 'lucide-react' import Link from 'next/link' import { useParams } from 'next/navigation' -import { chipVariants } from '@/components/emcn' -import { Lock } from '@/components/emcn/icons' import { SIM_RESOURCES_DRAG_TYPE } from '@/lib/copilot/resource-types' -import { cn } from '@/lib/core/utils/cn' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' import { ContextMenu } from '@/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/context-menu/context-menu' import { DeleteModal } from '@/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/delete-modal/delete-modal' diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/create-workspace-modal/create-workspace-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/create-workspace-modal/create-workspace-modal.tsx index e4d5eb80a55..5ef6dbb3eeb 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/create-workspace-modal/create-workspace-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/create-workspace-modal/create-workspace-modal.tsx @@ -8,7 +8,7 @@ import { ChipModalField, ChipModalFooter, ChipModalHeader, -} from '@/components/emcn' +} from '@sim/emcn' interface CreateWorkspaceModalProps { open: boolean diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/fork-activity-panel/fork-activity-panel.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/fork-activity-panel/fork-activity-panel.tsx index 9e9e5e4269c..d4327c9d897 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/fork-activity-panel/fork-activity-panel.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/fork-activity-panel/fork-activity-panel.tsx @@ -1,10 +1,9 @@ 'use client' import { Fragment, useState } from 'react' +import { ChevronDown, cn, Loader } from '@sim/emcn' import { formatDateTime } from '@sim/utils/formatting' -import { ChevronDown, Loader } from '@/components/emcn' import type { BackgroundWorkItem } from '@/lib/api/contracts/workspace-fork' -import { cn } from '@/lib/core/utils/cn' import { useWorkspaceBackgroundWork } from '@/hooks/queries/background-work' const HEADER_TEXT = 'font-medium text-[var(--text-tertiary)] text-caption' diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/fork-workspace-modal/fork-workspace-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/fork-workspace-modal/fork-workspace-modal.tsx index 43046bbc1a2..3ed9a6c7b64 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/fork-workspace-modal/fork-workspace-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/fork-workspace-modal/fork-workspace-modal.tsx @@ -1,9 +1,6 @@ 'use client' import { useEffect, useId, useMemo, useState } from 'react' -import { getErrorMessage } from '@sim/utils/errors' -import { Search } from 'lucide-react' -import { useRouter } from 'next/navigation' import { Checkbox, ChevronDown, @@ -18,14 +15,17 @@ import { type ChipModalFooterSlotAction, ChipModalHeader, ChipModalTabs, + cn, Tooltip, toast, -} from '@/components/emcn' +} from '@sim/emcn' +import { getErrorMessage } from '@sim/utils/errors' +import { Search } from 'lucide-react' +import { useRouter } from 'next/navigation' import type { ForkCopyableResource, GetForkResourcesResponse, } from '@/lib/api/contracts/workspace-fork' -import { cn } from '@/lib/core/utils/cn' import { SettingsSection } from '@/app/workspace/[workspaceId]/settings/components/settings-section/settings-section' import { ForkActivityPanel } from '@/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/fork-activity-panel/fork-activity-panel' import { diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/invite-modal/invite-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/invite-modal/invite-modal.tsx index 5780f79532f..ba0539e5d88 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/invite-modal/invite-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/invite-modal/invite-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { useCallback, useState } from 'react' -import { createLogger } from '@sim/logger' -import { useParams } from 'next/navigation' import { ChipModal, ChipModalBody, @@ -10,9 +8,12 @@ import { ChipModalFooter, ChipModalHeader, toast, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { useParams } from 'next/navigation' import { useSession } from '@/lib/auth/auth-client' import { isEnterprise } from '@/lib/billing/plan-helpers' +import { quickValidateEmail } from '@/lib/messaging/email/validation' import type { PermissionType } from '@/lib/workspaces/permissions/utils' import { useWorkspacePermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' import { isBillingEnabled } from '@/app/workspace/[workspaceId]/settings/navigation' @@ -75,6 +76,10 @@ export function InviteModal({ const validateEmail = useCallback( (email: string): string | null => { + const formatResult = quickValidateEmail(email) + if (!formatResult.isValid) { + return formatResult.reason ?? 'Invalid email' + } if (workspacePermissions?.users?.some((user) => user.email === email)) { return `${email} is already a teammate in this workspace` } diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/components/dependent-field-selector.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/components/dependent-field-selector.tsx index ddffcf48d1f..b906d7cb858 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/components/dependent-field-selector.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/components/dependent-field-selector.tsx @@ -1,7 +1,7 @@ 'use client' import { useMemo } from 'react' -import { ChipCombobox, type ComboboxOption, Loader } from '@/components/emcn' +import { ChipCombobox, type ComboboxOption, Loader } from '@sim/emcn' import type { SelectorContext, SelectorKey } from '@/hooks/selectors/types' import { useSelectorOptions } from '@/hooks/selectors/use-selector-query' diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/components/resource-reconfigure.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/components/resource-reconfigure.tsx index 390656e7808..5c7c6eedba5 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/components/resource-reconfigure.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/components/resource-reconfigure.tsx @@ -1,9 +1,8 @@ 'use client' import { type Dispatch, type SetStateAction, useMemo, useState } from 'react' -import { ChevronDown } from '@/components/emcn' +import { ChevronDown, cn } from '@sim/emcn' import type { ForkDependentReconfig, ForkResourceUsage } from '@/lib/api/contracts/workspace-fork' -import { cn } from '@/lib/core/utils/cn' import { SettingsSection } from '@/app/workspace/[workspaceId]/settings/components/settings-section/settings-section' import { DependentFieldSelector } from '@/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/components/dependent-field-selector' import { diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/promote-workspace-modal.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/promote-workspace-modal.tsx index 9c123ca2c9e..0ffd90fb96c 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/promote-workspace-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/components/promote-workspace-modal/promote-workspace-modal.tsx @@ -1,8 +1,6 @@ 'use client' import { useEffect, useMemo, useState } from 'react' -import { getErrorMessage } from '@sim/utils/errors' -import { ArrowRight } from 'lucide-react' import { Badge, ChipCombobox, @@ -14,7 +12,9 @@ import { type ChipModalFooterSlotAction, ChipModalHeader, toast, -} from '@/components/emcn' +} from '@sim/emcn' +import { getErrorMessage } from '@sim/utils/errors' +import { ArrowRight } from 'lucide-react' import type { ForkDependentReconfig, ForkLineageNodeApi, diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/workspace-header.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/workspace-header.tsx index 534bd0ccd39..1a0b9718eb7 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/workspace-header.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workspace-header/workspace-header.tsx @@ -1,13 +1,12 @@ 'use client' import { memo, useEffect, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { MoreHorizontal } from 'lucide-react' import { ChevronDown, Chip, ChipConfirmModal, chipVariants, + cn, DropdownMenu, DropdownMenuContent, DropdownMenuSeparator, @@ -15,9 +14,10 @@ import { Plus, Send, Skeleton, -} from '@/components/emcn' -import { ManageWorkspace, PanelLeft } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { ManageWorkspace, PanelLeft } from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { MoreHorizontal } from 'lucide-react' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' import { isBillingEnabled } from '@/app/workspace/[workspaceId]/settings/navigation' import { ContextMenu } from '@/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/context-menu/context-menu' diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx index a4c21f84dc9..2e94f37a861 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx @@ -1,16 +1,12 @@ 'use client' import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { MoreHorizontal, Pin } from 'lucide-react' -import Link from 'next/link' -import { useParams, usePathname, useRouter } from 'next/navigation' -import { usePostHog } from 'posthog-js/react' import { Button, Chip, ChipLink, chipVariants, + cn, DropdownMenu, DropdownMenuContent, DropdownMenuItem, @@ -22,7 +18,7 @@ import { Skeleton, Tooltip, Upload, -} from '@/components/emcn' +} from '@sim/emcn' import { BookOpen, Calendar, @@ -37,10 +33,14 @@ import { Table, Task, Workflow, -} from '@/components/emcn/icons' +} from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { MoreHorizontal, Pin } from 'lucide-react' +import Link from 'next/link' +import { useParams, usePathname, useRouter } from 'next/navigation' +import { usePostHog } from 'posthog-js/react' import { useSession } from '@/lib/auth/auth-client' import { SIM_RESOURCES_DRAG_TYPE } from '@/lib/copilot/resource-types' -import { cn } from '@/lib/core/utils/cn' import { isMacPlatform } from '@/lib/core/utils/platform' import { buildFolderTree, getFolderPath } from '@/lib/folders/tree' import { captureEvent } from '@/lib/posthog/client' diff --git a/apps/sim/blocks/blocks/apollo.ts b/apps/sim/blocks/blocks/apollo.ts index 9b792a4151b..8e5bbb5674e 100644 --- a/apps/sim/blocks/blocks/apollo.ts +++ b/apps/sim/blocks/blocks/apollo.ts @@ -1,5 +1,5 @@ +import { Users } from '@sim/emcn/icons' import { getErrorMessage } from '@sim/utils/errors' -import { Users } from '@/components/emcn/icons' import { ApolloIcon } from '@/components/icons' import type { BlockConfig, BlockMeta } from '@/blocks/types' import { AuthMode, IntegrationType } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/circleback.ts b/apps/sim/blocks/blocks/circleback.ts index 56ba5ecb9b4..1d80b7ee97c 100644 --- a/apps/sim/blocks/blocks/circleback.ts +++ b/apps/sim/blocks/blocks/circleback.ts @@ -1,4 +1,4 @@ -import { ClipboardList, Table } from '@/components/emcn/icons' +import { ClipboardList, Table } from '@sim/emcn/icons' import { CirclebackIcon } from '@/components/icons' import type { BlockConfig, BlockMeta } from '@/blocks/types' import { IntegrationType } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/clickhouse.ts b/apps/sim/blocks/blocks/clickhouse.ts index 4ae45311d86..9372883faad 100644 --- a/apps/sim/blocks/blocks/clickhouse.ts +++ b/apps/sim/blocks/blocks/clickhouse.ts @@ -1,14 +1,5 @@ +import { Bell, ClipboardList, Database, File, Search, Server, Trash, Wrench } from '@sim/emcn/icons' import { getErrorMessage } from '@sim/utils/errors' -import { - Bell, - ClipboardList, - Database, - File, - Search, - Server, - Trash, - Wrench, -} from '@/components/emcn/icons' import { ClickHouseIcon } from '@/components/icons' import type { BlockConfig, BlockMeta } from '@/blocks/types' import { IntegrationType } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/confluence.ts b/apps/sim/blocks/blocks/confluence.ts index f0594888a1d..93b0dcda9ff 100644 --- a/apps/sim/blocks/blocks/confluence.ts +++ b/apps/sim/blocks/blocks/confluence.ts @@ -1,4 +1,4 @@ -import { Search } from '@/components/emcn/icons' +import { Search } from '@sim/emcn/icons' import { ConfluenceIcon, PagerDutyIcon } from '@/components/icons' import { getScopesForService } from '@/lib/oauth/utils' import type { BlockConfig, BlockMeta } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/github.ts b/apps/sim/blocks/blocks/github.ts index 4d3735f731f..388edc22721 100644 --- a/apps/sim/blocks/blocks/github.ts +++ b/apps/sim/blocks/blocks/github.ts @@ -1,4 +1,4 @@ -import { Calendar } from '@/components/emcn/icons' +import { Calendar } from '@sim/emcn/icons' import { GithubIcon, NotionIcon } from '@/components/icons' import type { BlockConfig, BlockMeta } from '@/blocks/types' import { AuthMode, IntegrationType } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/gmail.ts b/apps/sim/blocks/blocks/gmail.ts index 3ac0825abdc..d49483d7630 100644 --- a/apps/sim/blocks/blocks/gmail.ts +++ b/apps/sim/blocks/blocks/gmail.ts @@ -1,4 +1,4 @@ -import { Card } from '@/components/emcn/icons' +import { Card } from '@sim/emcn/icons' import { GmailIcon, LemlistIcon } from '@/components/icons' import { getScopesForService } from '@/lib/oauth/utils' import type { BlockConfig, BlockMeta } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/google_drive.ts b/apps/sim/blocks/blocks/google_drive.ts index dc23d930e39..8e4b6b9beff 100644 --- a/apps/sim/blocks/blocks/google_drive.ts +++ b/apps/sim/blocks/blocks/google_drive.ts @@ -1,4 +1,4 @@ -import { BookOpen } from '@/components/emcn/icons' +import { BookOpen } from '@sim/emcn/icons' import { GoogleDriveIcon } from '@/components/icons' import { getScopesForService } from '@/lib/oauth/utils' import type { BlockConfig, BlockMeta } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/google_vault.ts b/apps/sim/blocks/blocks/google_vault.ts index 24c03daa7f3..57327385ff4 100644 --- a/apps/sim/blocks/blocks/google_vault.ts +++ b/apps/sim/blocks/blocks/google_vault.ts @@ -1,4 +1,4 @@ -import { ShieldCheck } from '@/components/emcn/icons' +import { ShieldCheck } from '@sim/emcn/icons' import { GoogleVaultIcon } from '@/components/icons' import { getScopesForService } from '@/lib/oauth/utils' import type { BlockConfig, BlockMeta } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/greptile.ts b/apps/sim/blocks/blocks/greptile.ts index 9152c09c42e..02e55452a16 100644 --- a/apps/sim/blocks/blocks/greptile.ts +++ b/apps/sim/blocks/blocks/greptile.ts @@ -1,4 +1,4 @@ -import { ClipboardList } from '@/components/emcn/icons' +import { ClipboardList } from '@sim/emcn/icons' import { GreptileIcon, SlackIcon } from '@/components/icons' import type { BlockConfig, BlockMeta } from '@/blocks/types' import { AuthMode, IntegrationType } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/imap.ts b/apps/sim/blocks/blocks/imap.ts index 80c291ab15b..91fe7250428 100644 --- a/apps/sim/blocks/blocks/imap.ts +++ b/apps/sim/blocks/blocks/imap.ts @@ -1,4 +1,4 @@ -import { ClipboardList, Table } from '@/components/emcn/icons' +import { ClipboardList, Table } from '@sim/emcn/icons' import { MailServerIcon } from '@/components/icons' import type { BlockConfig, BlockMeta } from '@/blocks/types' import { IntegrationType } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/logs.ts b/apps/sim/blocks/blocks/logs.ts index 2c41251e2ec..75ab5f54f04 100644 --- a/apps/sim/blocks/blocks/logs.ts +++ b/apps/sim/blocks/blocks/logs.ts @@ -1,4 +1,4 @@ -import { Library } from '@/components/emcn/icons' +import { Library } from '@sim/emcn/icons' import { fetchWorkspaceWorkflowOptions } from '@/lib/workflows/subblocks/options' import type { BlockConfig } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/mailchimp.ts b/apps/sim/blocks/blocks/mailchimp.ts index 7f07ab83941..cb9b8ac017a 100644 --- a/apps/sim/blocks/blocks/mailchimp.ts +++ b/apps/sim/blocks/blocks/mailchimp.ts @@ -1,4 +1,4 @@ -import { Mail } from '@/components/emcn/icons' +import { Mail } from '@sim/emcn/icons' import { MailchimpIcon } from '@/components/icons' import type { BlockConfig, BlockMeta } from '@/blocks/types' import { AuthMode, IntegrationType } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/mothership.ts b/apps/sim/blocks/blocks/mothership.ts index cee2eee9a37..d20aaf7fa7a 100644 --- a/apps/sim/blocks/blocks/mothership.ts +++ b/apps/sim/blocks/blocks/mothership.ts @@ -1,4 +1,4 @@ -import { Blimp } from '@/components/emcn' +import { Blimp } from '@sim/emcn' import type { BlockConfig } from '@/blocks/types' import type { ToolResponse } from '@/tools/types' diff --git a/apps/sim/blocks/blocks/notion.ts b/apps/sim/blocks/blocks/notion.ts index 822e84b38f7..fd11428f839 100644 --- a/apps/sim/blocks/blocks/notion.ts +++ b/apps/sim/blocks/blocks/notion.ts @@ -1,5 +1,5 @@ +import { Send } from '@sim/emcn/icons' import { toError } from '@sim/utils/errors' -import { Send } from '@/components/emcn/icons' import { NotionIcon } from '@/components/icons' import type { BlockConfig, BlockMeta } from '@/blocks/types' import { AuthMode, IntegrationType } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/rss.ts b/apps/sim/blocks/blocks/rss.ts index fb9cc38fc7a..93ed61a9483 100644 --- a/apps/sim/blocks/blocks/rss.ts +++ b/apps/sim/blocks/blocks/rss.ts @@ -1,4 +1,4 @@ -import { BookOpen, Table } from '@/components/emcn/icons' +import { BookOpen, Table } from '@sim/emcn/icons' import { RssIcon } from '@/components/icons' import type { BlockConfig, BlockMeta } from '@/blocks/types' import { IntegrationType } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/sentry.ts b/apps/sim/blocks/blocks/sentry.ts index 564d009018c..eeb5c832d21 100644 --- a/apps/sim/blocks/blocks/sentry.ts +++ b/apps/sim/blocks/blocks/sentry.ts @@ -1,4 +1,4 @@ -import { Bug } from '@/components/emcn/icons' +import { Bug } from '@sim/emcn/icons' import { SentryIcon } from '@/components/icons' import type { BlockConfig, BlockMeta } from '@/blocks/types' import { AuthMode, IntegrationType } from '@/blocks/types' diff --git a/apps/sim/blocks/blocks/slack.ts b/apps/sim/blocks/blocks/slack.ts index 2a523bfa304..bb663157a91 100644 --- a/apps/sim/blocks/blocks/slack.ts +++ b/apps/sim/blocks/blocks/slack.ts @@ -1,4 +1,4 @@ -import { BookOpen, ClipboardList, File, Table, Users } from '@/components/emcn/icons' +import { BookOpen, ClipboardList, File, Table, Users } from '@sim/emcn/icons' import { GoogleTranslateIcon, GreptileIcon, LinearIcon, SlackIcon } from '@/components/icons' import { getScopesForService } from '@/lib/oauth/utils' import type { BlockConfig, BlockMeta } from '@/blocks/types' diff --git a/apps/sim/components/emcn/index.ts b/apps/sim/components/emcn/index.ts deleted file mode 100644 index 2d972a1ab2e..00000000000 --- a/apps/sim/components/emcn/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -export * from './components' -/** - * `Table` exists in BOTH `./components` (data-table element) and `./icons` - * (glyph). This explicit re-export resolves the ambiguity to the COMPONENT — - * always import the icon from `@/components/emcn/icons`. Rendering the - * component as an icon paints an empty `w-full` table that squeezes its - * siblings (shipped as the tables-header "T…" flicker). - */ -export { - Table, - TableBody, - TableCaption, - TableCell, - TableFooter, - TableHead, - TableHeader, - TableRow, -} from './components/table/table' -export * from './icons' diff --git a/apps/sim/components/permissions/permission-selector.tsx b/apps/sim/components/permissions/permission-selector.tsx index 13e83cc5635..2b568544c1c 100644 --- a/apps/sim/components/permissions/permission-selector.tsx +++ b/apps/sim/components/permissions/permission-selector.tsx @@ -1,8 +1,7 @@ 'use client' import React from 'react' -import { ButtonGroup, ButtonGroupItem } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' +import { ButtonGroup, ButtonGroupItem, cn } from '@sim/emcn' import type { PermissionType } from '@/lib/workspaces/permissions/utils' export type { PermissionType } diff --git a/apps/sim/components/permissions/role-lock.tsx b/apps/sim/components/permissions/role-lock.tsx index a20029a9ce4..6988b1200c4 100644 --- a/apps/sim/components/permissions/role-lock.tsx +++ b/apps/sim/components/permissions/role-lock.tsx @@ -1,7 +1,7 @@ 'use client' import type { ReactNode } from 'react' -import { Tooltip } from '@/components/emcn' +import { Tooltip } from '@sim/emcn' export type WorkspaceRoleSource = 'owner' | 'explicit' | 'org-admin' export type CredentialRoleSource = 'explicit' | 'workspace-admin' diff --git a/apps/sim/components/ui/button.tsx b/apps/sim/components/ui/button.tsx index aac52222168..f788dc6d61f 100644 --- a/apps/sim/components/ui/button.tsx +++ b/apps/sim/components/ui/button.tsx @@ -1,7 +1,7 @@ import * as React from 'react' import { Slot } from '@radix-ui/react-slot' +import { cn } from '@sim/emcn' import { cva, type VariantProps } from 'class-variance-authority' -import { cn } from '@/lib/core/utils/cn' const buttonVariants = cva( 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', diff --git a/apps/sim/components/ui/generated-password-input.tsx b/apps/sim/components/ui/generated-password-input.tsx index 7cee9884fa1..9993878d60d 100644 --- a/apps/sim/components/ui/generated-password-input.tsx +++ b/apps/sim/components/ui/generated-password-input.tsx @@ -1,8 +1,8 @@ 'use client' import { useEffect, useState } from 'react' +import { Button, ChipInput, Tooltip } from '@sim/emcn' import { Check, Clipboard, Eye, EyeOff, RefreshCw } from 'lucide-react' -import { Button, ChipInput, Tooltip } from '@/components/emcn' import { generatePassword } from '@/lib/core/security/encryption' interface GeneratedPasswordInputProps { diff --git a/apps/sim/components/ui/progress.tsx b/apps/sim/components/ui/progress.tsx index df6dc5ac6fb..e111961f020 100644 --- a/apps/sim/components/ui/progress.tsx +++ b/apps/sim/components/ui/progress.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import * as ProgressPrimitive from '@radix-ui/react-progress' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '@sim/emcn' interface ProgressProps extends React.ComponentPropsWithoutRef { indicatorClassName?: string diff --git a/apps/sim/components/ui/select.tsx b/apps/sim/components/ui/select.tsx index b773a4dcb1b..a0c04317b14 100644 --- a/apps/sim/components/ui/select.tsx +++ b/apps/sim/components/ui/select.tsx @@ -2,8 +2,8 @@ import * as React from 'react' import * as SelectPrimitive from '@radix-ui/react-select' +import { cn } from '@sim/emcn' import { Check, ChevronDown, ChevronUp } from 'lucide-react' -import { cn } from '@/lib/core/utils/cn' const Select = SelectPrimitive.Root diff --git a/apps/sim/ee/access-control/components/access-control.tsx b/apps/sim/ee/access-control/components/access-control.tsx index 38304dd77b9..99211cc7edd 100644 --- a/apps/sim/ee/access-control/components/access-control.tsx +++ b/apps/sim/ee/access-control/components/access-control.tsx @@ -1,9 +1,6 @@ 'use client' import { useCallback, useMemo, useState } from 'react' -import { createLogger } from '@sim/logger' -import { ArrowRight, Plus } from 'lucide-react' -import { useParams } from 'next/navigation' import { Checkbox, Chip, @@ -15,7 +12,10 @@ import { ChipModalHeader, ChipTag, Label, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { ArrowRight, Plus } from 'lucide-react' +import { useParams } from 'next/navigation' import { getEnv, isTruthy } from '@/lib/core/config/env' import { SettingsEmptyState } from '@/app/workspace/[workspaceId]/settings/components/settings-empty-state' import { SettingsPanel } from '@/app/workspace/[workspaceId]/settings/components/settings-panel' diff --git a/apps/sim/ee/access-control/components/group-detail.tsx b/apps/sim/ee/access-control/components/group-detail.tsx index 3210a4ba157..4c712e60bfc 100644 --- a/apps/sim/ee/access-control/components/group-detail.tsx +++ b/apps/sim/ee/access-control/components/group-detail.tsx @@ -1,9 +1,6 @@ 'use client' import { useCallback, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' -import { ChevronDown, Plus } from 'lucide-react' import { Checkbox, Chip, @@ -18,15 +15,18 @@ import { ChipModalHeader, ChipModalTabs, ChipTag, + cn, Info, Search, Skeleton, Switch, toast, -} from '@/components/emcn' -import { ArrowLeft } from '@/components/emcn/icons' +} from '@sim/emcn' +import { ArrowLeft } from '@sim/emcn/icons' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { ChevronDown, Plus } from 'lucide-react' import type { ShareAuthType } from '@/lib/api/contracts/public-shares' -import { cn } from '@/lib/core/utils/cn' import { isBlockTypeAccessControlExempt } from '@/lib/permission-groups/block-access' import type { PermissionGroupConfig } from '@/lib/permission-groups/types' import { UnsavedChangesModal } from '@/app/workspace/[workspaceId]/components/credential-detail' diff --git a/apps/sim/ee/access-control/components/workspace-select.tsx b/apps/sim/ee/access-control/components/workspace-select.tsx index f8f2496aa13..8f6ab20a7fd 100644 --- a/apps/sim/ee/access-control/components/workspace-select.tsx +++ b/apps/sim/ee/access-control/components/workspace-select.tsx @@ -1,6 +1,6 @@ 'use client' -import { ChipDropdown } from '@/components/emcn' +import { ChipDropdown } from '@sim/emcn' interface WorkspaceSelectProps { workspaceIds: string[] diff --git a/apps/sim/ee/audit-logs/components/audit-logs.tsx b/apps/sim/ee/audit-logs/components/audit-logs.tsx index bf050d137b4..349eb829328 100644 --- a/apps/sim/ee/audit-logs/components/audit-logs.tsx +++ b/apps/sim/ee/audit-logs/components/audit-logs.tsx @@ -1,24 +1,24 @@ 'use client' import { useCallback, useEffect, useMemo, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { formatDateTime } from '@sim/utils/formatting' -import { isRecordLike } from '@sim/utils/object' -import { ChevronDown } from 'lucide-react' import { Badge, Button, + Calendar, ChipInput, ChipSelect, type ComboboxOption, + cn, Popover, PopoverAnchor, PopoverContent, RefreshCw, Search, -} from '@/components/emcn' -import { Calendar } from '@/components/emcn/components/calendar/calendar' -import { cn } from '@/lib/core/utils/cn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { formatDateTime } from '@sim/utils/formatting' +import { isRecordLike } from '@sim/utils/object' +import { ChevronDown } from 'lucide-react' import { getEndDateFromTimeRange, getStartDateFromTimeRange } from '@/lib/logs/filters' import type { EnterpriseAuditLogEntry } from '@/app/api/v1/audit-logs/format' import { formatDateShort } from '@/app/workspace/[workspaceId]/logs/utils' diff --git a/apps/sim/ee/audit-logs/constants.ts b/apps/sim/ee/audit-logs/constants.ts index a7bf49e2afd..6a361c292a6 100644 --- a/apps/sim/ee/audit-logs/constants.ts +++ b/apps/sim/ee/audit-logs/constants.ts @@ -1,5 +1,5 @@ import { AuditResourceType } from '@sim/audit' -import type { ComboboxOption } from '@/components/emcn' +import type { ComboboxOption } from '@sim/emcn' const ACRONYMS = new Set(['API', 'BYOK', 'MCP', 'OAUTH']) diff --git a/apps/sim/ee/components/setting-row.tsx b/apps/sim/ee/components/setting-row.tsx index 0527082496a..dd5b138029c 100644 --- a/apps/sim/ee/components/setting-row.tsx +++ b/apps/sim/ee/components/setting-row.tsx @@ -1,5 +1,5 @@ +import { Label, Tooltip } from '@sim/emcn' import { Info } from 'lucide-react' -import { Label, Tooltip } from '@/components/emcn' interface SettingRowProps { label: string diff --git a/apps/sim/ee/data-drains/components/data-drains-settings.tsx b/apps/sim/ee/data-drains/components/data-drains-settings.tsx index 8642a235693..3b494c0f3ff 100644 --- a/apps/sim/ee/data-drains/components/data-drains-settings.tsx +++ b/apps/sim/ee/data-drains/components/data-drains-settings.tsx @@ -1,10 +1,6 @@ 'use client' import { useState } from 'react' -import { createLogger } from '@sim/logger' -import { isOrgAdminRole } from '@sim/platform-authz/predicates' -import { toError } from '@sim/utils/errors' -import { ChevronDown, Plus } from 'lucide-react' import { Badge, Chip, @@ -16,6 +12,7 @@ import { ChipModalFooter, ChipModalHeader, ChipSelect, + cn, Switch, Table, TableBody, @@ -24,10 +21,13 @@ import { TableHeader, TableRow, toast, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { isOrgAdminRole } from '@sim/platform-authz/predicates' +import { toError } from '@sim/utils/errors' +import { ChevronDown, Plus } from 'lucide-react' import type { CreateDataDrainBody, DataDrain, DataDrainRun } from '@/lib/api/contracts/data-drains' import { useSession } from '@/lib/auth/auth-client' -import { cn } from '@/lib/core/utils/cn' import { CADENCE_TYPES, DESTINATION_TYPES, SOURCE_TYPES } from '@/lib/data-drains/types' import { getUserRole } from '@/lib/workspaces/organization/utils' import { RowActionsMenu } from '@/app/workspace/[workspaceId]/settings/components/row-actions-menu' diff --git a/apps/sim/ee/data-drains/destinations/registry.tsx b/apps/sim/ee/data-drains/destinations/registry.tsx index 2703ceac6c0..b2d70c06f35 100644 --- a/apps/sim/ee/data-drains/destinations/registry.tsx +++ b/apps/sim/ee/data-drains/destinations/registry.tsx @@ -1,14 +1,7 @@ 'use client' import type { ComponentType } from 'react' -import { - ChipInput, - ChipModalField, - ChipSelect, - ChipTextarea, - SecretInput, - Switch, -} from '@/components/emcn' +import { ChipInput, ChipModalField, ChipSelect, ChipTextarea, SecretInput, Switch } from '@sim/emcn' import type { CreateDataDrainBody } from '@/lib/api/contracts/data-drains' import type { DestinationType } from '@/lib/data-drains/types' diff --git a/apps/sim/ee/data-retention/components/data-retention-settings.tsx b/apps/sim/ee/data-retention/components/data-retention-settings.tsx index c2eec1bb430..af4daade496 100644 --- a/apps/sim/ee/data-retention/components/data-retention-settings.tsx +++ b/apps/sim/ee/data-retention/components/data-retention-settings.tsx @@ -1,11 +1,6 @@ 'use client' import { useEffect, useRef, useState } from 'react' -import { createLogger } from '@sim/logger' -import { isOrgAdminRole } from '@sim/platform-authz/predicates' -import { toError } from '@sim/utils/errors' -import { generateId } from '@sim/utils/id' -import { ArrowLeft, ArrowRight, Plus } from 'lucide-react' import { Checkbox, Chip, @@ -16,7 +11,12 @@ import { ChipTag, Search, toast, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { isOrgAdminRole } from '@sim/platform-authz/predicates' +import { toError } from '@sim/utils/errors' +import { generateId } from '@sim/utils/id' +import { ArrowLeft, ArrowRight, Plus } from 'lucide-react' import type { UpdateOrganizationDataRetentionBody } from '@/lib/api/contracts/organization' import type { RetentionOverride } from '@/lib/api/contracts/primitives' import { useSession } from '@/lib/auth/auth-client' diff --git a/apps/sim/ee/sso/components/sso-auth.tsx b/apps/sim/ee/sso/components/sso-auth.tsx index 75ce54600d2..5d6ae70d029 100644 --- a/apps/sim/ee/sso/components/sso-auth.tsx +++ b/apps/sim/ee/sso/components/sso-auth.tsx @@ -1,13 +1,12 @@ 'use client' import { type KeyboardEvent, useState } from 'react' +import { cn, Input, Label, Loader } from '@sim/emcn' import { createLogger } from '@sim/logger' import { useRouter } from 'next/navigation' -import { Input, Label, Loader } from '@/components/emcn' import { ApiClientError } from '@/lib/api/client/errors' import { requestJson } from '@/lib/api/client/request' import { chatSSOContract } from '@/lib/api/contracts/chats' -import { cn } from '@/lib/core/utils/cn' import { quickValidateEmail } from '@/lib/messaging/email/validation' import AuthBackground from '@/app/(auth)/components/auth-background' import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes' diff --git a/apps/sim/ee/sso/components/sso-form.tsx b/apps/sim/ee/sso/components/sso-form.tsx index 53e967c0368..86ce9cd8db2 100644 --- a/apps/sim/ee/sso/components/sso-form.tsx +++ b/apps/sim/ee/sso/components/sso-form.tsx @@ -1,14 +1,13 @@ 'use client' import { useEffect, useState } from 'react' +import { Button, cn, Input, Label, Loader } from '@sim/emcn' import { createLogger } from '@sim/logger' import Link from 'next/link' import { useRouter, useSearchParams } from 'next/navigation' -import { Button, Input, Label, Loader } from '@/components/emcn' import { client } from '@/lib/auth/auth-client' import { env, isFalsy } from '@/lib/core/config/env' import { validateCallbackUrl } from '@/lib/core/security/input-validation' -import { cn } from '@/lib/core/utils/cn' import { quickValidateEmail } from '@/lib/messaging/email/validation' import { AUTH_SUBMIT_BTN } from '@/app/(auth)/components/auth-button-classes' diff --git a/apps/sim/ee/sso/components/sso-settings.tsx b/apps/sim/ee/sso/components/sso-settings.tsx index b3e55fe4d25..457a161b0ea 100644 --- a/apps/sim/ee/sso/components/sso-settings.tsx +++ b/apps/sim/ee/sso/components/sso-settings.tsx @@ -1,9 +1,6 @@ 'use client' import { type ReactNode, useState } from 'react' -import { createLogger } from '@sim/logger' -import { getErrorMessage } from '@sim/utils/errors' -import { Check, ChevronDown, Clipboard, Eye, EyeOff } from 'lucide-react' import { Button, Chip, @@ -11,17 +8,20 @@ import { ChipInput, ChipSelect, ChipTextarea, + cn, Expandable, ExpandableContent, Label, Switch, toast, -} from '@/components/emcn' +} from '@sim/emcn' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { Check, ChevronDown, Clipboard, Eye, EyeOff } from 'lucide-react' import type { SsoRegistrationBody } from '@/lib/api/contracts/auth' import { useSession } from '@/lib/auth/auth-client' import { getSubscriptionAccessState } from '@/lib/billing/client/utils' import { isBillingEnabled } from '@/lib/core/config/env-flags' -import { cn } from '@/lib/core/utils/cn' import { getBaseUrl } from '@/lib/core/utils/urls' import { getUserRole } from '@/lib/workspaces/organization/utils' import { SaveDiscardActions } from '@/app/workspace/[workspaceId]/settings/components/save-discard-actions/save-discard-actions' diff --git a/apps/sim/ee/whitelabeling/components/whitelabeling-settings.tsx b/apps/sim/ee/whitelabeling/components/whitelabeling-settings.tsx index 32eb4602760..ae2c82d1296 100644 --- a/apps/sim/ee/whitelabeling/components/whitelabeling-settings.tsx +++ b/apps/sim/ee/whitelabeling/components/whitelabeling-settings.tsx @@ -1,18 +1,17 @@ 'use client' import { useEffect, useRef, useState } from 'react' +import { Button, ChipInput, cn, Label, Loader, toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { isOrgAdminRole } from '@sim/platform-authz/predicates' import { toError } from '@sim/utils/errors' import { Image as ImageIcon, X } from 'lucide-react' import Image from 'next/image' import { useParams } from 'next/navigation' -import { Button, ChipInput, Label, Loader, toast } from '@/components/emcn' import { useSession } from '@/lib/auth/auth-client' import { getSubscriptionAccessState } from '@/lib/billing/client/utils' import { HEX_COLOR_REGEX } from '@/lib/branding' import { isBillingEnabled } from '@/lib/core/config/env-flags' -import { cn } from '@/lib/core/utils/cn' import { getUserRole } from '@/lib/workspaces/organization/utils' import { CHIP_FIELD_INPUT, diff --git a/apps/sim/enrichments/email-verification/email-verification.ts b/apps/sim/enrichments/email-verification/email-verification.ts index d6d7417c511..bd78306813e 100644 --- a/apps/sim/enrichments/email-verification/email-verification.ts +++ b/apps/sim/enrichments/email-verification/email-verification.ts @@ -1,4 +1,4 @@ -import { ShieldCheck } from '@/components/emcn/icons' +import { ShieldCheck } from '@sim/emcn/icons' import { str, toolProvider } from '@/enrichments/providers' import type { EnrichmentConfig } from '@/enrichments/types' diff --git a/apps/sim/enrichments/work-email/work-email.ts b/apps/sim/enrichments/work-email/work-email.ts index 37dc76bf7b3..f965a8544f5 100644 --- a/apps/sim/enrichments/work-email/work-email.ts +++ b/apps/sim/enrichments/work-email/work-email.ts @@ -1,5 +1,5 @@ +import { Mail } from '@sim/emcn/icons' import { filterUndefined } from '@sim/utils/object' -import { Mail } from '@/components/emcn/icons' import { normalizeDomain, splitName, str, toolProvider } from '@/enrichments/providers' import type { EnrichmentConfig } from '@/enrichments/types' diff --git a/apps/sim/hooks/mcp/use-mcp-oauth-popup.ts b/apps/sim/hooks/mcp/use-mcp-oauth-popup.ts index 27bd0286f94..b3fd9a6c58a 100644 --- a/apps/sim/hooks/mcp/use-mcp-oauth-popup.ts +++ b/apps/sim/hooks/mcp/use-mcp-oauth-popup.ts @@ -1,10 +1,10 @@ 'use client' import { useCallback, useEffect, useRef, useState } from 'react' +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { toError } from '@sim/utils/errors' import { useQueryClient } from '@tanstack/react-query' -import { toast } from '@/components/emcn' import type { McpOauthCallbackMessage, McpOauthCallbackReason } from '@/lib/mcp/oauth' import { mcpKeys, useStartMcpOauth } from '@/hooks/queries/mcp' diff --git a/apps/sim/hooks/queries/kb/knowledge.ts b/apps/sim/hooks/queries/kb/knowledge.ts index e85bf1f1885..03b5d91afc8 100644 --- a/apps/sim/hooks/queries/kb/knowledge.ts +++ b/apps/sim/hooks/queries/kb/knowledge.ts @@ -1,6 +1,6 @@ +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { keepPreviousData, useMutation, useQuery, useQueryClient } from '@tanstack/react-query' -import { toast } from '@/components/emcn' import { ApiClientError } from '@/lib/api/client/errors' import { requestJson } from '@/lib/api/client/request' import { diff --git a/apps/sim/hooks/queries/public-shares.ts b/apps/sim/hooks/queries/public-shares.ts index 08382e638cd..6507cc14cf1 100644 --- a/apps/sim/hooks/queries/public-shares.ts +++ b/apps/sim/hooks/queries/public-shares.ts @@ -1,5 +1,5 @@ +import { toast } from '@sim/emcn' import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query' -import { toast } from '@/components/emcn' import { requestJson } from '@/lib/api/client/request' import { type AuthenticatePublicFileResponse, diff --git a/apps/sim/hooks/queries/schedules.ts b/apps/sim/hooks/queries/schedules.ts index c3f035a0d59..efa503f36fc 100644 --- a/apps/sim/hooks/queries/schedules.ts +++ b/apps/sim/hooks/queries/schedules.ts @@ -1,7 +1,7 @@ +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' import { keepPreviousData, useMutation, useQuery, useQueryClient } from '@tanstack/react-query' -import { toast } from '@/components/emcn' import { isApiClientError } from '@/lib/api/client/errors' import { requestJson } from '@/lib/api/client/request' import { deployWorkflowContract } from '@/lib/api/contracts/deployments' diff --git a/apps/sim/hooks/queries/tables.test.ts b/apps/sim/hooks/queries/tables.test.ts index d8245e50c31..de552d8bf03 100644 --- a/apps/sim/hooks/queries/tables.test.ts +++ b/apps/sim/hooks/queries/tables.test.ts @@ -78,7 +78,7 @@ vi.mock('@/app/workspace/providers/socket-provider', () => ({ useSocket: vi.fn(() => ({ socket: null })), })) -vi.mock('@/components/emcn', () => ({ +vi.mock('@sim/emcn', () => ({ toast: { error: vi.fn(), success: vi.fn() }, })) diff --git a/apps/sim/hooks/queries/tables.ts b/apps/sim/hooks/queries/tables.ts index cbf69d8c57a..b59f0383170 100644 --- a/apps/sim/hooks/queries/tables.ts +++ b/apps/sim/hooks/queries/tables.ts @@ -4,6 +4,7 @@ * React Query hooks for managing user-defined tables. */ +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { type InfiniteData, @@ -15,7 +16,6 @@ import { useQueryClient, } from '@tanstack/react-query' import { useRouter } from 'next/navigation' -import { toast } from '@/components/emcn' import { isValidationError } from '@/lib/api/client/errors' import { requestJson } from '@/lib/api/client/request' import type { ContractJsonResponse } from '@/lib/api/contracts' diff --git a/apps/sim/hooks/queries/workspace-file-folders.ts b/apps/sim/hooks/queries/workspace-file-folders.ts index cb63bfea98e..dd0a627a0d4 100644 --- a/apps/sim/hooks/queries/workspace-file-folders.ts +++ b/apps/sim/hooks/queries/workspace-file-folders.ts @@ -1,6 +1,6 @@ +import { toast } from '@sim/emcn' import { toError } from '@sim/utils/errors' import { keepPreviousData, useMutation, useQuery, useQueryClient } from '@tanstack/react-query' -import { toast } from '@/components/emcn' import { requestJson } from '@/lib/api/client/request' import { bulkArchiveWorkspaceFileItemsContract, diff --git a/apps/sim/hooks/queries/workspace-files.ts b/apps/sim/hooks/queries/workspace-files.ts index b3a0c1bd589..d03a80c50f2 100644 --- a/apps/sim/hooks/queries/workspace-files.ts +++ b/apps/sim/hooks/queries/workspace-files.ts @@ -1,9 +1,9 @@ +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { toError } from '@sim/utils/errors' import { sleep } from '@sim/utils/helpers' import { backoffWithJitter } from '@sim/utils/retry' import { keepPreviousData, useMutation, useQuery, useQueryClient } from '@tanstack/react-query' -import { toast } from '@/components/emcn' import { ApiClientError, isApiClientError } from '@/lib/api/client/errors' import { requestJson } from '@/lib/api/client/request' import { getUsageLimitsContract } from '@/lib/api/contracts/usage-limits' diff --git a/apps/sim/hooks/use-collaborative-workflow.ts b/apps/sim/hooks/use-collaborative-workflow.ts index ddee1b798b1..0bfdecbfda1 100644 --- a/apps/sim/hooks/use-collaborative-workflow.ts +++ b/apps/sim/hooks/use-collaborative-workflow.ts @@ -1,4 +1,5 @@ import { useCallback, useEffect, useRef } from 'react' +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { BLOCK_OPERATIONS, @@ -15,7 +16,6 @@ import { useQueryClient } from '@tanstack/react-query' import { isEqual } from 'es-toolkit' import type { Edge } from 'reactflow' import { useShallow } from 'zustand/react/shallow' -import { toast } from '@/components/emcn' import { requestJson } from '@/lib/api/client/request' import { getWorkflowStateContract } from '@/lib/api/contracts' import { useSession } from '@/lib/auth/auth-client' diff --git a/apps/sim/hooks/use-oauth-return.ts b/apps/sim/hooks/use-oauth-return.ts index 897adb9dffb..08680c83ec6 100644 --- a/apps/sim/hooks/use-oauth-return.ts +++ b/apps/sim/hooks/use-oauth-return.ts @@ -1,8 +1,8 @@ 'use client' import { useEffect, useRef } from 'react' +import { toast } from '@sim/emcn' import { useParams, useRouter } from 'next/navigation' -import { toast } from '@/components/emcn' import { requestJson } from '@/lib/api/client/request' import { listWorkspaceCredentialsContract } from '@/lib/api/contracts' import { diff --git a/apps/sim/lib/billing/client/use-limit-upgrade-toast.ts b/apps/sim/lib/billing/client/use-limit-upgrade-toast.ts index c512d7e2ac1..f774c67a0de 100644 --- a/apps/sim/lib/billing/client/use-limit-upgrade-toast.ts +++ b/apps/sim/lib/billing/client/use-limit-upgrade-toast.ts @@ -1,8 +1,8 @@ 'use client' import { useCallback } from 'react' +import { toast } from '@sim/emcn' import { useParams, useRouter } from 'next/navigation' -import { toast } from '@/components/emcn' import { buildUpgradeHref, type UpgradeReason } from '@/lib/billing/upgrade-reasons' /** diff --git a/apps/sim/lib/blog/code.tsx b/apps/sim/lib/blog/code.tsx index b1bac0c4920..dc7436f7ad5 100644 --- a/apps/sim/lib/blog/code.tsx +++ b/apps/sim/lib/blog/code.tsx @@ -1,6 +1,6 @@ 'use client' -import { Code } from '@/components/emcn' +import { Code } from '@sim/emcn' interface CodeBlockProps { code: string diff --git a/apps/sim/lib/copilot/tools/client/store-utils.ts b/apps/sim/lib/copilot/tools/client/store-utils.ts index a8952f935a9..ec4c1190b2f 100644 --- a/apps/sim/lib/copilot/tools/client/store-utils.ts +++ b/apps/sim/lib/copilot/tools/client/store-utils.ts @@ -1,6 +1,6 @@ import type { ComponentType } from 'react' +import { Loader } from '@sim/emcn' import { FileText } from 'lucide-react' -import { Loader } from '@/components/emcn' import { Read as ReadTool } from '@/lib/copilot/generated/tool-catalog-v1' import { VFS_DIR_TO_RESOURCE } from '@/lib/copilot/resources/types' import { isToolHiddenInUi } from '@/lib/copilot/tools/client/hidden-tools' diff --git a/apps/sim/lib/core/utils.test.ts b/apps/sim/lib/core/utils.test.ts index 5aa5a91804f..a9e2b1662f9 100644 --- a/apps/sim/lib/core/utils.test.ts +++ b/apps/sim/lib/core/utils.test.ts @@ -1,3 +1,4 @@ +import { cn } from '@sim/emcn' import { createEnvMock } from '@sim/testing' import { formatDate, @@ -9,7 +10,6 @@ import { import { afterEach, describe, expect, it, vi } from 'vitest' import { getRotatingApiKey } from '@/lib/core/config/api-keys' import { decryptSecret, encryptSecret } from '@/lib/core/security/encryption' -import { cn } from '@/lib/core/utils/cn' import { convertScheduleOptionsToCron } from '@/lib/core/utils/scheduling' import { getInvalidCharacters, isValidName, validateName } from '@/lib/core/utils/validation' diff --git a/apps/sim/next.config.ts b/apps/sim/next.config.ts index 4c66b60f3f6..187fc0914e2 100644 --- a/apps/sim/next.config.ts +++ b/apps/sim/next.config.ts @@ -133,6 +133,7 @@ const nextConfig: NextConfig = { optimizeCss: true, preloadEntriesOnStart: false, optimizePackageImports: [ + '@sim/emcn', 'lodash', 'framer-motion', 'reactflow', @@ -171,6 +172,7 @@ const nextConfig: NextConfig = { '@t3-oss/env-nextjs', '@t3-oss/env-core', '@sim/db', + '@sim/emcn', ], async headers() { return [ diff --git a/apps/sim/package.json b/apps/sim/package.json index 88c68644a59..c94cc5aba6d 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -97,6 +97,7 @@ "@react-email/components": "0.5.7", "@react-email/render": "2.0.8", "@sim/audit": "workspace:*", + "@sim/emcn": "workspace:*", "@sim/logger": "workspace:*", "@sim/platform-authz": "workspace:*", "@sim/realtime-protocol": "workspace:*", diff --git a/apps/sim/stores/terminal/console/store.ts b/apps/sim/stores/terminal/console/store.ts index 61b660859d6..a3262620c3c 100644 --- a/apps/sim/stores/terminal/console/store.ts +++ b/apps/sim/stores/terminal/console/store.ts @@ -1,9 +1,9 @@ +import { toast } from '@sim/emcn' import { createLogger } from '@sim/logger' import { generateId } from '@sim/utils/id' import { create } from 'zustand' import { devtools } from 'zustand/middleware' import { useShallow } from 'zustand/react/shallow' -import { toast } from '@/components/emcn' import { redactApiKeys } from '@/lib/core/security/redaction' import { sendMothershipMessage } from '@/lib/mothership/events' import { getQueryClient } from '@/app/_shell/providers/query-provider' diff --git a/bun.lock b/bun.lock index ea728cc09b0..2b92202f9ae 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "simstudio", @@ -24,6 +25,7 @@ "@ai-sdk/openai": "2.0.107", "@ai-sdk/react": "2.0.205", "@sim/db": "workspace:*", + "@sim/emcn": "workspace:*", "@vercel/og": "^0.6.5", "ai": "5.0.203", "class-variance-authority": "^0.7.1", @@ -161,6 +163,7 @@ "@react-email/components": "0.5.7", "@react-email/render": "2.0.8", "@sim/audit": "workspace:*", + "@sim/emcn": "workspace:*", "@sim/logger": "workspace:*", "@sim/platform-authz": "workspace:*", "@sim/realtime-protocol": "workspace:*", @@ -372,6 +375,40 @@ "typescript": "^5.7.3", }, }, + "packages/emcn": { + "name": "@sim/emcn", + "version": "0.1.0", + "dependencies": { + "clsx": "^2.1.1", + "tailwind-merge": "^2.6.0", + }, + "devDependencies": { + "@sim/tsconfig": "workspace:*", + "@types/prismjs": "^1.26.5", + "@types/react": "^19", + "@types/react-dom": "^19", + "class-variance-authority": "^0.7.1", + "framer-motion": "^12.5.0", + "input-otp": "^1.4.2", + "lucide-react": "^0.479.0", + "next": "16.2.6", + "prismjs": "^1.30.0", + "react": "19.2.4", + "react-dom": "19.2.4", + "typescript": "^5.7.3", + "vitest": "^4.1.0", + }, + "peerDependencies": { + "class-variance-authority": "^0.7.1", + "framer-motion": "^12.5.0", + "input-otp": "^1.4.2", + "lucide-react": ">=0.479.0", + "next": ">=15", + "prismjs": "^1.30.0", + "react": "^19", + "react-dom": "^19", + }, + }, "packages/logger": { "name": "@sim/logger", "version": "0.1.0", @@ -1483,6 +1520,8 @@ "@sim/db": ["@sim/db@workspace:packages/db"], + "@sim/emcn": ["@sim/emcn@workspace:packages/emcn"], + "@sim/logger": ["@sim/logger@workspace:packages/logger"], "@sim/pii": ["@sim/pii@workspace:apps/pii"], @@ -2913,7 +2952,7 @@ "lru.min": ["lru.min@1.1.4", "", {}, "sha512-DqC6n3QQ77zdFpCMASA1a3Jlb64Hv2N2DciFGkO/4L9+q/IpIAuRlKOvCXabtRW6cQf8usbmM6BE/TOPysCdIA=="], - "lucide-react": ["lucide-react@0.511.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-VK5a2ydJ7xm8GvBeKLS9mu1pVK6ucef9780JVUjw6bAjJL/QXnd4Y0p7SPeOUMC27YhzNCZvm5d/QX0Tp3rc0w=="], + "lucide-react": ["lucide-react@0.479.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-aBhNnveRhorBOK7uA4gDjgaf+YlHMdMhQ/3cupk6exM10hWlEU+2QtWYOfhXhjAsmdb6LeKR+NZnow4UxRRiTQ=="], "magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="], @@ -3717,7 +3756,7 @@ "systeminformation": ["systeminformation@5.23.8", "", { "os": "!aix", "bin": { "systeminformation": "lib/cli.js" } }, "sha512-Osd24mNKe6jr/YoXLLK3k8TMdzaxDffhpCxgkfgBHcapykIkd50HXThM3TCEuHO2pPuCsSx2ms/SunqhU5MmsQ=="], - "tailwind-merge": ["tailwind-merge@3.6.0", "", {}, "sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w=="], + "tailwind-merge": ["tailwind-merge@2.6.1", "", {}, "sha512-Oo6tHdpZsGpkKG88HJ8RR1rg/RdnEkQEfMoEk2x1XRI3F1AxeU+ijRXpiVUF4UbLfcxxRGw6TbUINKYdWVsQTQ=="], "tailwindcss": ["tailwindcss@4.3.1", "", {}, "sha512-hk+TB1m+K8CYNrP6rjQaq/Y+4Zylwpa87mLYBKCunwnnQ9p+fHb7kmSfGqyEJoxF/O6CDyABWVFEafNSYKll+Q=="], @@ -4407,6 +4446,10 @@ "d3-sankey/d3-shape": ["d3-shape@1.3.7", "", { "dependencies": { "d3-path": "1" } }, "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw=="], + "docs/lucide-react": ["lucide-react@0.511.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-VK5a2ydJ7xm8GvBeKLS9mu1pVK6ucef9780JVUjw6bAjJL/QXnd4Y0p7SPeOUMC27YhzNCZvm5d/QX0Tp3rc0w=="], + + "docs/tailwind-merge": ["tailwind-merge@3.6.0", "", {}, "sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w=="], + "docx/@types/node": ["@types/node@25.9.3", "", { "dependencies": { "undici-types": ">=7.24.0 <7.24.7" } }, "sha512-603BddQMv3pUcr4U2dhujk83N2tTDVr/34wII2B6bJy6g+8WD6yUb11jszNs0gdi4PesVWl7ABt8nYMVpnLUcg=="], "docx/nanoid": ["nanoid@5.1.11", "", { "bin": { "nanoid": "bin/nanoid.js" } }, "sha512-v+KEsUv2ps74PaSKv0gHTxTCgMXOIfBEbaqa6w6ISIGC7ZsvHN4N9oJ8d4cmf0n5oTzQz2SLmThbQWhjd/8eKg=="], @@ -4457,12 +4500,16 @@ "fumadocs-openapi/shiki": ["shiki@4.2.0", "", { "dependencies": { "@shikijs/core": "4.2.0", "@shikijs/engine-javascript": "4.2.0", "@shikijs/engine-oniguruma": "4.2.0", "@shikijs/langs": "4.2.0", "@shikijs/themes": "4.2.0", "@shikijs/types": "4.2.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-hjNax6o/ylDy9lefQEaSDtzaT3iVNtZ3WmpQnbuQNoG4xvnSKf2kSKbihZVO4JRG1TTMejs7CmNRYlWgAL66pQ=="], + "fumadocs-openapi/tailwind-merge": ["tailwind-merge@3.6.0", "", {}, "sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w=="], + "fumadocs-ui/@radix-ui/react-slot": ["@radix-ui/react-slot@1.3.0", "", { "dependencies": { "@radix-ui/react-compose-refs": "1.1.3" }, "peerDependencies": { "@types/react": "*", "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" }, "optionalPeers": ["@types/react"] }, "sha512-MojKku4U/miO8Av4Dkb+ctMAQx7JmY96LmtDQlAarCRtd7rN52QCSzBF+XAvr5S6coSVj9HEPBgHAHKEJVk/WA=="], "fumadocs-ui/lucide-react": ["lucide-react@1.18.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-LZDb7H/0YfM+RJncD0hDQRCAu+vSGODqpe35TuVI8EuXaRjkczbsx7p8dY4J87F/MUSj6bpYqeI8nw8qXaAdmA=="], "fumadocs-ui/shiki": ["shiki@4.2.0", "", { "dependencies": { "@shikijs/core": "4.2.0", "@shikijs/engine-javascript": "4.2.0", "@shikijs/engine-oniguruma": "4.2.0", "@shikijs/langs": "4.2.0", "@shikijs/themes": "4.2.0", "@shikijs/types": "4.2.0", "@shikijs/vscode-textmate": "^10.0.2", "@types/hast": "^3.0.4" } }, "sha512-hjNax6o/ylDy9lefQEaSDtzaT3iVNtZ3WmpQnbuQNoG4xvnSKf2kSKbihZVO4JRG1TTMejs7CmNRYlWgAL66pQ=="], + "fumadocs-ui/tailwind-merge": ["tailwind-merge@3.6.0", "", {}, "sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w=="], + "gcp-metadata/gaxios": ["gaxios@7.1.3", "", { "dependencies": { "extend": "^3.0.2", "https-proxy-agent": "^7.0.1", "node-fetch": "^3.3.2", "rimraf": "^5.0.1" } }, "sha512-YGGyuEdVIjqxkxVH1pUTMY/XtmmsApXrCVv5EU25iX6inEPbV+VakJfLealkBtJN69AQmh1eGOdCl9Sm1UP6XQ=="], "gcp-metadata/google-logging-utils": ["google-logging-utils@1.1.3", "", {}, "sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA=="], @@ -4611,10 +4658,6 @@ "sim/@types/node": ["@types/node@24.2.1", "", { "dependencies": { "undici-types": "~7.10.0" } }, "sha512-DRh5K+ka5eJic8CjH7td8QpYEV6Zo10gfRkjHCO3weqZHWDtAaSTFtl4+VMqOJ4N5jcuhZ9/l+yy8rVgw7BQeQ=="], - "sim/lucide-react": ["lucide-react@0.479.0", "", { "peerDependencies": { "react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-aBhNnveRhorBOK7uA4gDjgaf+YlHMdMhQ/3cupk6exM10hWlEU+2QtWYOfhXhjAsmdb6LeKR+NZnow4UxRRiTQ=="], - - "sim/tailwind-merge": ["tailwind-merge@2.6.1", "", {}, "sha512-Oo6tHdpZsGpkKG88HJ8RR1rg/RdnEkQEfMoEk2x1XRI3F1AxeU+ijRXpiVUF4UbLfcxxRGw6TbUINKYdWVsQTQ=="], - "sim/tailwindcss": ["tailwindcss@3.4.19", "", { "dependencies": { "@alloc/quick-lru": "^5.2.0", "arg": "^5.0.2", "chokidar": "^3.6.0", "didyoumean": "^1.2.2", "dlv": "^1.1.3", "fast-glob": "^3.3.2", "glob-parent": "^6.0.2", "is-glob": "^4.0.3", "jiti": "^1.21.7", "lilconfig": "^3.1.3", "micromatch": "^4.0.8", "normalize-path": "^3.0.0", "object-hash": "^3.0.0", "picocolors": "^1.1.1", "postcss": "^8.4.47", "postcss-import": "^15.1.0", "postcss-js": "^4.0.1", "postcss-load-config": "^4.0.2 || ^5.0 || ^6.0", "postcss-nested": "^6.2.0", "postcss-selector-parser": "^6.1.2", "resolve": "^1.22.8", "sucrase": "^3.35.0" }, "bin": { "tailwind": "lib/cli.js", "tailwindcss": "lib/cli.js" } }, "sha512-3ofp+LL8E+pK/JuPLPggVAIaEuhvIz4qNcf3nA1Xn2o/7fb7s/TYpHhwGDv1ZU3PkBluUVaF8PyCHcm48cKLWQ=="], "simstudio/@types/node": ["@types/node@20.19.43", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-6oYBAi5ikg4Pl+kGsoYtawUMBT2zZMCvPNF7pVLnHZfd1zf38DRiWn/gT01RYCdUqkv7Fhr+C9ot4/tb+2sVvA=="], @@ -4633,6 +4676,8 @@ "source-map-support/source-map": ["source-map@0.6.1", "", {}, "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="], + "streamdown/tailwind-merge": ["tailwind-merge@3.6.0", "", {}, "sha512-uxL7qAVQriqRQPAyK3pj66VqskWqoZ37PW94jwOTwNfq/z9oyu1V+eqrZqtR2+fCiXdYOZe/Modt8GtvqNzu+w=="], + "string-width/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], "string-width-cjs/emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], diff --git a/packages/emcn/package.json b/packages/emcn/package.json new file mode 100644 index 00000000000..85d7b1de694 --- /dev/null +++ b/packages/emcn/package.json @@ -0,0 +1,66 @@ +{ + "name": "@sim/emcn", + "version": "0.1.0", + "private": true, + "sideEffects": [ + "**/*.css" + ], + "type": "module", + "license": "Apache-2.0", + "engines": { + "bun": ">=1.2.13", + "node": ">=20.0.0" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./src/index.ts" + }, + "./icons": { + "types": "./src/icons/index.ts", + "default": "./src/icons/index.ts" + }, + "./*": { + "types": "./src/*", + "default": "./src/*" + } + }, + "scripts": { + "type-check": "tsc --noEmit", + "test": "vitest run", + "lint": "biome check --write --unsafe .", + "lint:check": "biome check .", + "format": "biome format --write .", + "format:check": "biome format ." + }, + "dependencies": { + "clsx": "^2.1.1", + "tailwind-merge": "^2.6.0" + }, + "peerDependencies": { + "class-variance-authority": "^0.7.1", + "framer-motion": "^12.5.0", + "input-otp": "^1.4.2", + "lucide-react": ">=0.479.0", + "next": ">=15", + "prismjs": "^1.30.0", + "react": "^19", + "react-dom": "^19" + }, + "devDependencies": { + "@sim/tsconfig": "workspace:*", + "@types/prismjs": "^1.26.5", + "@types/react": "^19", + "@types/react-dom": "^19", + "class-variance-authority": "^0.7.1", + "framer-motion": "^12.5.0", + "input-otp": "^1.4.2", + "lucide-react": "^0.479.0", + "next": "16.2.6", + "prismjs": "^1.30.0", + "react": "19.2.4", + "react-dom": "19.2.4", + "typescript": "^5.7.3", + "vitest": "^4.1.0" + } +} diff --git a/apps/sim/components/emcn/AGENTS.md b/packages/emcn/src/AGENTS.md similarity index 91% rename from apps/sim/components/emcn/AGENTS.md rename to packages/emcn/src/AGENTS.md index 36d1b103368..ebbfb1ad49a 100644 --- a/apps/sim/components/emcn/AGENTS.md +++ b/packages/emcn/src/AGENTS.md @@ -2,7 +2,7 @@ These rules apply to `apps/sim/components/emcn/**`. -- Import from `@/components/emcn`, never from subpaths except CSS files. +- Import from `@sim/emcn`, never from subpaths except CSS files. - Use Radix UI primitives for accessibility where applicable. - Use CVA when a component has 2+ variants; use direct `className` composition for single-style components. - Export both the component and its variants helper when using CVA. diff --git a/apps/sim/components/emcn/components/avatar/avatar.tsx b/packages/emcn/src/components/avatar/avatar.tsx similarity index 97% rename from apps/sim/components/emcn/components/avatar/avatar.tsx rename to packages/emcn/src/components/avatar/avatar.tsx index d895c1b9642..a511b7cb089 100644 --- a/apps/sim/components/emcn/components/avatar/avatar.tsx +++ b/packages/emcn/src/components/avatar/avatar.tsx @@ -3,7 +3,7 @@ import * as React from 'react' import * as AvatarPrimitive from '@radix-ui/react-avatar' import { cva, type VariantProps } from 'class-variance-authority' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' /** * Variant styles for the Avatar component. @@ -64,7 +64,7 @@ interface AvatarProps * * @example * ```tsx - * import { Avatar, AvatarImage, AvatarFallback } from '@/components/emcn' + * import { Avatar, AvatarImage, AvatarFallback } from '../../index' * * // Basic usage * diff --git a/apps/sim/components/emcn/components/badge/badge.tsx b/packages/emcn/src/components/badge/badge.tsx similarity index 99% rename from apps/sim/components/emcn/components/badge/badge.tsx rename to packages/emcn/src/components/badge/badge.tsx index 48a38a9f98d..7f7cea2c7d4 100644 --- a/apps/sim/components/emcn/components/badge/badge.tsx +++ b/packages/emcn/src/components/badge/badge.tsx @@ -1,6 +1,6 @@ import { forwardRef, type HTMLAttributes } from 'react' import { cva, type VariantProps } from 'class-variance-authority' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' /** Shared base styles for status color badge variants */ const STATUS_BASE = 'gap-1.5 rounded-md' diff --git a/apps/sim/components/emcn/components/banner/banner.tsx b/packages/emcn/src/components/banner/banner.tsx similarity index 93% rename from apps/sim/components/emcn/components/banner/banner.tsx rename to packages/emcn/src/components/banner/banner.tsx index 452cfb928f5..15368c2a5c2 100644 --- a/apps/sim/components/emcn/components/banner/banner.tsx +++ b/packages/emcn/src/components/banner/banner.tsx @@ -2,8 +2,8 @@ import type { HTMLAttributes, ReactNode } from 'react' import { cva, type VariantProps } from 'class-variance-authority' -import { Button, type ButtonProps } from '@/components/emcn/components/button/button' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' +import { Button, type ButtonProps } from '../button/button' const bannerVariants = cva('shrink-0 px-6 py-2.5', { variants: { diff --git a/apps/sim/components/emcn/components/button-group/button-group.tsx b/packages/emcn/src/components/button-group/button-group.tsx similarity index 99% rename from apps/sim/components/emcn/components/button-group/button-group.tsx rename to packages/emcn/src/components/button-group/button-group.tsx index d6dda835c27..ca7056669d6 100644 --- a/apps/sim/components/emcn/components/button-group/button-group.tsx +++ b/packages/emcn/src/components/button-group/button-group.tsx @@ -11,7 +11,7 @@ import { useContext, } from 'react' import { cva, type VariantProps } from 'class-variance-authority' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' const buttonGroupVariants = cva('inline-flex', { variants: { diff --git a/apps/sim/components/emcn/components/button/button.tsx b/packages/emcn/src/components/button/button.tsx similarity index 98% rename from apps/sim/components/emcn/components/button/button.tsx rename to packages/emcn/src/components/button/button.tsx index d75a9d9d07d..80eebd30722 100644 --- a/apps/sim/components/emcn/components/button/button.tsx +++ b/packages/emcn/src/components/button/button.tsx @@ -1,6 +1,6 @@ import { type ButtonHTMLAttributes, forwardRef } from 'react' import { cva, type VariantProps } from 'class-variance-authority' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' const buttonVariants = cva( 'inline-flex items-center justify-center font-medium transition-colors disabled:pointer-events-none disabled:opacity-70 outline-none focus:outline-none focus-visible:outline-none rounded-[5px]', diff --git a/apps/sim/components/emcn/components/calendar/calendar-day-cell.tsx b/packages/emcn/src/components/calendar/calendar-day-cell.tsx similarity index 94% rename from apps/sim/components/emcn/components/calendar/calendar-day-cell.tsx rename to packages/emcn/src/components/calendar/calendar-day-cell.tsx index ae965570367..33f070af65c 100644 --- a/apps/sim/components/emcn/components/calendar/calendar-day-cell.tsx +++ b/packages/emcn/src/components/calendar/calendar-day-cell.tsx @@ -1,8 +1,8 @@ 'use client' import { type ButtonHTMLAttributes, forwardRef, type ReactNode } from 'react' -import { chipVariants } from '@/components/emcn/components/chip/chip' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' +import { chipVariants } from '../chip/chip' export interface CalendarDayCellProps extends Omit, 'children'> { diff --git a/apps/sim/components/emcn/components/calendar/calendar.test.ts b/packages/emcn/src/components/calendar/calendar.test.ts similarity index 95% rename from apps/sim/components/emcn/components/calendar/calendar.test.ts rename to packages/emcn/src/components/calendar/calendar.test.ts index f9683be2c7b..f0e3360a21d 100644 --- a/apps/sim/components/emcn/components/calendar/calendar.test.ts +++ b/packages/emcn/src/components/calendar/calendar.test.ts @@ -2,11 +2,7 @@ * @vitest-environment node */ import { describe, expect, it } from 'vitest' -import { - buildRangeBounds, - formatDateRangeLabel, - parseDateValue, -} from '@/components/emcn/components/calendar/calendar' +import { buildRangeBounds, formatDateRangeLabel, parseDateValue } from './calendar' describe('parseDateValue', () => { it('parses a YYYY-MM-DD string as a local day', () => { diff --git a/apps/sim/components/emcn/components/calendar/calendar.tsx b/packages/emcn/src/components/calendar/calendar.tsx similarity index 97% rename from apps/sim/components/emcn/components/calendar/calendar.tsx rename to packages/emcn/src/components/calendar/calendar.tsx index 16f6548eaa4..cb1af8e0fe7 100644 --- a/apps/sim/components/emcn/components/calendar/calendar.tsx +++ b/packages/emcn/src/components/calendar/calendar.tsx @@ -2,11 +2,11 @@ import { useEffect, useMemo, useState } from 'react' import { ChevronLeft, ChevronRight } from 'lucide-react' -import { CalendarDayCell } from '@/components/emcn/components/calendar/calendar-day-cell' -import { Chip, chipVariants } from '@/components/emcn/components/chip/chip' -import { chipContentLabelClass } from '@/components/emcn/components/chip/chip-chrome' -import { ChipTimePicker } from '@/components/emcn/components/chip-time-picker/chip-time-picker' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' +import { Chip, chipVariants } from '../chip/chip' +import { chipContentLabelClass } from '../chip/chip-chrome' +import { ChipTimePicker } from '../chip-time-picker/chip-time-picker' +import { CalendarDayCell } from './calendar-day-cell' const MONTHS = [ 'January', diff --git a/apps/sim/components/emcn/components/checkbox/checkbox.tsx b/packages/emcn/src/components/checkbox/checkbox.tsx similarity index 98% rename from apps/sim/components/emcn/components/checkbox/checkbox.tsx rename to packages/emcn/src/components/checkbox/checkbox.tsx index ae63f9f26ce..92c5dee6f90 100644 --- a/apps/sim/components/emcn/components/checkbox/checkbox.tsx +++ b/packages/emcn/src/components/checkbox/checkbox.tsx @@ -4,7 +4,7 @@ import * as React from 'react' import * as CheckboxPrimitive from '@radix-ui/react-checkbox' import { cva, type VariantProps } from 'class-variance-authority' import { Check, Minus } from 'lucide-react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' /** * Variant styles for the Checkbox component. diff --git a/apps/sim/components/emcn/components/chip-combobox/chip-combobox.tsx b/packages/emcn/src/components/chip-combobox/chip-combobox.tsx similarity index 90% rename from apps/sim/components/emcn/components/chip-combobox/chip-combobox.tsx rename to packages/emcn/src/components/chip-combobox/chip-combobox.tsx index 6e65dd27655..b766225e8ed 100644 --- a/apps/sim/components/emcn/components/chip-combobox/chip-combobox.tsx +++ b/packages/emcn/src/components/chip-combobox/chip-combobox.tsx @@ -1,7 +1,7 @@ 'use client' -import { Combobox, type ComboboxProps } from '@/components/emcn/components/combobox/combobox' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' +import { Combobox, type ComboboxProps } from '../combobox/combobox' /** * Chip-styled {@link Combobox}. A thin wrapper that skins the trigger to match diff --git a/apps/sim/components/emcn/components/chip-copy-input/chip-copy-input.tsx b/packages/emcn/src/components/chip-copy-input/chip-copy-input.tsx similarity index 81% rename from apps/sim/components/emcn/components/chip-copy-input/chip-copy-input.tsx rename to packages/emcn/src/components/chip-copy-input/chip-copy-input.tsx index b23f9c44138..cee80bf7e5c 100644 --- a/apps/sim/components/emcn/components/chip-copy-input/chip-copy-input.tsx +++ b/packages/emcn/src/components/chip-copy-input/chip-copy-input.tsx @@ -11,18 +11,18 @@ * * @example * ```tsx - * import { ChipCopyInput } from '@/components/emcn' + * import { ChipCopyInput } from '../../index' * * * ``` */ import * as React from 'react' -import { Button } from '@/components/emcn/components/button/button' -import { ChipInput, type ChipInputProps } from '@/components/emcn/components/chip-input/chip-input' -import { Tooltip } from '@/components/emcn/components/tooltip/tooltip' -import { Check, Duplicate } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' -import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard' +import { useCopyToClipboard } from '../../hooks/use-copy-to-clipboard' +import { Check, Duplicate } from '../../icons' +import { cn } from '../../lib/cn' +import { Button } from '../button/button' +import { ChipInput, type ChipInputProps } from '../chip-input/chip-input' +import { Tooltip } from '../tooltip/tooltip' export interface ChipCopyInputProps extends Omit { diff --git a/apps/sim/components/emcn/components/chip-date-picker/chip-date-picker.tsx b/packages/emcn/src/components/chip-date-picker/chip-date-picker.tsx similarity index 91% rename from apps/sim/components/emcn/components/chip-date-picker/chip-date-picker.tsx rename to packages/emcn/src/components/chip-date-picker/chip-date-picker.tsx index 0e1d3dc972c..bcc1a3ce07c 100644 --- a/apps/sim/components/emcn/components/chip-date-picker/chip-date-picker.tsx +++ b/packages/emcn/src/components/chip-date-picker/chip-date-picker.tsx @@ -2,16 +2,12 @@ import { forwardRef, useState } from 'react' import * as PopoverPrimitive from '@radix-ui/react-popover' -import { - Calendar, - formatDateLabel, - formatDateRangeLabel, -} from '@/components/emcn/components/calendar/calendar' -import { chipVariants, TRIGGER_BORDER_CLASS } from '@/components/emcn/components/chip/chip' -import { chipContentLabelClass } from '@/components/emcn/components/chip/chip-chrome' -import { POPOVER_ANIMATION_CLASSES } from '@/components/emcn/components/popover/popover-animation' -import { ChevronDown } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +import { ChevronDown } from '../../icons' +import { cn } from '../../lib/cn' +import { Calendar, formatDateLabel, formatDateRangeLabel } from '../calendar/calendar' +import { chipVariants, TRIGGER_BORDER_CLASS } from '../chip/chip' +import { chipContentLabelClass } from '../chip/chip-chrome' +import { POPOVER_ANIMATION_CLASSES } from '../popover/popover-animation' interface ChipDatePickerBaseProps { /** diff --git a/apps/sim/components/emcn/components/chip-dropdown/chip-dropdown.tsx b/packages/emcn/src/components/chip-dropdown/chip-dropdown.tsx similarity index 97% rename from apps/sim/components/emcn/components/chip-dropdown/chip-dropdown.tsx rename to packages/emcn/src/components/chip-dropdown/chip-dropdown.tsx index 116eec410f0..244b09b6585 100644 --- a/apps/sim/components/emcn/components/chip-dropdown/chip-dropdown.tsx +++ b/packages/emcn/src/components/chip-dropdown/chip-dropdown.tsx @@ -9,17 +9,17 @@ import { useState, } from 'react' import type { VariantProps } from 'class-variance-authority' -import { chipVariants, TRIGGER_BORDER_CLASS } from '@/components/emcn/components/chip/chip' +import { Check, ChevronDown } from '../../icons' +import { cn } from '../../lib/cn' +import { chipVariants, TRIGGER_BORDER_CLASS } from '../chip/chip' import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSearchInput, DropdownMenuTrigger, -} from '@/components/emcn/components/dropdown-menu/dropdown-menu' -import { InsideModalContext } from '@/components/emcn/components/modal/modal' -import { Check, ChevronDown } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +} from '../dropdown-menu/dropdown-menu' +import { InsideModalContext } from '../modal/modal' type ChipIcon = ComponentType<{ className?: string }> diff --git a/apps/sim/components/emcn/components/chip-input/chip-input.tsx b/packages/emcn/src/components/chip-input/chip-input.tsx similarity index 93% rename from apps/sim/components/emcn/components/chip-input/chip-input.tsx rename to packages/emcn/src/components/chip-input/chip-input.tsx index 65c8017bd84..9cb72304fe3 100644 --- a/apps/sim/components/emcn/components/chip-input/chip-input.tsx +++ b/packages/emcn/src/components/chip-input/chip-input.tsx @@ -16,7 +16,7 @@ * * @example * ```tsx - * import { ChipInput, Search } from '@/components/emcn' + * import { ChipInput, Search } from '../../index' * * // Search box * setQ(e.target.value)} /> @@ -26,11 +26,8 @@ * ``` */ import * as React from 'react' -import { - chipFieldSurfaceClass, - chipFieldTextClass, -} from '@/components/emcn/components/chip/chip-chrome' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' +import { chipFieldSurfaceClass, chipFieldTextClass } from '../chip/chip-chrome' type ChipInputIcon = React.ComponentType<{ className?: string }> diff --git a/apps/sim/components/emcn/components/chip-modal/chip-modal.tsx b/packages/emcn/src/components/chip-modal/chip-modal.tsx similarity index 96% rename from apps/sim/components/emcn/components/chip-modal/chip-modal.tsx rename to packages/emcn/src/components/chip-modal/chip-modal.tsx index 433cc78ad70..dbf0e8cdd0a 100644 --- a/apps/sim/components/emcn/components/chip-modal/chip-modal.tsx +++ b/packages/emcn/src/components/chip-modal/chip-modal.tsx @@ -40,27 +40,33 @@ import * as React from 'react' import { X } from 'lucide-react' -import { Button } from '@/components/emcn/components/button/button' -import { Chip, type ChipProps } from '@/components/emcn/components/chip/chip' -import { - chipContentIconClass, - chipContentLabelClass, -} from '@/components/emcn/components/chip/chip-chrome' -import { ChipCopyInput } from '@/components/emcn/components/chip-copy-input/chip-copy-input' -import { - ChipDropdown, - type ChipDropdownOption, -} from '@/components/emcn/components/chip-dropdown/chip-dropdown' -import { ChipInput } from '@/components/emcn/components/chip-input/chip-input' -import { ChipSwitch } from '@/components/emcn/components/chip-switch/chip-switch' -import { ChipTextarea } from '@/components/emcn/components/chip-textarea/chip-textarea' -import { Label } from '@/components/emcn/components/label/label' -import { Modal, ModalContent } from '@/components/emcn/components/modal/modal' -import { TagInput, type TagItem } from '@/components/emcn/components/tag-input/tag-input' -import { Tooltip } from '@/components/emcn/components/tooltip/tooltip' -import { Loader } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' -import { quickValidateEmail } from '@/lib/messaging/email/validation' +import { Loader } from '../../icons' +import { cn } from '../../lib/cn' +import { Button } from '../button/button' +import { Chip, type ChipProps } from '../chip/chip' +import { chipContentIconClass, chipContentLabelClass } from '../chip/chip-chrome' +import { ChipCopyInput } from '../chip-copy-input/chip-copy-input' +import { ChipDropdown, type ChipDropdownOption } from '../chip-dropdown/chip-dropdown' +import { ChipInput } from '../chip-input/chip-input' +import { ChipSwitch } from '../chip-switch/chip-switch' +import { ChipTextarea } from '../chip-textarea/chip-textarea' +import { Label } from '../label/label' +import { Modal, ModalContent } from '../modal/modal' +import { TagInput, type TagItem } from '../tag-input/tag-input' +import { Tooltip } from '../tooltip/tooltip' + +/** + * Generic RFC 5322 email syntax gate for the `type='emails'` field. This is + * deliberately format-only — app-specific policy (disposable domains, MX/DNS, + * membership rules) is the consumer's concern and flows through the field's + * `validate` prop, keeping that logic in the app rather than the design system. + */ +const EMAIL_SYNTAX_REGEX = + /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/ + +function isValidEmailSyntax(email: string): boolean { + return EMAIL_SYNTAX_REGEX.test(email) && email.length <= 254 +} /** * The modal's hairline divider — used by the header and footer edges, and @@ -731,12 +737,8 @@ function ChipModalEmailsControl({ const current = itemsRef.current if (current.some((item) => item.value === email)) return false - const formatCheck = quickValidateEmail(email) - if (!formatCheck.isValid) { - commitItems([ - ...current, - { value: email, isValid: false, error: formatCheck.reason ?? 'Invalid email format' }, - ]) + if (!isValidEmailSyntax(email)) { + commitItems([...current, { value: email, isValid: false, error: 'Invalid email format' }]) return false } diff --git a/apps/sim/components/emcn/components/chip-select/chip-select.tsx b/packages/emcn/src/components/chip-select/chip-select.tsx similarity index 97% rename from apps/sim/components/emcn/components/chip-select/chip-select.tsx rename to packages/emcn/src/components/chip-select/chip-select.tsx index e30a40165c4..c4fb30b975e 100644 --- a/apps/sim/components/emcn/components/chip-select/chip-select.tsx +++ b/packages/emcn/src/components/chip-select/chip-select.tsx @@ -1,7 +1,9 @@ 'use client' import * as React from 'react' -import { chipVariants, TRIGGER_BORDER_CLASS } from '@/components/emcn/components/chip/chip' +import { ChevronDown } from '../../icons' +import { cn } from '../../lib/cn' +import { chipVariants, TRIGGER_BORDER_CLASS } from '../chip/chip' import { DropdownMenu, DropdownMenuCheckboxItem, @@ -10,9 +12,7 @@ import { DropdownMenuLabel, DropdownMenuSearchInput, DropdownMenuTrigger, -} from '@/components/emcn/components/dropdown-menu/dropdown-menu' -import { ChevronDown } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +} from '../dropdown-menu/dropdown-menu' /** A selectable option in a {@link ChipSelect}. */ export interface ChipSelectOption { diff --git a/apps/sim/components/emcn/components/chip-switch/chip-switch.tsx b/packages/emcn/src/components/chip-switch/chip-switch.tsx similarity index 96% rename from apps/sim/components/emcn/components/chip-switch/chip-switch.tsx rename to packages/emcn/src/components/chip-switch/chip-switch.tsx index 2635b8ca208..717af940ba5 100644 --- a/apps/sim/components/emcn/components/chip-switch/chip-switch.tsx +++ b/packages/emcn/src/components/chip-switch/chip-switch.tsx @@ -1,8 +1,8 @@ 'use client' import type { ComponentType, ReactNode } from 'react' -import { chipVariants } from '@/components/emcn/components/chip/chip' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' +import { chipVariants } from '../chip/chip' /** * One segment in a {@link ChipSwitch}. `label` accepts a `ReactNode` so callers diff --git a/apps/sim/components/emcn/components/chip-switch/index.ts b/packages/emcn/src/components/chip-switch/index.ts similarity index 100% rename from apps/sim/components/emcn/components/chip-switch/index.ts rename to packages/emcn/src/components/chip-switch/index.ts diff --git a/apps/sim/components/emcn/components/chip-tag/chip-tag.tsx b/packages/emcn/src/components/chip-tag/chip-tag.tsx similarity index 99% rename from apps/sim/components/emcn/components/chip-tag/chip-tag.tsx rename to packages/emcn/src/components/chip-tag/chip-tag.tsx index b41b1038dc9..6aeeedfc6a8 100644 --- a/apps/sim/components/emcn/components/chip-tag/chip-tag.tsx +++ b/packages/emcn/src/components/chip-tag/chip-tag.tsx @@ -2,7 +2,7 @@ import type { ComponentType, HTMLAttributes, MouseEventHandler, ReactNode } from 'react' import { cva, type VariantProps } from 'class-variance-authority' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' /** * Small inline tag/badge — 20px tall neutral surface for compact in-line accents diff --git a/apps/sim/components/emcn/components/chip-tag/index.ts b/packages/emcn/src/components/chip-tag/index.ts similarity index 100% rename from apps/sim/components/emcn/components/chip-tag/index.ts rename to packages/emcn/src/components/chip-tag/index.ts diff --git a/apps/sim/components/emcn/components/chip-textarea/chip-textarea.tsx b/packages/emcn/src/components/chip-textarea/chip-textarea.tsx similarity index 91% rename from apps/sim/components/emcn/components/chip-textarea/chip-textarea.tsx rename to packages/emcn/src/components/chip-textarea/chip-textarea.tsx index 67f554f9208..8f891a11031 100644 --- a/apps/sim/components/emcn/components/chip-textarea/chip-textarea.tsx +++ b/packages/emcn/src/components/chip-textarea/chip-textarea.tsx @@ -14,17 +14,14 @@ * * @example * ```tsx - * import { ChipTextarea } from '@/components/emcn' + * import { ChipTextarea } from '../../index' * * * ``` */ import * as React from 'react' -import { - chipFieldSurfaceClass, - chipFieldTextClass, -} from '@/components/emcn/components/chip/chip-chrome' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' +import { chipFieldSurfaceClass, chipFieldTextClass } from '../chip/chip-chrome' export interface ChipTextareaProps extends Omit, 'size'> { diff --git a/apps/sim/components/emcn/components/chip-time-picker/chip-time-picker.tsx b/packages/emcn/src/components/chip-time-picker/chip-time-picker.tsx similarity index 97% rename from apps/sim/components/emcn/components/chip-time-picker/chip-time-picker.tsx rename to packages/emcn/src/components/chip-time-picker/chip-time-picker.tsx index 9a206b6ac5f..83d2d25964a 100644 --- a/apps/sim/components/emcn/components/chip-time-picker/chip-time-picker.tsx +++ b/packages/emcn/src/components/chip-time-picker/chip-time-picker.tsx @@ -1,8 +1,8 @@ 'use client' import * as React from 'react' -import { ChipInput } from '@/components/emcn/components/chip-input/chip-input' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' +import { ChipInput } from '../chip-input/chip-input' /** * Formats an `HH:mm` (24h) value as the 12h display label (`9:30 AM`). diff --git a/apps/sim/components/emcn/components/chip/chip-chevron.tsx b/packages/emcn/src/components/chip/chip-chevron.tsx similarity index 91% rename from apps/sim/components/emcn/components/chip/chip-chevron.tsx rename to packages/emcn/src/components/chip/chip-chevron.tsx index 6b2e9fcdc67..aaafd4b0587 100644 --- a/apps/sim/components/emcn/components/chip/chip-chevron.tsx +++ b/packages/emcn/src/components/chip/chip-chevron.tsx @@ -1,5 +1,5 @@ -import { ChevronDown } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +import { ChevronDown } from '../../icons' +import { cn } from '../../lib/cn' interface ChipChevronDownProps { /** Layout-only extras (e.g. `ml-auto` to push the chevron flush right). Never chrome. */ diff --git a/apps/sim/components/emcn/components/chip/chip-chrome.ts b/packages/emcn/src/components/chip/chip-chrome.ts similarity index 100% rename from apps/sim/components/emcn/components/chip/chip-chrome.ts rename to packages/emcn/src/components/chip/chip-chrome.ts diff --git a/apps/sim/components/emcn/components/chip/chip.tsx b/packages/emcn/src/components/chip/chip.tsx similarity index 98% rename from apps/sim/components/emcn/components/chip/chip.tsx rename to packages/emcn/src/components/chip/chip.tsx index b915fac533d..764fd2f6039 100644 --- a/apps/sim/components/emcn/components/chip/chip.tsx +++ b/packages/emcn/src/components/chip/chip.tsx @@ -9,14 +9,14 @@ import { } from 'react' import { cva, type VariantProps } from 'class-variance-authority' import Link, { type LinkProps } from 'next/link' +import { cn } from '../../lib/cn' import { chipContentIconClass, chipContentLabelClass, chipFilledFillTokens, chipGeometryClass, chipPrimaryFillTokens, -} from '@/components/emcn/components/chip/chip-chrome' -import { cn } from '@/lib/core/utils/cn' +} from './chip-chrome' /** * 30px pill — the platform's most common chrome pattern. diff --git a/apps/sim/components/emcn/components/code/code.css b/packages/emcn/src/components/code/code.css similarity index 100% rename from apps/sim/components/emcn/components/code/code.css rename to packages/emcn/src/components/code/code.css diff --git a/apps/sim/components/emcn/components/code/code.tsx b/packages/emcn/src/components/code/code.tsx similarity index 99% rename from apps/sim/components/emcn/components/code/code.tsx rename to packages/emcn/src/components/code/code.tsx index f157e4d991f..0bb1c5c336a 100644 --- a/apps/sim/components/emcn/components/code/code.tsx +++ b/packages/emcn/src/components/code/code.tsx @@ -12,7 +12,7 @@ import { } from 'react' import { useVirtualizer } from '@tanstack/react-virtual' import { ChevronRight } from 'lucide-react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' import './code.css' /** @@ -26,7 +26,7 @@ type PrismModule = typeof import('./prism') * * Prism (core + the side-effectful JS/Python/JSON grammar registrations) is kept * out of this module's static import graph so it never lands in bundles that only - * pull `Code` through the shared `@/components/emcn` barrel. It is loaded once per + * pull `Code` through the shared `@sim/emcn` barrel. It is loaded once per * session on the first highlight and cached here for all subsequent viewers. */ let prismModulePromise: Promise | null = null diff --git a/apps/sim/components/emcn/components/code/copy-code-button.tsx b/packages/emcn/src/components/code/copy-code-button.tsx similarity index 75% rename from apps/sim/components/emcn/components/code/copy-code-button.tsx rename to packages/emcn/src/components/code/copy-code-button.tsx index e68493cea88..2c1c30046b3 100644 --- a/apps/sim/components/emcn/components/code/copy-code-button.tsx +++ b/packages/emcn/src/components/code/copy-code-button.tsx @@ -1,8 +1,8 @@ 'use client' -import { Button, Check, Duplicate } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard' +import { useCopyToClipboard } from '../../hooks/use-copy-to-clipboard' +import { Button, Check, Duplicate } from '../../index' +import { cn } from '../../lib/cn' interface CopyCodeButtonProps { code: string diff --git a/apps/sim/components/emcn/components/code/prism.ts b/packages/emcn/src/components/code/prism.ts similarity index 92% rename from apps/sim/components/emcn/components/code/prism.ts rename to packages/emcn/src/components/code/prism.ts index f80e3faa8dd..0aebddbf6ae 100644 --- a/apps/sim/components/emcn/components/code/prism.ts +++ b/packages/emcn/src/components/code/prism.ts @@ -11,7 +11,7 @@ import 'prismjs/components/prism-json' * imports them as having side effects and therefore non-tree-shakeable. Keeping * them here — rather than in `code.tsx` — ensures Prism only enters bundles that * actually import `highlight`/`languages`, instead of every consumer of the - * shared `@/components/emcn` barrel (which re-exports `Code`). + * shared `@sim/emcn` barrel (which re-exports `Code`). * * `code.tsx` itself never imports this module statically; it loads it lazily via * dynamic `import()` on first highlight. diff --git a/apps/sim/components/emcn/components/collapsible-card/collapsible-card.tsx b/packages/emcn/src/components/collapsible-card/collapsible-card.tsx similarity index 94% rename from apps/sim/components/emcn/components/collapsible-card/collapsible-card.tsx rename to packages/emcn/src/components/collapsible-card/collapsible-card.tsx index c4df054d3d9..fc8a942726b 100644 --- a/apps/sim/components/emcn/components/collapsible-card/collapsible-card.tsx +++ b/packages/emcn/src/components/collapsible-card/collapsible-card.tsx @@ -1,8 +1,8 @@ 'use client' import type * as React from 'react' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' +import { cn } from '../../lib/cn' +import { handleKeyboardActivation } from '../../lib/keyboard' export interface CollapsibleCardProps { /** Header label (rendered in the standard truncated field-title style). */ diff --git a/apps/sim/components/emcn/components/combobox/combobox.tsx b/packages/emcn/src/components/combobox/combobox.tsx similarity index 99% rename from apps/sim/components/emcn/components/combobox/combobox.tsx rename to packages/emcn/src/components/combobox/combobox.tsx index 18465d3da7e..fc4804c4b66 100644 --- a/apps/sim/components/emcn/components/combobox/combobox.tsx +++ b/packages/emcn/src/components/combobox/combobox.tsx @@ -16,8 +16,8 @@ import { } from 'react' import { cva, type VariantProps } from 'class-variance-authority' import { Check, ChevronDown, Search } from 'lucide-react' -import { cn } from '@/lib/core/utils/cn' import { Loader } from '../../icons' +import { cn } from '../../lib/cn' import { Input } from '../input/input' import { Popover, PopoverAnchor, PopoverContent, PopoverScrollArea } from '../popover/popover' diff --git a/apps/sim/components/emcn/components/dropdown-menu/dropdown-menu.tsx b/packages/emcn/src/components/dropdown-menu/dropdown-menu.tsx similarity index 98% rename from apps/sim/components/emcn/components/dropdown-menu/dropdown-menu.tsx rename to packages/emcn/src/components/dropdown-menu/dropdown-menu.tsx index 19dcc7db78b..eaac04246ff 100644 --- a/apps/sim/components/emcn/components/dropdown-menu/dropdown-menu.tsx +++ b/packages/emcn/src/components/dropdown-menu/dropdown-menu.tsx @@ -23,9 +23,9 @@ import * as React from 'react' import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu' import { Check, ChevronRight, Circle, Search } from 'lucide-react' -import { chipFieldSurfaceClass } from '@/components/emcn/components/chip/chip-chrome' -import { InsideModalContext } from '@/components/emcn/components/modal/modal' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' +import { chipFieldSurfaceClass } from '../chip/chip-chrome' +import { InsideModalContext } from '../modal/modal' const ANIMATION_CLASSES = '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 data-[state=closed]:animate-out data-[state=open]:animate-in motion-reduce:animate-none' diff --git a/apps/sim/components/emcn/components/expandable/expandable.tsx b/packages/emcn/src/components/expandable/expandable.tsx similarity index 97% rename from apps/sim/components/emcn/components/expandable/expandable.tsx rename to packages/emcn/src/components/expandable/expandable.tsx index 2c04cb56532..62d89db9df5 100644 --- a/apps/sim/components/emcn/components/expandable/expandable.tsx +++ b/packages/emcn/src/components/expandable/expandable.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import * as CollapsiblePrimitive from '@radix-ui/react-collapsible' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' /** * Expandable root that controls the open/closed state. diff --git a/apps/sim/components/emcn/components/field-divider/field-divider.tsx b/packages/emcn/src/components/field-divider/field-divider.tsx similarity index 97% rename from apps/sim/components/emcn/components/field-divider/field-divider.tsx rename to packages/emcn/src/components/field-divider/field-divider.tsx index 018b4678f35..7408a21360f 100644 --- a/apps/sim/components/emcn/components/field-divider/field-divider.tsx +++ b/packages/emcn/src/components/field-divider/field-divider.tsx @@ -1,4 +1,4 @@ -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' const DASHED_DIVIDER_STYLE = { backgroundImage: diff --git a/apps/sim/components/emcn/components/index.ts b/packages/emcn/src/components/index.ts similarity index 96% rename from apps/sim/components/emcn/components/index.ts rename to packages/emcn/src/components/index.ts index a3eb10ae725..4fde80b8f51 100644 --- a/apps/sim/components/emcn/components/index.ts +++ b/packages/emcn/src/components/index.ts @@ -1,5 +1,5 @@ export { Avatar, AvatarFallback, AvatarImage } from './avatar/avatar' -export { Badge } from './badge/badge' +export { Badge, type BadgeProps } from './badge/badge' export { Banner } from './banner/banner' export { Button, buttonVariants } from './button/button' export { ButtonGroup, ButtonGroupItem } from './button-group/button-group' @@ -8,7 +8,14 @@ export { type CalendarDayCellProps, } from './calendar/calendar-day-cell' export { Checkbox } from './checkbox/checkbox' -export { Chip, ChipLink, chipVariants } from './chip/chip' +export { + Chip, + ChipLink, + type ChipLinkProps, + type ChipProps, + chipVariants, + TRIGGER_BORDER_CLASS, +} from './chip/chip' export { ChipChevronDown } from './chip/chip-chevron' export { cellIconNodeClass, @@ -17,6 +24,7 @@ export { chipContentLabelClass, chipFieldSurfaceClass, chipFieldTextClass, + chipFilledFillTokens, chipFilledSurfaceTokens, chipGeometryClass, chipPrimaryFillTokens, diff --git a/apps/sim/components/emcn/components/info-card/info-card.tsx b/packages/emcn/src/components/info-card/info-card.tsx similarity index 98% rename from apps/sim/components/emcn/components/info-card/info-card.tsx rename to packages/emcn/src/components/info-card/info-card.tsx index b803620ff00..397818c195d 100644 --- a/apps/sim/components/emcn/components/info-card/info-card.tsx +++ b/packages/emcn/src/components/info-card/info-card.tsx @@ -21,7 +21,7 @@ import * as React from 'react' import { Check } from 'lucide-react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' export interface InfoCardProps extends React.HTMLAttributes {} diff --git a/apps/sim/components/emcn/components/info/info.tsx b/packages/emcn/src/components/info/info.tsx similarity index 94% rename from apps/sim/components/emcn/components/info/info.tsx rename to packages/emcn/src/components/info/info.tsx index fe2a70b1c8b..7ceb6323244 100644 --- a/apps/sim/components/emcn/components/info/info.tsx +++ b/packages/emcn/src/components/info/info.tsx @@ -1,8 +1,8 @@ 'use client' import type { ReactNode } from 'react' -import { Tooltip } from '@/components/emcn/components/tooltip/tooltip' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' +import { Tooltip } from '../tooltip/tooltip' /** * Tooltip placement side. diff --git a/apps/sim/components/emcn/components/input-otp/input-otp.tsx b/packages/emcn/src/components/input-otp/input-otp.tsx similarity index 96% rename from apps/sim/components/emcn/components/input-otp/input-otp.tsx rename to packages/emcn/src/components/input-otp/input-otp.tsx index 8951c415895..a649d7b0626 100644 --- a/apps/sim/components/emcn/components/input-otp/input-otp.tsx +++ b/packages/emcn/src/components/input-otp/input-otp.tsx @@ -5,7 +5,7 @@ * * @example * ```tsx - * import { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/emcn' + * import { InputOTP, InputOTPGroup, InputOTPSlot } from '../../index' * * * @@ -29,7 +29,7 @@ import * as React from 'react' import { OTPInput, OTPInputContext } from 'input-otp' import { Minus } from 'lucide-react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' /** * Root OTP input component. Manages the overall input state and layout. diff --git a/apps/sim/components/emcn/components/input/input.tsx b/packages/emcn/src/components/input/input.tsx similarity index 92% rename from apps/sim/components/emcn/components/input/input.tsx rename to packages/emcn/src/components/input/input.tsx index 70ba6381051..7b3dd35b67b 100644 --- a/apps/sim/components/emcn/components/input/input.tsx +++ b/packages/emcn/src/components/input/input.tsx @@ -3,7 +3,7 @@ * * @example * ```tsx - * import { Input } from '@/components/emcn' + * import { Input } from '../../index' * * // Basic usage * @@ -18,7 +18,7 @@ * For chip-styled surfaces use {@link ChipInput} instead. */ import * as React from 'react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' const INPUT_CLASS = 'flex w-full touch-manipulation rounded-sm border border-[var(--border-1)] bg-[var(--surface-5)] px-2 py-1.5 font-medium font-sans text-sm text-[var(--text-primary)] transition-colors placeholder:text-[var(--text-muted)] outline-none disabled:cursor-not-allowed disabled:opacity-50 scroll-pr-1' diff --git a/apps/sim/components/emcn/components/label/label.tsx b/packages/emcn/src/components/label/label.tsx similarity index 96% rename from apps/sim/components/emcn/components/label/label.tsx rename to packages/emcn/src/components/label/label.tsx index aad8b54b381..a4623bca65a 100644 --- a/apps/sim/components/emcn/components/label/label.tsx +++ b/packages/emcn/src/components/label/label.tsx @@ -1,7 +1,7 @@ 'use client' import * as LabelPrimitive from '@radix-ui/react-label' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' export interface LabelProps extends React.ComponentPropsWithoutRef {} diff --git a/apps/sim/components/emcn/components/modal/auto-focus.ts b/packages/emcn/src/components/modal/auto-focus.ts similarity index 100% rename from apps/sim/components/emcn/components/modal/auto-focus.ts rename to packages/emcn/src/components/modal/auto-focus.ts diff --git a/apps/sim/components/emcn/components/modal/modal.tsx b/packages/emcn/src/components/modal/modal.tsx similarity index 99% rename from apps/sim/components/emcn/components/modal/modal.tsx rename to packages/emcn/src/components/modal/modal.tsx index 7e9de9430a5..ae78693064f 100644 --- a/apps/sim/components/emcn/components/modal/modal.tsx +++ b/packages/emcn/src/components/modal/modal.tsx @@ -41,7 +41,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog' import * as TabsPrimitive from '@radix-ui/react-tabs' import { X } from 'lucide-react' import { usePathname } from 'next/navigation' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' import { Button } from '../button/button' import { focusFirstTextInput, focusFirstTextInputIn } from './auto-focus' diff --git a/apps/sim/components/emcn/components/popover/popover-animation.ts b/packages/emcn/src/components/popover/popover-animation.ts similarity index 100% rename from apps/sim/components/emcn/components/popover/popover-animation.ts rename to packages/emcn/src/components/popover/popover-animation.ts diff --git a/apps/sim/components/emcn/components/popover/popover.tsx b/packages/emcn/src/components/popover/popover.tsx similarity index 99% rename from apps/sim/components/emcn/components/popover/popover.tsx rename to packages/emcn/src/components/popover/popover.tsx index 2455cd70c38..6efb2c52cbb 100644 --- a/apps/sim/components/emcn/components/popover/popover.tsx +++ b/packages/emcn/src/components/popover/popover.tsx @@ -5,7 +5,7 @@ * @example * Basic usage with folders: * ```tsx - * import { Popover, PopoverAnchor, PopoverBackButton, PopoverContent, PopoverFolder, PopoverItem } from '@/components/emcn' + * import { Popover, PopoverAnchor, PopoverBackButton, PopoverContent, PopoverFolder, PopoverItem } from '../../index' * import { Workflow, Bot } from 'lucide-react' * * function MyMenu() { @@ -54,7 +54,7 @@ import { DismissableLayerBranch } from '@radix-ui/react-dismissable-layer' import * as PopoverPrimitive from '@radix-ui/react-popover' import { Check, ChevronLeft, ChevronRight, Search } from 'lucide-react' import { createPortal } from 'react-dom' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' type PopoverSize = 'sm' | 'md' type PopoverColorScheme = 'default' | 'inverted' diff --git a/apps/sim/components/emcn/components/progress-item/progress-item.tsx b/packages/emcn/src/components/progress-item/progress-item.tsx similarity index 97% rename from apps/sim/components/emcn/components/progress-item/progress-item.tsx rename to packages/emcn/src/components/progress-item/progress-item.tsx index 03ac17da363..91991b73e89 100644 --- a/apps/sim/components/emcn/components/progress-item/progress-item.tsx +++ b/packages/emcn/src/components/progress-item/progress-item.tsx @@ -1,8 +1,8 @@ import { forwardRef, type HTMLAttributes } from 'react' import { cva, type VariantProps } from 'class-variance-authority' import { AlertTriangle } from 'lucide-react' -import { Check, Loader, Square, X } from '@/components/emcn/icons' -import { cn } from '@/lib/core/utils/cn' +import { Check, Loader, Square, X } from '../../icons' +import { cn } from '../../lib/cn' const progressItemVariants = cva('flex items-start gap-2.5 px-3 py-3 text-[12px]', { variants: { diff --git a/apps/sim/components/emcn/components/secret-input/secret-input.tsx b/packages/emcn/src/components/secret-input/secret-input.tsx similarity index 97% rename from apps/sim/components/emcn/components/secret-input/secret-input.tsx rename to packages/emcn/src/components/secret-input/secret-input.tsx index b62c717168a..359e9f1d5ae 100644 --- a/apps/sim/components/emcn/components/secret-input/secret-input.tsx +++ b/packages/emcn/src/components/secret-input/secret-input.tsx @@ -11,7 +11,7 @@ * * @example * ```tsx - * import { SecretInput } from '@/components/emcn' + * import { SecretInput } from '../../index' * * * @@ -18,9 +18,9 @@ */ 'use client' -import { Button, Check, Duplicate } from '@/components/emcn' -import { cn } from '@/lib/core/utils/cn' -import { useCopyToClipboard } from '@/hooks/use-copy-to-clipboard' +import { useCopyToClipboard } from '../../hooks/use-copy-to-clipboard' +import { Button, Check, Duplicate } from '../../index' +import { cn } from '../../lib/cn' const REDACTED_DOTS = '••••••••••••••••••••••••••••••••' diff --git a/apps/sim/components/emcn/components/skeleton/skeleton.tsx b/packages/emcn/src/components/skeleton/skeleton.tsx similarity index 91% rename from apps/sim/components/emcn/components/skeleton/skeleton.tsx rename to packages/emcn/src/components/skeleton/skeleton.tsx index 7dbee5edc01..00a129c5e15 100644 --- a/apps/sim/components/emcn/components/skeleton/skeleton.tsx +++ b/packages/emcn/src/components/skeleton/skeleton.tsx @@ -1,4 +1,4 @@ -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' /** * Placeholder loading skeleton with a subtle pulse animation. diff --git a/apps/sim/components/emcn/components/slider/slider.tsx b/packages/emcn/src/components/slider/slider.tsx similarity index 97% rename from apps/sim/components/emcn/components/slider/slider.tsx rename to packages/emcn/src/components/slider/slider.tsx index 9991a728eb0..c9435557284 100644 --- a/apps/sim/components/emcn/components/slider/slider.tsx +++ b/packages/emcn/src/components/slider/slider.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import * as SliderPrimitive from '@radix-ui/react-slider' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' interface SliderProps extends React.ComponentPropsWithoutRef {} diff --git a/apps/sim/components/emcn/components/switch/switch.tsx b/packages/emcn/src/components/switch/switch.tsx similarity index 97% rename from apps/sim/components/emcn/components/switch/switch.tsx rename to packages/emcn/src/components/switch/switch.tsx index 3c4fb8b3007..2e0e6fd3d8b 100644 --- a/apps/sim/components/emcn/components/switch/switch.tsx +++ b/packages/emcn/src/components/switch/switch.tsx @@ -2,7 +2,7 @@ import * as React from 'react' import * as SwitchPrimitives from '@radix-ui/react-switch' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' /** * Switch component styled to match Sim's design system. diff --git a/apps/sim/components/emcn/components/table/table.tsx b/packages/emcn/src/components/table/table.tsx similarity index 98% rename from apps/sim/components/emcn/components/table/table.tsx rename to packages/emcn/src/components/table/table.tsx index 5b418063166..498c0067c4f 100644 --- a/apps/sim/components/emcn/components/table/table.tsx +++ b/packages/emcn/src/components/table/table.tsx @@ -1,5 +1,5 @@ import * as React from 'react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' /** * A simple Table component for displaying data. diff --git a/apps/sim/components/emcn/components/tag-input/tag-input.tsx b/packages/emcn/src/components/tag-input/tag-input.tsx similarity index 98% rename from apps/sim/components/emcn/components/tag-input/tag-input.tsx rename to packages/emcn/src/components/tag-input/tag-input.tsx index 49fd7e8d75b..7df84dbba29 100644 --- a/apps/sim/components/emcn/components/tag-input/tag-input.tsx +++ b/packages/emcn/src/components/tag-input/tag-input.tsx @@ -3,7 +3,7 @@ * * @example * ```tsx - * import { TagInput, type TagItem } from '@/components/emcn' + * import { TagInput, type TagItem } from '../../index' * * const [items, setItems] = useState([]) * @@ -40,10 +40,10 @@ import * as React from 'react' import { cva, type VariantProps } from 'class-variance-authority' import { Paperclip, Plus, X } from 'lucide-react' -import { ChipTag, chipTagVariants } from '@/components/emcn/components/chip-tag/chip-tag' -import { Tooltip } from '@/components/emcn/components/tooltip/tooltip' -import { cn } from '@/lib/core/utils/cn' -import { handleKeyboardActivation } from '@/lib/core/utils/keyboard' +import { cn } from '../../lib/cn' +import { handleKeyboardActivation } from '../../lib/keyboard' +import { ChipTag, chipTagVariants } from '../chip-tag/chip-tag' +import { Tooltip } from '../tooltip/tooltip' /** * Variant styles for the TagInput container. diff --git a/apps/sim/components/emcn/components/textarea/textarea.tsx b/packages/emcn/src/components/textarea/textarea.tsx similarity index 96% rename from apps/sim/components/emcn/components/textarea/textarea.tsx rename to packages/emcn/src/components/textarea/textarea.tsx index a6d8676acf8..df545c83614 100644 --- a/apps/sim/components/emcn/components/textarea/textarea.tsx +++ b/packages/emcn/src/components/textarea/textarea.tsx @@ -1,6 +1,6 @@ import * as React from 'react' import { cva, type VariantProps } from 'class-variance-authority' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' const textareaVariants = cva( 'flex w-full touch-manipulation rounded-sm border border-[var(--border-1)] bg-[var(--surface-5)] px-2 py-2 font-medium font-sans text-sm text-[var(--text-primary)] transition-colors placeholder:text-[var(--text-muted)] outline-none resize-none overflow-auto disabled:cursor-not-allowed disabled:opacity-50', diff --git a/apps/sim/components/emcn/components/time-picker/time-picker.tsx b/packages/emcn/src/components/time-picker/time-picker.tsx similarity index 98% rename from apps/sim/components/emcn/components/time-picker/time-picker.tsx rename to packages/emcn/src/components/time-picker/time-picker.tsx index 0fbb163ffba..f12462ba9ce 100644 --- a/apps/sim/components/emcn/components/time-picker/time-picker.tsx +++ b/packages/emcn/src/components/time-picker/time-picker.tsx @@ -28,12 +28,8 @@ import * as React from 'react' import { cva, type VariantProps } from 'class-variance-authority' import { ChevronDown } from 'lucide-react' -import { - Popover, - PopoverAnchor, - PopoverContent, -} from '@/components/emcn/components/popover/popover' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' +import { Popover, PopoverAnchor, PopoverContent } from '../popover/popover' /** * Variant styles for the time picker trigger. diff --git a/apps/sim/components/emcn/components/toast/toast.tsx b/packages/emcn/src/components/toast/toast.tsx similarity index 97% rename from apps/sim/components/emcn/components/toast/toast.tsx rename to packages/emcn/src/components/toast/toast.tsx index d979c2a99e0..3dee9af1541 100644 --- a/apps/sim/components/emcn/components/toast/toast.tsx +++ b/packages/emcn/src/components/toast/toast.tsx @@ -17,19 +17,16 @@ import { generateId } from '@sim/utils/id' import { AnimatePresence, motion, useReducedMotion } from 'framer-motion' import { usePathname } from 'next/navigation' import { createPortal } from 'react-dom' -import { Button } from '@/components/emcn/components/button/button' -import { Chip } from '@/components/emcn/components/chip/chip' -import { - chipContentIconClass, - chipFilledFillTokens, -} from '@/components/emcn/components/chip/chip-chrome' -import { Bell } from '@/components/emcn/icons/bell' -import { CircleAlert } from '@/components/emcn/icons/circle-alert' -import { CircleCheck } from '@/components/emcn/icons/circle-check' -import { CircleInfo } from '@/components/emcn/icons/circle-info' -import { TriangleAlert } from '@/components/emcn/icons/triangle-alert' -import { X } from '@/components/emcn/icons/x' -import { cn } from '@/lib/core/utils/cn' +import { Bell } from '../../icons/bell' +import { CircleAlert } from '../../icons/circle-alert' +import { CircleCheck } from '../../icons/circle-check' +import { CircleInfo } from '../../icons/circle-info' +import { TriangleAlert } from '../../icons/triangle-alert' +import { X } from '../../icons/x' +import { cn } from '../../lib/cn' +import { Button } from '../button/button' +import { Chip } from '../chip/chip' +import { chipContentIconClass, chipFilledFillTokens } from '../chip/chip-chrome' const AUTO_DISMISS_MS = 5000 diff --git a/apps/sim/components/emcn/components/tooltip/tooltip.tsx b/packages/emcn/src/components/tooltip/tooltip.tsx similarity index 99% rename from apps/sim/components/emcn/components/tooltip/tooltip.tsx rename to packages/emcn/src/components/tooltip/tooltip.tsx index 71671048ea8..71171e64c0d 100644 --- a/apps/sim/components/emcn/components/tooltip/tooltip.tsx +++ b/packages/emcn/src/components/tooltip/tooltip.tsx @@ -3,7 +3,7 @@ import * as React from 'react' import { Slot } from '@radix-ui/react-slot' import { createPortal } from 'react-dom' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' const TOOLTIP_OFFSET = 16 const EDGE_GUTTER = 16 diff --git a/apps/sim/components/emcn/components/wizard/wizard.tsx b/packages/emcn/src/components/wizard/wizard.tsx similarity index 99% rename from apps/sim/components/emcn/components/wizard/wizard.tsx rename to packages/emcn/src/components/wizard/wizard.tsx index 0d5f69f2233..ddece93ac7d 100644 --- a/apps/sim/components/emcn/components/wizard/wizard.tsx +++ b/packages/emcn/src/components/wizard/wizard.tsx @@ -1,7 +1,7 @@ 'use client' import * as React from 'react' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../../lib/cn' import { Button } from '../button/button' import { Modal, diff --git a/packages/emcn/src/css-modules.d.ts b/packages/emcn/src/css-modules.d.ts new file mode 100644 index 00000000000..6f79bf12d1e --- /dev/null +++ b/packages/emcn/src/css-modules.d.ts @@ -0,0 +1,8 @@ +/** + * Ambient declaration for CSS Modules so the package type-checks standalone. + * Consuming apps (Next.js) provide their own equivalent at build time. + */ +declare module '*.module.css' { + const classes: { readonly [key: string]: string } + export default classes +} diff --git a/apps/sim/hooks/use-copy-to-clipboard.ts b/packages/emcn/src/hooks/use-copy-to-clipboard.ts similarity index 100% rename from apps/sim/hooks/use-copy-to-clipboard.ts rename to packages/emcn/src/hooks/use-copy-to-clipboard.ts diff --git a/apps/sim/components/emcn/icons/animate/download.module.css b/packages/emcn/src/icons/animate/download.module.css similarity index 100% rename from apps/sim/components/emcn/icons/animate/download.module.css rename to packages/emcn/src/icons/animate/download.module.css diff --git a/apps/sim/components/emcn/icons/animate/layout.module.css b/packages/emcn/src/icons/animate/layout.module.css similarity index 100% rename from apps/sim/components/emcn/icons/animate/layout.module.css rename to packages/emcn/src/icons/animate/layout.module.css diff --git a/apps/sim/components/emcn/icons/animate/loader.module.css b/packages/emcn/src/icons/animate/loader.module.css similarity index 100% rename from apps/sim/components/emcn/icons/animate/loader.module.css rename to packages/emcn/src/icons/animate/loader.module.css diff --git a/apps/sim/components/emcn/icons/animate/pills-ring.module.css b/packages/emcn/src/icons/animate/pills-ring.module.css similarity index 100% rename from apps/sim/components/emcn/icons/animate/pills-ring.module.css rename to packages/emcn/src/icons/animate/pills-ring.module.css diff --git a/apps/sim/components/emcn/icons/arrow-down.tsx b/packages/emcn/src/icons/arrow-down.tsx similarity index 100% rename from apps/sim/components/emcn/icons/arrow-down.tsx rename to packages/emcn/src/icons/arrow-down.tsx diff --git a/apps/sim/components/emcn/icons/arrow-left.tsx b/packages/emcn/src/icons/arrow-left.tsx similarity index 100% rename from apps/sim/components/emcn/icons/arrow-left.tsx rename to packages/emcn/src/icons/arrow-left.tsx diff --git a/apps/sim/components/emcn/icons/arrow-right.tsx b/packages/emcn/src/icons/arrow-right.tsx similarity index 100% rename from apps/sim/components/emcn/icons/arrow-right.tsx rename to packages/emcn/src/icons/arrow-right.tsx diff --git a/apps/sim/components/emcn/icons/arrow-up-down.tsx b/packages/emcn/src/icons/arrow-up-down.tsx similarity index 100% rename from apps/sim/components/emcn/icons/arrow-up-down.tsx rename to packages/emcn/src/icons/arrow-up-down.tsx diff --git a/apps/sim/components/emcn/icons/arrow-up.tsx b/packages/emcn/src/icons/arrow-up.tsx similarity index 100% rename from apps/sim/components/emcn/icons/arrow-up.tsx rename to packages/emcn/src/icons/arrow-up.tsx diff --git a/apps/sim/components/emcn/icons/asterisk.tsx b/packages/emcn/src/icons/asterisk.tsx similarity index 100% rename from apps/sim/components/emcn/icons/asterisk.tsx rename to packages/emcn/src/icons/asterisk.tsx diff --git a/apps/sim/components/emcn/icons/bell.tsx b/packages/emcn/src/icons/bell.tsx similarity index 100% rename from apps/sim/components/emcn/icons/bell.tsx rename to packages/emcn/src/icons/bell.tsx diff --git a/apps/sim/components/emcn/icons/blimp.tsx b/packages/emcn/src/icons/blimp.tsx similarity index 100% rename from apps/sim/components/emcn/icons/blimp.tsx rename to packages/emcn/src/icons/blimp.tsx diff --git a/apps/sim/components/emcn/icons/book-open.tsx b/packages/emcn/src/icons/book-open.tsx similarity index 100% rename from apps/sim/components/emcn/icons/book-open.tsx rename to packages/emcn/src/icons/book-open.tsx diff --git a/apps/sim/components/emcn/icons/bubble-chat-close.tsx b/packages/emcn/src/icons/bubble-chat-close.tsx similarity index 100% rename from apps/sim/components/emcn/icons/bubble-chat-close.tsx rename to packages/emcn/src/icons/bubble-chat-close.tsx diff --git a/apps/sim/components/emcn/icons/bubble-chat-preview.tsx b/packages/emcn/src/icons/bubble-chat-preview.tsx similarity index 100% rename from apps/sim/components/emcn/icons/bubble-chat-preview.tsx rename to packages/emcn/src/icons/bubble-chat-preview.tsx diff --git a/apps/sim/components/emcn/icons/bug.tsx b/packages/emcn/src/icons/bug.tsx similarity index 100% rename from apps/sim/components/emcn/icons/bug.tsx rename to packages/emcn/src/icons/bug.tsx diff --git a/apps/sim/components/emcn/icons/calendar.tsx b/packages/emcn/src/icons/calendar.tsx similarity index 100% rename from apps/sim/components/emcn/icons/calendar.tsx rename to packages/emcn/src/icons/calendar.tsx diff --git a/apps/sim/components/emcn/icons/card.tsx b/packages/emcn/src/icons/card.tsx similarity index 100% rename from apps/sim/components/emcn/icons/card.tsx rename to packages/emcn/src/icons/card.tsx diff --git a/apps/sim/components/emcn/icons/check.tsx b/packages/emcn/src/icons/check.tsx similarity index 100% rename from apps/sim/components/emcn/icons/check.tsx rename to packages/emcn/src/icons/check.tsx diff --git a/apps/sim/components/emcn/icons/chevron-down.tsx b/packages/emcn/src/icons/chevron-down.tsx similarity index 100% rename from apps/sim/components/emcn/icons/chevron-down.tsx rename to packages/emcn/src/icons/chevron-down.tsx diff --git a/apps/sim/components/emcn/icons/circle-alert.tsx b/packages/emcn/src/icons/circle-alert.tsx similarity index 100% rename from apps/sim/components/emcn/icons/circle-alert.tsx rename to packages/emcn/src/icons/circle-alert.tsx diff --git a/apps/sim/components/emcn/icons/circle-check.tsx b/packages/emcn/src/icons/circle-check.tsx similarity index 100% rename from apps/sim/components/emcn/icons/circle-check.tsx rename to packages/emcn/src/icons/circle-check.tsx diff --git a/apps/sim/components/emcn/icons/circle-info.tsx b/packages/emcn/src/icons/circle-info.tsx similarity index 100% rename from apps/sim/components/emcn/icons/circle-info.tsx rename to packages/emcn/src/icons/circle-info.tsx diff --git a/apps/sim/components/emcn/icons/clipboard-list.tsx b/packages/emcn/src/icons/clipboard-list.tsx similarity index 100% rename from apps/sim/components/emcn/icons/clipboard-list.tsx rename to packages/emcn/src/icons/clipboard-list.tsx diff --git a/apps/sim/components/emcn/icons/clipboard.tsx b/packages/emcn/src/icons/clipboard.tsx similarity index 100% rename from apps/sim/components/emcn/icons/clipboard.tsx rename to packages/emcn/src/icons/clipboard.tsx diff --git a/apps/sim/components/emcn/icons/clock.tsx b/packages/emcn/src/icons/clock.tsx similarity index 100% rename from apps/sim/components/emcn/icons/clock.tsx rename to packages/emcn/src/icons/clock.tsx diff --git a/apps/sim/components/emcn/icons/columns2.tsx b/packages/emcn/src/icons/columns2.tsx similarity index 100% rename from apps/sim/components/emcn/icons/columns2.tsx rename to packages/emcn/src/icons/columns2.tsx diff --git a/apps/sim/components/emcn/icons/columns3.tsx b/packages/emcn/src/icons/columns3.tsx similarity index 100% rename from apps/sim/components/emcn/icons/columns3.tsx rename to packages/emcn/src/icons/columns3.tsx diff --git a/apps/sim/components/emcn/icons/connections.tsx b/packages/emcn/src/icons/connections.tsx similarity index 100% rename from apps/sim/components/emcn/icons/connections.tsx rename to packages/emcn/src/icons/connections.tsx diff --git a/apps/sim/components/emcn/icons/credit.tsx b/packages/emcn/src/icons/credit.tsx similarity index 100% rename from apps/sim/components/emcn/icons/credit.tsx rename to packages/emcn/src/icons/credit.tsx diff --git a/apps/sim/components/emcn/icons/cursor.tsx b/packages/emcn/src/icons/cursor.tsx similarity index 100% rename from apps/sim/components/emcn/icons/cursor.tsx rename to packages/emcn/src/icons/cursor.tsx diff --git a/apps/sim/components/emcn/icons/database-x.tsx b/packages/emcn/src/icons/database-x.tsx similarity index 100% rename from apps/sim/components/emcn/icons/database-x.tsx rename to packages/emcn/src/icons/database-x.tsx diff --git a/apps/sim/components/emcn/icons/database.tsx b/packages/emcn/src/icons/database.tsx similarity index 100% rename from apps/sim/components/emcn/icons/database.tsx rename to packages/emcn/src/icons/database.tsx diff --git a/apps/sim/components/emcn/icons/document-attachment.tsx b/packages/emcn/src/icons/document-attachment.tsx similarity index 100% rename from apps/sim/components/emcn/icons/document-attachment.tsx rename to packages/emcn/src/icons/document-attachment.tsx diff --git a/apps/sim/components/emcn/icons/download.tsx b/packages/emcn/src/icons/download.tsx similarity index 91% rename from apps/sim/components/emcn/icons/download.tsx rename to packages/emcn/src/icons/download.tsx index 32fd04b632f..b9ba6a660a7 100644 --- a/apps/sim/components/emcn/icons/download.tsx +++ b/packages/emcn/src/icons/download.tsx @@ -1,6 +1,6 @@ import type { SVGProps } from 'react' -import styles from '@/components/emcn/icons/animate/download.module.css' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../lib/cn' +import styles from './animate/download.module.css' export interface DownloadProps extends SVGProps { /** diff --git a/apps/sim/components/emcn/icons/duplicate.tsx b/packages/emcn/src/icons/duplicate.tsx similarity index 100% rename from apps/sim/components/emcn/icons/duplicate.tsx rename to packages/emcn/src/icons/duplicate.tsx diff --git a/apps/sim/components/emcn/icons/expand.tsx b/packages/emcn/src/icons/expand.tsx similarity index 100% rename from apps/sim/components/emcn/icons/expand.tsx rename to packages/emcn/src/icons/expand.tsx diff --git a/apps/sim/components/emcn/icons/eye-off.tsx b/packages/emcn/src/icons/eye-off.tsx similarity index 100% rename from apps/sim/components/emcn/icons/eye-off.tsx rename to packages/emcn/src/icons/eye-off.tsx diff --git a/apps/sim/components/emcn/icons/eye.tsx b/packages/emcn/src/icons/eye.tsx similarity index 100% rename from apps/sim/components/emcn/icons/eye.tsx rename to packages/emcn/src/icons/eye.tsx diff --git a/apps/sim/components/emcn/icons/file-x.tsx b/packages/emcn/src/icons/file-x.tsx similarity index 100% rename from apps/sim/components/emcn/icons/file-x.tsx rename to packages/emcn/src/icons/file-x.tsx diff --git a/apps/sim/components/emcn/icons/file.tsx b/packages/emcn/src/icons/file.tsx similarity index 100% rename from apps/sim/components/emcn/icons/file.tsx rename to packages/emcn/src/icons/file.tsx diff --git a/apps/sim/components/emcn/icons/files.tsx b/packages/emcn/src/icons/files.tsx similarity index 100% rename from apps/sim/components/emcn/icons/files.tsx rename to packages/emcn/src/icons/files.tsx diff --git a/apps/sim/components/emcn/icons/fingerprint.tsx b/packages/emcn/src/icons/fingerprint.tsx similarity index 100% rename from apps/sim/components/emcn/icons/fingerprint.tsx rename to packages/emcn/src/icons/fingerprint.tsx diff --git a/apps/sim/components/emcn/icons/folder-code.tsx b/packages/emcn/src/icons/folder-code.tsx similarity index 100% rename from apps/sim/components/emcn/icons/folder-code.tsx rename to packages/emcn/src/icons/folder-code.tsx diff --git a/apps/sim/components/emcn/icons/folder-input.tsx b/packages/emcn/src/icons/folder-input.tsx similarity index 100% rename from apps/sim/components/emcn/icons/folder-input.tsx rename to packages/emcn/src/icons/folder-input.tsx diff --git a/apps/sim/components/emcn/icons/folder-plus.tsx b/packages/emcn/src/icons/folder-plus.tsx similarity index 100% rename from apps/sim/components/emcn/icons/folder-plus.tsx rename to packages/emcn/src/icons/folder-plus.tsx diff --git a/apps/sim/components/emcn/icons/folder.tsx b/packages/emcn/src/icons/folder.tsx similarity index 100% rename from apps/sim/components/emcn/icons/folder.tsx rename to packages/emcn/src/icons/folder.tsx diff --git a/apps/sim/components/emcn/icons/hammer.tsx b/packages/emcn/src/icons/hammer.tsx similarity index 100% rename from apps/sim/components/emcn/icons/hammer.tsx rename to packages/emcn/src/icons/hammer.tsx diff --git a/apps/sim/components/emcn/icons/hand.tsx b/packages/emcn/src/icons/hand.tsx similarity index 100% rename from apps/sim/components/emcn/icons/hand.tsx rename to packages/emcn/src/icons/hand.tsx diff --git a/apps/sim/components/emcn/icons/help-circle.tsx b/packages/emcn/src/icons/help-circle.tsx similarity index 100% rename from apps/sim/components/emcn/icons/help-circle.tsx rename to packages/emcn/src/icons/help-circle.tsx diff --git a/apps/sim/components/emcn/icons/hex-simple.tsx b/packages/emcn/src/icons/hex-simple.tsx similarity index 100% rename from apps/sim/components/emcn/icons/hex-simple.tsx rename to packages/emcn/src/icons/hex-simple.tsx diff --git a/apps/sim/components/emcn/icons/home.tsx b/packages/emcn/src/icons/home.tsx similarity index 100% rename from apps/sim/components/emcn/icons/home.tsx rename to packages/emcn/src/icons/home.tsx diff --git a/apps/sim/components/emcn/icons/image-up.tsx b/packages/emcn/src/icons/image-up.tsx similarity index 100% rename from apps/sim/components/emcn/icons/image-up.tsx rename to packages/emcn/src/icons/image-up.tsx diff --git a/apps/sim/components/emcn/icons/index.ts b/packages/emcn/src/icons/index.ts similarity index 100% rename from apps/sim/components/emcn/icons/index.ts rename to packages/emcn/src/icons/index.ts diff --git a/apps/sim/components/emcn/icons/integration.tsx b/packages/emcn/src/icons/integration.tsx similarity index 100% rename from apps/sim/components/emcn/icons/integration.tsx rename to packages/emcn/src/icons/integration.tsx diff --git a/apps/sim/components/emcn/icons/key-square.tsx b/packages/emcn/src/icons/key-square.tsx similarity index 100% rename from apps/sim/components/emcn/icons/key-square.tsx rename to packages/emcn/src/icons/key-square.tsx diff --git a/apps/sim/components/emcn/icons/key.tsx b/packages/emcn/src/icons/key.tsx similarity index 100% rename from apps/sim/components/emcn/icons/key.tsx rename to packages/emcn/src/icons/key.tsx diff --git a/apps/sim/components/emcn/icons/layout.tsx b/packages/emcn/src/icons/layout.tsx similarity index 94% rename from apps/sim/components/emcn/icons/layout.tsx rename to packages/emcn/src/icons/layout.tsx index 788e477426d..c2eea996ffe 100644 --- a/apps/sim/components/emcn/icons/layout.tsx +++ b/packages/emcn/src/icons/layout.tsx @@ -1,6 +1,6 @@ import type { SVGProps } from 'react' -import styles from '@/components/emcn/icons/animate/layout.module.css' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../lib/cn' +import styles from './animate/layout.module.css' export type LayoutAnimationVariant = 'clockwise' | 'counterclockwise' diff --git a/apps/sim/components/emcn/icons/library.tsx b/packages/emcn/src/icons/library.tsx similarity index 100% rename from apps/sim/components/emcn/icons/library.tsx rename to packages/emcn/src/icons/library.tsx diff --git a/apps/sim/components/emcn/icons/link.tsx b/packages/emcn/src/icons/link.tsx similarity index 100% rename from apps/sim/components/emcn/icons/link.tsx rename to packages/emcn/src/icons/link.tsx diff --git a/apps/sim/components/emcn/icons/list-filter.tsx b/packages/emcn/src/icons/list-filter.tsx similarity index 100% rename from apps/sim/components/emcn/icons/list-filter.tsx rename to packages/emcn/src/icons/list-filter.tsx diff --git a/apps/sim/components/emcn/icons/loader.tsx b/packages/emcn/src/icons/loader.tsx similarity index 91% rename from apps/sim/components/emcn/icons/loader.tsx rename to packages/emcn/src/icons/loader.tsx index bb08fc5aad5..1b702c19e2a 100644 --- a/apps/sim/components/emcn/icons/loader.tsx +++ b/packages/emcn/src/icons/loader.tsx @@ -1,6 +1,6 @@ import type { SVGProps } from 'react' -import styles from '@/components/emcn/icons/animate/loader.module.css' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../lib/cn' +import styles from './animate/loader.module.css' export interface LoaderProps extends SVGProps { /** diff --git a/apps/sim/components/emcn/icons/lock.tsx b/packages/emcn/src/icons/lock.tsx similarity index 100% rename from apps/sim/components/emcn/icons/lock.tsx rename to packages/emcn/src/icons/lock.tsx diff --git a/apps/sim/components/emcn/icons/log-in.tsx b/packages/emcn/src/icons/log-in.tsx similarity index 100% rename from apps/sim/components/emcn/icons/log-in.tsx rename to packages/emcn/src/icons/log-in.tsx diff --git a/apps/sim/components/emcn/icons/log-out.tsx b/packages/emcn/src/icons/log-out.tsx similarity index 100% rename from apps/sim/components/emcn/icons/log-out.tsx rename to packages/emcn/src/icons/log-out.tsx diff --git a/apps/sim/components/emcn/icons/mail.tsx b/packages/emcn/src/icons/mail.tsx similarity index 100% rename from apps/sim/components/emcn/icons/mail.tsx rename to packages/emcn/src/icons/mail.tsx diff --git a/apps/sim/components/emcn/icons/manage-workspace.tsx b/packages/emcn/src/icons/manage-workspace.tsx similarity index 100% rename from apps/sim/components/emcn/icons/manage-workspace.tsx rename to packages/emcn/src/icons/manage-workspace.tsx diff --git a/apps/sim/components/emcn/icons/mic.tsx b/packages/emcn/src/icons/mic.tsx similarity index 100% rename from apps/sim/components/emcn/icons/mic.tsx rename to packages/emcn/src/icons/mic.tsx diff --git a/apps/sim/components/emcn/icons/more-horizontal.tsx b/packages/emcn/src/icons/more-horizontal.tsx similarity index 100% rename from apps/sim/components/emcn/icons/more-horizontal.tsx rename to packages/emcn/src/icons/more-horizontal.tsx diff --git a/apps/sim/components/emcn/icons/no-wrap.tsx b/packages/emcn/src/icons/no-wrap.tsx similarity index 100% rename from apps/sim/components/emcn/icons/no-wrap.tsx rename to packages/emcn/src/icons/no-wrap.tsx diff --git a/apps/sim/components/emcn/icons/palette.tsx b/packages/emcn/src/icons/palette.tsx similarity index 100% rename from apps/sim/components/emcn/icons/palette.tsx rename to packages/emcn/src/icons/palette.tsx diff --git a/apps/sim/components/emcn/icons/panel-left.tsx b/packages/emcn/src/icons/panel-left.tsx similarity index 100% rename from apps/sim/components/emcn/icons/panel-left.tsx rename to packages/emcn/src/icons/panel-left.tsx diff --git a/apps/sim/components/emcn/icons/paperclip.tsx b/packages/emcn/src/icons/paperclip.tsx similarity index 100% rename from apps/sim/components/emcn/icons/paperclip.tsx rename to packages/emcn/src/icons/paperclip.tsx diff --git a/apps/sim/components/emcn/icons/pause.tsx b/packages/emcn/src/icons/pause.tsx similarity index 100% rename from apps/sim/components/emcn/icons/pause.tsx rename to packages/emcn/src/icons/pause.tsx diff --git a/apps/sim/components/emcn/icons/pencil.tsx b/packages/emcn/src/icons/pencil.tsx similarity index 100% rename from apps/sim/components/emcn/icons/pencil.tsx rename to packages/emcn/src/icons/pencil.tsx diff --git a/apps/sim/components/emcn/icons/pills-ring.tsx b/packages/emcn/src/icons/pills-ring.tsx similarity index 92% rename from apps/sim/components/emcn/icons/pills-ring.tsx rename to packages/emcn/src/icons/pills-ring.tsx index f77bf7d52e7..c1ba467ad2b 100644 --- a/apps/sim/components/emcn/icons/pills-ring.tsx +++ b/packages/emcn/src/icons/pills-ring.tsx @@ -1,6 +1,6 @@ import type { SVGProps } from 'react' -import styles from '@/components/emcn/icons/animate/pills-ring.module.css' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../lib/cn' +import styles from './animate/pills-ring.module.css' export interface PillsRingProps extends SVGProps { /** diff --git a/apps/sim/components/emcn/icons/pin-off.tsx b/packages/emcn/src/icons/pin-off.tsx similarity index 100% rename from apps/sim/components/emcn/icons/pin-off.tsx rename to packages/emcn/src/icons/pin-off.tsx diff --git a/apps/sim/components/emcn/icons/pin.tsx b/packages/emcn/src/icons/pin.tsx similarity index 100% rename from apps/sim/components/emcn/icons/pin.tsx rename to packages/emcn/src/icons/pin.tsx diff --git a/apps/sim/components/emcn/icons/play.tsx b/packages/emcn/src/icons/play.tsx similarity index 100% rename from apps/sim/components/emcn/icons/play.tsx rename to packages/emcn/src/icons/play.tsx diff --git a/apps/sim/components/emcn/icons/plus.tsx b/packages/emcn/src/icons/plus.tsx similarity index 100% rename from apps/sim/components/emcn/icons/plus.tsx rename to packages/emcn/src/icons/plus.tsx diff --git a/apps/sim/components/emcn/icons/redo.tsx b/packages/emcn/src/icons/redo.tsx similarity index 100% rename from apps/sim/components/emcn/icons/redo.tsx rename to packages/emcn/src/icons/redo.tsx diff --git a/apps/sim/components/emcn/icons/refresh-cw.tsx b/packages/emcn/src/icons/refresh-cw.tsx similarity index 87% rename from apps/sim/components/emcn/icons/refresh-cw.tsx rename to packages/emcn/src/icons/refresh-cw.tsx index 36536400194..9877e3a4771 100644 --- a/apps/sim/components/emcn/icons/refresh-cw.tsx +++ b/packages/emcn/src/icons/refresh-cw.tsx @@ -1,6 +1,6 @@ import type { SVGProps } from 'react' -import styles from '@/components/emcn/icons/animate/loader.module.css' -import { cn } from '@/lib/core/utils/cn' +import { cn } from '../lib/cn' +import styles from './animate/loader.module.css' export interface RefreshCwProps extends SVGProps { animate?: boolean diff --git a/apps/sim/components/emcn/icons/rocket.tsx b/packages/emcn/src/icons/rocket.tsx similarity index 100% rename from apps/sim/components/emcn/icons/rocket.tsx rename to packages/emcn/src/icons/rocket.tsx diff --git a/apps/sim/components/emcn/icons/rows3.tsx b/packages/emcn/src/icons/rows3.tsx similarity index 100% rename from apps/sim/components/emcn/icons/rows3.tsx rename to packages/emcn/src/icons/rows3.tsx diff --git a/apps/sim/components/emcn/icons/search.tsx b/packages/emcn/src/icons/search.tsx similarity index 100% rename from apps/sim/components/emcn/icons/search.tsx rename to packages/emcn/src/icons/search.tsx diff --git a/apps/sim/components/emcn/icons/select-all.tsx b/packages/emcn/src/icons/select-all.tsx similarity index 100% rename from apps/sim/components/emcn/icons/select-all.tsx rename to packages/emcn/src/icons/select-all.tsx diff --git a/apps/sim/components/emcn/icons/send.tsx b/packages/emcn/src/icons/send.tsx similarity index 100% rename from apps/sim/components/emcn/icons/send.tsx rename to packages/emcn/src/icons/send.tsx diff --git a/apps/sim/components/emcn/icons/server.tsx b/packages/emcn/src/icons/server.tsx similarity index 100% rename from apps/sim/components/emcn/icons/server.tsx rename to packages/emcn/src/icons/server.tsx diff --git a/apps/sim/components/emcn/icons/settings.tsx b/packages/emcn/src/icons/settings.tsx similarity index 100% rename from apps/sim/components/emcn/icons/settings.tsx rename to packages/emcn/src/icons/settings.tsx diff --git a/apps/sim/components/emcn/icons/shield-check.tsx b/packages/emcn/src/icons/shield-check.tsx similarity index 100% rename from apps/sim/components/emcn/icons/shield-check.tsx rename to packages/emcn/src/icons/shield-check.tsx diff --git a/apps/sim/components/emcn/icons/shuffle.tsx b/packages/emcn/src/icons/shuffle.tsx similarity index 100% rename from apps/sim/components/emcn/icons/shuffle.tsx rename to packages/emcn/src/icons/shuffle.tsx diff --git a/apps/sim/components/emcn/icons/sim.tsx b/packages/emcn/src/icons/sim.tsx similarity index 100% rename from apps/sim/components/emcn/icons/sim.tsx rename to packages/emcn/src/icons/sim.tsx diff --git a/apps/sim/components/emcn/icons/slash.tsx b/packages/emcn/src/icons/slash.tsx similarity index 100% rename from apps/sim/components/emcn/icons/slash.tsx rename to packages/emcn/src/icons/slash.tsx diff --git a/apps/sim/components/emcn/icons/square-arrow-up-right.tsx b/packages/emcn/src/icons/square-arrow-up-right.tsx similarity index 100% rename from apps/sim/components/emcn/icons/square-arrow-up-right.tsx rename to packages/emcn/src/icons/square-arrow-up-right.tsx diff --git a/apps/sim/components/emcn/icons/square.tsx b/packages/emcn/src/icons/square.tsx similarity index 100% rename from apps/sim/components/emcn/icons/square.tsx rename to packages/emcn/src/icons/square.tsx diff --git a/apps/sim/components/emcn/icons/table-x.tsx b/packages/emcn/src/icons/table-x.tsx similarity index 100% rename from apps/sim/components/emcn/icons/table-x.tsx rename to packages/emcn/src/icons/table-x.tsx diff --git a/apps/sim/components/emcn/icons/table.tsx b/packages/emcn/src/icons/table.tsx similarity index 100% rename from apps/sim/components/emcn/icons/table.tsx rename to packages/emcn/src/icons/table.tsx diff --git a/apps/sim/components/emcn/icons/tag.tsx b/packages/emcn/src/icons/tag.tsx similarity index 100% rename from apps/sim/components/emcn/icons/tag.tsx rename to packages/emcn/src/icons/tag.tsx diff --git a/apps/sim/components/emcn/icons/task.tsx b/packages/emcn/src/icons/task.tsx similarity index 100% rename from apps/sim/components/emcn/icons/task.tsx rename to packages/emcn/src/icons/task.tsx diff --git a/apps/sim/components/emcn/icons/terminal-window.tsx b/packages/emcn/src/icons/terminal-window.tsx similarity index 100% rename from apps/sim/components/emcn/icons/terminal-window.tsx rename to packages/emcn/src/icons/terminal-window.tsx diff --git a/apps/sim/components/emcn/icons/thumbs-down.tsx b/packages/emcn/src/icons/thumbs-down.tsx similarity index 100% rename from apps/sim/components/emcn/icons/thumbs-down.tsx rename to packages/emcn/src/icons/thumbs-down.tsx diff --git a/apps/sim/components/emcn/icons/thumbs-up.tsx b/packages/emcn/src/icons/thumbs-up.tsx similarity index 100% rename from apps/sim/components/emcn/icons/thumbs-up.tsx rename to packages/emcn/src/icons/thumbs-up.tsx diff --git a/apps/sim/components/emcn/icons/trash-outline.tsx b/packages/emcn/src/icons/trash-outline.tsx similarity index 100% rename from apps/sim/components/emcn/icons/trash-outline.tsx rename to packages/emcn/src/icons/trash-outline.tsx diff --git a/apps/sim/components/emcn/icons/trash.tsx b/packages/emcn/src/icons/trash.tsx similarity index 100% rename from apps/sim/components/emcn/icons/trash.tsx rename to packages/emcn/src/icons/trash.tsx diff --git a/apps/sim/components/emcn/icons/trash2.tsx b/packages/emcn/src/icons/trash2.tsx similarity index 100% rename from apps/sim/components/emcn/icons/trash2.tsx rename to packages/emcn/src/icons/trash2.tsx diff --git a/apps/sim/components/emcn/icons/triangle-alert.tsx b/packages/emcn/src/icons/triangle-alert.tsx similarity index 100% rename from apps/sim/components/emcn/icons/triangle-alert.tsx rename to packages/emcn/src/icons/triangle-alert.tsx diff --git a/apps/sim/components/emcn/icons/type-boolean.tsx b/packages/emcn/src/icons/type-boolean.tsx similarity index 100% rename from apps/sim/components/emcn/icons/type-boolean.tsx rename to packages/emcn/src/icons/type-boolean.tsx diff --git a/apps/sim/components/emcn/icons/type-json.tsx b/packages/emcn/src/icons/type-json.tsx similarity index 100% rename from apps/sim/components/emcn/icons/type-json.tsx rename to packages/emcn/src/icons/type-json.tsx diff --git a/apps/sim/components/emcn/icons/type-number.tsx b/packages/emcn/src/icons/type-number.tsx similarity index 100% rename from apps/sim/components/emcn/icons/type-number.tsx rename to packages/emcn/src/icons/type-number.tsx diff --git a/apps/sim/components/emcn/icons/type-text.tsx b/packages/emcn/src/icons/type-text.tsx similarity index 100% rename from apps/sim/components/emcn/icons/type-text.tsx rename to packages/emcn/src/icons/type-text.tsx diff --git a/apps/sim/components/emcn/icons/undo.tsx b/packages/emcn/src/icons/undo.tsx similarity index 100% rename from apps/sim/components/emcn/icons/undo.tsx rename to packages/emcn/src/icons/undo.tsx diff --git a/apps/sim/components/emcn/icons/unlock.tsx b/packages/emcn/src/icons/unlock.tsx similarity index 100% rename from apps/sim/components/emcn/icons/unlock.tsx rename to packages/emcn/src/icons/unlock.tsx diff --git a/apps/sim/components/emcn/icons/upload.tsx b/packages/emcn/src/icons/upload.tsx similarity index 100% rename from apps/sim/components/emcn/icons/upload.tsx rename to packages/emcn/src/icons/upload.tsx diff --git a/apps/sim/components/emcn/icons/user-plus.tsx b/packages/emcn/src/icons/user-plus.tsx similarity index 100% rename from apps/sim/components/emcn/icons/user-plus.tsx rename to packages/emcn/src/icons/user-plus.tsx diff --git a/apps/sim/components/emcn/icons/user.tsx b/packages/emcn/src/icons/user.tsx similarity index 100% rename from apps/sim/components/emcn/icons/user.tsx rename to packages/emcn/src/icons/user.tsx diff --git a/apps/sim/components/emcn/icons/users.tsx b/packages/emcn/src/icons/users.tsx similarity index 100% rename from apps/sim/components/emcn/icons/users.tsx rename to packages/emcn/src/icons/users.tsx diff --git a/apps/sim/components/emcn/icons/wordmark.tsx b/packages/emcn/src/icons/wordmark.tsx similarity index 100% rename from apps/sim/components/emcn/icons/wordmark.tsx rename to packages/emcn/src/icons/wordmark.tsx diff --git a/apps/sim/components/emcn/icons/workflow-x.tsx b/packages/emcn/src/icons/workflow-x.tsx similarity index 100% rename from apps/sim/components/emcn/icons/workflow-x.tsx rename to packages/emcn/src/icons/workflow-x.tsx diff --git a/apps/sim/components/emcn/icons/workflow.tsx b/packages/emcn/src/icons/workflow.tsx similarity index 100% rename from apps/sim/components/emcn/icons/workflow.tsx rename to packages/emcn/src/icons/workflow.tsx diff --git a/apps/sim/components/emcn/icons/wrap.tsx b/packages/emcn/src/icons/wrap.tsx similarity index 100% rename from apps/sim/components/emcn/icons/wrap.tsx rename to packages/emcn/src/icons/wrap.tsx diff --git a/apps/sim/components/emcn/icons/wrench.tsx b/packages/emcn/src/icons/wrench.tsx similarity index 100% rename from apps/sim/components/emcn/icons/wrench.tsx rename to packages/emcn/src/icons/wrench.tsx diff --git a/apps/sim/components/emcn/icons/x.tsx b/packages/emcn/src/icons/x.tsx similarity index 100% rename from apps/sim/components/emcn/icons/x.tsx rename to packages/emcn/src/icons/x.tsx diff --git a/apps/sim/components/emcn/icons/zoom-in.tsx b/packages/emcn/src/icons/zoom-in.tsx similarity index 100% rename from apps/sim/components/emcn/icons/zoom-in.tsx rename to packages/emcn/src/icons/zoom-in.tsx diff --git a/apps/sim/components/emcn/icons/zoom-out.tsx b/packages/emcn/src/icons/zoom-out.tsx similarity index 100% rename from apps/sim/components/emcn/icons/zoom-out.tsx rename to packages/emcn/src/icons/zoom-out.tsx diff --git a/packages/emcn/src/index.ts b/packages/emcn/src/index.ts new file mode 100644 index 00000000000..5c8509c774d --- /dev/null +++ b/packages/emcn/src/index.ts @@ -0,0 +1,28 @@ +export * from './components' +/** + * `Calendar` exists in BOTH `./components` (the date picker) and `./icons` (a + * glyph). Like `Table` above, this explicit re-export resolves the barrel to + * the COMPONENT; the icon stays available from `@sim/emcn/icons`. + */ +export { Calendar, type CalendarProps } from './components/calendar/calendar' +/** + * `Table` exists in BOTH `./components` (data-table element) and `./icons` + * (glyph). This explicit re-export resolves the ambiguity to the COMPONENT — + * always import the icon from `@sim/emcn/icons`. Rendering the + * component as an icon paints an empty `w-full` table that squeezes its + * siblings (shipped as the tables-header "T…" flicker). + */ +export { + Table, + TableBody, + TableCaption, + TableCell, + TableFooter, + TableHead, + TableHeader, + TableRow, +} from './components/table/table' +export { useCopyToClipboard } from './hooks/use-copy-to-clipboard' +export * from './icons' +export { cn } from './lib/cn' +export { handleKeyboardActivation, isKeyboardActivation } from './lib/keyboard' diff --git a/apps/sim/lib/core/utils/cn.ts b/packages/emcn/src/lib/cn.ts similarity index 100% rename from apps/sim/lib/core/utils/cn.ts rename to packages/emcn/src/lib/cn.ts diff --git a/apps/sim/lib/core/utils/keyboard.ts b/packages/emcn/src/lib/keyboard.ts similarity index 100% rename from apps/sim/lib/core/utils/keyboard.ts rename to packages/emcn/src/lib/keyboard.ts diff --git a/packages/emcn/tsconfig.json b/packages/emcn/tsconfig.json new file mode 100644 index 00000000000..486f19cfc91 --- /dev/null +++ b/packages/emcn/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "@sim/tsconfig/library.json", + "compilerOptions": { + "jsx": "react-jsx", + "lib": ["ES2022", "DOM", "DOM.Iterable"] + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/emcn/vitest.config.ts b/packages/emcn/vitest.config.ts new file mode 100644 index 00000000000..eac71bf664a --- /dev/null +++ b/packages/emcn/vitest.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'vitest/config' + +export default defineConfig({ + test: { + globals: false, + environment: 'node', + include: ['src/**/*.test.ts', 'src/**/*.test.tsx'], + }, +})