@vantageos/mosaic-blocks 0.5.24-alpha → 0.5.25-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 159 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 160 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
- 159 exported `Mosaic*` components across 9 sections (215 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
+ 160 exported `Mosaic*` components across 9 sections (217 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 | 159 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 | 160 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
@@ -47,7 +47,7 @@ function _interopNamespace(e) {
47
47
  var React30__namespace = /*#__PURE__*/_interopNamespace(React30);
48
48
 
49
49
  // src/version.ts
50
- var version = "0.5.24-alpha";
50
+ var version = "0.5.25-alpha";
51
51
  function Placeholder({ label = "mosaic-blocks placeholder" }) {
52
52
  return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-mosaic-block": "placeholder", children: label });
53
53
  }
@@ -14769,6 +14769,135 @@ function MosaicTemplateList({
14769
14769
  );
14770
14770
  }
14771
14771
  MosaicTemplateList.displayName = "MosaicTemplateList";
14772
+ var templateManagementRowVariants = classVarianceAuthority.cva(
14773
+ "flex items-center justify-between gap-3 border-b border-border px-4 py-3 last:border-b-0"
14774
+ );
14775
+ function cn96(...classes) {
14776
+ return classes.filter(Boolean).join(" ");
14777
+ }
14778
+ function MosaicTemplateManagementPanel({
14779
+ templates,
14780
+ heading,
14781
+ emptyMessage,
14782
+ renameLabel,
14783
+ duplicateLabel,
14784
+ deleteLabel,
14785
+ saveLabel,
14786
+ cancelLabel,
14787
+ renameInputAriaLabel,
14788
+ actionsAriaLabelFor,
14789
+ onRename,
14790
+ onDuplicate,
14791
+ onDelete,
14792
+ className
14793
+ }) {
14794
+ const [renamingId, setRenamingId] = React30__namespace.useState(null);
14795
+ const [draftName, setDraftName] = React30__namespace.useState("");
14796
+ const startRename = (item) => {
14797
+ setRenamingId(item.id);
14798
+ setDraftName(item.name);
14799
+ };
14800
+ const cancelRename = () => {
14801
+ setRenamingId(null);
14802
+ setDraftName("");
14803
+ };
14804
+ const saveRename = (id) => {
14805
+ const trimmed = draftName.trim();
14806
+ if (trimmed.length > 0) {
14807
+ onRename(id, trimmed);
14808
+ }
14809
+ setRenamingId(null);
14810
+ setDraftName("");
14811
+ };
14812
+ const menuItems = [
14813
+ { id: "rename", label: renameLabel },
14814
+ { id: "duplicate", label: duplicateLabel },
14815
+ { id: "delete", label: deleteLabel, separator: true }
14816
+ ];
14817
+ const handleItemSelect = (item, actionId) => {
14818
+ if (actionId === "rename") {
14819
+ startRename(item);
14820
+ } else if (actionId === "duplicate") {
14821
+ onDuplicate(item.id);
14822
+ } else if (actionId === "delete") {
14823
+ onDelete(item.id);
14824
+ }
14825
+ };
14826
+ return /* @__PURE__ */ jsxRuntime.jsxs(
14827
+ "div",
14828
+ {
14829
+ "data-slot": "template-management-panel",
14830
+ className: cn96("flex flex-col rounded-lg border border-border bg-background", className),
14831
+ children: [
14832
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { className: "border-b border-border px-4 py-3 font-semibold text-foreground text-sm", children: heading }),
14833
+ templates.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-4 py-6 text-center text-muted-foreground text-sm", children: emptyMessage }) : /* @__PURE__ */ jsxRuntime.jsx("ul", { children: templates.map((item) => {
14834
+ const isRenaming = renamingId === item.id;
14835
+ return /* @__PURE__ */ jsxRuntime.jsx(
14836
+ "li",
14837
+ {
14838
+ "data-slot": "template-management-row",
14839
+ className: templateManagementRowVariants(),
14840
+ children: isRenaming ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-1 items-center gap-2", children: [
14841
+ /* @__PURE__ */ jsxRuntime.jsx(
14842
+ MosaicInput,
14843
+ {
14844
+ "aria-label": renameInputAriaLabel,
14845
+ value: draftName,
14846
+ onChange: (event) => setDraftName(event.target.value),
14847
+ className: "flex-1"
14848
+ }
14849
+ ),
14850
+ /* @__PURE__ */ jsxRuntime.jsx(MosaicButton, { type: "button", size: "sm", onClick: () => saveRename(item.id), children: saveLabel }),
14851
+ /* @__PURE__ */ jsxRuntime.jsx(MosaicButton, { type: "button", variant: "outline", size: "sm", onClick: cancelRename, children: cancelLabel })
14852
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14853
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-foreground text-sm", children: item.name }),
14854
+ /* @__PURE__ */ jsxRuntime.jsx(
14855
+ MosaicDropdownMenu,
14856
+ {
14857
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(
14858
+ "button",
14859
+ {
14860
+ type: "button",
14861
+ "aria-label": actionsAriaLabelFor(item.name),
14862
+ className: cn96(
14863
+ "flex size-8 items-center justify-center rounded-md",
14864
+ "text-muted-foreground hover:bg-muted hover:text-foreground"
14865
+ ),
14866
+ children: /* @__PURE__ */ jsxRuntime.jsx(DotsIcon, {})
14867
+ }
14868
+ ),
14869
+ items: menuItems,
14870
+ onItemSelect: (actionId) => handleItemSelect(item, actionId)
14871
+ }
14872
+ )
14873
+ ] })
14874
+ },
14875
+ item.id
14876
+ );
14877
+ }) })
14878
+ ]
14879
+ }
14880
+ );
14881
+ }
14882
+ MosaicTemplateManagementPanel.displayName = "MosaicTemplateManagementPanel";
14883
+ function DotsIcon() {
14884
+ return /* @__PURE__ */ jsxRuntime.jsxs(
14885
+ "svg",
14886
+ {
14887
+ xmlns: "http://www.w3.org/2000/svg",
14888
+ width: "16",
14889
+ height: "16",
14890
+ viewBox: "0 0 24 24",
14891
+ fill: "currentColor",
14892
+ "aria-hidden": "true",
14893
+ children: [
14894
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "5", r: "1.5" }),
14895
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "1.5" }),
14896
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "19", r: "1.5" })
14897
+ ]
14898
+ }
14899
+ );
14900
+ }
14772
14901
 
