@vantageos/mosaic-blocks 0.4.4-alpha → 0.4.6-alpha
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/README.md +38 -35
- package/dist/index.cjs +609 -244
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +139 -2
- package/dist/index.d.ts +139 -2
- package/dist/index.js +605 -241
- package/dist/index.js.map +1 -1
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
## 1. Hero & Positioning
|
|
12
12
|
|
|
13
|
-
`@vantageos/mosaic-blocks` is the **React composed-block layer** of the VantageOS Mosaic design system. It provides
|
|
13
|
+
`@vantageos/mosaic-blocks` is the **React composed-block layer** of the VantageOS Mosaic design system. It provides 123 opinionated, fully-typed UI components that integrate natively with:
|
|
14
14
|
|
|
15
15
|
- **Clerk** — auth sign-in/up flows, org switcher, RBAC, webhook sync
|
|
16
16
|
- **Convex** — real-time data binding ready
|
|
@@ -67,17 +67,11 @@ pnpm add @vantageos/mosaic-blocks react react-dom tailwindcss @clerk/nextjs @van
|
|
|
67
67
|
|
|
68
68
|
---
|
|
69
69
|
|
|
70
|
-
##
|
|
70
|
+
## svix — webhook signature verification
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
`MosaicClerkWebhookHandler` dynamically imports `svix` at runtime (not at module load) to verify Clerk webhook signatures, and throws an explicit `Error` with installation instructions if it cannot be resolved — it never silently fails.
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|---|---|---|
|
|
76
|
-
| `svix` | `MosaicClerkWebhookHandler` (Clerk webhook signature verification) | `npm install svix` |
|
|
77
|
-
|
|
78
|
-
### svix — webhook signature verification
|
|
79
|
-
|
|
80
|
-
`MosaicClerkWebhookHandler` dynamically imports `svix` at runtime to verify Clerk webhook signatures. If `svix` is not installed in your app, the handler throws an explicit `Error` with installation instructions — it never silently fails.
|
|
74
|
+
**Known gap (not fixed by this doc pass):** `svix` is currently declared as a regular `dependencies` entry in `package.json`, not a `peerDependencies`/`optionalDependencies` entry. In practice this means `svix` installs automatically for every consumer of `@vantageos/mosaic-blocks`, whether or not you use `MosaicClerkWebhookHandler` — it is not truly opt-in today. Tracked as a follow-up; do not assume you can skip installing it based on this README alone until the `package.json` classification changes.
|
|
81
75
|
|
|
82
76
|
```bash
|
|
83
77
|
npm install svix
|
|
@@ -85,8 +79,6 @@ npm install svix
|
|
|
85
79
|
pnpm add svix
|
|
86
80
|
```
|
|
87
81
|
|
|
88
|
-
If you do not use `MosaicClerkWebhookHandler`, you do not need to install `svix`.
|
|
89
|
-
|
|
90
82
|
---
|
|
91
83
|
|
|
92
84
|
## 4. Quick Start (30 seconds)
|
|
@@ -177,18 +169,21 @@ For OKLCH design tokens, pair with `@vantageos/mosaic-tokens` — see [Section 1
|
|
|
177
169
|
|
|
178
170
|
## 6. Component Catalogue Summary
|
|
179
171
|
|
|
180
|
-
|
|
172
|
+
123 exported `Mosaic*` components across 9 sections (140 total named exports including hooks, variant helpers, and unprefixed aliases such as `Tooltip`/`Accordion`). This count is enforced by `src/__tests__/readme-matches-exports.test.ts` — it fails CI if this README drifts from `src/index.ts` again. Full reference: [docs/components-catalog.md](docs/components-catalog.md).
|
|
173
|
+
|
|
174
|
+
> There is **no "Debate" section**. No `Mosaic*` debate component (room/timer/participant) is exported by this package — despite the "absorbed from anydebate" origin story below, the debate UI was never ported. If you need debate-room UI, it does not exist here yet.
|
|
181
175
|
|
|
182
176
|
| Section | Top components | Count |
|
|
183
177
|
|---|---|---|
|
|
184
|
-
| Layout | `MosaicDashboardLayout`, `
|
|
185
|
-
| Device / Adaptive | `MosaicDeviceProvider`, `MosaicAdaptiveGrid`, `MosaicAdaptiveModal`, `MosaicAdaptiveNavigation` |
|
|
186
|
-
| Auth / Multi-tenant | `MosaicMultiTenantProvider`, `
|
|
187
|
-
| Agents | `MosaicAgentComposer`, `MosaicAgentCard`, `
|
|
188
|
-
|
|
|
189
|
-
|
|
|
190
|
-
|
|
|
191
|
-
|
|
|
178
|
+
| Layout & navigation | `MosaicDashboardLayout`, `MosaicAppSidebar`, `MosaicDashboardHeader` | 9 |
|
|
179
|
+
| Device / Adaptive | `MosaicDeviceProvider`, `MosaicAdaptiveGrid`, `MosaicAdaptiveModal`, `MosaicAdaptiveNavigation` | 4 |
|
|
180
|
+
| Auth / Multi-tenant | `MosaicMultiTenantProvider`, `MosaicSignInLayout`, `MosaicOrgPanel`, `MosaicClerkWebhookHandler` | 14 |
|
|
181
|
+
| Agents & messaging | `MosaicAgentComposer`, `MosaicAgentCard`, `MosaicAgentList`, `MosaicMessageList`, `MosaicMarketplaceList` | 28 |
|
|
182
|
+
| Data display | `MosaicDataTable`, `MosaicKanbanBoard`, `MosaicStepPipeline`, `MosaicActivityFeed` | 6 |
|
|
183
|
+
| Forms & inputs | `MosaicInput`, `MosaicSelect`, `MosaicField`, `MosaicCombobox`, `MosaicFilterBar` | 17 |
|
|
184
|
+
| Primitives (incl. base-ui atoms) | `MosaicButton`, `MosaicBadge`, `MosaicCard`, `MosaicTabs`, `MosaicTooltip`, `MosaicAccordion` | 30 |
|
|
185
|
+
| Landing & utility blocks | `MosaicHeroSplit`, `MosaicStatsGrid`, `MosaicPricingCard`, `MosaicCounter`, `MosaicThemeToggle` | 13 |
|
|
186
|
+
| Theming | `MosaicThemeProvider` | 1 |
|
|
192
187
|
|
|
193
188
|
All exports: `import { ComponentName } from "@vantageos/mosaic-blocks"`
|
|
194
189
|
|
|
@@ -216,7 +211,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
|
|
216
211
|
|
|
217
212
|
Key auth components:
|
|
218
213
|
|
|
219
|
-
- `
|
|
214
|
+
- `MosaicSignInLayout` / `MosaicSignUpLayout` — styled Clerk auth flows
|
|
220
215
|
- `MosaicOrgSwitcher` — organization switcher with avatar, plan badge
|
|
221
216
|
- `MosaicOrgPanel` — full org management (members, roles, invitations)
|
|
222
217
|
- `MosaicClerkWebhookHandler` — Next.js route handler for Clerk webhook sync (requires `svix`)
|
|
@@ -284,7 +279,7 @@ import { mergeMosaicTranslations } from "@vantageos/mosaic-i18n";
|
|
|
284
279
|
|
|
285
280
|
mergeMosaicTranslations("fr", {
|
|
286
281
|
"mosaic.button.confirm": "Valider",
|
|
287
|
-
"mosaic.
|
|
282
|
+
"mosaic.agentComposer.launch": "Lancer l'agent",
|
|
288
283
|
});
|
|
289
284
|
```
|
|
290
285
|
|
|
@@ -345,7 +340,7 @@ Named exports only — tree-shakeable. Types are co-located with each component
|
|
|
345
340
|
import {
|
|
346
341
|
MosaicDashboardLayout,
|
|
347
342
|
MosaicDeviceProvider,
|
|
348
|
-
|
|
343
|
+
MosaicActivityFeed,
|
|
349
344
|
} from "@vantageos/mosaic-blocks";
|
|
350
345
|
import Link from "next/link";
|
|
351
346
|
|
|
@@ -365,8 +360,12 @@ export default function DashboardPage() {
|
|
|
365
360
|
renderLink={(href, children) => <Link href={href}>{children}</Link>}
|
|
366
361
|
>
|
|
367
362
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
368
|
-
<
|
|
369
|
-
|
|
363
|
+
<MosaicActivityFeed
|
|
364
|
+
activities={[]}
|
|
365
|
+
heading="Recent activity"
|
|
366
|
+
viewAllLabel="View all"
|
|
367
|
+
emptyMessage="No activity yet"
|
|
368
|
+
/>
|
|
370
369
|
</div>
|
|
371
370
|
</MosaicDashboardLayout>
|
|
372
371
|
</MosaicDeviceProvider>
|
|
@@ -417,9 +416,10 @@ export default function AgentsPage({ agents }: { agents: Agent[] }) {
|
|
|
417
416
|
|
|
418
417
|
```tsx
|
|
419
418
|
import { ClerkProvider } from "@clerk/nextjs";
|
|
419
|
+
import { SignIn } from "@clerk/nextjs";
|
|
420
420
|
import {
|
|
421
421
|
MosaicMultiTenantProvider,
|
|
422
|
-
|
|
422
|
+
MosaicSignInLayout,
|
|
423
423
|
} from "@vantageos/mosaic-blocks";
|
|
424
424
|
|
|
425
425
|
export default function AuthLayout({ children }: { children: React.ReactNode }) {
|
|
@@ -433,13 +433,15 @@ export default function AuthLayout({ children }: { children: React.ReactNode })
|
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
// app/sign-in/page.tsx
|
|
436
|
+
// clerkSignIn is injected by the caller so mosaic-blocks never bundles Clerk directly.
|
|
436
437
|
export default function SignInPage() {
|
|
437
438
|
return (
|
|
438
439
|
<div className="min-h-screen flex items-center justify-center">
|
|
439
|
-
<
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
440
|
+
<MosaicSignInLayout
|
|
441
|
+
clerkSignIn={SignIn}
|
|
442
|
+
path="/sign-in"
|
|
443
|
+
routing="path"
|
|
444
|
+
afterSignInUrl="/dashboard"
|
|
443
445
|
/>
|
|
444
446
|
</div>
|
|
445
447
|
);
|
|
@@ -468,8 +470,9 @@ This package follows [Semantic Versioning](https://semver.org/). While in alpha
|
|
|
468
470
|
|
|
469
471
|
| Version | Status | Notes |
|
|
470
472
|
|---|---|---|
|
|
471
|
-
| `0.
|
|
472
|
-
| `0.
|
|
473
|
+
| `0.4.6-alpha` | Current | 123 exported `Mosaic*` components, Clerk auth, mobile-first, Storybook 10, 30 stories |
|
|
474
|
+
| `0.2.0-alpha` | Historical | anydebate absorb (partial) — counts quoted for this release are historical and superseded by the Current row above; see [CHANGELOG.md](CHANGELOG.md) |
|
|
475
|
+
| `0.1.0-alpha.1` | Historical | Initial alpha publish |
|
|
473
476
|
|
|
474
477
|
Full release history: [CHANGELOG.md](CHANGELOG.md)
|
|
475
478
|
|
|
@@ -486,10 +489,10 @@ Quick summary:
|
|
|
486
489
|
1. Fork and clone the repo
|
|
487
490
|
2. `pnpm install` at repo root
|
|
488
491
|
3. `pnpm build` — compiles the package
|
|
489
|
-
4. `pnpm test` — runs vitest suite (
|
|
492
|
+
4. `pnpm test` — runs vitest suite (557+ tests; exact count grows with every PR, see CI output)
|
|
490
493
|
5. `pnpm lint` — biome check
|
|
491
494
|
6. `pnpm storybook` — component sandbox at localhost:6006
|
|
492
|
-
7. Open a PR — CI gate has 7 required checks (
|
|
495
|
+
7. Open a PR — CI gate has 7 required checks (Lint, Typecheck, Test, Parse guard, Build, Sandbox build, React-doctor — see `.github/workflows/ci.yml`)
|
|
493
496
|
|
|
494
497
|
All PRs require a passing CI and a review. See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for system design and [docs/adr/](docs/adr/) for architecture decisions.
|
|
495
498
|
|