@ai-matrx/design-system 0.5.0 → 0.5.2
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 +28 -1
- package/dist/index.cjs +7 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.5.2 — 2026-09-07
|
|
4
|
+
|
|
5
|
+
Two real source corrections, found by adopting 0.5.0 in the first two consumers
|
|
6
|
+
before any of them shipped it.
|
|
7
|
+
|
|
8
|
+
(0.5.1 is an automatic changed-only republish tag the release automation cut
|
|
9
|
+
between these two commits; it carries 0.5.0's source with no source change. Go
|
|
10
|
+
straight to 0.5.2.)
|
|
11
|
+
|
|
12
|
+
- **`useIsMobile` no longer crashes where `matchMedia` is absent.** Older jsdom
|
|
13
|
+
setups and some embedded webviews do not provide it, and `Dialog` reads the
|
|
14
|
+
hook — so adopting 0.5.0 took down 38 of workflow-studio's tests over a
|
|
15
|
+
breakpoint. The width read still gives a correct first answer; only live
|
|
16
|
+
resize tracking is lost, which is exactly what is unavailable. A primitive
|
|
17
|
+
must never cost a host its whole suite (or its screen) for an optional
|
|
18
|
+
capability.
|
|
19
|
+
- **`Checkbox` and `Table` now default to `md`** — the stock 16px control and
|
|
20
|
+
`p-3` cells, which every host except matrx-frontend already used. The 0.5.0
|
|
21
|
+
defaults would have made three consumers bind a size just to stand still.
|
|
22
|
+
matrx-frontend is dense on purpose and binds `sm` in its own shim.
|
|
23
|
+
|
|
24
|
+
### Consumer action (C28)
|
|
25
|
+
|
|
26
|
+
None beyond installing 0.5.2 (0.5.1 was an automatic republish tag cut between these two commits; it carries the 0.5.0 source). If you pinned `Checkbox size="sm"` or
|
|
27
|
+
`Table size="sm"` to match 0.5.0's defaults, drop it unless you actually want
|
|
28
|
+
the dense variant.
|
|
29
|
+
|
|
3
30
|
## 0.5.0 — 2026-09-07
|
|
4
31
|
|
|
5
32
|
**THE GROWTH WAVE (C18).** The 2026-09-07 adoption lane deleted 34 forked
|
|
@@ -108,7 +135,7 @@ copy of something this version now ships:
|
|
|
108
135
|
carrying that app's own visual language; they are DEFERRED, not forgotten —
|
|
109
136
|
see FEATURE.md § Deferred.
|
|
110
137
|
- **aidream/apps/dashboard** — `src/components/ui/{avatar,card,checkbox,context-menu,dialog,dropdown-menu,scroll-area,switch,table,tabs,textarea}.tsx`.
|
|
111
|
-
|
|
138
|
+
Bind `Card size="lg"` to keep this app's density (Table defaults to md as of 0.5.1).
|
|
112
139
|
- **aidream/apps/workflow-studio** — `src/components/ui/{dialog,dropdown-menu,scroll-area,switch,tabs,textarea}.tsx`.
|
|
113
140
|
Its ScrollArea viewport hack becomes `viewportClassName="[&>div]:!block [&>div]:min-w-0"`.
|
|
114
141
|
|
package/dist/index.cjs
CHANGED
|
@@ -742,7 +742,7 @@ var CHECKBOX_SIZES = {
|
|
|
742
742
|
sm: { root: "h-3.5 w-3.5 rounded-xs", glyph: "h-3 w-3" },
|
|
743
743
|
md: { root: "h-4 w-4 rounded-sm", glyph: "h-3.5 w-3.5" }
|
|
744
744
|
};
|
|
745
|
-
var Checkbox = React6.forwardRef(({ className, size = "
|
|
745
|
+
var Checkbox = React6.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
746
746
|
CheckboxPrimitive.Root,
|
|
747
747
|
{
|
|
748
748
|
ref,
|
|
@@ -804,11 +804,14 @@ function useIsMobile() {
|
|
|
804
804
|
const [hasMounted, setHasMounted] = React8.useState(false);
|
|
805
805
|
React8.useEffect(() => {
|
|
806
806
|
setHasMounted(true);
|
|
807
|
-
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
808
807
|
const onChange = () => {
|
|
809
808
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
810
809
|
};
|
|
811
810
|
onChange();
|
|
811
|
+
if (typeof window.matchMedia !== "function") {
|
|
812
|
+
return void 0;
|
|
813
|
+
}
|
|
814
|
+
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
812
815
|
mql.addEventListener("change", onChange);
|
|
813
816
|
return () => mql.removeEventListener("change", onChange);
|
|
814
817
|
}, []);
|
|
@@ -2814,12 +2817,12 @@ var TABLE_SIZES = {
|
|
|
2814
2817
|
sm: { head: "px-2", cell: "p-2" },
|
|
2815
2818
|
md: { head: "px-3", cell: "p-3" }
|
|
2816
2819
|
};
|
|
2817
|
-
var TableSizeContext = React23.createContext("
|
|
2820
|
+
var TableSizeContext = React23.createContext("md");
|
|
2818
2821
|
function useTableSize() {
|
|
2819
2822
|
return React23.useContext(TableSizeContext);
|
|
2820
2823
|
}
|
|
2821
2824
|
var Table = React23.forwardRef(
|
|
2822
|
-
({ className, size = "
|
|
2825
|
+
({ className, size = "md", wrap = true, wrapperClassName, ...props }, ref) => {
|
|
2823
2826
|
const table = /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2824
2827
|
"table",
|
|
2825
2828
|
{
|