@vantageos/mosaic-blocks 0.5.33-alpha → 0.5.34-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 177 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 180 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
- 177 exported `Mosaic*` components across 9 sections (277 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
+ 180 exported `Mosaic*` components across 9 sections (283 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 | 177 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 |
473
+ | `0.5.17-alpha` | Current | 180 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.33-alpha";
51
+ var version = "0.5.34-alpha";
52
52
  function Placeholder({ label = "mosaic-blocks placeholder" }) {
53
53
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
54
54
  }
@@ -16919,6 +16919,207 @@ function MosaicSaveChatAsMemoryForm({
16919
16919
  );
16920
16920
  }
16921
16921
  MosaicSaveChatAsMemoryForm.displayName = "MosaicSaveChatAsMemoryForm";
16922
+ var calloutVariants = classVarianceAuthority.cva(
16923
+ ["flex items-start gap-2.5", "rounded-md border", "px-3 py-2.5", "text-sm"],
16924
+ {
16925
+ variants: {
16926
+ variant: {
16927
+ info: "border-info-500/30 bg-info-50 text-foreground",
16928
+ warning: "border-warning-500/30 bg-warning-50 text-foreground"
16929
+ }
16930
+ },
16931
+ defaultVariants: {
16932
+ variant: "info"
16933
+ }
16934
+ }
16935
+ );
16936
+ function cn114(...classes) {
16937
+ return classes.filter(Boolean).join(" ");
16938
+ }
16939
+ function MosaicCallout({
16940
+ variant = "info",
16941
+ title,
16942
+ children,
16943
+ icon,
16944
+ className,
16945
+ ref,
16946
+ ...props
16947
+ }) {
16948
+ const role = variant === "warning" ? "alert" : "status";
16949
+ return /* @__PURE__ */ jsxRuntime.jsxs(
16950
+ "div",
16951
+ {
16952
+ ref,
16953
+ role,
16954
+ "data-slot": "callout",
16955
+ className: cn114(calloutVariants({ variant }), className),
16956
+ ...props,
16957
+ children: [
16958
+ icon ? /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", className: "mt-0.5 shrink-0", children: icon }) : null,
16959
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5", children: [
16960
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium", children: title }),
16961
+ children ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-muted-foreground", children }) : null
16962
+ ] })
16963
+ ]
16964
+ }
16965
+ );
16966
+ }
16967
+ MosaicCallout.displayName = "MosaicCallout";
16968
+ var matchStateVariants = classVarianceAuthority.cva(["text-xs font-medium"], {
16969
+ variants: {
16970
+ matchState: {
16971
+ exact: "text-success-700",
16972
+ partial: "text-warning-700",
16973
+ ambiguous: "text-warning-700",
16974
+ none: "text-destructive"
16975
+ }
16976
+ },
16977
+ defaultVariants: {
16978
+ matchState: "none"
16979
+ }
16980
+ });
16981
+ function matchStateSignal(matchState) {
16982
+ switch (matchState) {
16983
+ case "exact":
16984
+ return { role: "status", ariaLive: "off" };
16985
+ case "partial":
16986
+ return { role: "status", ariaLive: "polite" };
16987
+ case "ambiguous":
16988
+ return { role: "alert", ariaLive: "assertive" };
16989
+ case "none":
16990
+ return { role: "alert", ariaLive: "polite" };
16991
+ }
16992
+ }
16993
+ function cn115(...classes) {
16994
+ return classes.filter(Boolean).join(" ");
16995
+ }
16996
+ function MosaicMatchInput({
16997
+ matchState,
16998
+ stateLabels,
16999
+ locked,
17000
+ className,
17001
+ ...comboboxProps
17002
+ }) {
17003
+ const { role, ariaLive } = matchStateSignal(matchState);
17004
+ const label = stateLabels[matchState];
17005
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-slot": "match-input", className: cn115("flex flex-col gap-1", className), children: [
17006
+ /* @__PURE__ */ jsxRuntime.jsx(MosaicCombobox, { ...comboboxProps, disabled: locked }),
17007
+ /* @__PURE__ */ jsxRuntime.jsx(
17008
+ "span",
17009
+ {
17010
+ role,
17011
+ "aria-live": ariaLive,
17012
+ "data-match-state": matchState,
17013
+ className: matchStateVariants({ matchState }),
17014
+ children: label
17015
+ }
17016
+ )
17017
+ ] });
17018
+ }
17019
+ MosaicMatchInput.displayName = "MosaicMatchInput";
17020
+ var editableCellVariants = classVarianceAuthority.cva(
17021
+ ["inline-flex w-full items-center rounded-sm px-1.5 py-1 text-sm"],
17022
+ {
17023
+ variants: {
17024
+ disabled: {
17025
+ true: "cursor-not-allowed text-muted-foreground",
17026
+ false: "cursor-text hover:bg-accent/50"
17027
+ }
17028
+ },
17029
+ defaultVariants: {
17030
+ disabled: false
17031
+ }
17032
+ }
17033
+ );
17034
+ function cn116(...classes) {
17035
+ return classes.filter(Boolean).join(" ");
17036
+ }
17037
+ function MosaicEditableCell({
17038
+ value,
17039
+ onCommit,
17040
+ onCancel,
17041
+ validate,
17042
+ editAriaLabel,
17043
+ disabled,
17044
+ className,
17045
+ ref
17046
+ }) {
17047
+ const [isEditing, setIsEditing] = React30__namespace.useState(false);
17048
+ const [draft, setDraft] = React30__namespace.useState("");
17049
+ const [error, setError] = React30__namespace.useState(null);
17050
+ function startEdit() {
17051
+ if (disabled) return;
17052
+ setDraft(value);
17053
+ setError(null);
17054
+ setIsEditing(true);
17055
+ }
17056
+ function commit() {
17057
+ const message = validate ? validate(draft) : null;
17058
+ if (message) {
17059
+ setError(message);
17060
+ return;
17061
+ }
17062
+ setError(null);
17063
+ setIsEditing(false);
17064
+ onCommit(draft);
17065
+ }
17066
+ function cancel() {
17067
+ setDraft(value);
17068
+ setError(null);
17069
+ setIsEditing(false);
17070
+ onCancel?.();
17071
+ }
17072
+ function handleKeyDown(event) {
17073
+ if (event.key === "Enter") {
17074
+ commit();
17075
+ } else if (event.key === "Escape") {
17076
+ cancel();
17077
+ }
17078
+ }
17079
+ if (!isEditing) {
17080
+ return /* @__PURE__ */ jsxRuntime.jsx(
17081
+ "button",
17082
+ {
17083
+ ref,
17084
+ type: "button",
17085
+ "data-slot": "editable-cell",
17086
+ disabled,
17087
+ "aria-label": editAriaLabel,
17088
+ className: cn116(editableCellVariants({ disabled }), "text-left", className),
17089
+ onDoubleClick: startEdit,
17090
+ onKeyDown: (event) => {
17091
+ if (!disabled && event.key === "Enter") {
17092
+ startEdit();
17093
+ }
17094
+ },
17095
+ children: value
17096
+ }
17097
+ );
17098
+ }
17099
+ return /* @__PURE__ */ jsxRuntime.jsxs(
17100
+ "div",
17101
+ {
17102
+ ref,
17103
+ "data-slot": "editable-cell",
17104
+ className: cn116("flex flex-col gap-1", className),
17105
+ children: [
17106
+ /* @__PURE__ */ jsxRuntime.jsx(
17107
+ MosaicInput,
17108
+ {
17109
+ "aria-label": editAriaLabel,
17110
+ value: draft,
17111
+ autoFocus: true,
17112
+ onChange: (event) => setDraft(event.target.value),
17113
+ onKeyDown: handleKeyDown,
17114
+ onBlur: commit
17115
+ }
17116
+ ),
17117
+ error ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-destructive", children: error }) : null
17118
+ ]
17119
+ }
17120
+ );
17121
+ }
17122
+ MosaicEditableCell.displayName = "MosaicEditableCell";
16922
17123
 
