mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-05-19 05:45:01 -04:00
Rename @spaceui/* deps to @spacedrive/*
This commit is contained in:
@@ -584,11 +584,11 @@ Spacedrive's UI components come from [SpaceUI](https://github.com/spacedriveapp/
|
||||
|
||||
| Package | Description |
|
||||
|---------|-------------|
|
||||
| `@spaceui/tokens` | Design tokens, semantic color system, Tailwind v4 theme |
|
||||
| `@spaceui/primitives` | Base UI components built on Radix UI |
|
||||
| `@spaceui/forms` | Form field wrappers for react-hook-form |
|
||||
| `@spaceui/ai` | AI agent interaction components |
|
||||
| `@spaceui/explorer` | File management components |
|
||||
| `@spacedrive/tokens` | Design tokens, semantic color system, Tailwind v4 theme |
|
||||
| `@spacedrive/primitives` | Base UI components built on Radix UI |
|
||||
| `@spacedrive/forms` | Form field wrappers for react-hook-form |
|
||||
| `@spacedrive/ai` | AI agent interaction components |
|
||||
| `@spacedrive/explorer` | File management components |
|
||||
|
||||
### Working on UI Alongside Spacedrive
|
||||
|
||||
@@ -615,14 +615,14 @@ bun run link
|
||||
|
||||
# Link into Spacedrive
|
||||
cd ../spacedrive
|
||||
bun link @spaceui/tokens @spaceui/primitives @spaceui/ai
|
||||
bun link @spacedrive/tokens @spacedrive/primitives @spacedrive/ai
|
||||
```
|
||||
|
||||
With linking active, changes you make in `spaceui/` are picked up immediately by Spacedrive's Vite dev server — no rebuild needed. The Vite configs in `apps/tauri/` and `apps/web/` already have the necessary source aliases, `optimizeDeps.exclude`, and `server.fs.allow` settings configured.
|
||||
|
||||
### If You're Only Working on Spacedrive
|
||||
|
||||
If you're not modifying SpaceUI itself, you don't need to clone it. Spacedrive consumes published `@spaceui/*` packages from npm. Just run `bun install` and everything resolves from the registry.
|
||||
If you're not modifying SpaceUI itself, you don't need to clone it. Spacedrive consumes published `@spacedrive/*` packages from npm. Just run `bun install` and everything resolves from the registry.
|
||||
|
||||
### SpaceUI Integration Guide
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ const path = require("path");
|
||||
const projectRoot = __dirname;
|
||||
const workspaceRoot = path.resolve(projectRoot, "../..");
|
||||
const spaceUiTokensRoot = path.dirname(
|
||||
require.resolve("@spaceui/tokens/raw-colors", { paths: [projectRoot, workspaceRoot] })
|
||||
require.resolve("@spacedrive/tokens/raw-colors", { paths: [projectRoot, workspaceRoot] })
|
||||
);
|
||||
const spaceUiTokensNodeModules = path.resolve(spaceUiTokensRoot, "node_modules");
|
||||
|
||||
@@ -50,7 +50,7 @@ config.resolver = {
|
||||
|
||||
// Dynamically resolve React/React Native from wherever the package manager installed them
|
||||
extraNodeModules: {
|
||||
"@spaceui/tokens": spaceUiTokensRoot,
|
||||
"@spacedrive/tokens": spaceUiTokensRoot,
|
||||
react: path.dirname(require.resolve("react/package.json", { paths: [projectRoot, workspaceRoot] })),
|
||||
"react-native": path.dirname(
|
||||
require.resolve("react-native/package.json", { paths: [projectRoot, workspaceRoot] })
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
"@react-navigation/native-stack": "^7.2.0",
|
||||
"@sd/assets": "workspace:*",
|
||||
"@sd/ts-client": "workspace:*",
|
||||
"@spaceui/tokens": "link:@spaceui/tokens",
|
||||
"@spacedrive/tokens": "link:@spacedrive/tokens",
|
||||
"@shopify/flash-list": "2.0.2",
|
||||
"@tanstack/react-query": "^5.59.0",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const sharedColors = require('@spaceui/tokens/raw-colors');
|
||||
const sharedColors = require('@spacedrive/tokens/raw-colors');
|
||||
|
||||
/**
|
||||
* Convert shared color format (HSL string) to NativeWind format (hsl() function)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@headlessui/tailwindcss": "^0.2.0",
|
||||
"@spaceui/tokens": "link:@spaceui/tokens",
|
||||
"@spacedrive/tokens": "link:@spacedrive/tokens",
|
||||
"@tailwindcss/forms": "^0.5.7",
|
||||
"@tailwindcss/typography": "^0.5.10",
|
||||
"@tailwindcss/vite": "^4.1.0",
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
@import "tailwindcss";
|
||||
@import "@spaceui/tokens/src/css/theme.css";
|
||||
@import "@spaceui/tokens/src/css/base.css";
|
||||
@import "@spaceui/tokens/src/css/themes/light.css";
|
||||
@import "@spaceui/tokens/src/css/themes/midnight.css";
|
||||
@import "@spaceui/tokens/src/css/themes/noir.css";
|
||||
@import "@spaceui/tokens/src/css/themes/slate.css";
|
||||
@import "@spaceui/tokens/src/css/themes/nord.css";
|
||||
@import "@spaceui/tokens/src/css/themes/mocha.css";
|
||||
@import "@spacedrive/tokens/src/css/theme.css";
|
||||
@import "@spacedrive/tokens/src/css/base.css";
|
||||
@import "@spacedrive/tokens/src/css/themes/light.css";
|
||||
@import "@spacedrive/tokens/src/css/themes/midnight.css";
|
||||
@import "@spacedrive/tokens/src/css/themes/noir.css";
|
||||
@import "@spacedrive/tokens/src/css/themes/slate.css";
|
||||
@import "@spacedrive/tokens/src/css/themes/nord.css";
|
||||
@import "@spacedrive/tokens/src/css/themes/mocha.css";
|
||||
|
||||
/* Tell Tailwind v4 where to scan for utility classes */
|
||||
@source "../../../packages/ui/src";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow";
|
||||
import { ContextMenu } from "@spaceui/primitives";
|
||||
import { ContextMenu } from "@spacedrive/primitives";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
|
||||
export interface MenuItem {
|
||||
|
||||
@@ -54,28 +54,28 @@ export default defineConfig(async () => ({
|
||||
)
|
||||
},
|
||||
{
|
||||
find: '@spaceui/tokens/src/css',
|
||||
find: '@spacedrive/tokens/src/css',
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
'../../../spaceui/packages/tokens/src/css'
|
||||
)
|
||||
},
|
||||
{
|
||||
find: '@spaceui/tokens',
|
||||
find: '@spacedrive/tokens',
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
'../../../spaceui/packages/tokens'
|
||||
)
|
||||
},
|
||||
{
|
||||
find: '@spaceui/ai',
|
||||
find: '@spacedrive/ai',
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
'../../../spaceui/packages/ai/src/index.ts'
|
||||
)
|
||||
},
|
||||
{
|
||||
find: '@spaceui/primitives',
|
||||
find: '@spacedrive/primitives',
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
'../../../spaceui/packages/primitives/src/index.ts'
|
||||
@@ -106,7 +106,7 @@ export default defineConfig(async () => ({
|
||||
},
|
||||
|
||||
optimizeDeps: {
|
||||
exclude: ['@spaceui/ai', '@spaceui/primitives', '@spaceui/tokens']
|
||||
exclude: ['@spacedrive/ai', '@spacedrive/primitives', '@spacedrive/tokens']
|
||||
},
|
||||
|
||||
clearScreen: false,
|
||||
|
||||
@@ -28,21 +28,21 @@ export default defineConfig({
|
||||
replacement: path.resolve(__dirname, "./node_modules/react-dom/client.js"),
|
||||
},
|
||||
{
|
||||
find: "@spaceui/tokens/css/themes",
|
||||
find: "@spacedrive/tokens/css/themes",
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
"../../../spaceui/packages/tokens/src/css/themes",
|
||||
),
|
||||
},
|
||||
{
|
||||
find: "@spaceui/tokens/css",
|
||||
find: "@spacedrive/tokens/css",
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
"../../../spaceui/packages/tokens/src/css/base.css",
|
||||
),
|
||||
},
|
||||
{
|
||||
find: "@spaceui/tokens",
|
||||
find: "@spacedrive/tokens",
|
||||
replacement: path.resolve(
|
||||
__dirname,
|
||||
"../../../spaceui/packages/tokens/src/index.ts",
|
||||
@@ -67,7 +67,7 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ["@spaceui/ai", "@spaceui/primitives", "@spaceui/tokens"],
|
||||
exclude: ["@spacedrive/ai", "@spacedrive/primitives", "@spacedrive/tokens"],
|
||||
},
|
||||
build: {
|
||||
outDir: "dist",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Migrate @sd/ui → @spaceui/primitives
|
||||
# Migrate @sd/ui → @spacedrive/primitives
|
||||
|
||||
Replace all imports from `@sd/ui` with `@spaceui/primitives` across the spacedrive codebase. The components are identical — same names, same props, same behavior. This is a pure import path swap.
|
||||
Replace all imports from `@sd/ui` with `@spacedrive/primitives` across the spacedrive codebase. The components are identical — same names, same props, same behavior. This is a pure import path swap.
|
||||
|
||||
## Rules
|
||||
|
||||
@@ -11,11 +11,11 @@ Replace all imports from `@sd/ui` with `@spaceui/primitives` across the spacedri
|
||||
|
||||
## Import Mapping
|
||||
|
||||
Every import from `'@sd/ui'` becomes an import from `'@spaceui/primitives'` with these exceptions:
|
||||
Every import from `'@sd/ui'` becomes an import from `'@spacedrive/primitives'` with these exceptions:
|
||||
|
||||
### Form field wrappers → `@spaceui/forms`
|
||||
### Form field wrappers → `@spacedrive/forms`
|
||||
|
||||
These imports come from `@spaceui/forms`, NOT `@spaceui/primitives`:
|
||||
These imports come from `@spacedrive/forms`, NOT `@spacedrive/primitives`:
|
||||
|
||||
- `FormField`
|
||||
- `CheckBoxField`
|
||||
@@ -30,9 +30,9 @@ These imports come from `@spaceui/forms`, NOT `@spaceui/primitives`:
|
||||
- `cva` → `import { cva } from 'class-variance-authority'`
|
||||
- `cx` → `import { cx } from 'class-variance-authority'`
|
||||
|
||||
### Everything else → `@spaceui/primitives`
|
||||
### Everything else → `@spacedrive/primitives`
|
||||
|
||||
All of these come from `@spaceui/primitives`:
|
||||
All of these come from `@spacedrive/primitives`:
|
||||
|
||||
```
|
||||
Button, buttonStyles, buttonVariants, ButtonProps, LinkButtonProps
|
||||
@@ -83,10 +83,10 @@ export * as Dropdown from './Dropdown';
|
||||
export * as RadioGroup from './RadioGroup';
|
||||
export * as Tabs from './Tabs';
|
||||
|
||||
// After — same namespace pattern from @spaceui/primitives:
|
||||
import { Dropdown } from '@spaceui/primitives'; // if using the namespace re-export
|
||||
// After — same namespace pattern from @spacedrive/primitives:
|
||||
import { Dropdown } from '@spacedrive/primitives'; // if using the namespace re-export
|
||||
// OR
|
||||
import * as Dropdown from '@spaceui/primitives/src/Dropdown'; // direct
|
||||
import * as Dropdown from '@spacedrive/primitives/src/Dropdown'; // direct
|
||||
```
|
||||
|
||||
Check each file's actual usage to determine the correct import style.
|
||||
@@ -115,8 +115,8 @@ Some files import both primitives AND form fields from `@sd/ui`. Split into two
|
||||
import { Button, Input, Dialog, useDialog, dialogManager, InputField, FormField } from '@sd/ui';
|
||||
|
||||
// After
|
||||
import { Button, Input, Dialog, useDialog, dialogManager } from '@spaceui/primitives';
|
||||
import { InputField, FormField } from '@spaceui/forms';
|
||||
import { Button, Input, Dialog, useDialog, dialogManager } from '@spacedrive/primitives';
|
||||
import { InputField, FormField } from '@spacedrive/forms';
|
||||
```
|
||||
|
||||
## How to Handle cva/cx
|
||||
@@ -127,7 +127,7 @@ import { cva, cx, Button } from '@sd/ui';
|
||||
|
||||
// After
|
||||
import { cva, cx } from 'class-variance-authority';
|
||||
import { Button } from '@spaceui/primitives';
|
||||
import { Button } from '@spacedrive/primitives';
|
||||
```
|
||||
|
||||
## Verification
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
</Popover>
|
||||
```
|
||||
|
||||
`Popover` is now a Radix composable object from `@spaceui/primitives`, not a function component. Every usage must be converted.
|
||||
`Popover` is now a Radix composable object from `@spacedrive/primitives`, not a function component. Every usage must be converted.
|
||||
|
||||
## The Pattern
|
||||
|
||||
**Before:**
|
||||
```tsx
|
||||
import { Popover, usePopover } from "@spaceui/primitives";
|
||||
import { Popover, usePopover } from "@spacedrive/primitives";
|
||||
|
||||
const popover = usePopover();
|
||||
|
||||
@@ -33,7 +33,7 @@ const popover = usePopover();
|
||||
|
||||
**After:**
|
||||
```tsx
|
||||
import { Popover, usePopover } from "@spaceui/primitives";
|
||||
import { Popover, usePopover } from "@spacedrive/primitives";
|
||||
|
||||
const popover = usePopover();
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ The repo publishes multiple packages from a single monorepo. Domain-specific com
|
||||
```
|
||||
spacedriveapp/spaceui/
|
||||
├── packages/
|
||||
│ ├── primitives/ # @spaceui/primitives
|
||||
│ ├── primitives/ # @spacedrive/primitives
|
||||
│ │ ├── src/
|
||||
│ │ │ ├── Button.tsx
|
||||
│ │ │ ├── Input.tsx
|
||||
@@ -68,7 +68,7 @@ spacedriveapp/spaceui/
|
||||
│ │ │ └── index.ts
|
||||
│ │ └── package.json
|
||||
│ │
|
||||
│ ├── forms/ # @spaceui/forms
|
||||
│ ├── forms/ # @spacedrive/forms
|
||||
│ │ ├── src/
|
||||
│ │ │ ├── Form.tsx
|
||||
│ │ │ ├── FormField.tsx
|
||||
@@ -79,9 +79,9 @@ spacedriveapp/spaceui/
|
||||
│ │ │ ├── RadioGroupField.tsx
|
||||
│ │ │ ├── SwitchField.tsx
|
||||
│ │ │ └── index.ts
|
||||
│ │ └── package.json # peer deps: @spaceui/primitives, react-hook-form, zod
|
||||
│ │ └── package.json # peer deps: @spacedrive/primitives, react-hook-form, zod
|
||||
│ │
|
||||
│ ├── ai/ # @spaceui/ai
|
||||
│ ├── ai/ # @spacedrive/ai
|
||||
│ │ ├── src/
|
||||
│ │ │ ├── ToolCall.tsx
|
||||
│ │ │ ├── Markdown.tsx
|
||||
@@ -99,9 +99,9 @@ spacedriveapp/spaceui/
|
||||
│ │ │ ├── AutonomyPanel.tsx
|
||||
│ │ │ ├── types.ts
|
||||
│ │ │ └── index.ts
|
||||
│ │ └── package.json # peer deps: @spaceui/primitives, @spacebot/api-client
|
||||
│ │ └── package.json # peer deps: @spacedrive/primitives, @spacebot/api-client
|
||||
│ │
|
||||
│ ├── explorer/ # @spaceui/explorer
|
||||
│ ├── explorer/ # @spacedrive/explorer
|
||||
│ │ ├── src/
|
||||
│ │ │ ├── FileGrid.tsx
|
||||
│ │ │ ├── FileList.tsx
|
||||
@@ -117,9 +117,9 @@ spacedriveapp/spaceui/
|
||||
│ │ │ ├── RenameInput.tsx
|
||||
│ │ │ ├── types.ts
|
||||
│ │ │ └── index.ts
|
||||
│ │ └── package.json # peer deps: @spaceui/primitives
|
||||
│ │ └── package.json # peer deps: @spacedrive/primitives
|
||||
│ │
|
||||
│ └── tokens/ # @spaceui/tokens
|
||||
│ └── tokens/ # @spacedrive/tokens
|
||||
│ ├── src/
|
||||
│ │ ├── colors.ts # semantic color definitions
|
||||
│ │ ├── tailwind-preset.ts
|
||||
@@ -133,13 +133,13 @@ spacedriveapp/spaceui/
|
||||
│
|
||||
├── turbo.json # or bun workspace config
|
||||
├── tsconfig.base.json
|
||||
├── tailwind.config.ts # base config using @spaceui/tokens
|
||||
├── tailwind.config.ts # base config using @spacedrive/tokens
|
||||
└── package.json # workspace root
|
||||
```
|
||||
|
||||
### Package Responsibilities
|
||||
|
||||
#### `@spaceui/tokens`
|
||||
#### `@spacedrive/tokens`
|
||||
|
||||
Design tokens and Tailwind preset. The foundation everything else builds on.
|
||||
|
||||
@@ -151,11 +151,11 @@ Design tokens and Tailwind preset. The foundation everything else builds on.
|
||||
|
||||
Both app `tailwind.config.ts` files use:
|
||||
```ts
|
||||
import { spaceUiPreset } from '@spaceui/tokens';
|
||||
import { spaceUiPreset } from '@spacedrive/tokens';
|
||||
export default { presets: [spaceUiPreset], /* app-specific overrides */ };
|
||||
```
|
||||
|
||||
#### `@spaceui/primitives`
|
||||
#### `@spacedrive/primitives`
|
||||
|
||||
All interactive building blocks. No business logic. No data fetching. No product-specific concepts.
|
||||
|
||||
@@ -179,16 +179,16 @@ All interactive building blocks. No business logic. No data fetching. No product
|
||||
- Typography — unify Spacedrive's set with spacebot's 6 heading/body variants
|
||||
- Shortcut/Kbd — evaluate and keep one
|
||||
|
||||
#### `@spaceui/forms`
|
||||
#### `@spacedrive/forms`
|
||||
|
||||
Form field wrappers built on `react-hook-form` + `@spaceui/primitives`. Identical pattern in both apps today — Controller wrapper → Label → Primitive → ErrorMessage.
|
||||
Form field wrappers built on `react-hook-form` + `@spacedrive/primitives`. Identical pattern in both apps today — Controller wrapper → Label → Primitive → ErrorMessage.
|
||||
|
||||
- Form, FormField (base wrapper)
|
||||
- InputField, TextAreaField
|
||||
- SelectField, CheckboxField, RadioGroupField, SwitchField
|
||||
- Peer deps on `react-hook-form` and `zod`
|
||||
|
||||
#### `@spaceui/ai`
|
||||
#### `@spacedrive/ai`
|
||||
|
||||
Assembled components for AI agent interaction. These understand agent concepts — tool calls, workers, transcripts, tasks, memories, conversations — but are not tied to any specific agent runtime. Tailored to Spacebot today, generic enough that the component vocabulary applies to any agent surface.
|
||||
|
||||
@@ -255,7 +255,7 @@ interface AgentInfo { id: string; name: string; detail: string; status?: string;
|
||||
interface ModelOption { id: string; name: string; provider: string; context_window?: number; capabilities?: string[]; }
|
||||
```
|
||||
|
||||
#### `@spaceui/explorer`
|
||||
#### `@spacedrive/explorer`
|
||||
|
||||
Assembled components for file browsing and management. These understand file system concepts — paths, thumbnails, kinds, tags, metadata, preview — but are not tied to Spacedrive's specific backend. The Spacedrive app wires them to its core queries; any other file-browsing surface could use them with different data sources.
|
||||
|
||||
@@ -292,7 +292,7 @@ The explorer package starts smaller than ai — many of these components are dee
|
||||
|
||||
## Dependency Strategy
|
||||
|
||||
### `@spaceui/primitives` Dependencies
|
||||
### `@spacedrive/primitives` Dependencies
|
||||
|
||||
Direct:
|
||||
- `@radix-ui/*` (checkbox, dialog, dropdown-menu, popover, radio-group, select, slider, switch, tabs, tooltip)
|
||||
@@ -305,13 +305,13 @@ Peer:
|
||||
- `react`, `react-dom`
|
||||
- `tailwindcss` (build-time)
|
||||
|
||||
### `@spaceui/ai` Dependencies
|
||||
### `@spacedrive/ai` Dependencies
|
||||
|
||||
Direct:
|
||||
- `react-markdown`, `remark-gfm`, `rehype-raw` (for Markdown)
|
||||
|
||||
Peer:
|
||||
- `@spaceui/primitives`
|
||||
- `@spacedrive/primitives`
|
||||
- `@spacebot/api-client` (for types)
|
||||
- `@tanstack/react-query` (consumers provide)
|
||||
- `@tanstack/react-virtual` (consumers provide)
|
||||
@@ -321,10 +321,10 @@ Optional / lazy-loaded:
|
||||
- `@react-sigma/core`, `sigma`, `graphology` (MemoryGraph — code-split)
|
||||
- `@dnd-kit/core`, `@dnd-kit/sortable`, `@dnd-kit/utilities` (TaskBoard — code-split)
|
||||
|
||||
### `@spaceui/explorer` Dependencies
|
||||
### `@spacedrive/explorer` Dependencies
|
||||
|
||||
Peer:
|
||||
- `@spaceui/primitives`
|
||||
- `@spacedrive/primitives`
|
||||
- `@tanstack/react-virtual` (consumers provide)
|
||||
- `react`, `react-dom`
|
||||
|
||||
@@ -366,7 +366,7 @@ App-specific layout, routing, Spacedrive integration, and anything that calls `u
|
||||
- Selection management
|
||||
- Platform-specific behavior (Tauri commands, native menus)
|
||||
|
||||
Spacedrive's `@sd/ui` package **goes away** — its contents migrate to `@spaceui/primitives`. During transition, `@sd/ui` becomes a thin re-export wrapper, then is removed.
|
||||
Spacedrive's `@sd/ui` package **goes away** — its contents migrate to `@spacedrive/primitives`. During transition, `@sd/ui` becomes a thin re-export wrapper, then is removed.
|
||||
|
||||
### Spacebot Portal `spacebot/interface/src/`
|
||||
|
||||
@@ -392,32 +392,32 @@ The portal's `/src/ui/` directory **is deleted entirely** once migration is comp
|
||||
### Phase 0 — Bootstrap the Repo
|
||||
|
||||
1. Create `spacedriveapp/spaceui` repo with monorepo tooling (Turbo or Bun workspaces).
|
||||
2. Set up `@spaceui/tokens` with the shared Tailwind preset, extracting color definitions from Spacedrive's current `styles.css` and tailwind config.
|
||||
3. Set up `@spaceui/primitives`, `@spaceui/forms`, `@spaceui/ai`, `@spaceui/explorer` as empty packages with build config (tsup or unbuild, Tailwind, TypeScript).
|
||||
2. Set up `@spacedrive/tokens` with the shared Tailwind preset, extracting color definitions from Spacedrive's current `styles.css` and tailwind config.
|
||||
3. Set up `@spacedrive/primitives`, `@spacedrive/forms`, `@spacedrive/ai`, `@spacedrive/explorer` as empty packages with build config (tsup or unbuild, Tailwind, TypeScript).
|
||||
4. Both app repos add spaceui as a workspace dependency (git submodule, npm link, or published packages — your call on linking strategy).
|
||||
|
||||
### Phase 1 — Stop the Bleeding (week 1)
|
||||
|
||||
Move the actively-duplicated components first so no more copy-paste happens:
|
||||
|
||||
1. Move `ToolCall.tsx` + `pairTranscriptSteps` + types → `@spaceui/ai`
|
||||
2. Move `Markdown.tsx` → `@spaceui/ai`
|
||||
1. Move `ToolCall.tsx` + `pairTranscriptSteps` + types → `@spacedrive/ai`
|
||||
2. Move `Markdown.tsx` → `@spacedrive/ai`
|
||||
3. Both apps update imports. Delete the duplicates.
|
||||
|
||||
### Phase 2 — Primitives Migration (weeks 2–3)
|
||||
|
||||
Move all primitives out of both repos into `@spaceui/primitives`:
|
||||
Move all primitives out of both repos into `@spacedrive/primitives`:
|
||||
|
||||
1. Start with the intersection — components that exist in both @sd/ui and spacebot `/src/ui/` with identical APIs: Button, Input, Checkbox, Switch, Slider, Dialog, Tabs, Tooltip, Popover, Select, RadioGroup, Dropdown, ProgressBar, Loader, Divider.
|
||||
2. For each: take the better implementation, move to spaceui, update imports in both apps.
|
||||
3. Add spacebot-only primitives that are genuinely reusable: Badge, Card, NumberStepper, FilterButton, ToggleGroup.
|
||||
4. Merge divergent implementations: Banner/InfoBanner, Typography, Shortcut/Kbd.
|
||||
5. Move form fields → `@spaceui/forms`.
|
||||
6. Spacedrive's `@sd/ui` becomes a thin `index.ts` that re-exports from `@spaceui/primitives` (backwards compat shim).
|
||||
5. Move form fields → `@spacedrive/forms`.
|
||||
6. Spacedrive's `@sd/ui` becomes a thin `index.ts` that re-exports from `@spacedrive/primitives` (backwards compat shim).
|
||||
|
||||
### Phase 3 — AI Composite Extraction (weeks 3–5)
|
||||
|
||||
Extract shared AI composites into `@spaceui/ai`:
|
||||
Extract shared AI composites into `@spacedrive/ai`:
|
||||
|
||||
1. `InlineWorkerCard` — extract from Spacedrive, parameterize the API calls (accept data via props, not internal fetching).
|
||||
2. `ChatComposer` — extract from Spacedrive, make project/model selectors pluggable.
|
||||
@@ -428,7 +428,7 @@ Extract shared AI composites into `@spaceui/ai`:
|
||||
|
||||
### Phase 4 — New Shared Components (aligned with VISION)
|
||||
|
||||
Build new components directly in `@spaceui/ai`:
|
||||
Build new components directly in `@spacedrive/ai`:
|
||||
|
||||
1. `TaskBoard` + `TaskCard` — refactor from portal's version, serve VISION Phase 2.
|
||||
2. `MemoryGraph` + `MemoryList` — refactor from portal's MemoryGraph, add list view, serve VISION Phase 3.
|
||||
@@ -437,7 +437,7 @@ Build new components directly in `@spaceui/ai`:
|
||||
|
||||
### Phase 5 — Explorer Extraction (parallel track)
|
||||
|
||||
Extract file management components into `@spaceui/explorer` incrementally:
|
||||
Extract file management components into `@spacedrive/explorer` incrementally:
|
||||
|
||||
1. Start with self-contained pieces: TagPill, KindIcon, FileThumb, PathBar.
|
||||
2. Then stateful but bounded: RenameInput, DragOverlay, InspectorPanel.
|
||||
@@ -447,7 +447,7 @@ Extract file management components into `@spaceui/explorer` incrementally:
|
||||
### Phase 6 — Cleanup
|
||||
|
||||
1. Delete spacebot portal's `/src/ui/` entirely.
|
||||
2. Remove Spacedrive's `@sd/ui` re-export shim (update all imports to `@spaceui/primitives`).
|
||||
2. Remove Spacedrive's `@sd/ui` re-export shim (update all imports to `@spacedrive/primitives`).
|
||||
3. Audit both apps for any remaining duplicated UI code.
|
||||
4. Portal's `/src/components/` should only contain portal-specific components (channels, cortex, orchestration, admin).
|
||||
|
||||
@@ -474,7 +474,7 @@ Recommendation: **Hybrid.** During active development, both repos use workspace
|
||||
|
||||
- **No business logic.** A Button doesn't know about agents or files.
|
||||
- **Styling via className + CVA variants.** Consumers can override or extend.
|
||||
- **Semantic color classes only.** All components use `@spaceui/tokens` colors. No hardcoded hex, no `var()` references in className.
|
||||
- **Semantic color classes only.** All components use `@spacedrive/tokens` colors. No hardcoded hex, no `var()` references in className.
|
||||
- **Radix for accessibility.** Every interactive primitive wraps a Radix component.
|
||||
- **Composable over configurable.** Card has Card.Header, Card.Content, Card.Footer — not a single Card with 15 props.
|
||||
|
||||
@@ -504,7 +504,7 @@ Recommendation: **Hybrid.** During active development, both repos use workspace
|
||||
|
||||
## Audit: Full Component Inventory
|
||||
|
||||
### Primitives — Final Merged Set for `@spaceui/primitives`
|
||||
### Primitives — Final Merged Set for `@spacedrive/primitives`
|
||||
|
||||
| Component | Source | Notes |
|
||||
|-----------|--------|-------|
|
||||
@@ -541,7 +541,7 @@ Recommendation: **Hybrid.** During active development, both repos use workspace
|
||||
| TopBarButtonGroup | @sd/ui | Keep |
|
||||
| Icon | @sd/ui | Keep |
|
||||
|
||||
### AI Composites — Full Set for `@spaceui/ai`
|
||||
### AI Composites — Full Set for `@spacedrive/ai`
|
||||
|
||||
| Component | Source | Priority |
|
||||
|-----------|--------|----------|
|
||||
@@ -560,7 +560,7 @@ Recommendation: **Hybrid.** During active development, both repos use workspace
|
||||
| CronJobList | New | Phase 4 (VISION P3) |
|
||||
| AutonomyPanel | New | Phase 4 (VISION P4) |
|
||||
|
||||
### Explorer Composites — Initial Set for `@spaceui/explorer`
|
||||
### Explorer Composites — Initial Set for `@spacedrive/explorer`
|
||||
|
||||
| Component | Source | Priority |
|
||||
|-----------|--------|----------|
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
"@react-three/fiber": "^9.4.2",
|
||||
"@sd/assets": "workspace:*",
|
||||
"@sd/ts-client": "workspace:*",
|
||||
"@spaceui/ai": "link:@spaceui/ai",
|
||||
"@spaceui/primitives": "link:@spaceui/primitives",
|
||||
"@spaceui/tokens": "link:@spaceui/tokens",
|
||||
"@spacedrive/ai": "link:@spacedrive/ai",
|
||||
"@spacedrive/primitives": "link:@spacedrive/primitives",
|
||||
"@spacedrive/tokens": "link:@spacedrive/tokens",
|
||||
"openapi-fetch": "^0.17",
|
||||
"@tanstack/react-query": "^5.90.7",
|
||||
"@tanstack/react-query-devtools": "^5.90.2",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { motion } from "framer-motion";
|
||||
import { BallBlue } from "@sd/assets/images";
|
||||
import Orb from "../../components/Orb";
|
||||
import { CircleButton } from "@spaceui/primitives";
|
||||
import { CircleButton } from "@spacedrive/primitives";
|
||||
import { GlobeHemisphereWest, GithubLogo, DiscordLogo } from "@phosphor-icons/react";
|
||||
import contributors from "../../contributors.json";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { SpacedriveProvider, type SpacedriveClient } from "./contexts/Spacedrive
|
||||
import { ServerProvider } from "./contexts/ServerContext";
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
import { RouterProvider } from "react-router-dom";
|
||||
import { Dialogs, Toaster, TooltipProvider } from "@spaceui/primitives";
|
||||
import { Dialogs, Toaster, TooltipProvider } from "@spacedrive/primitives";
|
||||
import { ShellLayout } from "./ShellLayout";
|
||||
import { explorerRoutes } from "./router";
|
||||
import { useDaemonStatus } from "./hooks/useDaemonStatus";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {Microphone, Sparkle} from '@phosphor-icons/react';
|
||||
import {ModelSelector, type ModelOption} from '@spaceui/ai';
|
||||
import {ModelSelector, type ModelOption} from '@spacedrive/ai';
|
||||
import {
|
||||
CircleButton,
|
||||
OptionList,
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
Popover,
|
||||
SelectPill,
|
||||
usePopover
|
||||
} from '@spaceui/primitives';
|
||||
} from '@spacedrive/primitives';
|
||||
import {AnimatePresence, motion} from 'framer-motion';
|
||||
import {useState} from 'react';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import type {
|
||||
PortalConversationSummary,
|
||||
PortalHistoryMessage
|
||||
} from '@spacebot/api-client';
|
||||
import {MessageBubble} from '@spaceui/ai';
|
||||
import {MessageBubble} from '@spacedrive/ai';
|
||||
import {useQuery} from '@tanstack/react-query';
|
||||
import {useVirtualizer} from '@tanstack/react-virtual';
|
||||
import {useEffect, useMemo, useRef} from 'react';
|
||||
@@ -28,11 +28,11 @@ interface ConversationScreenProps {
|
||||
selectedProject: string;
|
||||
selectedModel: string;
|
||||
projectOptions: string[];
|
||||
models: import('@spaceui/ai').ModelOption[];
|
||||
models: import('@spacedrive/ai').ModelOption[];
|
||||
onSelectProject(project: string): void;
|
||||
onSelectModel(model: string): void;
|
||||
projectSelector: ReturnType<
|
||||
typeof import('@spaceui/primitives').usePopover
|
||||
typeof import('@spacedrive/primitives').usePopover
|
||||
>;
|
||||
isSending?: boolean;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import {apiClient, type WorkerListItem} from '@spacebot/api-client';
|
||||
import {
|
||||
InlineWorkerCard as InlineWorkerCardUI,
|
||||
type TranscriptStep
|
||||
} from '@spaceui/ai';
|
||||
} from '@spacedrive/ai';
|
||||
import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query';
|
||||
|
||||
export function InlineWorkerCard({
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
type PortalConversationSummary,
|
||||
type TypingStateEvent
|
||||
} from '@spacebot/api-client';
|
||||
import {SearchBar, usePopover} from '@spaceui/primitives';
|
||||
import {SearchBar, usePopover} from '@spacedrive/primitives';
|
||||
import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query';
|
||||
import {
|
||||
createContext,
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
SearchBar,
|
||||
SelectPill,
|
||||
usePopover
|
||||
} from '@spaceui/primitives';
|
||||
} from '@spacedrive/primitives';
|
||||
import {ReactQueryDevtools} from '@tanstack/react-query-devtools';
|
||||
import {useEffect, useState} from 'react';
|
||||
import {Outlet, useLocation, useNavigate} from 'react-router-dom';
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
TaskList,
|
||||
type TaskPriority as UiTaskPriority,
|
||||
type TaskStatus as UiTaskStatus,
|
||||
} from '@spaceui/ai';
|
||||
} from '@spacedrive/ai';
|
||||
import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query';
|
||||
import {useCallback, useState} from 'react';
|
||||
import {agents, useSpacebot} from '../SpacebotContext';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState } from "react";
|
||||
import { DotsThree } from "@phosphor-icons/react";
|
||||
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
|
||||
import { CircleButton } from "@spaceui/primitives";
|
||||
import { CircleButton } from "@spacedrive/primitives";
|
||||
import { TopBarItem } from "./Context";
|
||||
|
||||
interface OverflowButtonProps {
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
} from '@phosphor-icons/react';
|
||||
import {getIcon} from '@sd/assets/util';
|
||||
import type {File} from '@sd/ts-client';
|
||||
import {toast} from '@spaceui/primitives';
|
||||
import {toast} from '@spacedrive/primitives';
|
||||
import clsx from 'clsx';
|
||||
import {LocationMap} from '../LocationMap';
|
||||
import {useState} from 'react';
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
} from "../Inspector";
|
||||
import clsx from "clsx";
|
||||
import type { Location } from "@sd/ts-client";
|
||||
import { Button, Dialog, dialogManager, useDialog, CircleButton, type UseDialogProps } from "@spaceui/primitives";
|
||||
import { Button, Dialog, dialogManager, useDialog, CircleButton, type UseDialogProps } from "@spacedrive/primitives";
|
||||
import { useLibraryMutation } from "../../../contexts/SpacedriveContext";
|
||||
import { useContextMenu } from "../../../hooks/useContextMenu";
|
||||
import LocationIcon from "@sd/assets/icons/Location.png";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ListBullets, CircleNotch, FunnelSimple, ArrowsOut } from "@phosphor-icons/react";
|
||||
import { Popover, usePopover, CircleButton } from "@spaceui/primitives";
|
||||
import { Popover, usePopover, CircleButton } from "@spacedrive/primitives";
|
||||
import clsx from "clsx";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { X, FunnelSimple } from "@phosphor-icons/react";
|
||||
import { CircleButton } from "@spaceui/primitives";
|
||||
import { CircleButton } from "@spacedrive/primitives";
|
||||
import { useState } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useJobsContext } from "../hooks/JobsContext";
|
||||
|
||||
@@ -29,7 +29,7 @@ import { TextViewer } from "./TextViewer";
|
||||
import { WithPrismTheme } from "./prism";
|
||||
import { SplatShimmerEffect } from "./SplatShimmerEffect";
|
||||
import { sounds } from "@sd/assets/sounds";
|
||||
import { CircleButton } from "@spaceui/primitives";
|
||||
import { CircleButton } from "@spacedrive/primitives";
|
||||
import { DirectoryPreview } from "./DirectoryPreview";
|
||||
|
||||
const MeshViewer = lazy(() =>
|
||||
|
||||
@@ -9,7 +9,7 @@ import { File as FileComponent } from "../../routes/explorer/File";
|
||||
import { PLYLoader } from "three/examples/jsm/loaders/PLYLoader.js";
|
||||
import * as GaussianSplats3D from "@mkkellogg/gaussian-splats-3d";
|
||||
import * as THREE from "three";
|
||||
import { CircleButton, CircleButtonGroup } from "@spaceui/primitives";
|
||||
import { CircleButton, CircleButtonGroup } from "@spacedrive/primitives";
|
||||
import {
|
||||
Play,
|
||||
Pause,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState } from 'react';
|
||||
import { Input, Label, dialogManager, useDialog, Dialog } from '@spaceui/primitives';
|
||||
import { Input, Label, dialogManager, useDialog, Dialog } from '@spacedrive/primitives';
|
||||
import { useLibraryMutation } from '@sd/ts-client';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import type { GroupType } from '@sd/ts-client';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useState } from 'react';
|
||||
import clsx from 'clsx';
|
||||
import { Input, Label, dialogManager, useDialog, Dialog } from '@spaceui/primitives';
|
||||
import { Input, Label, dialogManager, useDialog, Dialog } from '@spacedrive/primitives';
|
||||
import { useLibraryMutation } from '@sd/ts-client';
|
||||
import { useForm } from 'react-hook-form';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import { SpaceItem } from "./SpaceItem";
|
||||
import { createPortal } from "react-dom";
|
||||
import { useState } from "react";
|
||||
import { useLibraryMutation } from "../../contexts/SpacedriveContext";
|
||||
import { Input } from "@spaceui/primitives";
|
||||
import { Input } from "@spacedrive/primitives";
|
||||
|
||||
interface PaletteItem {
|
||||
type: ItemType;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {CaretDown, GearSix, Plus} from '@phosphor-icons/react';
|
||||
import type {Space} from '@sd/ts-client';
|
||||
import {DropdownMenu, SelectPill} from '@spaceui/primitives';
|
||||
import {DropdownMenu, SelectPill} from '@spacedrive/primitives';
|
||||
import clsx from 'clsx';
|
||||
import {useCreateSpaceDialog} from './CreateSpaceModal';
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import type {
|
||||
SpaceGroup as SpaceGroupType,
|
||||
SpaceItem as SpaceItemType
|
||||
} from '@sd/ts-client';
|
||||
import {CircleButton, Popover, usePopover} from '@spaceui/primitives';
|
||||
import {CircleButton, Popover, usePopover} from '@spacedrive/primitives';
|
||||
import clsx from 'clsx';
|
||||
import {motion} from 'framer-motion';
|
||||
import {memo, useEffect, useState} from 'react';
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
ArrowsOut,
|
||||
FunnelSimple,
|
||||
} from "@phosphor-icons/react";
|
||||
import { Popover, usePopover, CircleButton } from "@spaceui/primitives";
|
||||
import { Popover, usePopover, CircleButton } from "@spacedrive/primitives";
|
||||
import clsx from "clsx";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
} from '@dnd-kit/sortable';
|
||||
import {CSS} from '@dnd-kit/utilities';
|
||||
import {Plus, X} from '@phosphor-icons/react';
|
||||
import {TabBar as TabBarPrimitive, TabBarItem} from '@spaceui/primitives';
|
||||
import {TabBar as TabBarPrimitive, TabBarItem} from '@spacedrive/primitives';
|
||||
import clsx from 'clsx';
|
||||
import {useMemo} from 'react';
|
||||
import type {Tab} from '.';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState, useEffect } from 'react';
|
||||
import { MagnifyingGlass, Plus } from '@phosphor-icons/react';
|
||||
import clsx from 'clsx';
|
||||
import { Popover, usePopover } from '@spaceui/primitives';
|
||||
import { Popover, usePopover } from '@spacedrive/primitives';
|
||||
import { useNormalizedQuery, useLibraryMutation } from '../../contexts/SpacedriveContext';
|
||||
import type { Tag } from '@sd/ts-client';
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* Spacedrive-specific Popover wrapper that preserves the usePopover + trigger prop API.
|
||||
* Built on top of @spaceui/primitives Radix Popover.
|
||||
* Built on top of @spacedrive/primitives Radix Popover.
|
||||
*
|
||||
* Usage:
|
||||
* const popover = usePopover();
|
||||
@@ -11,7 +11,7 @@
|
||||
* </WrappedPopover>
|
||||
*/
|
||||
|
||||
import { Popover } from "@spaceui/primitives";
|
||||
import { Popover } from "@spacedrive/primitives";
|
||||
import clsx from "clsx";
|
||||
import React, { useEffect, useRef } from "react";
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
Dialog,
|
||||
dialogManager,
|
||||
useDialog,
|
||||
} from "@spaceui/primitives";
|
||||
} from "@spacedrive/primitives";
|
||||
import { queryClient } from "@sd/ts-client/hooks";
|
||||
import type { Event } from "@sd/ts-client";
|
||||
import { useCoreMutation, useSpacedriveClient } from "../../contexts/SpacedriveContext";
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
Dialog,
|
||||
dialogManager,
|
||||
useDialog,
|
||||
} from "@spaceui/primitives";
|
||||
} from "@spacedrive/primitives";
|
||||
import type { SdPath, File as FileType } from "@sd/ts-client";
|
||||
import { useLibraryMutation, useLibraryQuery } from "../../contexts/SpacedriveContext";
|
||||
import { File, FileStack } from "../../routes/explorer/File";
|
||||
|
||||
@@ -13,7 +13,7 @@ import type {
|
||||
PairedDeviceInfo,
|
||||
RemoteLibraryInfo,
|
||||
} from "@sd/ts-client";
|
||||
import { Button, Dialog, dialogManager, useDialog } from "@spaceui/primitives";
|
||||
import { Button, Dialog, dialogManager, useDialog } from "@spacedrive/primitives";
|
||||
import { useCoreQuery, useCoreMutation, useSpacedriveClient } from "../../contexts/SpacedriveContext";
|
||||
|
||||
interface SyncSetupDialogProps {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { motion, AnimatePresence } from "framer-motion";
|
||||
import { Copy } from "@phosphor-icons/react";
|
||||
import { useDaemonStatus } from "../../hooks/useDaemonStatus";
|
||||
import { usePlatform } from "../../contexts/PlatformContext";
|
||||
import { Button } from "@spaceui/primitives";
|
||||
import { Button } from "@spacedrive/primitives";
|
||||
import folderIcon from "@sd/assets/icons/FolderNoSpace.png";
|
||||
|
||||
function CLICommand({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { usePlatform, type OpenResult } from "../contexts/PlatformContext";
|
||||
import { toast } from "@spaceui/primitives";
|
||||
import { toast } from "@spacedrive/primitives";
|
||||
|
||||
export function useOpenWith(paths: string[]) {
|
||||
const platform = usePlatform();
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
SidebarSimple,
|
||||
Tag as TagIcon
|
||||
} from '@phosphor-icons/react';
|
||||
import {CircleButton, CircleButtonGroup} from '@spaceui/primitives';
|
||||
import {CircleButton, CircleButtonGroup} from '@spacedrive/primitives';
|
||||
import clsx from 'clsx';
|
||||
import {useCallback, useEffect, useMemo, useState} from 'react';
|
||||
import {TopBarItem, TopBarPortal} from '../../TopBar';
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
} from "@phosphor-icons/react";
|
||||
import { motion, AnimatePresence } from "framer-motion";
|
||||
import clsx from "clsx";
|
||||
import { CircleButton } from "@spaceui/primitives";
|
||||
import { CircleButton } from "@spacedrive/primitives";
|
||||
import type { DirectorySortBy, MediaSortBy } from "@sd/ts-client";
|
||||
|
||||
interface SortMenuPanelProps {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useState } from 'react';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
import { Tag as TagIcon, X } from '@phosphor-icons/react';
|
||||
import clsx from 'clsx';
|
||||
import { Button } from '@spaceui/primitives';
|
||||
import { Button } from '@spacedrive/primitives';
|
||||
import { useNormalizedQuery, useLibraryMutation } from '../../contexts/SpacedriveContext';
|
||||
import { useSelection } from './SelectionContext';
|
||||
import { useKeybind } from '../../hooks/useKeybind';
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
Sparkle,
|
||||
SquaresFour
|
||||
} from '@phosphor-icons/react';
|
||||
import {CircleButton} from '@spaceui/primitives';
|
||||
import {CircleButton} from '@spacedrive/primitives';
|
||||
import clsx from 'clsx';
|
||||
import {AnimatePresence, motion} from 'framer-motion';
|
||||
import {useEffect, useRef, useState} from 'react';
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Sliders } from "@phosphor-icons/react";
|
||||
import { motion, AnimatePresence } from "framer-motion";
|
||||
import clsx from "clsx";
|
||||
import { useExplorer } from "./context";
|
||||
import { CircleButton } from "@spaceui/primitives";
|
||||
import { CircleButton } from "@spacedrive/primitives";
|
||||
|
||||
interface ViewSettingsPanelProps {
|
||||
viewSettings: any;
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
TabsList,
|
||||
TabsTrigger,
|
||||
TabsContent,
|
||||
} from "@spaceui/primitives";
|
||||
} from "@spacedrive/primitives";
|
||||
import type {
|
||||
IndexMode,
|
||||
LocationAddInput,
|
||||
|
||||
@@ -18,7 +18,7 @@ import {
|
||||
TabsList,
|
||||
TabsTrigger,
|
||||
TabsContent,
|
||||
} from "@spaceui/primitives";
|
||||
} from "@spacedrive/primitives";
|
||||
import type {
|
||||
IndexMode,
|
||||
LocationAddInput,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useState, useRef, useEffect } from "react";
|
||||
import { motion, AnimatePresence } from "framer-motion";
|
||||
import { MagnifyingGlass } from "@phosphor-icons/react";
|
||||
import { CircleButton, SearchBar } from "@spaceui/primitives";
|
||||
import { CircleButton, SearchBar } from "@spacedrive/primitives";
|
||||
|
||||
interface ExpandableSearchButtonProps {
|
||||
value: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState, useEffect, useRef, useCallback } from "react";
|
||||
import { Input } from "@spaceui/primitives";
|
||||
import { Input } from "@spacedrive/primitives";
|
||||
import type { File } from "@sd/ts-client";
|
||||
import clsx from "clsx";
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
useLibraryMutation,
|
||||
useNormalizedQuery
|
||||
} from '@sd/ts-client';
|
||||
import {Button, CircleButton, Popover, usePopover} from '@spaceui/primitives';
|
||||
import {Button, CircleButton, Popover, usePopover} from '@spacedrive/primitives';
|
||||
import clsx from 'clsx';
|
||||
import {motion} from 'framer-motion';
|
||||
import {useEffect, useState} from 'react';
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
Plus
|
||||
} from '@phosphor-icons/react';
|
||||
import type {DirectorySortBy, File} from '@sd/ts-client';
|
||||
import {CircleButton, CircleButtonGroup} from '@spaceui/primitives';
|
||||
import {CircleButton, CircleButtonGroup} from '@spacedrive/primitives';
|
||||
import * as d3 from 'd3';
|
||||
import {useEffect, useMemo, useRef, useState} from 'react';
|
||||
import {createPortal} from 'react-dom';
|
||||
|
||||
@@ -26,7 +26,7 @@ import type {
|
||||
VolumeListOutput,
|
||||
VolumeListQueryInput
|
||||
} from '@sd/ts-client';
|
||||
import {Tooltip, CircleButton} from '@spaceui/primitives';
|
||||
import {Tooltip, CircleButton} from '@spacedrive/primitives';
|
||||
import clsx from 'clsx';
|
||||
import {useEffect, useRef, useState} from 'react';
|
||||
import Masonry from 'react-masonry-css';
|
||||
|
||||
@@ -7,7 +7,7 @@ import LocationIcon from '@sd/assets/icons/Location.png';
|
||||
import MobileIcon from '@sd/assets/icons/Mobile.png';
|
||||
import StorageIcon from '@sd/assets/icons/Storage.png';
|
||||
import TagsIcon from '@sd/assets/icons/Tags.png';
|
||||
import {CircleButton} from '@spaceui/primitives';
|
||||
import {CircleButton} from '@spacedrive/primitives';
|
||||
import {motion} from 'framer-motion';
|
||||
import {useEffect, useRef, useState} from 'react';
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
GearSix,
|
||||
CloudArrowUp,
|
||||
} from "@phosphor-icons/react";
|
||||
import { Popover, usePopover, CircleButton } from "@spaceui/primitives";
|
||||
import { Popover, usePopover, CircleButton } from "@spacedrive/primitives";
|
||||
import clsx from "clsx";
|
||||
import { TopBarPortal, TopBarItem } from "../../TopBar";
|
||||
import { PairingModal } from "../../components/modals/PairingModal";
|
||||
|
||||
@@ -7,7 +7,7 @@ import DriveIcon from '@sd/assets/icons/Drive.png';
|
||||
import HDDIcon from '@sd/assets/icons/HDD.png';
|
||||
import ServerIcon from '@sd/assets/icons/Server.png';
|
||||
import type {Device, Volume} from '@sd/ts-client';
|
||||
import {CircleButton} from '@spaceui/primitives';
|
||||
import {CircleButton} from '@spacedrive/primitives';
|
||||
import {motion} from 'framer-motion';
|
||||
import {useEffect, useState} from 'react';
|
||||
import {useVolumeContextMenu} from '../../components/SpacesSidebar/hooks/useVolumeContextMenu';
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
useLibraryMutation,
|
||||
} from "../../contexts/SpacedriveContext";
|
||||
import { TopBarPortal, TopBarItem } from "../../TopBar";
|
||||
import { CircleButton } from "@spaceui/primitives";
|
||||
import { CircleButton } from "@spacedrive/primitives";
|
||||
import { ExpandableSearchButton } from "../explorer/components/ExpandableSearchButton";
|
||||
import { SourceTypeIcon } from "../../components/Sources/SourceTypeIcon";
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import {
|
||||
} from "../../contexts/SpacedriveContext";
|
||||
import { useTabManager } from "../../components/TabManager/useTabManager";
|
||||
import { TopBarPortal, TopBarItem } from "../../TopBar";
|
||||
import { CircleButton, Popover, usePopover } from "@spaceui/primitives";
|
||||
import { CircleButton, Popover, usePopover } from "@spacedrive/primitives";
|
||||
import { ExpandableSearchButton } from "../explorer/components/ExpandableSearchButton";
|
||||
import { SourcePathBar } from "../../components/Sources/SourcePathBar";
|
||||
import { SourceDataRow } from "../../components/Sources/SourceDataRow";
|
||||
|
||||
@@ -4,8 +4,8 @@ import { useLibraryQuery } from "../../contexts/SpacedriveContext";
|
||||
import { useTabManager } from "../../components/TabManager/useTabManager";
|
||||
import { SourceCard } from "../../components/Sources/SourceCard";
|
||||
import { TopBarPortal, TopBarItem } from "../../TopBar";
|
||||
import { CircleButton } from "@spaceui/primitives";
|
||||
import { SearchBar } from "@spaceui/primitives";
|
||||
import { CircleButton } from "@spacedrive/primitives";
|
||||
import { SearchBar } from "@spacedrive/primitives";
|
||||
|
||||
export function SourcesHome() {
|
||||
const navigate = useNavigate();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ShinyButton } from "@spaceui/primitives";
|
||||
import { ShinyButton } from "@spacedrive/primitives";
|
||||
import { SpacedriveProvider } from "../contexts/SpacedriveContext";
|
||||
import { useLibraries } from "../hooks/useLibraries";
|
||||
import { useAllEvents } from "../hooks/useEvent";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { motion } from 'framer-motion';
|
||||
import { X, ShareNetwork, Users } from '@phosphor-icons/react';
|
||||
import { useState, useMemo } from 'react';
|
||||
import { CircleButton } from '@spaceui/primitives';
|
||||
import { CircleButton } from '@spacedrive/primitives';
|
||||
|
||||
interface Person {
|
||||
id: string;
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
Stop,
|
||||
} from "@phosphor-icons/react";
|
||||
import { BallBlue } from "@sd/assets/images";
|
||||
import { Popover, usePopover } from "@spaceui/primitives";
|
||||
import { Popover, usePopover } from "@spacedrive/primitives";
|
||||
import {
|
||||
apiClient,
|
||||
getEventsUrl,
|
||||
|
||||
Reference in New Issue
Block a user