W6: export panel

components-export: ExportPanel (scope picker + request) + ExportJobRow (status,
download on ready, error verbatim; timer lives in the app per the polling
contract). Demo Export tab polls getExport app-side. Lib confirmed
self-contained (react + lucide only); README/tsconfig updated. Typechecks clean.

Co-Authored-By: Claude Fable 5 (build) <noreply@anthropic.com>
This commit is contained in:
jules
2026-07-07 10:05:46 +10:00
parent 40d2f94795
commit efbf4b2e61
4 changed files with 169 additions and 7 deletions

View File

@@ -20,8 +20,7 @@ it in three places:
"@crema/knowledge-ui": libSrc("knowledge-ui") + "/index.tsx",
"@crema/knowledge-ui/": libSrc("knowledge-ui") + "/",
```
The lib also imports `@crema/file-ui` (for uploads/previews), so alias that too
if not already, and make sure `lucide-react` is in your shared-dep dedupe list.
Make sure `lucide-react` is in your shared-dep dedupe list.
2. **`tsconfig.json`** — paths:
```json
@@ -34,6 +33,16 @@ it in three places:
@source "../../lib-knowledge-ui/src";
```
The lib is **fully self-contained** — it imports only `react` and `lucide-react`
(no other `@crema/*` libs), so a fresh consumer wires exactly this one alias. The
app may separately use `@crema/file-ui` for the upload dropzone on its collection
page (spec §4.5), but that's the app's choice, not a lib dependency.
The vite alias (step 1) also needs its own step — mirror step 2 in
`vite.config.ts` `resolve.alias`, and ensure `react` / `react-dom` /
`lucide-react` are deduped to the app's copies (sibling libs carry no
node_modules).
## Wiring the transport
The lib defines `KnowledgeTransport`; the app implements it over its KB client