16923
17124
  Object.defineProperty(exports, "Accordion", {
16924
17125
  enumerable: true,
@@ -16969,6 +17170,7 @@ exports.MosaicAvatar = MosaicAvatar;
16969
17170
  exports.MosaicBadge = MosaicBadge;
16970
17171
  exports.MosaicBlurredOrb = MosaicBlurredOrb;
16971
17172
  exports.MosaicButton = MosaicButton;
17173
+ exports.MosaicCallout = MosaicCallout;
16972
17174
  exports.MosaicCard = MosaicCard;
16973
17175
  exports.MosaicCardContent = MosaicCardContent;
16974
17176
  exports.MosaicCardDescription = MosaicCardDescription;
@@ -16999,6 +17201,7 @@ exports.MosaicDrawer = MosaicDrawer;
16999
17201
  exports.MosaicDropdownMenu = MosaicDropdownMenu;
17000
17202
  exports.MosaicEditMemoryDialog = MosaicEditMemoryDialog;
17001
17203
  exports.MosaicEditSessionDialog = MosaicEditSessionDialog;
17204
+ exports.MosaicEditableCell = MosaicEditableCell;
17002
17205
  exports.MosaicEmptyState = MosaicEmptyState;
17003
17206
  exports.MosaicFallingPattern = MosaicFallingPattern;
17004
17207
  exports.MosaicFeature3Col = MosaicFeature3Col;
@@ -17025,6 +17228,7 @@ exports.MosaicMarketplaceCard = MosaicMarketplaceCard;
17025
17228
  exports.MosaicMarketplaceList = MosaicMarketplaceList;
17026
17229
  exports.MosaicMarketplaceListDesktop = MarketplaceListDesktop;
17027
17230
  exports.MosaicMarketplaceListMobile = MarketplaceListMobile;
17231
+ exports.MosaicMatchInput = MosaicMatchInput;
17028
17232
  exports.MosaicMemberList = MosaicMemberList;
17029
17233
  exports.MosaicMemoryCard = MosaicMemoryCard;
17030
17234
  exports.MosaicMemoryDashboard = MosaicMemoryDashboard;
@@ -17120,6 +17324,7 @@ exports.alertDialogContentVariants = alertDialogContentVariants;
17120
17324
  exports.alertDialogOverlayVariants = alertDialogOverlayVariants;
17121
17325
  exports.badgeVariants = badgeVariants;
17122
17326
  exports.buttonVariants = buttonVariants;
17327
+ exports.calloutVariants = calloutVariants;
17123
17328
  exports.chatMessageBubbleVariants = chatMessageBubbleVariants;
17124
17329
  exports.chatMessageContainerVariants = chatMessageContainerVariants;
17125
17330
  exports.chatMessageToolStatusVariants = chatMessageToolStatusVariants;
@@ -17135,7 +17340,9 @@ exports.editSessionDialogButtonVariants = editSessionDialogButtonVariants;
17135
17340
  exports.editSessionDialogErrorVariants = editSessionDialogErrorVariants;
17136
17341
  exports.editSessionDialogFieldVariants = editSessionDialogFieldVariants;
17137
17342
  exports.editSessionDialogFooterVariants = editSessionDialogFooterVariants;
17343
+ exports.editableCellVariants = editableCellVariants;
17138
17344
  exports.marketplaceCardVariants = marketplaceCardVariants;
17345
+ exports.matchStateVariants = matchStateVariants;
17139
17346
  exports.memoryDashboardViewToggleButtonVariants = memoryDashboardViewToggleButtonVariants;
17140
17347
  exports.memoryGridVariants = memoryGridVariants;
17141
17348
  exports.memoryListItemVariants = memoryListItemVariants;