@ai-matrx/design-system 0.11.4 โ†’ 0.11.6

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,109 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.11.6 โ€” 2026-09-08
4
+
5
+ **THE PATCH TO TAKE.** 0.11.3, 0.11.4 and 0.11.5 are all superseded; the
6
+ history of why is kept below because each one is a distinct, reusable finding
7
+ about shipping CSS from a package.
8
+
9
+ ๐Ÿšจ **THE GENERATION HAZARD** โ€” the third and last of them, measured on
10
+ matrx-frontend's live stylesheet after adopting 0.11.5. That release spelled
11
+ the footer's bottom pad `pb-[var(--dialog-pad-bottom,0px)]` and the card
12
+ `[--dialog-pad-bottom:1.5rem]`. **Neither utility reached the consumer's
13
+ stylesheet**, while the pre-existing `px-[var(--dialog-pad,0px)]` on the same
14
+ element did โ€” so the footer rendered with `padding-bottom: 0`. A consumer's
15
+ Tailwind generates utilities from what it SCANS, and **a class name this
16
+ package invents is not guaranteed to reach any consumer's sheet**. Silent, no
17
+ error: the C26 host contract again, one layer further out.
18
+
19
+ **So 0.11.6 invents no class name at all.** The footer's utilities are the
20
+ 0.11.2 string minus exactly one token โ€” the negative block margin that caused
21
+ the original defect:
22
+
23
+ ```
24
+ - mx-[โ€ฆ] mb-[calc(var(--dialog-pad,0px)*-1)] px-[โ€ฆ] pb-[var(--dialog-pad,0px)]
25
+ + mx-[โ€ฆ] px-[โ€ฆ] pb-[var(--dialog-pad,0px)]
26
+ ```
27
+
28
+ Everything genuinely new lives in `styles.css`, which the package ships itself:
29
+
30
+ ```css
31
+ .matrx-dialog-card:has(> [data-slot="dialog-footer"]),
32
+ .matrx-dialog-card:has(> [data-slot="alert-dialog-footer"]) { padding-bottom: 0 }
33
+
34
+ .matrx-mobile-sheet > [data-slot="dialog-footer"] {
35
+ padding-bottom: max(var(--dialog-pad, 0px), env(safe-area-inset-bottom, 0px));
36
+ }
37
+ ```
38
+
39
+ The second rule restates the home-indicator floor the sheet's card used to buy
40
+ with `pb-safe`, since the reservation hands that padding to the footer. It is
41
+ the ONE place a shipped rule overrides a caller's footer padding, and it is a
42
+ safety floor rather than taste.
43
+
44
+ **Measured on the live app, 1280x800, after adoption** โ€” every consequence
45
+ length, `overlapPx = -16` (a full `gap-4` of clearance where 0.11.2 had `+7.6`
46
+ of occlusion), footer padding `12/24/24/24px` identical to 0.11.2, footer bottom
47
+ flush to the card's inner edge, and the card's total height unchanged. Nothing
48
+ about the dialog changed except that the consequence is now fully visible.
49
+
50
+ **Guard added:** `sticky-footer-geometry.test.tsx` ยง "invents NO new Tailwind
51
+ class name". All 9 of its assertions and both `styles.test.ts` ยง THE PREFLIGHT
52
+ RULE assertions are proven RED on the pre-fix baseline and GREEN here.
53
+
54
+ ### Consumer action (C28)
55
+
56
+ **Take 0.11.6.** No API change; the footer's rendered geometry is identical to
57
+ 0.11.2 minus the occlusion, and every `DialogFooter` / `AlertDialogFooter`
58
+ `className` override behaves exactly as it did. Three older contracts also
59
+ start working for the first time โ€” see ยง 0.11.4.
60
+
61
+ ## 0.11.5 โ€” 2026-09-08
62
+
63
+ **0.11.4's footer rule was correct and in the wrong place a second time โ€” it
64
+ would have overridden every caller's own footer padding.** Take this patch.
65
+ 0.11.3 and 0.11.4 are both superseded.
66
+
67
+ 0.11.4 fixed the layering by moving `.matrx-dialog-footer` OUT of the cascade
68
+ layer. That made it apply โ€” and, being unlayered, it then beat any host utility
69
+ on the same element. matrx-frontend has ~10 footers that pass their own padding
70
+ (`<DialogFooter className="p-0">`, `"px-4 py-3 border-t"`, `"px-5 py-3"`,
71
+ `"mt-2 pt-2"`, โ€ฆ), and every one of them would have silently lost.
72
+
73
+ **The resolution is to make the CARD carry the fix and leave the FOOTER
74
+ alone.** The footer's geometry goes back to being Tailwind utilities on the
75
+ element, exactly as it always was, so `cn` + tailwind-merge keeps a caller's
76
+ `className` winning โ€” minus the one utility that caused the defect:
77
+
78
+ ```
79
+ - mx-[โ€ฆ] mb-[calc(var(--dialog-pad,0px)*-1)] px-[โ€ฆ] pb-[var(--dialog-pad,0px)]
80
+ + mx-[โ€ฆ] px-[โ€ฆ] pb-[var(--dialog-pad-bottom,0px)]
81
+ ```
82
+
83
+ Only the card half โ€” which no caller addresses โ€” is CSS, and it stays unlayered
84
+ because it must beat the card's own `p-6` / `p-4 pb-safe`:
85
+
86
+ ```css
87
+ .matrx-dialog-card:has(> [data-slot="dialog-footer"]),
88
+ .matrx-dialog-card:has(> [data-slot="alert-dialog-footer"]) { padding-bottom: 0 }
89
+ ```
90
+
91
+ `--dialog-pad-bottom` is now declared by each card: `1.5rem` on the two desktop
92
+ cards, and on the mobile sheet the unlayered
93
+ `.matrx-mobile-sheet { --dialog-pad-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px)) }`
94
+ so the actions still clear the home indicator.
95
+
96
+ 0.11.4's OTHER half stands and is the durable finding: **THE PREFLIGHT RULE**
97
+ and the three contracts it rescued (`.pb-safe`, `.pt-safe`, the glass stroke)
98
+ are unchanged here โ€” see ยง 0.11.4.
99
+
100
+ ### Consumer action (C28)
101
+
102
+ **Take 0.11.5.** 0.11.3 renders the footer with no padding at all; 0.11.4
103
+ renders it with the package's padding regardless of what the caller asked for.
104
+ Both are superseded within the hour. Every `DialogFooter` / `AlertDialogFooter`
105
+ `className` override behaves exactly as it did in 0.11.2.
106
+
3
107
  ## 0.11.4 โ€” 2026-09-08
