@cfast/ui 0.0.1 → 0.2.0

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.
Files changed (51) hide show
  1. package/README.md +23 -23
  2. package/dist/chunk-PWBG6CGF.js +1400 -0
  3. package/dist/{permission-gate-DVmY42oz.d.ts → client-CIx8_tmv.d.ts} +617 -2
  4. package/dist/client.d.ts +4 -617
  5. package/dist/client.js +6 -8
  6. package/dist/index.d.ts +52 -5
  7. package/dist/index.js +17 -13
  8. package/llms.txt +159 -0
  9. package/package.json +25 -41
  10. package/LICENSE +0 -21
  11. package/dist/chunk-755IRYDN.js +0 -941
  12. package/dist/chunk-7SNK37GF.js +0 -418
  13. package/dist/chunk-ASMYTWTR.js +0 -356
  14. package/dist/chunk-B2XXH5V4.js +0 -66
  15. package/dist/chunk-BQMXYYEV.js +0 -348
  16. package/dist/chunk-DTKBXCTU.js +0 -211
  17. package/dist/chunk-EYIBATYR.js +0 -33
  18. package/dist/chunk-FPZAQ2YQ.js +0 -474
  19. package/dist/chunk-G2OU4BYC.js +0 -205
  20. package/dist/chunk-JEGEIQ3R.js +0 -925
  21. package/dist/chunk-JUNLQJ6H.js +0 -1013
  22. package/dist/chunk-NRGMW3JA.js +0 -906
  23. package/dist/chunk-Q6FPL2OJ.js +0 -1086
  24. package/dist/chunk-QHWAGKNW.js +0 -456
  25. package/dist/chunk-QZT62CGJ.js +0 -924
  26. package/dist/chunk-RDTUEOLK.js +0 -486
  27. package/dist/chunk-RESL4IJJ.js +0 -112
  28. package/dist/chunk-UDCWQUTR.js +0 -221
  29. package/dist/chunk-UE7PZOIJ.js +0 -11
  30. package/dist/chunk-UTZTHGNE.js +0 -84
  31. package/dist/chunk-UVRXMOX5.js +0 -439
  32. package/dist/chunk-XFD3N2D4.js +0 -161
  33. package/dist/client-CXIHCQtA.d.ts +0 -274
  34. package/dist/joy.d.ts +0 -199
  35. package/dist/joy.js +0 -1150
  36. package/dist/permission-gate-apt9T9Mu.d.ts +0 -1256
  37. package/dist/types-1bAiH2uK.d.ts +0 -392
  38. package/dist/types-BX6u5sAd.d.ts +0 -403
  39. package/dist/types-BpdY7w5l.d.ts +0 -403
  40. package/dist/types-BrepeVp8.d.ts +0 -403
  41. package/dist/types-BvAqMZhn.d.ts +0 -403
  42. package/dist/types-C74nSscq.d.ts +0 -403
  43. package/dist/types-DD1Cpx8F.d.ts +0 -403
  44. package/dist/types-DHUhQwJn.d.ts +0 -403
  45. package/dist/types-DZSJNt_M.d.ts +0 -392
  46. package/dist/types-DaaJiIjW.d.ts +0 -391
  47. package/dist/types-LUpWJwps.d.ts +0 -403
  48. package/dist/types-a7zVU6WE.d.ts +0 -394
  49. package/dist/types-biJTHMcH.d.ts +0 -403
  50. package/dist/types-ow_qSEYJ.d.ts +0 -392
  51. package/dist/types-wnLasZaB.d.ts +0 -1234
package/README.md CHANGED
@@ -35,7 +35,7 @@ Admin's job is **schema introspection → configuration**: it reads your Drizzle
35
35
 
36
36
  ### Headless core + plugins
37
37
 
38
- Same architecture as before, expanded to cover all component categories. The headless core (`@cfast/ui`) provides hooks, logic, and unstyled components. The Joy UI plugin (`@cfast/ui/joy`) provides styled implementations. Third-party plugins can add shadcn, Mantine, or any other library.
38
+ Same architecture as before, expanded to cover all component categories. The headless core (`@cfast/ui`) provides hooks, logic, and unstyled components. The Joy UI plugin (`@cfast/joy`) provides styled implementations. Third-party plugins can add shadcn, Mantine, or any other library.
39
39
 
40
40
  The plugin contract maps component slots to implementations:
41
41
 
@@ -78,7 +78,7 @@ Plugins only need to implement the slots they care about. Missing slots fall bac
78
78
  A table component that integrates with `@cfast/pagination`, `@cfast/db`, `@cfast/permissions`, and `@cfast/actions`.
79
79
 
