@locusai/web 0.1.7 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/next.config.js +15 -2
- package/package.json +26 -3
- package/src/app/(auth)/invite/page.tsx +109 -0
- package/src/app/(auth)/layout.tsx +19 -0
- package/src/app/(auth)/login/page.tsx +65 -0
- package/src/app/(auth)/onboarding/workspace/page.tsx +46 -0
- package/src/app/(auth)/register/page.tsx +165 -0
- package/src/app/(dashboard)/activity/page.tsx +7 -0
- package/src/app/(dashboard)/backlog/page.tsx +195 -0
- package/src/app/(dashboard)/board/page.tsx +141 -0
- package/src/app/(dashboard)/layout.tsx +32 -0
- package/src/app/(dashboard)/page.tsx +14 -0
- package/src/app/(dashboard)/settings/page.tsx +161 -0
- package/src/app/(dashboard)/settings/team/page.tsx +75 -0
- package/src/app/globals.css +259 -0
- package/src/app/layout.tsx +10 -20
- package/src/app/providers.tsx +26 -3
- package/src/components/AuthLayoutUI.tsx +53 -0
- package/src/components/BoardFilter.tsx +75 -74
- package/src/components/CreateModal/CreateModal.tsx +142 -0
- package/src/components/CreateModal/index.ts +1 -0
- package/src/components/Editor.tsx +279 -0
- package/src/components/Header.tsx +99 -12
- package/src/components/PageLayout.tsx +69 -0
- package/src/components/PropertyItem.tsx +55 -9
- package/src/components/Sidebar.tsx +280 -36
- package/src/components/SprintCreateModal.tsx +84 -0
- package/src/components/TaskCard.tsx +196 -78
- package/src/components/TaskCreateModal.tsx +181 -178
- package/src/components/TaskPanel.tsx +140 -692
- package/src/components/WorkspaceCreateModal.tsx +97 -0
- package/src/components/WorkspaceProtected.tsx +91 -0
- package/src/components/auth/InviteSteps.tsx +220 -0
- package/src/components/auth/LoginSteps.tsx +86 -0
- package/src/components/auth/RegisterSteps.tsx +371 -0
- package/src/components/auth/index.ts +3 -0
- package/src/components/backlog/BacklogList.tsx +92 -0
- package/src/components/backlog/BacklogSection.tsx +137 -0
- package/src/components/backlog/CompletedSprintItem.tsx +95 -0
- package/src/components/backlog/CompletedSprintsSection.tsx +77 -0
- package/src/components/backlog/SprintSection.tsx +155 -0
- package/src/components/backlog/constants.ts +26 -0
- package/src/components/board/BoardColumn.tsx +97 -0
- package/src/components/board/BoardContent.tsx +84 -0
- package/src/components/board/BoardEmptyState.tsx +82 -0
- package/src/components/board/BoardHeader.tsx +47 -0
- package/src/components/board/SprintMindmap.tsx +65 -0
- package/src/components/board/constants.ts +40 -0
- package/src/components/board/index.ts +5 -0
- package/src/components/common/ErrorState.tsx +124 -0
- package/src/components/common/LoadingState.tsx +83 -0
- package/src/components/common/index.ts +40 -0
- package/src/components/dashboard/ActivityFeed.tsx +77 -0
- package/src/components/dashboard/ActivityItem.tsx +207 -0
- package/src/components/dashboard/QuickActions.tsx +50 -0
- package/src/components/dashboard/StatCard.tsx +79 -0
- package/src/components/dnd/index.tsx +51 -0
- package/src/components/docs/DocsEditorArea.tsx +87 -0
- package/src/components/docs/DocsHeaderActions.tsx +121 -0
- package/src/components/docs/DocsSidebar.tsx +351 -0
- package/src/components/index.ts +7 -0
- package/src/components/onboarding/StepProgress.tsx +21 -0
- package/src/components/onboarding/index.ts +1 -0
- package/src/components/settings/ApiKeyConfirmationModal.tsx +81 -0
- package/src/components/settings/ApiKeyCreatedModal.tsx +96 -0
- package/src/components/settings/ApiKeysList.tsx +143 -0
- package/src/components/settings/ApiKeysSettings.tsx +144 -0
- package/src/components/settings/InviteMemberModal.tsx +106 -0
- package/src/components/settings/ProjectSetupGuide.tsx +147 -0
- package/src/components/settings/SettingItem.tsx +32 -0
- package/src/components/settings/SettingSection.tsx +50 -0
- package/src/components/settings/TeamInvitationsList.tsx +90 -0
- package/src/components/settings/TeamMembersList.tsx +95 -0
- package/src/components/settings/index.ts +8 -0
- package/src/components/task-panel/TaskActivity.tsx +127 -0
- package/src/components/task-panel/TaskChecklist.tsx +142 -0
- package/src/components/task-panel/TaskDescription.tsx +201 -0
- package/src/components/task-panel/TaskDocs.tsx +137 -0
- package/src/components/task-panel/TaskHeader.tsx +125 -0
- package/src/components/task-panel/TaskProperties.tsx +111 -0
- package/src/components/task-panel/index.ts +12 -0
- package/src/components/typography/EmptyStateText.tsx +59 -0
- package/src/components/typography/MetadataText.tsx +65 -0
- package/src/components/typography/SecondaryText.tsx +60 -0
- package/src/components/typography/SectionLabel.tsx +60 -0
- package/src/components/typography/index.ts +14 -0
- package/src/components/typography-scales.tsx +218 -0
- package/src/components/ui/Avatar.tsx +123 -0
- package/src/components/ui/Badge.tsx +69 -2
- package/src/components/ui/Button.tsx +71 -30
- package/src/components/ui/Checkbox.tsx +34 -0
- package/src/components/ui/Dropdown.tsx +67 -1
- package/src/components/ui/EmptyState.tsx +129 -0
- package/src/components/ui/Input.tsx +53 -6
- package/src/components/ui/Modal.tsx +45 -12
- package/src/components/ui/OtpInput.tsx +148 -0
- package/src/components/ui/Skeleton.tsx +36 -0
- package/src/components/ui/Spinner.tsx +112 -0
- package/src/components/ui/Textarea.tsx +28 -3
- package/src/components/ui/Toast.tsx +99 -0
- package/src/components/ui/Toggle.tsx +63 -0
- package/src/components/ui/constants.ts +108 -0
- package/src/components/ui/index.ts +7 -0
- package/src/context/AuthContext.tsx +140 -0
- package/src/context/index.ts +1 -0
- package/src/hooks/backlog/index.ts +13 -0
- package/src/hooks/backlog/useBacklogActions.ts +144 -0
- package/src/hooks/backlog/useBacklogComposite.ts +73 -0
- package/src/hooks/backlog/useBacklogData.ts +74 -0
- package/src/hooks/backlog/useBacklogDragDrop.ts +118 -0
- package/src/hooks/backlog/useBacklogUI.ts +74 -0
- package/src/hooks/index.ts +22 -0
- package/src/hooks/task-panel/index.ts +13 -0
- package/src/hooks/task-panel/useTaskActions.ts +200 -0
- package/src/hooks/task-panel/useTaskComputedValues.ts +30 -0
- package/src/hooks/task-panel/useTaskData.ts +78 -0
- package/src/hooks/task-panel/useTaskPanelComposite.ts +161 -0
- package/src/hooks/task-panel/useTaskUIState.ts +80 -0
- package/src/hooks/useAuthLayoutLogic.ts +43 -0
- package/src/hooks/useAuthenticatedUser.ts +36 -0
- package/src/hooks/useAuthenticatedUserWithOrg.ts +41 -0
- package/src/hooks/useBacklog.ts +303 -0
- package/src/hooks/useBoard.ts +230 -0
- package/src/hooks/useDashboardLayout.ts +49 -0
- package/src/hooks/useDocs.ts +279 -0
- package/src/hooks/useDocsQuery.ts +99 -0
- package/src/hooks/useDocsSidebarState.ts +104 -0
- package/src/hooks/useFormState.ts +40 -0
- package/src/hooks/useGlobalKeydowns.ts +52 -0
- package/src/hooks/useInviteForm.ts +122 -0
- package/src/hooks/useLoginForm.ts +84 -0
- package/src/hooks/useMutationWithToast.ts +56 -0
- package/src/hooks/useOrganizationQuery.ts +55 -0
- package/src/hooks/useRegisterForm.ts +216 -0
- package/src/hooks/useSprintsQuery.ts +38 -0
- package/src/hooks/useTaskDescription.ts +102 -0
- package/src/hooks/useTaskPanel.ts +341 -0
- package/src/hooks/useTasksQuery.ts +39 -0
- package/src/hooks/useTeamManagement.ts +92 -0
- package/src/hooks/useWorkspaceCreateForm.ts +70 -0
- package/src/hooks/useWorkspaceId.ts +29 -0
- package/src/lib/api-client.ts +40 -23
- package/src/lib/config.ts +25 -0
- package/src/lib/constants.ts +83 -0
- package/src/lib/options.ts +96 -0
- package/src/lib/query-keys.ts +91 -0
- package/src/lib/typography.ts +103 -0
- package/src/lib/utils.ts +4 -0
- package/src/lib/validation.ts +192 -0
- package/src/services/index.ts +7 -3
- package/src/services/notifications.ts +80 -0
- package/src/utils/env.utils.ts +15 -0
- package/src/views/ActivityView.tsx +123 -0
- package/src/views/Dashboard.tsx +126 -0
- package/src/views/Docs.tsx +98 -612
- package/tsconfig.tsbuildinfo +1 -1
- package/.next/BUILD_ID +0 -1
- package/.next/app-build-manifest.json +0 -55
- package/.next/app-path-routes-manifest.json +0 -8
- package/.next/build-manifest.json +0 -33
- package/.next/cache/.previewinfo +0 -1
- package/.next/cache/.rscinfo +0 -1
- package/.next/cache/.tsbuildinfo +0 -1
- package/.next/cache/config.json +0 -7
- package/.next/cache/webpack/client-production/0.pack +0 -0
- package/.next/cache/webpack/client-production/index.pack +0 -0
- package/.next/cache/webpack/edge-server-production/0.pack +0 -0
- package/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/.next/cache/webpack/server-production/0.pack +0 -0
- package/.next/cache/webpack/server-production/index.pack +0 -0
- package/.next/diagnostics/build-diagnostics.json +0 -6
- package/.next/diagnostics/framework.json +0 -1
- package/.next/export-detail.json +0 -5
- package/.next/export-marker.json +0 -6
- package/.next/images-manifest.json +0 -57
- package/.next/next-minimal-server.js.nft.json +0 -1
- package/.next/next-server.js.nft.json +0 -1
- package/.next/package.json +0 -1
- package/.next/prerender-manifest.json +0 -137
- package/.next/react-loadable-manifest.json +0 -32
- package/.next/required-server-files.json +0 -324
- package/.next/routes-manifest.json +0 -77
- package/.next/server/app/_not-found/page.js +0 -2
- package/.next/server/app/_not-found/page.js.nft.json +0 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +0 -1
- package/.next/server/app/_not-found.html +0 -1
- package/.next/server/app/_not-found.meta +0 -8
- package/.next/server/app/_not-found.rsc +0 -21
- package/.next/server/app/backlog/page.js +0 -2
- package/.next/server/app/backlog/page.js.nft.json +0 -1
- package/.next/server/app/backlog/page_client-reference-manifest.js +0 -1
- package/.next/server/app/backlog.html +0 -1
- package/.next/server/app/backlog.meta +0 -7
- package/.next/server/app/backlog.rsc +0 -25
- package/.next/server/app/docs/page.js +0 -97
- package/.next/server/app/docs/page.js.nft.json +0 -1
- package/.next/server/app/docs/page_client-reference-manifest.js +0 -1
- package/.next/server/app/docs.html +0 -1
- package/.next/server/app/docs.meta +0 -7
- package/.next/server/app/docs.rsc +0 -26
- package/.next/server/app/favicon.ico/route.js +0 -1
- package/.next/server/app/favicon.ico/route.js.nft.json +0 -1
- package/.next/server/app/favicon.ico.body +0 -0
- package/.next/server/app/favicon.ico.meta +0 -1
- package/.next/server/app/index.html +0 -1
- package/.next/server/app/index.meta +0 -7
- package/.next/server/app/index.rsc +0 -25
- package/.next/server/app/page.js +0 -2
- package/.next/server/app/page.js.nft.json +0 -1
- package/.next/server/app/page_client-reference-manifest.js +0 -1
- package/.next/server/app/settings/page.js +0 -2
- package/.next/server/app/settings/page.js.nft.json +0 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +0 -1
- package/.next/server/app/settings.html +0 -1
- package/.next/server/app/settings.meta +0 -7
- package/.next/server/app/settings.rsc +0 -25
- package/.next/server/app-paths-manifest.json +0 -8
- package/.next/server/chunks/496.js +0 -6
- package/.next/server/chunks/585.js +0 -1
- package/.next/server/chunks/665.js +0 -1
- package/.next/server/chunks/699.js +0 -22
- package/.next/server/chunks/852.js +0 -7
- package/.next/server/functions-config-manifest.json +0 -4
- package/.next/server/interception-route-rewrite-manifest.js +0 -1
- package/.next/server/middleware-build-manifest.js +0 -1
- package/.next/server/middleware-manifest.json +0 -6
- package/.next/server/middleware-react-loadable-manifest.js +0 -1
- package/.next/server/next-font-manifest.js +0 -1
- package/.next/server/next-font-manifest.json +0 -1
- package/.next/server/pages/404.html +0 -1
- package/.next/server/pages/500.html +0 -1
- package/.next/server/pages/_app.js +0 -1
- package/.next/server/pages/_app.js.nft.json +0 -1
- package/.next/server/pages/_document.js +0 -1
- package/.next/server/pages/_document.js.nft.json +0 -1
- package/.next/server/pages/_error.js +0 -19
- package/.next/server/pages/_error.js.nft.json +0 -1
- package/.next/server/pages-manifest.json +0 -6
- package/.next/server/server-reference-manifest.js +0 -1
- package/.next/server/server-reference-manifest.json +0 -1
- package/.next/server/webpack-runtime.js +0 -1
- package/.next/static/D0NXe04ZCLNDckV_quc8g/_buildManifest.js +0 -1
- package/.next/static/D0NXe04ZCLNDckV_quc8g/_ssgManifest.js +0 -1
- package/.next/static/chunks/138.b98511c56423f8bb.js +0 -1
- package/.next/static/chunks/146-34259952c594a3b0.js +0 -1
- package/.next/static/chunks/337-d3bb75304d130513.js +0 -1
- package/.next/static/chunks/477.1a6ecfe53375bd9c.js +0 -1
- package/.next/static/chunks/487-1808785ba665f784.js +0 -1
- package/.next/static/chunks/544.a9569941cc886e9d.js +0 -1
- package/.next/static/chunks/87c73c54-1f4741035a95c140.js +0 -1
- package/.next/static/chunks/902-d6926825a9fe8784.js +0 -1
- package/.next/static/chunks/955-c8f8f6235ae8f8c6.js +0 -1
- package/.next/static/chunks/996.e0a334e6ae90900e.js +0 -1
- package/.next/static/chunks/app/_not-found/page-44b1804abb44a34d.js +0 -1
- package/.next/static/chunks/app/backlog/page-dce1450769bfae8f.js +0 -1
- package/.next/static/chunks/app/docs/page-1efee819f25492cb.js +0 -1
- package/.next/static/chunks/app/layout-05f504c042b9f7ee.js +0 -1
- package/.next/static/chunks/app/page-3fd91aaaa4776ced.js +0 -1
- package/.next/static/chunks/app/settings/page-84e16c9638d657e4.js +0 -1
- package/.next/static/chunks/framework-152a1bc8c81c7458.js +0 -1
- package/.next/static/chunks/main-843ab130fc1be309.js +0 -1
- package/.next/static/chunks/main-app-123e879c5a937a00.js +0 -1
- package/.next/static/chunks/pages/_app-a050a8e6e4fb04cf.js +0 -1
- package/.next/static/chunks/pages/_error-3e422ffd891594de.js +0 -1
- package/.next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
- package/.next/static/chunks/webpack-99a10a055b5bb9c4.js +0 -1
- package/.next/static/css/13e8617b72f9d3aa.css +0 -1
- package/.next/static/css/8aea088cdc4338f0.css +0 -1
- package/.next/static/css/b301ab0424111664.css +0 -1
- package/.next/static/media/24c15609eaa28576-s.woff2 +0 -0
- package/.next/static/media/2c07349e02a7b712-s.woff2 +0 -0
- package/.next/static/media/456105d6ea6d39e0-s.woff2 +0 -0
- package/.next/static/media/47cbc4e2adbc5db9-s.p.woff2 +0 -0
- package/.next/static/media/4f77bef990aad698-s.woff2 +0 -0
- package/.next/static/media/627d916fd739a539-s.woff2 +0 -0
- package/.next/static/media/63b255f18bea0ca9-s.woff2 +0 -0
- package/.next/static/media/70bd82ac89b4fa42-s.woff2 +0 -0
- package/.next/static/media/84602850c8fd81c3-s.woff2 +0 -0
- package/.next/trace +0 -46
- package/.next/types/app/backlog/page.ts +0 -84
- package/.next/types/app/docs/page.ts +0 -84
- package/.next/types/app/layout.ts +0 -84
- package/.next/types/app/page.ts +0 -84
- package/.next/types/app/settings/page.ts +0 -84
- package/.next/types/cache-life.d.ts +0 -141
- package/.next/types/package.json +0 -1
- package/next-env.d.ts +0 -5
- package/out/404.html +0 -1
- package/out/_next/static/D0NXe04ZCLNDckV_quc8g/_buildManifest.js +0 -1
- package/out/_next/static/D0NXe04ZCLNDckV_quc8g/_ssgManifest.js +0 -1
- package/out/_next/static/chunks/138.b98511c56423f8bb.js +0 -1
- package/out/_next/static/chunks/146-34259952c594a3b0.js +0 -1
- package/out/_next/static/chunks/337-d3bb75304d130513.js +0 -1
- package/out/_next/static/chunks/477.1a6ecfe53375bd9c.js +0 -1
- package/out/_next/static/chunks/487-1808785ba665f784.js +0 -1
- package/out/_next/static/chunks/544.a9569941cc886e9d.js +0 -1
- package/out/_next/static/chunks/87c73c54-1f4741035a95c140.js +0 -1
- package/out/_next/static/chunks/902-d6926825a9fe8784.js +0 -1
- package/out/_next/static/chunks/955-c8f8f6235ae8f8c6.js +0 -1
- package/out/_next/static/chunks/996.e0a334e6ae90900e.js +0 -1
- package/out/_next/static/chunks/app/_not-found/page-44b1804abb44a34d.js +0 -1
- package/out/_next/static/chunks/app/backlog/page-dce1450769bfae8f.js +0 -1
- package/out/_next/static/chunks/app/docs/page-1efee819f25492cb.js +0 -1
- package/out/_next/static/chunks/app/layout-05f504c042b9f7ee.js +0 -1
- package/out/_next/static/chunks/app/page-3fd91aaaa4776ced.js +0 -1
- package/out/_next/static/chunks/app/settings/page-84e16c9638d657e4.js +0 -1
- package/out/_next/static/chunks/framework-152a1bc8c81c7458.js +0 -1
- package/out/_next/static/chunks/main-843ab130fc1be309.js +0 -1
- package/out/_next/static/chunks/main-app-123e879c5a937a00.js +0 -1
- package/out/_next/static/chunks/pages/_app-a050a8e6e4fb04cf.js +0 -1
- package/out/_next/static/chunks/pages/_error-3e422ffd891594de.js +0 -1
- package/out/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
- package/out/_next/static/chunks/webpack-99a10a055b5bb9c4.js +0 -1
- package/out/_next/static/css/13e8617b72f9d3aa.css +0 -1
- package/out/_next/static/css/8aea088cdc4338f0.css +0 -1
- package/out/_next/static/css/b301ab0424111664.css +0 -1
- package/out/_next/static/media/24c15609eaa28576-s.woff2 +0 -0
- package/out/_next/static/media/2c07349e02a7b712-s.woff2 +0 -0
- package/out/_next/static/media/456105d6ea6d39e0-s.woff2 +0 -0
- package/out/_next/static/media/47cbc4e2adbc5db9-s.p.woff2 +0 -0
- package/out/_next/static/media/4f77bef990aad698-s.woff2 +0 -0
- package/out/_next/static/media/627d916fd739a539-s.woff2 +0 -0
- package/out/_next/static/media/63b255f18bea0ca9-s.woff2 +0 -0
- package/out/_next/static/media/70bd82ac89b4fa42-s.woff2 +0 -0
- package/out/_next/static/media/84602850c8fd81c3-s.woff2 +0 -0
- package/out/backlog.html +0 -1
- package/out/backlog.txt +0 -25
- package/out/docs.html +0 -1
- package/out/docs.txt +0 -26
- package/out/favicon.ico +0 -0
- package/out/index.html +0 -1
- package/out/index.txt +0 -25
- package/out/logo.png +0 -0
- package/out/settings.html +0 -1
- package/out/settings.txt +0 -25
- package/src/app/backlog/page.tsx +0 -19
- package/src/app/page.tsx +0 -16
- package/src/app/settings/page.tsx +0 -194
- package/src/hooks/useTasks.ts +0 -119
- package/src/services/doc.service.ts +0 -27
- package/src/services/sprint.service.ts +0 -24
- package/src/services/task.service.ts +0 -75
- package/src/views/Backlog.tsx +0 -691
- package/src/views/Board.tsx +0 -306
- /package/src/app/{docs → (dashboard)/docs}/page.tsx +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @locusai/web
|
|
2
2
|
|
|
3
|
+
## 0.2.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fix package builds
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @locusai/sdk@0.2.2
|
|
10
|
+
- @locusai/shared@0.2.2
|
|
11
|
+
|
|
12
|
+
## 0.2.1
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Update app versions
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @locusai/sdk@0.2.1
|
|
19
|
+
- @locusai/shared@0.2.1
|
|
20
|
+
|
|
21
|
+
## 0.1.8
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [52d35dd]
|
|
26
|
+
- @locusai/sdk@0.2.0
|
|
27
|
+
- @locusai/shared@0.2.0
|
|
28
|
+
|
|
3
29
|
## 0.1.7
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/next.config.js
CHANGED
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
/** @type {import('next').NextConfig} */
|
|
2
2
|
const nextConfig = {
|
|
3
|
-
|
|
4
|
-
transpilePackages: ["@locusai/shared"],
|
|
3
|
+
transpilePackages: ["@locusai/shared", "@locusai/sdk"],
|
|
5
4
|
images: {
|
|
6
5
|
unoptimized: true,
|
|
7
6
|
},
|
|
7
|
+
webpack: (config, { isServer }) => {
|
|
8
|
+
// Externalize Node.js-only dependencies from browser bundle
|
|
9
|
+
if (!isServer) {
|
|
10
|
+
config.resolve.fallback = {
|
|
11
|
+
...config.resolve.fallback,
|
|
12
|
+
fs: false,
|
|
13
|
+
child_process: false,
|
|
14
|
+
"node:fs": false,
|
|
15
|
+
"node:child_process": false,
|
|
16
|
+
"node:path": false,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return config;
|
|
20
|
+
},
|
|
8
21
|
};
|
|
9
22
|
|
|
10
23
|
export default nextConfig;
|
package/package.json
CHANGED
|
@@ -1,34 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@locusai/web",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"dev": "next dev -p
|
|
6
|
+
"dev": "next dev -p 3000",
|
|
7
7
|
"build": "next build",
|
|
8
8
|
"start": "next start",
|
|
9
9
|
"lint": "biome lint .",
|
|
10
10
|
"typecheck": "tsc -b --noEmit"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
+
"@dnd-kit/core": "^6.3.1",
|
|
14
|
+
"@dnd-kit/sortable": "^10.0.0",
|
|
15
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
16
|
+
"@locusai/sdk": "workspace:*",
|
|
13
17
|
"@locusai/shared": "workspace:*",
|
|
18
|
+
"@tailwindcss/typography": "^0.5.19",
|
|
14
19
|
"@tanstack/react-query": "^5.90.18",
|
|
15
20
|
"@tanstack/react-query-devtools": "^5.91.2",
|
|
16
|
-
"@
|
|
21
|
+
"@tiptap/extension-code-block": "^3.15.3",
|
|
22
|
+
"@tiptap/extension-code-block-lowlight": "^3.15.3",
|
|
23
|
+
"@tiptap/extension-color": "^3.15.3",
|
|
24
|
+
"@tiptap/extension-highlight": "^3.15.3",
|
|
25
|
+
"@tiptap/extension-link": "^3.15.3",
|
|
26
|
+
"@tiptap/extension-placeholder": "^3.15.3",
|
|
27
|
+
"@tiptap/extension-task-item": "^3.15.3",
|
|
28
|
+
"@tiptap/extension-task-list": "^3.15.3",
|
|
29
|
+
"@tiptap/extension-text-style": "^3.15.3",
|
|
30
|
+
"@tiptap/extension-typography": "^3.15.3",
|
|
31
|
+
"@tiptap/pm": "^3.15.3",
|
|
32
|
+
"@tiptap/react": "^3.15.3",
|
|
33
|
+
"@tiptap/starter-kit": "^3.15.3",
|
|
17
34
|
"axios": "^1.13.2",
|
|
18
35
|
"clsx": "^2.1.1",
|
|
19
36
|
"date-fns": "^4.1.0",
|
|
20
37
|
"framer-motion": "^12.26.2",
|
|
38
|
+
"html-react-parser": "^5.2.11",
|
|
39
|
+
"lowlight": "^3.3.0",
|
|
21
40
|
"lucide-react": "^0.453.0",
|
|
22
41
|
"next": "15.4.10",
|
|
23
42
|
"react": "^19.0.0",
|
|
43
|
+
"react-beautiful-dnd": "^13.1.1",
|
|
24
44
|
"react-dom": "^19.0.0",
|
|
45
|
+
"sonner": "^2.0.7",
|
|
25
46
|
"tailwind-merge": "^3.4.0",
|
|
47
|
+
"tiptap-markdown": "^0.9.0",
|
|
26
48
|
"zod": "^3.23.8"
|
|
27
49
|
},
|
|
28
50
|
"devDependencies": {
|
|
29
51
|
"@tailwindcss/postcss": "^4.1.18",
|
|
30
52
|
"@types/node": "^22.10.7",
|
|
31
53
|
"@types/react": "^19.0.0",
|
|
54
|
+
"@types/react-beautiful-dnd": "^13.1.8",
|
|
32
55
|
"@types/react-dom": "^19.0.0",
|
|
33
56
|
"postcss": "^8.5.6",
|
|
34
57
|
"tailwindcss": "^4.1.18",
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useRouter, useSearchParams } from "next/navigation";
|
|
4
|
+
import { Suspense } from "react";
|
|
5
|
+
import {
|
|
6
|
+
InviteEmailDisplay,
|
|
7
|
+
InviteErrorState,
|
|
8
|
+
InviteExistingUserForm,
|
|
9
|
+
InviteFooter,
|
|
10
|
+
InviteHeader,
|
|
11
|
+
InviteLoadingState,
|
|
12
|
+
InviteLoggedInMessage,
|
|
13
|
+
InviteNewAccountForm,
|
|
14
|
+
InviteUserExistsMessage,
|
|
15
|
+
} from "@/components/auth/InviteSteps";
|
|
16
|
+
import { Spinner } from "@/components/ui";
|
|
17
|
+
import { useInviteForm } from "@/hooks/useInviteForm";
|
|
18
|
+
|
|
19
|
+
function InviteContent() {
|
|
20
|
+
const searchParams = useSearchParams();
|
|
21
|
+
const router = useRouter();
|
|
22
|
+
const token = searchParams.get("token");
|
|
23
|
+
|
|
24
|
+
const {
|
|
25
|
+
invitation,
|
|
26
|
+
userExists,
|
|
27
|
+
loading,
|
|
28
|
+
error,
|
|
29
|
+
name,
|
|
30
|
+
isSubmitting,
|
|
31
|
+
isLoggingInAsInvitedUser,
|
|
32
|
+
setName,
|
|
33
|
+
handleJoin,
|
|
34
|
+
} = useInviteForm(token);
|
|
35
|
+
|
|
36
|
+
if (loading) {
|
|
37
|
+
return <InviteLoadingState />;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (error) {
|
|
41
|
+
return <InviteErrorState error={error} onGoHome={() => router.push("/")} />;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (!invitation) {
|
|
45
|
+
return (
|
|
46
|
+
<InviteErrorState
|
|
47
|
+
error="Invitation not found"
|
|
48
|
+
onGoHome={() => router.push("/")}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<div className="max-w-sm mx-auto py-10 px-4">
|
|
55
|
+
<InviteHeader />
|
|
56
|
+
|
|
57
|
+
<div className="bg-card border border-border/40 rounded-3xl p-6 shadow-xl space-y-5">
|
|
58
|
+
<InviteEmailDisplay email={invitation.email} />
|
|
59
|
+
|
|
60
|
+
{userExists && !isLoggingInAsInvitedUser ? (
|
|
61
|
+
<InviteUserExistsMessage
|
|
62
|
+
onSignIn={() =>
|
|
63
|
+
router.push(
|
|
64
|
+
`/login?email=${encodeURIComponent(invitation.email)}&redirect=${encodeURIComponent(window.location.href)}`
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
/>
|
|
68
|
+
) : (
|
|
69
|
+
<>
|
|
70
|
+
{!userExists && (
|
|
71
|
+
<InviteNewAccountForm
|
|
72
|
+
name={name}
|
|
73
|
+
loading={isSubmitting}
|
|
74
|
+
onNameChange={setName}
|
|
75
|
+
onSubmit={handleJoin}
|
|
76
|
+
/>
|
|
77
|
+
)}
|
|
78
|
+
|
|
79
|
+
{userExists && isLoggingInAsInvitedUser && (
|
|
80
|
+
<>
|
|
81
|
+
<InviteLoggedInMessage userName={invitation.email} />
|
|
82
|
+
<InviteExistingUserForm
|
|
83
|
+
loading={isSubmitting}
|
|
84
|
+
onSubmit={handleJoin}
|
|
85
|
+
/>
|
|
86
|
+
</>
|
|
87
|
+
)}
|
|
88
|
+
</>
|
|
89
|
+
)}
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<InviteFooter />
|
|
93
|
+
</div>
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export default function InvitePage() {
|
|
98
|
+
return (
|
|
99
|
+
<Suspense
|
|
100
|
+
fallback={
|
|
101
|
+
<div className="flex items-center justify-center min-h-screen">
|
|
102
|
+
<Spinner size="lg" />
|
|
103
|
+
</div>
|
|
104
|
+
}
|
|
105
|
+
>
|
|
106
|
+
<InviteContent />
|
|
107
|
+
</Suspense>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { AuthLayoutUI } from "@/components";
|
|
4
|
+
import { LoadingPage } from "@/components/ui";
|
|
5
|
+
import { useAuthLayoutLogic } from "@/hooks";
|
|
6
|
+
|
|
7
|
+
export default function AuthLayout({
|
|
8
|
+
children,
|
|
9
|
+
}: {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
}) {
|
|
12
|
+
const { isLoading } = useAuthLayoutLogic();
|
|
13
|
+
|
|
14
|
+
if (isLoading) {
|
|
15
|
+
return <LoadingPage />;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return <AuthLayoutUI>{children}</AuthLayoutUI>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import { LoginEmailStep, LoginOtpStep } from "@/components/auth/LoginSteps";
|
|
5
|
+
import { useLoginForm } from "@/hooks/useLoginForm";
|
|
6
|
+
|
|
7
|
+
export default function LoginPage() {
|
|
8
|
+
const {
|
|
9
|
+
step,
|
|
10
|
+
email,
|
|
11
|
+
otp,
|
|
12
|
+
loading,
|
|
13
|
+
setEmail,
|
|
14
|
+
setOtp,
|
|
15
|
+
handleSendOtp,
|
|
16
|
+
handleVerify,
|
|
17
|
+
goBackToEmail,
|
|
18
|
+
} = useLoginForm();
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div className="space-y-8">
|
|
22
|
+
{/* Header */}
|
|
23
|
+
<div className="space-y-2 text-center">
|
|
24
|
+
<h2 className="text-2xl font-bold tracking-tight text-foreground">
|
|
25
|
+
Sign in
|
|
26
|
+
</h2>
|
|
27
|
+
<p className="text-sm text-muted-foreground/80">
|
|
28
|
+
{step === "email"
|
|
29
|
+
? "Enter your email to access your workspace"
|
|
30
|
+
: `We've sent a code to ${email}`}
|
|
31
|
+
</p>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
{/* Steps */}
|
|
35
|
+
{step === "email" ? (
|
|
36
|
+
<LoginEmailStep
|
|
37
|
+
email={email}
|
|
38
|
+
loading={loading}
|
|
39
|
+
onEmailChange={setEmail}
|
|
40
|
+
onSubmit={handleSendOtp}
|
|
41
|
+
/>
|
|
42
|
+
) : (
|
|
43
|
+
<LoginOtpStep
|
|
44
|
+
email={email}
|
|
45
|
+
otp={otp}
|
|
46
|
+
loading={loading}
|
|
47
|
+
onOtpChange={setOtp}
|
|
48
|
+
onSubmit={handleVerify}
|
|
49
|
+
onBack={goBackToEmail}
|
|
50
|
+
/>
|
|
51
|
+
)}
|
|
52
|
+
|
|
53
|
+
{/* Footer */}
|
|
54
|
+
<div className="text-center text-sm text-muted-foreground/50">
|
|
55
|
+
Don't have an account?{" "}
|
|
56
|
+
<Link
|
|
57
|
+
href="/register"
|
|
58
|
+
className="font-medium text-primary hover:underline transition-colors"
|
|
59
|
+
>
|
|
60
|
+
Create an account
|
|
61
|
+
</Link>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Button, Input } from "@/components/ui";
|
|
4
|
+
import { useWorkspaceCreateForm } from "@/hooks/useWorkspaceCreateForm";
|
|
5
|
+
|
|
6
|
+
export default function OnboardingWorkspacePage() {
|
|
7
|
+
const { name, isLoading, setName, handleSubmit } = useWorkspaceCreateForm();
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<div className="space-y-6">
|
|
11
|
+
{/* Header */}
|
|
12
|
+
<div className="text-center space-y-2">
|
|
13
|
+
<h1 className="text-2xl font-bold tracking-tight">
|
|
14
|
+
Create your workspace
|
|
15
|
+
</h1>
|
|
16
|
+
<p className="text-sm text-muted-foreground">
|
|
17
|
+
You need at least one workspace to get started.
|
|
18
|
+
</p>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
{/* Form */}
|
|
22
|
+
<form onSubmit={handleSubmit} className="space-y-4">
|
|
23
|
+
<div className="space-y-2">
|
|
24
|
+
<label className="text-xs font-semibold uppercase tracking-wider text-muted-foreground">
|
|
25
|
+
Workspace Name
|
|
26
|
+
</label>
|
|
27
|
+
<Input
|
|
28
|
+
placeholder="e.g. Acme Corp, My Projects"
|
|
29
|
+
value={name}
|
|
30
|
+
onChange={(e) => setName(e.target.value)}
|
|
31
|
+
required
|
|
32
|
+
autoFocus
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<Button
|
|
37
|
+
type="submit"
|
|
38
|
+
className="w-full"
|
|
39
|
+
disabled={!name.trim() || isLoading}
|
|
40
|
+
>
|
|
41
|
+
{isLoading ? "Creating..." : "Get Started"}
|
|
42
|
+
</Button>
|
|
43
|
+
</form>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import Link from "next/link";
|
|
4
|
+
import {
|
|
5
|
+
RegisterEmailStep,
|
|
6
|
+
RegisterInviteStep,
|
|
7
|
+
RegisterOrganizationStep,
|
|
8
|
+
RegisterOtpStep,
|
|
9
|
+
RegisterProfileStep,
|
|
10
|
+
RegisterWorkspaceStep,
|
|
11
|
+
} from "@/components/auth/RegisterSteps";
|
|
12
|
+
import { StepProgress } from "@/components/onboarding";
|
|
13
|
+
import { useRegisterForm } from "@/hooks/useRegisterForm";
|
|
14
|
+
|
|
15
|
+
export default function RegisterPage() {
|
|
16
|
+
const {
|
|
17
|
+
step,
|
|
18
|
+
loading,
|
|
19
|
+
email,
|
|
20
|
+
otp,
|
|
21
|
+
name,
|
|
22
|
+
companyName,
|
|
23
|
+
teamSize,
|
|
24
|
+
userRole,
|
|
25
|
+
workspaceName,
|
|
26
|
+
invitedEmails,
|
|
27
|
+
currentInviteEmail,
|
|
28
|
+
currentStepIndex,
|
|
29
|
+
setEmail,
|
|
30
|
+
setOtp,
|
|
31
|
+
setName,
|
|
32
|
+
setCompanyName,
|
|
33
|
+
setTeamSize,
|
|
34
|
+
setUserRole,
|
|
35
|
+
setWorkspaceName,
|
|
36
|
+
setCurrentInviteEmail,
|
|
37
|
+
goToStep,
|
|
38
|
+
handleSendOtp,
|
|
39
|
+
handleVerifyOtp,
|
|
40
|
+
handleAddInvite,
|
|
41
|
+
handleRemoveInvite,
|
|
42
|
+
handleCompleteRegistration,
|
|
43
|
+
} = useRegisterForm();
|
|
44
|
+
|
|
45
|
+
const renderStep = () => {
|
|
46
|
+
switch (step) {
|
|
47
|
+
case "email":
|
|
48
|
+
return (
|
|
49
|
+
<RegisterEmailStep
|
|
50
|
+
email={email}
|
|
51
|
+
loading={loading}
|
|
52
|
+
onEmailChange={setEmail}
|
|
53
|
+
onSubmit={handleSendOtp}
|
|
54
|
+
/>
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
case "otp":
|
|
58
|
+
return (
|
|
59
|
+
<RegisterOtpStep
|
|
60
|
+
email={email}
|
|
61
|
+
otp={otp}
|
|
62
|
+
loading={loading}
|
|
63
|
+
onOtpChange={setOtp}
|
|
64
|
+
onSubmit={handleVerifyOtp}
|
|
65
|
+
onBack={() => goToStep("email")}
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
case "profile":
|
|
70
|
+
return (
|
|
71
|
+
<RegisterProfileStep
|
|
72
|
+
name={name}
|
|
73
|
+
userRole={userRole}
|
|
74
|
+
onNameChange={setName}
|
|
75
|
+
onRoleChange={setUserRole}
|
|
76
|
+
onSubmit={(e) => {
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
goToStep("organization");
|
|
79
|
+
}}
|
|
80
|
+
/>
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
case "organization":
|
|
84
|
+
return (
|
|
85
|
+
<RegisterOrganizationStep
|
|
86
|
+
companyName={companyName}
|
|
87
|
+
teamSize={teamSize}
|
|
88
|
+
onCompanyNameChange={setCompanyName}
|
|
89
|
+
onTeamSizeChange={setTeamSize}
|
|
90
|
+
onSubmit={(e) => {
|
|
91
|
+
e.preventDefault();
|
|
92
|
+
goToStep("workspace");
|
|
93
|
+
}}
|
|
94
|
+
/>
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
case "workspace":
|
|
98
|
+
return (
|
|
99
|
+
<RegisterWorkspaceStep
|
|
100
|
+
workspaceName={workspaceName}
|
|
101
|
+
onWorkspaceNameChange={setWorkspaceName}
|
|
102
|
+
onSubmit={(e) => {
|
|
103
|
+
e.preventDefault();
|
|
104
|
+
goToStep("invite");
|
|
105
|
+
}}
|
|
106
|
+
/>
|
|
107
|
+
);
|
|
108
|
+
|
|
109
|
+
case "invite":
|
|
110
|
+
return (
|
|
111
|
+
<RegisterInviteStep
|
|
112
|
+
invitedEmails={invitedEmails}
|
|
113
|
+
currentInviteEmail={currentInviteEmail}
|
|
114
|
+
loading={loading}
|
|
115
|
+
onCurrentEmailChange={setCurrentInviteEmail}
|
|
116
|
+
onAddInvite={handleAddInvite}
|
|
117
|
+
onRemoveInvite={handleRemoveInvite}
|
|
118
|
+
onSkip={() => handleCompleteRegistration()}
|
|
119
|
+
onSubmit={() => handleCompleteRegistration()}
|
|
120
|
+
onKeyDown={(e) => e.key === "Enter" && handleAddInvite()}
|
|
121
|
+
/>
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<div className="space-y-8">
|
|
128
|
+
{/* Header */}
|
|
129
|
+
<div className="space-y-2 text-center">
|
|
130
|
+
<h2 className="text-2xl font-bold tracking-tight text-foreground">
|
|
131
|
+
{step === "invite" ? "Bring your team" : "Create your account"}
|
|
132
|
+
</h2>
|
|
133
|
+
<p className="text-sm text-muted-foreground/80">
|
|
134
|
+
{step === "email" && "Experience the future of task management."}
|
|
135
|
+
{step === "otp" && "We've sent a 6-digit code to your email."}
|
|
136
|
+
{step === "profile" && "Let's personalize your experience."}
|
|
137
|
+
{step === "organization" && "Tell us about your company."}
|
|
138
|
+
{step === "workspace" && "Create your first collaborative space."}
|
|
139
|
+
{step === "invite" && "Collaboration is better together."}
|
|
140
|
+
</p>
|
|
141
|
+
</div>
|
|
142
|
+
|
|
143
|
+
{/* Progress indicator for main steps (not email/otp) */}
|
|
144
|
+
{step !== "email" && step !== "otp" && (
|
|
145
|
+
<StepProgress currentStep={currentStepIndex - 2} totalSteps={4} />
|
|
146
|
+
)}
|
|
147
|
+
|
|
148
|
+
{/* Render current step */}
|
|
149
|
+
{renderStep()}
|
|
150
|
+
|
|
151
|
+
{/* Footer for email step */}
|
|
152
|
+
{step === "email" && (
|
|
153
|
+
<div className="text-center text-sm text-muted-foreground/50 mt-8">
|
|
154
|
+
Already have an account?{" "}
|
|
155
|
+
<Link
|
|
156
|
+
href="/login"
|
|
157
|
+
className="font-medium text-primary hover:underline transition-colors"
|
|
158
|
+
>
|
|
159
|
+
Sign in
|
|
160
|
+
</Link>
|
|
161
|
+
</div>
|
|
162
|
+
)}
|
|
163
|
+
</div>
|
|
164
|
+
);
|
|
165
|
+
}
|