@vantageos/mosaic-blocks 0.5.8-alpha → 0.5.9-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 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 129 opinionated, fully-typed UI components that integrate natively with:
13
+ `@vantageos/mosaic-blocks` is the **React composed-block layer** of the VantageOS Mosaic design system. It provides 130 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
@@ -169,7 +169,7 @@ For OKLCH design tokens, pair with `@vantageos/mosaic-tokens` — see [Section 1
169
169
 
170
170
  ## 6. Component Catalogue Summary
171
171
 
172
- 129 exported `Mosaic*` components across 9 sections (149 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).
172
+ 130 exported `Mosaic*` components across 9 sections (150 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
173
 
174
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.
175
175
 
@@ -179,7 +179,7 @@ For OKLCH design tokens, pair with `@vantageos/mosaic-tokens` — see [Section 1
179
179
  | Device / Adaptive | `MosaicDeviceProvider`, `MosaicAdaptiveGrid`, `MosaicAdaptiveModal`, `MosaicAdaptiveNavigation` | 4 |
180
180
  | Auth / Multi-tenant | `MosaicMultiTenantProvider`, `MosaicSignInLayout`, `MosaicOrgPanel`, `MosaicClerkWebhookHandler` | 14 |
181
181
  | Agents & messaging | `MosaicAgentComposer`, `MosaicAgentCard`, `MosaicAgentList`, `MosaicMessageList`, `MosaicMarketplaceList` | 28 |
182
- | Data display | `MosaicDataTable`, `MosaicKanbanBoard`, `MosaicStepPipeline`, `MosaicActivityFeed`, `MosaicDocumentUpload`, `MosaicUrlScraper`, `MosaicMarkdown` | 9 |
182
+ | Data display | `MosaicDataTable`, `MosaicKanbanBoard`, `MosaicStepPipeline`, `MosaicActivityFeed`, `MosaicDocumentUpload`, `MosaicUrlScraper`, `MosaicMarkdown`, `MosaicApprovalPrompt` | 10 |
183
183
  | Forms & inputs | `MosaicInput`, `MosaicSelect`, `MosaicField`, `MosaicCombobox`, `MosaicFilterBar` | 17 |
184
184
  | Primitives (incl. base-ui atoms) | `MosaicButton`, `MosaicBadge`, `MosaicCard`, `MosaicTabs`, `MosaicTooltip`, `MosaicAccordion` | 30 |
185
185
  | Landing & utility blocks | `MosaicHeroSplit`, `MosaicStatsGrid`, `MosaicPricingCard`, `MosaicCounter`, `MosaicThemeToggle` | 13 |
@@ -470,7 +470,8 @@ This package follows [Semantic Versioning](https://semver.org/). While in alpha
470
470
 
471
471
  | Version | Status | Notes |
472
472
  |---|---|---|
473
- | `0.5.8-alpha` | Current | 129 exported `Mosaic*` components — adds `MosaicChatMessage` (chat message: role + text/reasoning/tool-call parts) |
473
+ | `0.5.9-alpha` | Current | 130 exported `Mosaic*` components — adds `MosaicApprovalPrompt` (tool-call approve/deny) |
474
+ | `0.5.8-alpha` | Historical | 129 shipped `Mosaic*` components — adds `MosaicChatMessage` (chat message: role + text/reasoning/tool-call parts) — superseded by the Current row above |
474
475
  | `0.5.7-alpha` | Historical | 128 shipped `Mosaic*` components, adds `MosaicChatThread` (presentational auto-scrolling chat thread), `MosaicChatComposer` (chat input + send/stop button), and `MosaicMarkdown` (dependency-free markdown renderer), Clerk auth, mobile-first, Storybook 10, 30 stories — superseded by the Current row above |
475
476
  | `0.5.6-alpha` | Historical | 127 shipped `Mosaic*` components, adds `MosaicChatThread` (presentational auto-scrolling chat thread) and `MosaicChatComposer` (chat input + send/stop button), Clerk auth, mobile-first, Storybook 10, 30 stories — superseded by the Current row above |
476
477
  | `0.5.1-alpha` | Historical | 126 shipped `Mosaic*` components, adds `MosaicChatThread` (presentational auto-scrolling chat thread) — superseded by the Current row above |
package/dist/index.cjs CHANGED
@@ -46,7 +46,7 @@ function _interopNamespace(e) {
46
46
  var React28__namespace = /*#__PURE__*/_interopNamespace(React28);
47
47
 
48
48
  // src/version.ts
49
- var version = "0.5.8-alpha";
49
+ var version = "0.5.9-alpha";
50
50
  function Placeholder({ label = "mosaic-blocks placeholder" }) {
51
51
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
52
52
  }
@@ -12189,6 +12189,115 @@ function MosaicChatMessage({
12189
12189
  );
12190
12190
  }
12191
12191
  MosaicChatMessage.displayName = "MosaicChatMessage";
12192
+ var approvalPromptCardVariants = classVarianceAuthority.cva(["flex flex-col gap-3 rounded-lg border p-4"], {
12193
+ variants: {
12194
+ tone: {
12195
+ pending: "border-border bg-card",
12196
+ approved: "border-border bg-card",
12197
+ denied: "border-destructive/40 bg-destructive/5",
12198
+ error: "border-destructive/40 bg-destructive/5"
12199
+ }
12200
+ },
12201
+ defaultVariants: {
12202
+ tone: "pending"
12203
+ }
12204
+ });
12205
+ var approvalPromptMessageVariants = classVarianceAuthority.cva(["text-sm"], {
12206
+ variants: {
12207
+ tone: {
12208
+ muted: "text-muted-foreground",
12209
+ approved: "text-foreground",
12210
+ denied: "text-destructive",
12211
+ error: "text-destructive"
12212
+ }
12213
+ },
12214
+ defaultVariants: {
12215
+ tone: "muted"
12216
+ }
12217
+ });
12218
+ var approvalPromptButtonVariants = classVarianceAuthority.cva(
12219
+ [
12220
+ "min-h-9 inline-flex items-center justify-center rounded-md border px-4 text-sm font-medium transition-colors disabled:opacity-50"
12221
+ ],
12222
+ {
12223
+ variants: {
12224
+ intent: {
12225
+ approve: "border-border hover:bg-accent/50",
12226
+ deny: "border-destructive/40 text-destructive hover:bg-destructive/5"
12227
+ }
12228
+ }
12229
+ }
12230
+ );
12231
+ function cn77(...classes) {
12232
+ return classes.filter(Boolean).join(" ");
12233
+ }
12234
+ function MosaicApprovalPrompt(props) {
12235
+ const { toolName, toolNameLabel, promptTitle, renderArguments, className, ref } = props;
12236
+ const tone = props.status === "responded" ? props.decision : props.status === "error" ? "error" : "pending";
12237
+ return /* @__PURE__ */ jsxRuntime.jsxs(
12238
+ "fieldset",
12239
+ {
12240
+ ref,
12241
+ "data-slot": "approval-prompt",
12242
+ "aria-label": promptTitle,
12243
+ className: cn77("border-0 p-0 m-0", approvalPromptCardVariants({ tone }), className),
12244
+ children: [
12245
+ /* @__PURE__ */ jsxRuntime.jsx("legend", { "data-slot": "approval-prompt-title", className: "text-base font-semibold md:text-lg", children: promptTitle }),
12246
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "approval-prompt-tool", className: "flex flex-col gap-1", children: [
12247
+ /* @__PURE__ */ jsxRuntime.jsx(
12248
+ "span",
12249
+ {
12250
+ "data-slot": "approval-prompt-tool-label",
12251
+ className: approvalPromptMessageVariants({ tone: "muted" }),
12252
+ children: toolNameLabel
12253
+ }
12254
+ ),
12255
+ /* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "approval-prompt-tool-name", className: "text-sm font-medium", children: toolName })
12256
+ ] }),
12257
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "approval-prompt-arguments", children: renderArguments }),
12258
+ props.status === "pending" && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "approval-prompt-actions", className: "flex gap-2", children: [
12259
+ /* @__PURE__ */ jsxRuntime.jsx(
12260
+ "button",
12261
+ {
12262
+ type: "button",
12263
+ "data-slot": "approval-prompt-approve-button",
12264
+ onClick: props.onApprove,
12265
+ className: approvalPromptButtonVariants({ intent: "approve" }),
12266
+ children: props.approveButtonLabel
12267
+ }
12268
+ ),
12269
+ /* @__PURE__ */ jsxRuntime.jsx(
12270
+ "button",
12271
+ {
12272
+ type: "button",
12273
+ "data-slot": "approval-prompt-deny-button",
12274
+ onClick: props.onDeny,
12275
+ className: approvalPromptButtonVariants({ intent: "deny" }),
12276
+ children: props.denyButtonLabel
12277
+ }
12278
+ )
12279
+ ] }),
12280
+ props.status === "responded" && /* @__PURE__ */ jsxRuntime.jsx(
12281
+ "p",
12282
+ {
12283
+ "data-slot": "approval-prompt-decision",
12284
+ className: approvalPromptMessageVariants({ tone: props.decision }),
12285
+ children: props.decisionMessage
12286
+ }
12287
+ ),
12288
+ props.status === "error" && /* @__PURE__ */ jsxRuntime.jsx(
12289
+ "p",
12290
+ {
12291
+ "data-slot": "approval-prompt-error",
12292
+ className: approvalPromptMessageVariants({ tone: "error" }),
12293
+ children: props.errorMessage
12294
+ }
12295
+ )
12296
+ ]
12297
+ }
12298
+ );
12299
+ }
12300
+ MosaicApprovalPrompt.displayName = "MosaicApprovalPrompt";
12192
12301
 
12193
12302
  Object.defineProperty(exports, "Accordion", {
12194
12303
  enumerable: true,
@@ -12217,6 +12326,7 @@ exports.MosaicAgentListMobile = AgentListMobile;
12217
12326
  exports.MosaicAgentTeamPreview = MosaicAgentTeamPreview;
12218
12327
  exports.MosaicAnimatedList = MosaicAnimatedList;
12219
12328
  exports.MosaicAppSidebar = MosaicAppSidebar;
12329
+ exports.MosaicApprovalPrompt = MosaicApprovalPrompt;
12220
12330
  exports.MosaicAvatar = MosaicAvatar;
12221
12331
  exports.MosaicBadge = MosaicBadge;
12222
12332
  exports.MosaicBlurredOrb = MosaicBlurredOrb;