@vantageos/mosaic-blocks 0.5.9-alpha → 0.5.12-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 +12 -9
- package/dist/index.cjs +383 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +335 -2
- package/dist/index.d.ts +335 -2
- package/dist/index.js +380 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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 132 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
|
-
|
|
172
|
+
132 exported `Mosaic*` components across 9 sections (154 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
|
|
|
@@ -470,13 +470,16 @@ This package follows [Semantic Versioning](https://semver.org/). While in alpha
|
|
|
470
470
|
|
|
471
471
|
| Version | Status | Notes |
|
|
472
472
|
|---|---|---|
|
|
473
|
-
| `0.5.
|
|
474
|
-
| `0.5.
|
|
475
|
-
| `0.5.
|
|
476
|
-
| `0.5.
|
|
477
|
-
| `0.5.
|
|
478
|
-
| `0.
|
|
479
|
-
| `0.
|
|
473
|
+
| `0.5.12-alpha` | Current | 132 exported `Mosaic*` components — adds `MosaicApiKeyPanel` (presentational BYOK panel: idle/validating/valid/invalid, no storage, no network) |
|
|
474
|
+
| `0.5.11-alpha` | Historical | 131 exported `Mosaic*` components — guard fix only, no new component: `readme-matches-exports.test.ts` now exempts Historical rows by their Status column (structural), not by wording — superseded by the Current row above |
|
|
475
|
+
| `0.5.10-alpha` | Historical | 131 exported `Mosaic*` components, adds `MosaicToolToggleList` (per-tool switch + approval-level selector) — superseded by the Current row above |
|
|
476
|
+
| `0.5.9-alpha` | Historical | 130 exported `Mosaic*` components — adds `MosaicApprovalPrompt` (tool-call approve/deny) — superseded by the Current row above |
|
|
477
|
+
| `0.5.8-alpha` | Historical | 129 exported `Mosaic*` components — adds `MosaicChatMessage` (chat message: role + text/reasoning/tool-call parts) — superseded by the Current row above |
|
|
478
|
+
| `0.5.7-alpha` | Historical | 128 exported `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 |
|
|
479
|
+
| `0.5.6-alpha` | Historical | 127 exported `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 |
|
|
480
|
+
| `0.5.1-alpha` | Historical | 126 exported `Mosaic*` components, adds `MosaicChatThread` (presentational auto-scrolling chat thread) — superseded by the Current row above |
|
|
481
|
+
| `0.4.8-alpha` | Historical | 125 exported `Mosaic*` components, Clerk auth, mobile-first, Storybook 10, 30 stories — superseded by the Current row above |
|
|
482
|
+
| `0.4.7-alpha` | Historical | 124 exported `Mosaic*` components — superseded by the Current row above |
|
|
480
483
|
| `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) |
|
|
481
484
|
| `0.1.0-alpha.1` | Historical | Initial alpha publish |
|
|
482
485
|
|
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.
|
|
49
|
+
var version = "0.5.12-alpha";
|
|
50
50
|
function Placeholder({ label = "mosaic-blocks placeholder" }) {
|
|
51
51
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
|
|
52
52
|
}
|
|
@@ -12298,6 +12298,384 @@ function MosaicApprovalPrompt(props) {
|
|
|
12298
12298
|
);
|
|
12299
12299
|
}
|
|
12300
12300
|
MosaicApprovalPrompt.displayName = "MosaicApprovalPrompt";
|
|
12301
|
+
var toolToggleListSectionVariants = classVarianceAuthority.cva(["flex flex-col gap-2"], {
|
|
12302
|
+
variants: {}
|
|
12303
|
+
});
|
|
12304
|
+
var toolToggleListRowVariants = classVarianceAuthority.cva(
|
|
12305
|
+
[
|
|
12306
|
+
"flex flex-col gap-3 rounded-lg border p-3 transition-colors sm:flex-row sm:items-center sm:justify-between"
|
|
12307
|
+
],
|
|
12308
|
+
{
|
|
12309
|
+
variants: {
|
|
12310
|
+
enabled: {
|
|
12311
|
+
true: "border-border bg-card",
|
|
12312
|
+
false: "border-border bg-card/50 opacity-70"
|
|
12313
|
+
}
|
|
12314
|
+
},
|
|
12315
|
+
defaultVariants: {
|
|
12316
|
+
enabled: true
|
|
12317
|
+
}
|
|
12318
|
+
}
|
|
12319
|
+
);
|
|
12320
|
+
function cn78(...classes) {
|
|
12321
|
+
return classes.filter(Boolean).join(" ");
|
|
12322
|
+
}
|
|
12323
|
+
function MosaicToolToggleList({
|
|
12324
|
+
sections,
|
|
12325
|
+
tools,
|
|
12326
|
+
approvalLevels,
|
|
12327
|
+
onToggleTool,
|
|
12328
|
+
onChangeApproval,
|
|
12329
|
+
toggleAriaLabel,
|
|
12330
|
+
approvalSelectAriaLabel,
|
|
12331
|
+
className,
|
|
12332
|
+
ref
|
|
12333
|
+
}) {
|
|
12334
|
+
const toolsById = new Map(tools.map((tool) => [tool.id, tool]));
|
|
12335
|
+
const approvalLabelById = new Map(approvalLevels.map((level) => [level.id, level.label]));
|
|
12336
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, "data-slot": "tool-toggle-list", className: cn78("flex flex-col gap-6", className), children: sections.map((section) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12337
|
+
"div",
|
|
12338
|
+
{
|
|
12339
|
+
"data-slot": "tool-toggle-list-section",
|
|
12340
|
+
className: toolToggleListSectionVariants(),
|
|
12341
|
+
children: [
|
|
12342
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12343
|
+
"h3",
|
|
12344
|
+
{
|
|
12345
|
+
"data-slot": "tool-toggle-list-section-title",
|
|
12346
|
+
className: "text-sm font-semibold text-foreground",
|
|
12347
|
+
children: section.title
|
|
12348
|
+
}
|
|
12349
|
+
),
|
|
12350
|
+
section.toolIds.map((toolId) => {
|
|
12351
|
+
const tool = toolsById.get(toolId);
|
|
12352
|
+
if (!tool) return null;
|
|
12353
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12354
|
+
"div",
|
|
12355
|
+
{
|
|
12356
|
+
"data-slot": "tool-toggle-list-row",
|
|
12357
|
+
className: toolToggleListRowVariants({ enabled: tool.enabled }),
|
|
12358
|
+
children: [
|
|
12359
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
12360
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12361
|
+
_switch.Switch.Root,
|
|
12362
|
+
{
|
|
12363
|
+
checked: tool.enabled,
|
|
12364
|
+
onCheckedChange: (checked) => onToggleTool(tool.id, checked),
|
|
12365
|
+
"aria-label": toggleAriaLabel(tool.name),
|
|
12366
|
+
"data-slot": "tool-toggle-list-switch",
|
|
12367
|
+
className: cn78(
|
|
12368
|
+
"relative inline-flex h-6 w-10 shrink-0 cursor-pointer items-center",
|
|
12369
|
+
"rounded-full border-2 border-transparent outline-none",
|
|
12370
|
+
"bg-muted transition-colors",
|
|
12371
|
+
"data-[checked]:bg-foreground",
|
|
12372
|
+
"focus-visible:ring-ring focus-visible:ring-[3px]"
|
|
12373
|
+
),
|
|
12374
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12375
|
+
_switch.Switch.Thumb,
|
|
12376
|
+
{
|
|
12377
|
+
"data-slot": "tool-toggle-list-switch-thumb",
|
|
12378
|
+
className: cn78(
|
|
12379
|
+
"pointer-events-none block h-4 w-4 rounded-full",
|
|
12380
|
+
"bg-background shadow-sm",
|
|
12381
|
+
"translate-x-0 transition-transform",
|
|
12382
|
+
"data-[checked]:translate-x-5"
|
|
12383
|
+
)
|
|
12384
|
+
}
|
|
12385
|
+
)
|
|
12386
|
+
}
|
|
12387
|
+
),
|
|
12388
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5", children: [
|
|
12389
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12390
|
+
"span",
|
|
12391
|
+
{
|
|
12392
|
+
"data-slot": "tool-toggle-list-name",
|
|
12393
|
+
className: "text-sm font-medium text-foreground",
|
|
12394
|
+
children: tool.name
|
|
12395
|
+
}
|
|
12396
|
+
),
|
|
12397
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12398
|
+
"span",
|
|
12399
|
+
{
|
|
12400
|
+
"data-slot": "tool-toggle-list-description",
|
|
12401
|
+
className: "text-sm text-muted-foreground",
|
|
12402
|
+
children: tool.description
|
|
12403
|
+
}
|
|
12404
|
+
)
|
|
12405
|
+
] })
|
|
12406
|
+
] }),
|
|
12407
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12408
|
+
select.Select.Root,
|
|
12409
|
+
{
|
|
12410
|
+
value: tool.approvalLevelId,
|
|
12411
|
+
onValueChange: (value) => {
|
|
12412
|
+
if (value !== null) onChangeApproval(tool.id, value);
|
|
12413
|
+
},
|
|
12414
|
+
children: [
|
|
12415
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
12416
|
+
select.Select.Trigger,
|
|
12417
|
+
{
|
|
12418
|
+
"aria-label": approvalSelectAriaLabel(tool.name),
|
|
12419
|
+
"data-slot": "tool-toggle-list-approval-trigger",
|
|
12420
|
+
className: cn78(
|
|
12421
|
+
"inline-flex h-9 min-w-[10rem] items-center justify-between gap-2",
|
|
12422
|
+
"rounded-md border border-border bg-background px-3 py-2",
|
|
12423
|
+
"text-sm text-foreground shadow-xs outline-none",
|
|
12424
|
+
"hover:bg-muted",
|
|
12425
|
+
"focus-visible:ring-ring focus-visible:ring-[3px]",
|
|
12426
|
+
"data-[popup-open]:ring-ring data-[popup-open]:ring-[3px]"
|
|
12427
|
+
),
|
|
12428
|
+
children: [
|
|
12429
|
+
/* @__PURE__ */ jsxRuntime.jsx(select.Select.Value, { children: (val) => val != null ? approvalLabelById.get(val) : "" }),
|
|
12430
|
+
/* @__PURE__ */ jsxRuntime.jsx(select.Select.Icon, { className: "size-4 shrink-0 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(ChevronDownIcon5, {}) })
|
|
12431
|
+
]
|
|
12432
|
+
}
|
|
12433
|
+
),
|
|
12434
|
+
/* @__PURE__ */ jsxRuntime.jsx(select.Select.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.Positioner, { sideOffset: 4, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
12435
|
+
select.Select.Popup,
|
|
12436
|
+
{
|
|
12437
|
+
"data-slot": "tool-toggle-list-approval-popup",
|
|
12438
|
+
className: cn78(
|
|
12439
|
+
"z-50 min-w-[10rem] overflow-hidden rounded-md border border-border",
|
|
12440
|
+
"bg-popover p-1 text-popover-foreground shadow-md",
|
|
12441
|
+
"origin-[var(--transform-origin)]",
|
|
12442
|
+
"transition-[transform,scale,opacity]",
|
|
12443
|
+
"data-[open]:scale-100 data-[open]:opacity-100",
|
|
12444
|
+
"data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
|
|
12445
|
+
"data-[starting-style]:scale-95 data-[starting-style]:opacity-0"
|
|
12446
|
+
),
|
|
12447
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(select.Select.List, { children: approvalLevels.map((level) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12448
|
+
select.Select.Item,
|
|
12449
|
+
{
|
|
12450
|
+
value: level.id,
|
|
12451
|
+
className: cn78(
|
|
12452
|
+
"relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5",
|
|
12453
|
+
"text-sm text-popover-foreground outline-none",
|
|
12454
|
+
"data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
|
|
12455
|
+
"data-[selected]:font-medium"
|
|
12456
|
+
),
|
|
12457
|
+
children: [
|
|
12458
|
+
/* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemText, { children: level.label }),
|
|
12459
|
+
/* @__PURE__ */ jsxRuntime.jsx(select.Select.ItemIndicator, { className: "ml-auto size-4", children: /* @__PURE__ */ jsxRuntime.jsx(CheckIcon5, {}) })
|
|
12460
|
+
]
|
|
12461
|
+
},
|
|
12462
|
+
level.id
|
|
12463
|
+
)) })
|
|
12464
|
+
}
|
|
12465
|
+
) }) })
|
|
12466
|
+
]
|
|
12467
|
+
}
|
|
12468
|
+
)
|
|
12469
|
+
]
|
|
12470
|
+
},
|
|
12471
|
+
tool.id
|
|
12472
|
+
);
|
|
12473
|
+
})
|
|
12474
|
+
]
|
|
12475
|
+
},
|
|
12476
|
+
section.id
|
|
12477
|
+
)) });
|
|
12478
|
+
}
|
|
12479
|
+
MosaicToolToggleList.displayName = "MosaicToolToggleList";
|
|
12480
|
+
function ChevronDownIcon5() {
|
|
12481
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12482
|
+
"svg",
|
|
12483
|
+
{
|
|
12484
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12485
|
+
viewBox: "0 0 24 24",
|
|
12486
|
+
fill: "none",
|
|
12487
|
+
stroke: "currentColor",
|
|
12488
|
+
strokeWidth: "2",
|
|
12489
|
+
strokeLinecap: "round",
|
|
12490
|
+
strokeLinejoin: "round",
|
|
12491
|
+
"aria-hidden": "true",
|
|
12492
|
+
className: "size-4",
|
|
12493
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m6 9 6 6 6-6" })
|
|
12494
|
+
}
|
|
12495
|
+
);
|
|
12496
|
+
}
|
|
12497
|
+
function CheckIcon5() {
|
|
12498
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12499
|
+
"svg",
|
|
12500
|
+
{
|
|
12501
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12502
|
+
viewBox: "0 0 24 24",
|
|
12503
|
+
fill: "none",
|
|
12504
|
+
stroke: "currentColor",
|
|
12505
|
+
strokeWidth: "2",
|
|
12506
|
+
strokeLinecap: "round",
|
|
12507
|
+
strokeLinejoin: "round",
|
|
12508
|
+
"aria-hidden": "true",
|
|
12509
|
+
className: "size-4",
|
|
12510
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 6 9 17l-5-5" })
|
|
12511
|
+
}
|
|
12512
|
+
);
|
|
12513
|
+
}
|
|
12514
|
+
var apiKeyPanelTabVariants = classVarianceAuthority.cva(
|
|
12515
|
+
[
|
|
12516
|
+
"flex-1 cursor-pointer rounded-md border px-2.5 py-1.5 text-sm font-medium",
|
|
12517
|
+
"transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
12518
|
+
],
|
|
12519
|
+
{
|
|
12520
|
+
variants: {
|
|
12521
|
+
active: {
|
|
12522
|
+
true: "border-ring bg-accent text-foreground",
|
|
12523
|
+
false: "border-transparent text-muted-foreground hover:text-foreground"
|
|
12524
|
+
}
|
|
12525
|
+
},
|
|
12526
|
+
defaultVariants: {
|
|
12527
|
+
active: false
|
|
12528
|
+
}
|
|
12529
|
+
}
|
|
12530
|
+
);
|
|
12531
|
+
var apiKeyPanelInputVariants = classVarianceAuthority.cva(
|
|
12532
|
+
[
|
|
12533
|
+
"min-h-9 w-full rounded-md border bg-transparent px-3 text-sm outline-none",
|
|
12534
|
+
"transition-colors focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50"
|
|
12535
|
+
],
|
|
12536
|
+
{
|
|
12537
|
+
variants: {
|
|
12538
|
+
invalid: {
|
|
12539
|
+
true: "border-destructive",
|
|
12540
|
+
false: "border-border"
|
|
12541
|
+
}
|
|
12542
|
+
},
|
|
12543
|
+
defaultVariants: {
|
|
12544
|
+
invalid: false
|
|
12545
|
+
}
|
|
12546
|
+
}
|
|
12547
|
+
);
|
|
12548
|
+
var apiKeyPanelMessageVariants = classVarianceAuthority.cva(["text-sm"], {
|
|
12549
|
+
variants: {
|
|
12550
|
+
tone: {
|
|
12551
|
+
error: "text-destructive",
|
|
12552
|
+
muted: "text-muted-foreground"
|
|
12553
|
+
}
|
|
12554
|
+
},
|
|
12555
|
+
defaultVariants: {
|
|
12556
|
+
tone: "muted"
|
|
12557
|
+
}
|
|
12558
|
+
});
|
|
12559
|
+
function cn79(...classes) {
|
|
12560
|
+
return classes.filter(Boolean).join(" ");
|
|
12561
|
+
}
|
|
12562
|
+
function MosaicApiKeyPanel(props) {
|
|
12563
|
+
const {
|
|
12564
|
+
providers,
|
|
12565
|
+
activeProviderId,
|
|
12566
|
+
onProviderChange,
|
|
12567
|
+
tabsAriaLabel,
|
|
12568
|
+
keyValue,
|
|
12569
|
+
onKeyChange,
|
|
12570
|
+
onValidate,
|
|
12571
|
+
inputAriaLabel,
|
|
12572
|
+
validateButtonLabel,
|
|
12573
|
+
className,
|
|
12574
|
+
ref
|
|
12575
|
+
} = props;
|
|
12576
|
+
const isBusy = props.status === "validating";
|
|
12577
|
+
const activeProvider = providers.find((provider) => provider.id === activeProviderId);
|
|
12578
|
+
function handleSubmit(event) {
|
|
12579
|
+
event.preventDefault();
|
|
12580
|
+
const trimmed = keyValue.trim();
|
|
12581
|
+
if (!trimmed || isBusy) return;
|
|
12582
|
+
onValidate(activeProviderId, trimmed);
|
|
12583
|
+
}
|
|
12584
|
+
function handleKeyChange(event) {
|
|
12585
|
+
onKeyChange(event.target.value);
|
|
12586
|
+
}
|
|
12587
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "api-key-panel", className: cn79("flex flex-col gap-3", className), children: [
|
|
12588
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12589
|
+
"div",
|
|
12590
|
+
{
|
|
12591
|
+
"data-slot": "api-key-panel-tabs",
|
|
12592
|
+
role: "radiogroup",
|
|
12593
|
+
"aria-label": tabsAriaLabel,
|
|
12594
|
+
className: "flex gap-1 rounded-lg border border-border bg-background p-1",
|
|
12595
|
+
children: providers.map((provider) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12596
|
+
"label",
|
|
12597
|
+
{
|
|
12598
|
+
"data-slot": "api-key-panel-tab",
|
|
12599
|
+
className: apiKeyPanelTabVariants({ active: provider.id === activeProviderId }),
|
|
12600
|
+
children: [
|
|
12601
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12602
|
+
"input",
|
|
12603
|
+
{
|
|
12604
|
+
type: "radio",
|
|
12605
|
+
className: "sr-only",
|
|
12606
|
+
name: "api-key-panel-provider",
|
|
12607
|
+
value: provider.id,
|
|
12608
|
+
checked: provider.id === activeProviderId,
|
|
12609
|
+
disabled: isBusy,
|
|
12610
|
+
onChange: () => onProviderChange(provider.id)
|
|
12611
|
+
}
|
|
12612
|
+
),
|
|
12613
|
+
provider.label
|
|
12614
|
+
]
|
|
12615
|
+
},
|
|
12616
|
+
provider.id
|
|
12617
|
+
))
|
|
12618
|
+
}
|
|
12619
|
+
),
|
|
12620
|
+
/* @__PURE__ */ jsxRuntime.jsxs("form", { "data-slot": "api-key-panel-form", onSubmit: handleSubmit, className: "flex flex-col gap-2", children: [
|
|
12621
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12622
|
+
"input",
|
|
12623
|
+
{
|
|
12624
|
+
type: "password",
|
|
12625
|
+
"data-slot": "api-key-panel-input",
|
|
12626
|
+
"aria-label": inputAriaLabel,
|
|
12627
|
+
placeholder: activeProvider?.placeholder,
|
|
12628
|
+
value: keyValue,
|
|
12629
|
+
onChange: handleKeyChange,
|
|
12630
|
+
disabled: isBusy,
|
|
12631
|
+
autoComplete: "off",
|
|
12632
|
+
spellCheck: false,
|
|
12633
|
+
className: apiKeyPanelInputVariants({ invalid: props.status === "invalid" })
|
|
12634
|
+
}
|
|
12635
|
+
),
|
|
12636
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12637
|
+
"button",
|
|
12638
|
+
{
|
|
12639
|
+
type: "submit",
|
|
12640
|
+
"data-slot": "api-key-panel-submit-button",
|
|
12641
|
+
disabled: isBusy || keyValue.trim().length === 0,
|
|
12642
|
+
className: "min-h-9 inline-flex w-fit items-center justify-center rounded-md border border-border px-4 text-sm font-medium transition-colors hover:bg-accent/50 disabled:opacity-50",
|
|
12643
|
+
children: props.status === "validating" ? props.validatingLabel : validateButtonLabel
|
|
12644
|
+
}
|
|
12645
|
+
)
|
|
12646
|
+
] }),
|
|
12647
|
+
props.status === "validating" && /* @__PURE__ */ jsxRuntime.jsx("output", { "data-slot": "api-key-panel-validating", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: apiKeyPanelMessageVariants({ tone: "muted" }), children: props.validatingLabel }) }),
|
|
12648
|
+
props.status === "invalid" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
12649
|
+
"p",
|
|
12650
|
+
{
|
|
12651
|
+
"data-slot": "api-key-panel-error-message",
|
|
12652
|
+
className: apiKeyPanelMessageVariants({ tone: "error" }),
|
|
12653
|
+
children: props.errorMessage
|
|
12654
|
+
}
|
|
12655
|
+
),
|
|
12656
|
+
props.status === "valid" && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12657
|
+
"div",
|
|
12658
|
+
{
|
|
12659
|
+
"data-slot": "api-key-panel-saved-hint",
|
|
12660
|
+
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
12661
|
+
children: [
|
|
12662
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-slot": "api-key-panel-saved-hint-text", children: props.savedKeyHintLabel(props.savedKeyLastFour) }),
|
|
12663
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12664
|
+
"button",
|
|
12665
|
+
{
|
|
12666
|
+
type: "button",
|
|
12667
|
+
"data-slot": "api-key-panel-remove-button",
|
|
12668
|
+
onClick: props.onRemove,
|
|
12669
|
+
className: "cursor-pointer border-none bg-transparent p-0 text-sm text-foreground underline decoration-ring underline-offset-4 hover:decoration-foreground",
|
|
12670
|
+
children: props.removeButtonLabel
|
|
12671
|
+
}
|
|
12672
|
+
)
|
|
12673
|
+
]
|
|
12674
|
+
}
|
|
12675
|
+
)
|
|
12676
|
+
] });
|
|
12677
|
+
}
|
|
12678
|
+
MosaicApiKeyPanel.displayName = "MosaicApiKeyPanel";
|
|
12301
12679
|
|
|
12302
12680
|
Object.defineProperty(exports, "Accordion", {
|
|
12303
12681
|
enumerable: true,
|
|
@@ -12325,6 +12703,7 @@ exports.MosaicAgentListDesktop = AgentListDesktop;
|
|
|
12325
12703
|
exports.MosaicAgentListMobile = AgentListMobile;
|
|
12326
12704
|
exports.MosaicAgentTeamPreview = MosaicAgentTeamPreview;
|
|
12327
12705
|
exports.MosaicAnimatedList = MosaicAnimatedList;
|
|
12706
|
+
exports.MosaicApiKeyPanel = MosaicApiKeyPanel;
|
|
12328
12707
|
exports.MosaicAppSidebar = MosaicAppSidebar;
|
|
12329
12708
|
exports.MosaicApprovalPrompt = MosaicApprovalPrompt;
|
|
12330
12709
|
exports.MosaicAvatar = MosaicAvatar;
|
|
@@ -12430,6 +12809,7 @@ exports.MosaicTestimonialsGrid = MosaicTestimonialsGrid;
|
|
|
12430
12809
|
exports.MosaicTextarea = MosaicTextarea;
|
|
12431
12810
|
exports.MosaicThemeProvider = MosaicThemeProvider;
|
|
12432
12811
|
exports.MosaicThemeToggle = MosaicThemeToggle;
|
|
12812
|
+
exports.MosaicToolToggleList = MosaicToolToggleList;
|
|
12433
12813
|
exports.MosaicTooltip = MosaicTooltip;
|
|
12434
12814
|
exports.MosaicTooltipContent = MosaicTooltipContent;
|
|
12435
12815
|
exports.MosaicTooltipProvider = MosaicTooltipProvider;
|
|
@@ -12444,6 +12824,8 @@ exports.chatMessageBubbleVariants = chatMessageBubbleVariants;
|
|
|
12444
12824
|
exports.chatMessageContainerVariants = chatMessageContainerVariants;
|
|
12445
12825
|
exports.chatMessageToolStatusVariants = chatMessageToolStatusVariants;
|
|
12446
12826
|
exports.skeletonVariants = skeletonVariants;
|
|
12827
|
+
exports.toolToggleListRowVariants = toolToggleListRowVariants;
|
|
12828
|
+
exports.toolToggleListSectionVariants = toolToggleListSectionVariants;
|
|
12447
12829
|
exports.useBreakpoint = useBreakpoint;
|
|
12448
12830
|
exports.useDevice = useDevice;
|
|
12449
12831
|
exports.useEffectiveWorkspaceId = useMosaicWorkspace;
|