14773
14902
  Object.defineProperty(exports, "Accordion", {
14774
14903
  enumerable: true,
@@ -14922,6 +15051,7 @@ exports.MosaicTemplateCard = MosaicTemplateCard;
14922
15051
  exports.MosaicTemplateCategoryChips = MosaicTemplateCategoryChips;
14923
15052
  exports.MosaicTemplateGallery = MosaicTemplateGallery;
14924
15053
  exports.MosaicTemplateList = MosaicTemplateList;
15054
+ exports.MosaicTemplateManagementPanel = MosaicTemplateManagementPanel;
14925
15055
  exports.MosaicTemplatePreview = MosaicTemplatePreview;
14926
15056
  exports.MosaicTestimonialsGrid = MosaicTestimonialsGrid;
14927
15057
  exports.MosaicTextarea = MosaicTextarea;
@@ -14974,6 +15104,7 @@ exports.templateAgentCardTagVariants = templateAgentCardTagVariants;
14974
15104
  exports.templateAgentCardVariants = templateAgentCardVariants;
14975
15105
  exports.templateCategoryChipVariants = templateCategoryChipVariants;
14976
15106
  exports.templateListVariants = templateListVariants;
15107
+ exports.templateManagementRowVariants = templateManagementRowVariants;
14977
15108
  exports.toastCardVariants = toastCardVariants;
14978
15109
  exports.toastDismissButtonVariants = toastDismissButtonVariants;
14979
15110
  exports.toastProviderPositionVariants = toastProviderPositionVariants;