@vantageos/mosaic-blocks 0.5.28-alpha → 0.5.29-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 +3 -3
- package/dist/index.cjs +153 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +161 -7
- package/dist/index.d.ts +161 -7
- package/dist/index.js +152 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/registry.json +1265 -322
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 168 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
|
+
168 exported `Mosaic*` components across 9 sections (241 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,7 +470,7 @@ This package follows [Semantic Versioning](https://semver.org/). While in alpha
|
|
|
470
470
|
|
|
471
471
|
| Version | Status | Notes |
|
|
472
472
|
|---|---|---|
|
|
473
|
-
| `0.5.17-alpha` | Current |
|
|
473
|
+
| `0.5.17-alpha` | Current | 168 exported `Mosaic*` components — adds `MosaicResizableSplitPane` (presentational resizable two-pane content layout: drag or arrow-key resize, host-controlled width and collapsed state; forms a pair with `MosaicPdfViewer` for side-by-side document preview + edit panel) — superseded row below kept for history |
|
|
474
474
|
| `0.5.16-alpha` | Historical | 136 exported `Mosaic*` components — adds `MosaicPdfViewer` (presentational inline PDF preview via the browser's native PDF renderer: host-controlled page navigation + zoom, local loading/error status, no PDF library, no network call by the component itself) — superseded by the Current row above |
|
|
475
475
|
| `0.5.15-alpha` | Historical | 135 exported `Mosaic*` components — adds `MosaicToast` + `MosaicToastProvider` (presentational ephemeral notification: 4 variants, optional `durationMs` auto-dismiss, host-controlled action node; provider positions the stack top-right/top-center/bottom-right/bottom-center) — superseded by the Current row above |
|
|
476
476
|
| `0.5.14-alpha` | Historical | 133 exported `Mosaic*` components — no new component: adds `scripts/docs-counts.mjs`, a generator that derives every README.md / docs/components-catalog.md component/export count from `src/index.ts` (`pnpm docs:counts` writes, `pnpm docs:counts --check` verifies without writing, wired into CI's Gates job) — closes the class of defect where a count goes stale only AFTER two branches compose, invisible to any per-branch CI run — superseded by the Current row above |
|
package/dist/index.cjs
CHANGED
|
@@ -48,7 +48,7 @@ function _interopNamespace(e) {
|
|
|
48
48
|
var React30__namespace = /*#__PURE__*/_interopNamespace(React30);
|
|
49
49
|
|
|
50
50
|
// src/version.ts
|
|
51
|
-
var version = "0.5.
|
|
51
|
+
var version = "0.5.29-alpha";
|
|
52
52
|
function Placeholder({ label = "mosaic-blocks placeholder" }) {
|
|
53
53
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
|
|
54
54
|
}
|
|
@@ -7448,6 +7448,9 @@ function MosaicMessageCard({
|
|
|
7448
7448
|
bookmarkLabel,
|
|
7449
7449
|
copyMessageLabel,
|
|
7450
7450
|
aiSenderLabel,
|
|
7451
|
+
viewThreadLabel,
|
|
7452
|
+
likeAriaLabel,
|
|
7453
|
+
dislikeAriaLabel,
|
|
7451
7454
|
className
|
|
7452
7455
|
}) {
|
|
7453
7456
|
const [bookmarked, setBookmarked] = React30__namespace.useState(message.bookmarked ?? false);
|
|
@@ -7563,7 +7566,7 @@ function MosaicMessageCard({
|
|
|
7563
7566
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
7564
7567
|
hasLiked && "text-primary"
|
|
7565
7568
|
),
|
|
7566
|
-
"aria-label":
|
|
7569
|
+
"aria-label": likeAriaLabel(likes),
|
|
7567
7570
|
children: [
|
|
7568
7571
|
icons.thumbUp,
|
|
7569
7572
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: likes })
|
|
@@ -7581,7 +7584,7 @@ function MosaicMessageCard({
|
|
|
7581
7584
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
7582
7585
|
hasDisliked && "text-destructive"
|
|
7583
7586
|
),
|
|
7584
|
-
"aria-label":
|
|
7587
|
+
"aria-label": dislikeAriaLabel(dislikes),
|
|
7585
7588
|
children: [
|
|
7586
7589
|
icons.thumbDown,
|
|
7587
7590
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: dislikes })
|
|
@@ -7711,7 +7714,7 @@ function MosaicMessageCard({
|
|
|
7711
7714
|
className: "inline-flex h-7 items-center gap-1 rounded-md text-xs text-muted-foreground hover:bg-accent hover:text-accent-foreground px-2",
|
|
7712
7715
|
children: [
|
|
7713
7716
|
icons.msgSquare,
|
|
7714
|
-
|
|
7717
|
+
viewThreadLabel
|
|
7715
7718
|
]
|
|
7716
7719
|
}
|
|
7717
7720
|
) })
|
|
@@ -7765,6 +7768,9 @@ function MessageListDesktop({
|
|
|
7765
7768
|
removeBookmarkLabel,
|
|
7766
7769
|
bookmarkLabel,
|
|
7767
7770
|
copyMessageLabel,
|
|
7771
|
+
viewThreadLabel,
|
|
7772
|
+
likeAriaLabel,
|
|
7773
|
+
dislikeAriaLabel,
|
|
7768
7774
|
className
|
|
7769
7775
|
}) {
|
|
7770
7776
|
const [query, setQuery] = React30__namespace.useState("");
|
|
@@ -7808,7 +7814,10 @@ function MessageListDesktop({
|
|
|
7808
7814
|
bookmarkAriaLabel,
|
|
7809
7815
|
removeBookmarkLabel,
|
|
7810
7816
|
bookmarkLabel,
|
|
7811
|
-
copyMessageLabel
|
|
7817
|
+
copyMessageLabel,
|
|
7818
|
+
viewThreadLabel,
|
|
7819
|
+
likeAriaLabel,
|
|
7820
|
+
dislikeAriaLabel
|
|
7812
7821
|
},
|
|
7813
7822
|
message.id
|
|
7814
7823
|
)),
|
|
@@ -7848,6 +7857,9 @@ function MessageListMobile({
|
|
|
7848
7857
|
removeBookmarkLabel,
|
|
7849
7858
|
bookmarkLabel,
|
|
7850
7859
|
copyMessageLabel,
|
|
7860
|
+
viewThreadLabel,
|
|
7861
|
+
likeAriaLabel,
|
|
7862
|
+
dislikeAriaLabel,
|
|
7851
7863
|
className
|
|
7852
7864
|
}) {
|
|
7853
7865
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "message-list-mobile", className: cn62("flex flex-col", className), children: [
|
|
@@ -7869,6 +7881,9 @@ function MessageListMobile({
|
|
|
7869
7881
|
removeBookmarkLabel,
|
|
7870
7882
|
bookmarkLabel,
|
|
7871
7883
|
copyMessageLabel,
|
|
7884
|
+
viewThreadLabel,
|
|
7885
|
+
likeAriaLabel,
|
|
7886
|
+
dislikeAriaLabel,
|
|
7872
7887
|
compact: true
|
|
7873
7888
|
},
|
|
7874
7889
|
message.id
|
|
@@ -10063,6 +10078,7 @@ function MosaicCreateOrgDialog({
|
|
|
10063
10078
|
orgNameFieldLabel,
|
|
10064
10079
|
orgNamePlaceholder,
|
|
10065
10080
|
slugFieldLabel,
|
|
10081
|
+
slugPlaceholder,
|
|
10066
10082
|
descriptionFieldLabel,
|
|
10067
10083
|
descriptionPlaceholder,
|
|
10068
10084
|
cancelLabel,
|
|
@@ -10148,7 +10164,7 @@ function MosaicCreateOrgDialog({
|
|
|
10148
10164
|
type: "text",
|
|
10149
10165
|
value: slug,
|
|
10150
10166
|
onChange: (e) => setSlug(e.target.value),
|
|
10151
|
-
placeholder:
|
|
10167
|
+
placeholder: slugPlaceholder,
|
|
10152
10168
|
required: true,
|
|
10153
10169
|
className: cn69(
|
|
10154
10170
|
"w-full rounded-md border bg-background px-3 py-2 min-h-[40px] text-sm placeholder:text-muted-foreground",
|
|
@@ -10613,6 +10629,7 @@ function injectStyles8() {
|
|
|
10613
10629
|
function MosaicDashboardContent({
|
|
10614
10630
|
views,
|
|
10615
10631
|
currentView,
|
|
10632
|
+
viewNotFoundLabel,
|
|
10616
10633
|
className
|
|
10617
10634
|
}) {
|
|
10618
10635
|
const { isMobile } = useDevice();
|
|
@@ -10626,7 +10643,7 @@ function MosaicDashboardContent({
|
|
|
10626
10643
|
"data-slot": "dashboard-content",
|
|
10627
10644
|
className: cn70("h-full overflow-auto", isMobile ? "p-4" : "p-6", className),
|
|
10628
10645
|
children: activeView ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mosaic-content-view space-y-6", children: activeView.content }, currentView) : /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "py-12 text-center text-sm text-muted-foreground", children: [
|
|
10629
|
-
|
|
10646
|
+
viewNotFoundLabel,
|
|
10630
10647
|
currentView
|
|
10631
10648
|
] })
|
|
10632
10649
|
}
|
|
@@ -15679,6 +15696,133 @@ function MosaicMemoryList({
|
|
|
15679
15696
|
);
|
|
15680
15697
|
}
|
|
15681
15698
|
MosaicMemoryList.displayName = "MosaicMemoryList";
|
|
15699
|
+
var memorySearchFilterChipVariants = classVarianceAuthority.cva(
|
|
15700
|
+
[
|
|
15701
|
+
"inline-flex items-center justify-center whitespace-nowrap",
|
|
15702
|
+
"rounded-full border px-3 py-1 gap-1",
|
|
15703
|
+
"text-xs font-medium transition-colors",
|
|
15704
|
+
"focus-visible:outline-none focus-visible:ring-ring focus-visible:ring-[3px]"
|
|
15705
|
+
],
|
|
15706
|
+
{
|
|
15707
|
+
variants: {
|
|
15708
|
+
selected: {
|
|
15709
|
+
true: "border-transparent bg-primary text-primary-foreground",
|
|
15710
|
+
false: "border-border bg-background text-foreground hover:bg-muted"
|
|
15711
|
+
}
|
|
15712
|
+
},
|
|
15713
|
+
defaultVariants: {
|
|
15714
|
+
selected: false
|
|
15715
|
+
}
|
|
15716
|
+
}
|
|
15717
|
+
);
|
|
15718
|
+
function cn104(...classes) {
|
|
15719
|
+
return classes.filter(Boolean).join(" ");
|
|
15720
|
+
}
|
|
15721
|
+
function SearchIcon8() {
|
|
15722
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15723
|
+
"svg",
|
|
15724
|
+
{
|
|
15725
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15726
|
+
width: "16",
|
|
15727
|
+
height: "16",
|
|
15728
|
+
viewBox: "0 0 24 24",
|
|
15729
|
+
fill: "none",
|
|
15730
|
+
stroke: "currentColor",
|
|
15731
|
+
strokeWidth: "2",
|
|
15732
|
+
strokeLinecap: "round",
|
|
15733
|
+
strokeLinejoin: "round",
|
|
15734
|
+
"aria-hidden": "true",
|
|
15735
|
+
children: [
|
|
15736
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "11", cy: "11", r: "8" }),
|
|
15737
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
|
15738
|
+
]
|
|
15739
|
+
}
|
|
15740
|
+
);
|
|
15741
|
+
}
|
|
15742
|
+
function ClearIcon() {
|
|
15743
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15744
|
+
"svg",
|
|
15745
|
+
{
|
|
15746
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
15747
|
+
width: "14",
|
|
15748
|
+
height: "14",
|
|
15749
|
+
viewBox: "0 0 24 24",
|
|
15750
|
+
fill: "none",
|
|
15751
|
+
stroke: "currentColor",
|
|
15752
|
+
strokeWidth: "2",
|
|
15753
|
+
strokeLinecap: "round",
|
|
15754
|
+
strokeLinejoin: "round",
|
|
15755
|
+
"aria-hidden": "true",
|
|
15756
|
+
children: [
|
|
15757
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
15758
|
+
/* @__PURE__ */ jsxRuntime.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
15759
|
+
]
|
|
15760
|
+
}
|
|
15761
|
+
);
|
|
15762
|
+
}
|
|
15763
|
+
function MosaicMemorySearch({
|
|
15764
|
+
query,
|
|
15765
|
+
onQueryChange,
|
|
15766
|
+
searchLabel,
|
|
15767
|
+
searchPlaceholder,
|
|
15768
|
+
clearButtonLabel,
|
|
15769
|
+
resultCount,
|
|
15770
|
+
formatResultCount,
|
|
15771
|
+
filters,
|
|
15772
|
+
selectedFilterIds,
|
|
15773
|
+
onFilterToggle,
|
|
15774
|
+
className,
|
|
15775
|
+
ref
|
|
15776
|
+
}) {
|
|
15777
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, "data-slot": "memory-search", className: cn104("flex flex-col gap-2", className), children: [
|
|
15778
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
15779
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(SearchIcon8, {}) }),
|
|
15780
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15781
|
+
MosaicInput,
|
|
15782
|
+
{
|
|
15783
|
+
type: "search",
|
|
15784
|
+
"aria-label": searchLabel,
|
|
15785
|
+
placeholder: searchPlaceholder,
|
|
15786
|
+
value: query,
|
|
15787
|
+
onChange: (event) => onQueryChange(event.target.value),
|
|
15788
|
+
className: "pl-9 pr-9"
|
|
15789
|
+
}
|
|
15790
|
+
),
|
|
15791
|
+
query.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
15792
|
+
"button",
|
|
15793
|
+
{
|
|
15794
|
+
type: "button",
|
|
15795
|
+
"aria-label": clearButtonLabel,
|
|
15796
|
+
onClick: () => onQueryChange(""),
|
|
15797
|
+
className: cn104(
|
|
15798
|
+
"absolute right-2 top-1/2 -translate-y-1/2",
|
|
15799
|
+
"flex size-5 items-center justify-center rounded-full",
|
|
15800
|
+
"text-muted-foreground hover:bg-muted hover:text-foreground",
|
|
15801
|
+
"focus-visible:outline-none focus-visible:ring-ring focus-visible:ring-[3px]"
|
|
15802
|
+
),
|
|
15803
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ClearIcon, {})
|
|
15804
|
+
}
|
|
15805
|
+
)
|
|
15806
|
+
] }),
|
|
15807
|
+
filters && filters.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "memory-search-filters", className: "flex flex-wrap items-center gap-2", children: filters.map((filter) => {
|
|
15808
|
+
const isSelected = (selectedFilterIds ?? []).includes(filter.id);
|
|
15809
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15810
|
+
"button",
|
|
15811
|
+
{
|
|
15812
|
+
type: "button",
|
|
15813
|
+
"data-slot": "memory-search-filter-chip",
|
|
15814
|
+
"aria-pressed": isSelected,
|
|
15815
|
+
onClick: () => onFilterToggle?.(filter.id),
|
|
15816
|
+
className: memorySearchFilterChipVariants({ selected: isSelected }),
|
|
15817
|
+
children: filter.label
|
|
15818
|
+
},
|
|
15819
|
+
filter.id
|
|
15820
|
+
);
|
|
15821
|
+
}) }),
|
|
15822
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { "data-slot": "memory-search-result-count", className: "text-sm text-muted-foreground", children: formatResultCount(resultCount) })
|
|
15823
|
+
] });
|
|
15824
|
+
}
|
|
15825
|
+
MosaicMemorySearch.displayName = "MosaicMemorySearch";
|
|
15682
15826
|
|
|
15683
15827
|
Object.defineProperty(exports, "Accordion", {
|
|
15684
15828
|
enumerable: true,
|
|
@@ -15789,6 +15933,7 @@ exports.MosaicMemoryCard = MosaicMemoryCard;
|
|
|
15789
15933
|
exports.MosaicMemoryDashboard = MosaicMemoryDashboard;
|
|
15790
15934
|
exports.MosaicMemoryGrid = MosaicMemoryGrid;
|
|
15791
15935
|
exports.MosaicMemoryList = MosaicMemoryList;
|
|
15936
|
+
exports.MosaicMemorySearch = MosaicMemorySearch;
|
|
15792
15937
|
exports.MosaicMessageCard = MosaicMessageCard;
|
|
15793
15938
|
exports.MosaicMessageList = MosaicMessageList;
|
|
15794
15939
|
exports.MosaicMessageListDesktop = MessageListDesktop;
|
|
@@ -15885,6 +16030,7 @@ exports.memoryDashboardViewToggleButtonVariants = memoryDashboardViewToggleButto
|
|
|
15885
16030
|
exports.memoryGridVariants = memoryGridVariants;
|
|
15886
16031
|
exports.memoryListItemVariants = memoryListItemVariants;
|
|
15887
16032
|
exports.memoryListVariants = memoryListVariants;
|
|
16033
|
+
exports.memorySearchFilterChipVariants = memorySearchFilterChipVariants;
|
|
15888
16034
|
exports.pdfViewerFrameVariants = pdfViewerFrameVariants;
|
|
15889
16035
|
exports.pdfViewerStatusVariants = pdfViewerStatusVariants;
|
|
15890
16036
|
exports.pdfViewerToolbarButtonVariants = pdfViewerToolbarButtonVariants;
|