@ai-matrx/design-system 0.10.1 → 0.11.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,97 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.11.1 — 2026-09-07
4
+
5
+ **The 0.10.1 dialog-centring fix, on the current line.** 0.11.0 was cut and
6
+ published minutes before the fix landed, so `latest` briefly carried the
7
+ regression: `Dialog`, `AlertDialog` and `CommandDialog` flew in from beyond the
8
+ viewport's top-left corner and snapped into place at the end of their 200ms
9
+ animation. **`ConfirmDialog`, which arrived in 0.11.0, is an `AlertDialog` and
10
+ was therefore affected on every Tailwind v4 host** — this is the release that
11
+ fixes it.
12
+
13
+ Root cause, census, the `.matrx-dialog-centered` / `.matrx-popper-offset` fix
14
+ and its failing-then-passing guard are all documented in § 0.10.1 below; this
15
+ release is that change and nothing else. 0.10.1 exists for anyone still on the
16
+ 0.10.x line and is published under a side dist-tag so it cannot pull `latest`
17
+ backwards past the confirm surface.
18
+
19
+ ### Consumer action (C28)
20
+
21
+ **None** — no API change, resting geometry identical. Take the patch. The three
22
+ consumers that regressed at 0.10.0 and stayed regressed at 0.11.0:
23
+ **aidream/dashboard**, **aidream/workflow-studio**, **matrx-extend**.
24
+ matrx-frontend was never visibly changed (its pre-0.10.0 `tw-animate-css`
25
+ spelling had the identical flaw) but should take it too.
26
+
27
+ ## 0.11.0 — 2026-09-07
28
+
29
+ **THE CONFIRM SURFACE MOVES IN.** `ConfirmDialog` and `ConfirmDialogHost` — the
30
+ platform's `window.confirm` replacement — now live here. They came from
31
+ `@ai-matrx/kit`, which is releasing 0.9.0 to delete its copy. Census row 19i,
32
+ decided on the row-20a Tooltip precedent: **one surface, one owner.**
33
+
34
+ **Why it had to move.** kit's confirm shipped a second, inlined AlertDialog with
35
+ its own hand-copied button class strings, a hardcoded `bg-black/80` scrim, and
36
+ the exact `data-[state=open]:animate-in … zoom-in-95 … slide-in-from-top-[48%]`
37
+ host-plugin utilities 0.10.0's motion sweep just finished removing from this
38
+ package. kit ships NO stylesheet, so that dialog was unanimated and off-theme in
39
+ three of the four consumers — on the one surface in the product that stands
40
+ between a user and a destroyed thing. kit could not import 0.10.0's fix, because
41
+ **this package depends on kit**; importing back is a cycle. And giving kit its own
42
+ sheet would have invented a second required-CSS contract no consumer performs —
43
+ the C26 silent host contract, one layer down. The only correct move was this one.
44
+
45
+ **What it inherits by being here** — none of it hand-copied, all of it already
46
+ proven by this package's own guards:
47
+
48
+ - `matrx-motion-overlay` / `matrx-motion-dialog` / `matrx-spin`, whose rules ship
49
+ in `styles.css` and are asserted present in the packed tarball;
50
+ - `--matrx-overlay-scrim`, a token that answers to the host's theme, instead of
51
+ `bg-black/80`;
52
+ - `AlertDialog` ruling 3 — clamped to `max-h-[85dvh]`, scrolling inside itself,
53
+ sticky footer. **This is what makes the platform's consequence-first copy law
54
+ survivable.** A confirmation that names everything it is about to destroy can be
55
+ long, and in kit's unclamped copy a long one pushed Cancel and Continue below
56
+ the fold of a short viewport. An AlertDialog does not dismiss on a backdrop
57
+ click, so that was a dead end on a destructive action. Fixed by the move, with
58
+ a guard;
59
+ - `buttonVariants` as the ONE source of button appearance — the destructive
60
+ confirm button is now literally the package's destructive button, including the
61
+ 44px coarse-pointer target, not a second hand-written copy of its classes;
62
+ - `PortalContainerProvider`, so a confirm opened inside a popped-out window panel
63
+ renders in THAT window's document without the host passing anything.
64
+
65
+ **Behavior is the kit port, verbatim.** Every prop, default and interaction is
66
+ unchanged; only the chrome underneath is the package's. The suite came across
67
+ whole and grew a third target: `src/confirm-dialog.test.tsx` proves the
68
+ imperative contract across the package boundary, proves the chrome is the
69
+ package's (a guard that fails the moment `bg-black` or `animate-in` comes back),
70
+ and proves the consequence-first copy contract — the consequence renders in full,
71
+ is the dialog's `aria-describedby` description, is never clamped or truncated,
72
+ and never puts the actions out of reach however long it is.
73
+
74
+ ### Added
75
+
76
+ - `ConfirmDialog`, `ConfirmDialogProps` — the declarative dialog (use it inline
77
+ when in-dialog `busy` state during async work is meaningful).
78
+ - `ConfirmDialogHost` — mount ONCE near the root of every provider tree.
79
+
80
+ ### Not added, on purpose
81
+
82
+ - `confirm()` is **not** re-exported from here. The imperative opener stays in
83
+ `@ai-matrx/kit/confirm-opener`, where it is pure TS with no React and no radix,
84
+ so hundreds of static call sites cost nothing. The host and the opener find each
85
+ other through the opener's `Symbol.for("ai-matrx.kit.confirm-opener-state")`
86
+ globalThis slot — across packages and across module graphs.
87
+
88
+ ### Consumer action (C28)
89
+
90
+ Mount `<ConfirmDialogHost />` from **here** and keep calling `confirm()` from
91
+ `@ai-matrx/kit/confirm-opener`. The full repointing diff — host, dialog, and the
92
+ imperative import — is in `@ai-matrx/kit` CHANGELOG § 0.9.0 § Consumer action.
93
+ Take both releases together: design-system >= 0.11.0 with kit >= 0.9.0.
94
+
3
95
  ## 0.10.1 — 2026-09-07