80
80
  ```typescript
81
- import { DataTable } from "@cfast/ui/joy";
81
+ import { DataTable } from "@cfast/joy";
82
82
  import { usePagination } from "@cfast/pagination/client";
83
83
  import { posts } from "~/db/schema";
84
84
 
@@ -129,7 +129,7 @@ function PostsTable() {
129
129
  URL-synced filter controls. Column types from Drizzle schema determine the filter input type.
130
130
 
131
131
  ```typescript
132
- import { FilterBar } from "@cfast/ui/joy";
132
+ import { FilterBar } from "@cfast/joy";
133
133
  import { posts } from "~/db/schema";
134
134
 
135
135
  function PostFilters() {
@@ -174,7 +174,7 @@ function PostFilters() {
174
174
  Read-only display components that format values based on their type. Used by `<DataTable>` cell renderers and `<DetailView>` field layouts.
175
175
 
176
176
  ```typescript
177
- import { DateField, BooleanField, EmailField, ImageField, RelationField } from "@cfast/ui/joy";
177
+ import { DateField, BooleanField, EmailField, ImageField, RelationField } from "@cfast/joy";
178
178
 
179
179
  <DateField value={post.createdAt} format="relative" />
180
180
  // → "3 days ago"
@@ -215,7 +215,7 @@ import { DateField, BooleanField, EmailField, ImageField, RelationField } from "
215
215
  Permission-aware empty state. Shows different content based on whether the user can create records.
216
216
 
217
217
  ```typescript
218
- import { EmptyState } from "@cfast/ui/joy";
218
+ import { EmptyState } from "@cfast/joy";
219
219
 
220
220
  <EmptyState
221
221
  title="No posts yet"
@@ -239,7 +239,7 @@ import { EmptyState } from "@cfast/ui/joy";
239
239
  A full page layout combining title, filters, data table, pagination, and empty state. This is the component `@cfast/admin` uses for every table view.
240
240
 
241
241
  ```typescript
242
- import { ListView } from "@cfast/ui/joy";
242
+ import { ListView } from "@cfast/joy";
243
243
 
244
244
  function PostsPage() {
245
245
  const pagination = useOffsetPagination<Post>();
@@ -273,7 +273,7 @@ function PostsPage() {
273
273
  A read-only detail page for a single record. Auto-lays out fields based on Drizzle column types.
274
274
 
275
275
  ```typescript
276
- import { DetailView } from "@cfast/ui/joy";
276
+ import { DetailView } from "@cfast/joy";
277
277
 
278
278
  function PostDetail({ post }: { post: Post }) {
279
279
  return (
@@ -300,7 +300,7 @@ function PostDetail({ post }: { post: Post }) {
300
300
  Base layout with sidebar navigation, header, and content area.
301
301
 
302
302
  ```typescript
303
- import { AppShell } from "@cfast/ui/joy";
303
+ import { AppShell } from "@cfast/joy";
304
304
 
305
305
  function Layout({ children }) {
306
306
  return (
@@ -330,7 +330,7 @@ const navigationItems = [
330
330
  Page wrapper with title, breadcrumb, tabs, and action toolbar. Used by `<ListView>` and `<DetailView>` internally, but also useful standalone.
331
331
 
332
332
  ```typescript
333
- import { PageContainer } from "@cfast/ui/joy";
333
+ import { PageContainer } from "@cfast/joy";
334
334
 
335
335
  <PageContainer
336
336
  title="Edit Post"
@@ -349,7 +349,7 @@ import { PageContainer } from "@cfast/ui/joy";
349
349
  Header dropdown showing current user info, role badge, and auth actions.
350
350
 
351
351
  ```typescript
352
- import { UserMenu } from "@cfast/ui/joy";
352
+ import { UserMenu } from "@cfast/joy";
353
353
 
354
354
  <UserMenu
355
355
  // Reads user from @cfast/auth's useCurrentUser()
@@ -372,7 +372,7 @@ import { UserMenu } from "@cfast/ui/joy";
372
372
  Thin progress bar at the top of the page during React Router navigation.
373
373
 
374
374
  ```typescript
375
- import { NavigationProgress } from "@cfast/ui/joy";
375
+ import { NavigationProgress } from "@cfast/joy";
376
376
 
377
377
  // In your root layout:
378
378
  <NavigationProgress />
@@ -389,7 +389,7 @@ Uses `useNavigation().state` from React Router. Shows on `loading`, hides on `id
389
389
  Permission-aware button wrapping a `@cfast/actions` action. *Already implemented in PR #6.*
390
390
 
391
391
  ```typescript
392
- import { ActionButton } from "@cfast/ui/joy";
392
+ import { ActionButton } from "@cfast/joy";
393
393
 
394
394
  <ActionButton
395
395
  action={publishPost}
@@ -416,7 +416,7 @@ Conditionally renders children based on action permissions. *Already implemented
416
416
  Standalone confirmation dialog. Used internally by `<ActionButton>` when `confirmation` is set, but also available directly.
417
417
 
418
418
  ```typescript
419
- import { ConfirmDialog, useConfirm } from "@cfast/ui/joy";
419
+ import { ConfirmDialog, useConfirm } from "@cfast/joy";
420
420
 
421
421
  function DangerZone() {
422
422
  const confirm = useConfirm();
@@ -440,7 +440,7 @@ function DangerZone() {
440
440
  Action result notifications. Wraps a toast library (Sonner for Joy UI plugin) with cfast-aware defaults.
441
441
 
442
442
  ```typescript
443
- import { ToastProvider, useToast } from "@cfast/ui/joy";
443
+ import { ToastProvider, useToast } from "@cfast/joy";
444
444
 
445
445
  // In root layout:
446
446
  <ToastProvider />
@@ -464,7 +464,7 @@ useActionToast(composed.client, {
464
464
  Displays action result feedback (success/error messages) in a consistent format.
465
465
 
466
466
  ```typescript
467
- import { FormStatus } from "@cfast/ui/joy";
467
+ import { FormStatus } from "@cfast/joy";
468
468
 
469
469
  function EditForm() {
470
470
  const actionData = useActionData();
@@ -507,7 +507,7 @@ Actions are permission-aware — hidden if the user can't perform them.
507
507
  Drag-and-drop file upload area. Integrates with `@cfast/storage`'s schema for validation and `useUpload` for upload progress.
508
508
 
509
509
  ```typescript
510
- import { DropZone } from "@cfast/ui/joy";
510
+ import { DropZone } from "@cfast/joy";
511
511
  import { useUpload } from "@cfast/storage/client";
512
512
 
513
513
  function CoverImageUpload() {
@@ -539,7 +539,7 @@ function CoverImageUpload() {
539
539
  Displays an image from `@cfast/storage` with signed URL handling.
540
540
 
541
541
  ```typescript
542
- import { ImagePreview } from "@cfast/ui/joy";
542
+ import { ImagePreview } from "@cfast/joy";
543
543
 
544
544
  <ImagePreview
545
545
  fileKey={post.coverImageKey}
@@ -555,7 +555,7 @@ import { ImagePreview } from "@cfast/ui/joy";
555
555
  A list of uploaded files with metadata, download links, and delete actions.
556
556
 
557
557
  ```typescript
558
- import { FileList } from "@cfast/ui/joy";
558
+ import { FileList } from "@cfast/joy";
559
559
 
560
560
  <FileList
561
561
  files={post.attachments}
@@ -574,7 +574,7 @@ import { FileList } from "@cfast/ui/joy";
574
574
  Avatar component with automatic initials fallback when no image is available.
575
575
 
576
576
  ```typescript
577
- import { AvatarWithInitials } from "@cfast/ui/joy";
577
+ import { AvatarWithInitials } from "@cfast/joy";
578
578
 
579
579
  <AvatarWithInitials
580
580
  src={user.avatarUrl}
@@ -589,7 +589,7 @@ import { AvatarWithInitials } from "@cfast/ui/joy";
589
589
  Colored badge displaying a user's role. Colors configurable per role.
590
590
 
591
591
  ```typescript
592
- import { RoleBadge } from "@cfast/ui/joy";
592
+ import { RoleBadge } from "@cfast/joy";
593
593
 
594
594
  <RoleBadge role={user.role} />
595
595
  // → Colored chip: "Admin" (red), "Editor" (blue), "Reader" (neutral)
@@ -606,7 +606,7 @@ import { RoleBadge } from "@cfast/ui/joy";
606
606
  Persistent banner shown when an admin is impersonating another user.
607
607
 
608
608
  ```typescript
609
- import { ImpersonationBanner } from "@cfast/ui/joy";
609
+ import { ImpersonationBanner } from "@cfast/joy";
610
610
 
611
611
  // In root layout:
612
612
  <ImpersonationBanner />
@@ -642,7 +642,7 @@ import { ImpersonationBanner } from "@cfast/ui/joy";
642
642
  └── Plugin API
643
643
  └── createUIPlugin() — maps component slots to implementations
644
644
 
645
- @cfast/ui/joy (MUI Joy UI plugin)
645
+ @cfast/joy (MUI Joy UI plugin)
646
646
  ├── All of the above, styled with Joy UI
647
647
  ├── DataTable — Joy Table + sorting + selection
648
648
  ├── FilterBar — Joy Input/Select/DatePicker filters
@@ -697,7 +697,7 @@ export type {
697
697
  } from "./types.js";
698
698
  ```
699
699
 
700
- Joy UI plugin (`@cfast/ui/joy`):
700
+ Joy UI plugin (`@cfast/joy`):
701
701
 
702
702
  ```typescript
703
703
  export {