4
108
 
5
109
  **0.11.3 SHIPPED THE FIX INTO A LAYER WHERE IT DID NOT APPLY โ€” and the census
package/dist/index.cjs CHANGED
@@ -1104,12 +1104,25 @@ var AlertDialogFooter = ({
1104
1104
  className: cn(
1105
1105
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
1106
1106
  // Ruling 3/4 โ€” sticky to the card edges so a scrolled body never shows
1107
- // through under the actions, and safe-area padded on a phone. ALL of
1108
- // that geometry is `matrx-dialog-footer`, a rule this package SHIPS
1109
- // (styles.css), because the utility spelling of it carried a negative
1110
- // block margin that sticky clamped โ€” painting the footer over the last
1111
- // 8px of the consequence at every description length (0.11.3).
1112
- "matrx-dialog-footer bg-background",
1107
+ // through under the actions, and safe-area padded on a phone.
1108
+ //
1109
+ // ๐Ÿšจ THERE IS NO `mb-[โ€ฆ]` HERE, AND THERE MUST NEVER BE ONE AGAIN
1110
+ // (0.11.3, feedback bf8fb00b). The bleed over the card's bottom padding
1111
+ // used to be a NEGATIVE BLOCK MARGIN, which makes this box taller than
1112
+ // the grid area the card allocates it โ€” and `position: sticky` CLAMPS a
1113
+ // box to its containing block, so the browser yanked the footer UP by
1114
+ // `--dialog-pad` against the card's `gap-4` and painted 8px of opaque
1115
+ // footer over the last line of the consequence, at every length. The
1116
+ // card now RESERVES this footer's block size instead (`matrx-dialog-card`
1117
+ // in styles.css hands over its `padding-bottom`), so the bleed costs no
1118
+ // margin at all. Guard: `sticky-footer-geometry.test.tsx`.
1119
+ //
1120
+ // These stay UTILITIES rather than a shipped rule so a caller's
1121
+ // `className` still wins through tailwind-merge โ€” a shipped rule would
1122
+ // have to be unlayered to survive Tailwind preflight (ยง THE PREFLIGHT
1123
+ // RULE in styles.css) and would then override every caller's padding.
1124
+ "sticky bottom-0 z-10 bg-background pt-3",
1125
+ "mx-[calc(var(--dialog-pad,0px)*-1)] px-[var(--dialog-pad,0px)] pb-[var(--dialog-pad,0px)]",
1113
1126
  className
1114
1127
  ),
1115
1128
  ...props
@@ -2235,12 +2248,26 @@ var DialogFooter = ({
2235
2248
  "data-slot": "dialog-footer",
2236
2249
  className: cn(
2237
2250
  "flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
2238
- // Ruling 3 โ€” the geometry is `matrx-dialog-footer`, a rule this package
2239
- // SHIPS (styles.css). It used to be utilities, one of which was a
2240
- // negative block margin that `position: sticky` clamps โ€” the footer was
2241
- // yanked up over the row above it by `--dialog-pad` minus the card gap
2242
- // (0.11.3). The card gives the footer its bottom padding instead.
2243
- "matrx-dialog-footer bg-background",
2251
+ // Ruling 3/4 โ€” sticky to the card edges so a scrolled body never shows
2252
+ // through under the actions, and safe-area padded on a phone.
2253
+ //
2254
+ // ๐Ÿšจ THERE IS NO `mb-[โ€ฆ]` HERE, AND THERE MUST NEVER BE ONE AGAIN
2255
+ // (0.11.3, feedback bf8fb00b). The bleed over the card's bottom padding
2256
+ // used to be a NEGATIVE BLOCK MARGIN, which makes this box taller than
2257
+ // the grid area the card allocates it โ€” and `position: sticky` CLAMPS a
2258
+ // box to its containing block, so the browser yanked the footer UP by
2259
+ // `--dialog-pad` against the card's `gap-4` and painted 8px of opaque
2260
+ // footer over the last line of the consequence, at every length. The
2261
+ // card now RESERVES this footer's block size instead (`matrx-dialog-card`
2262
+ // in styles.css hands over its `padding-bottom`), so the bleed costs no
2263
+ // margin at all. Guard: `sticky-footer-geometry.test.tsx`.
2264
+ //
2265
+ // These stay UTILITIES rather than a shipped rule so a caller's
2266
+ // `className` still wins through tailwind-merge โ€” a shipped rule would
2267
+ // have to be unlayered to survive Tailwind preflight (ยง THE PREFLIGHT
2268
+ // RULE in styles.css) and would then override every caller's padding.
2269
+ "sticky bottom-0 z-10 bg-background pt-3",
2270
+ "mx-[calc(var(--dialog-pad,0px)*-1)] px-[var(--dialog-pad,0px)] pb-[var(--dialog-pad,0px)]",
2244
2271
  className
2245
2272
  ),
2246
2273
  ...props