4
96
 
5
97
  **THE CENTRED DIALOG FLEW IN FROM OFF THE SCREEN.** 0.10.0 shipped a live
package/README.md CHANGED
@@ -5,9 +5,28 @@ The small, semantic UI foundation shared by AI Matrx React applications — prim
5
5
  **Controls:** Button, Badge, Label, Separator, the Input family, the Textarea family, Checkbox, Switch, RadioGroup, Slider, Toggle + ToggleGroup, Avatar, Progress.
6
6
  **Surfaces:** Card, Table, Tabs, Accordion, Collapsible, ScrollArea, Popover, Tooltip, HoverCard, Sheet, Dialog, AlertDialog, Drawer, BottomSheet + TabbedBottomSheet, Alert, Resizable, Skeleton.
7
7
  **Menus:** DropdownMenu, ContextMenu, Command / CommandDialog, Select, CreatablePicker.
8
- **Composed:** EditableLabel, SegmentedControl, ScoreRing, OverflowToolbar.
8
+ **Composed:** EditableLabel, SegmentedControl, ScoreRing, OverflowToolbar, ConfirmDialog + ConfirmDialogHost.
9
9
  **Hooks + utilities:** `useScrollFade`, `useIsMobile`, `usePortalContainer`, `useDialogContainer`, `useDrawerDirection`, `cn`.
10
10
 
11
+ **The confirm dialog lives here; the imperative `confirm()` lives in `@ai-matrx/kit`.** Since 0.11.0 / kit 0.9.0 the surface is one implementation, in the package that owns AlertDialog, the motion layer and the overlay scrim token. Mount the host once near your provider root and call `confirm()` from anywhere — they share one registry through a `globalThis` slot:
12
+
13
+ ```tsx
14
+ // app root, once
15
+ import { ConfirmDialogHost } from "@ai-matrx/design-system";
16
+ <ConfirmDialogHost />
17
+
18
+ // anywhere — a thunk, a util, a click handler
19
+ import { confirm } from "@ai-matrx/kit/confirm-opener";
20
+ if (!(await confirm({
21
+ title: "Re-run research",
22
+ description: "This discards the 14 pages you already have (~$50 and 10 minutes) and starts over.",
23
+ variant: "destructive",
24
+ confirmLabel: "Discard and re-run",
25
+ }))) return;
26
+ ```
27
+
28
+ Use the declarative `<ConfirmDialog open … busy />` inline instead when the dialog must stay open with a spinner while async work finishes. Name the consequence: a confirmation that says only "Are you sure?" does not satisfy the platform's destructive-and-expensive-actions law.
29
+
11
30
  **The Tooltip lives here, and only here.** `@ai-matrx/tap-target` used to ship its own copy; since design-system 0.7.0 / tap-target 0.2.0 it consumes this one and re-exports nothing.
12
31
 
13
32
  Where hosts had forked a primitive over DENSITY, density is a prop, not a fork: `Card size="sm|md|lg"`, `Table size="sm|md"`, `Accordion size="sm|md"`, `Switch`/`Avatar`/`Checkbox`/`Slider`/`RadioGroup`/`Toggle` `size`, `ResizableHandle size="xs".."4xl"`. It is declared once on the root and every item reads it from context, so a card cannot mix paddings and a radio group cannot mix control sizes.