@ai-matrx/design-system 0.10.1 → 0.11.0
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 +64 -74
- package/README.md +20 -1
- package/dist/index.cjs +399 -297
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +106 -30
- package/dist/index.d.ts +106 -30
- package/dist/index.js +436 -331
- package/dist/index.js.map +1 -1
- package/dist/styles.css +10 -59
- package/dist/tokens.css +0 -5
- package/package.json +6 -2
package/dist/styles.css
CHANGED
|
@@ -312,55 +312,30 @@
|
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
/* --- centred dialog card ----------------------------------------------
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
Tailwind v3 `translate-x-[-50%]` -> `transform: translate(…)` (replaced)
|
|
323
|
-
Tailwind v4 `translate-x-[-50%]` -> `translate: -50% -50%` (COMPOSES)
|
|
324
|
-
|
|
325
|
-
`translate` is an independent transform property: per spec it is applied
|
|
326
|
-
IN ADDITION to `transform`, not replaced by it. So on every v4 host the
|
|
327
|
-
card was centred twice for the animation's whole duration and snapped back
|
|
328
|
-
at the end. Measured live, 2560x1289, resting rect x=128 y=32:
|
|
329
|
-
currentTime=0 -> x=-966 y=-525 (off the top-left of the viewport);
|
|
330
|
-
`el.style.translate='none'` mid-animation -> x=137 y=41, i.e. resting.
|
|
331
|
-
Three of four consumers regressed (aidream/dashboard, workflow-studio,
|
|
332
|
-
matrx-extend went from instant-and-centred to flying in from off-screen).
|
|
333
|
-
|
|
334
|
-
The fix does not pick a Tailwind version. The package owns the centring
|
|
335
|
-
itself, in the `translate` property, on `.matrx-dialog-centered` below —
|
|
336
|
-
so it reads identically under v3 and v4 hosts — and the keyframes express
|
|
337
|
-
ONLY the delta: opacity, and a 2% rise scaled up from 95% carried by
|
|
338
|
-
`transform`, which now has no other job. Resting state is
|
|
339
|
-
`translate: -50% -50%; transform: none`, byte-identical to 0.10.0's
|
|
340
|
-
rendered rect. The two never restate each other again, and
|
|
341
|
-
`motion.test.tsx` fails the build if a centred surface goes back to
|
|
342
|
-
wearing a non-zero translate utility. */
|
|
343
|
-
.matrx-dialog-centered {
|
|
344
|
-
translate: -50% -50%;
|
|
345
|
-
}
|
|
315
|
+
The card is positioned by `translate-x-[-50%] translate-y-[-50%]`
|
|
316
|
+
utilities, and an animation REPLACES `transform` for its whole duration —
|
|
317
|
+
which is why the shadcn original had to re-state the centring inside the
|
|
318
|
+
motion (`slide-in-from-left-1/2 slide-in-from-top-[48%]`). Owning the
|
|
319
|
+
keyframes lets us just say it: the card rises 2% and scales up from 95%,
|
|
320
|
+
ending exactly on the resting transform so nothing jumps at the end. */
|
|
346
321
|
@keyframes matrx-dialog-in {
|
|
347
322
|
from {
|
|
348
323
|
opacity: 0;
|
|
349
|
-
transform:
|
|
324
|
+
transform: translate(-50%, -48%) scale(0.95);
|
|
350
325
|
}
|
|
351
326
|
to {
|
|
352
327
|
opacity: 1;
|
|
353
|
-
transform:
|
|
328
|
+
transform: translate(-50%, -50%) scale(1);
|
|
354
329
|
}
|
|
355
330
|
}
|
|
356
331
|
@keyframes matrx-dialog-out {
|
|
357
332
|
from {
|
|
358
333
|
opacity: 1;
|
|
359
|
-
transform:
|
|
334
|
+
transform: translate(-50%, -50%) scale(1);
|
|
360
335
|
}
|
|
361
336
|
to {
|
|
362
337
|
opacity: 0;
|
|
363
|
-
transform:
|
|
338
|
+
transform: translate(-50%, -48%) scale(0.95);
|
|
364
339
|
}
|
|
365
340
|
}
|
|
366
341
|
.matrx-motion-dialog[data-state="open"] {
|
|
@@ -633,30 +608,6 @@
|
|
|
633
608
|
var(--matrx-motion-ease-in);
|
|
634
609
|
}
|
|
635
610
|
|
|
636
|
-
/* THE POPPER'S RESTING GAP — same law as `.matrx-dialog-centered` above, same
|
|
637
|
-
reason. `Select` in `popper` position used to nudge itself off its trigger
|
|
638
|
-
with `data-[side=bottom]:translate-y-1` and three siblings. Those are
|
|
639
|
-
Tailwind translate utilities on a surface whose keyframes animate
|
|
640
|
-
`transform` — the identical composite hazard the centred card shipped in
|
|
641
|
-
0.10.0, at 4px instead of half a viewport: on a v4 host the gap composed
|
|
642
|
-
correctly by luck, on a v3 host the animation replaced it and the surface
|
|
643
|
-
snapped 4px at the end. Stated as the `translate` property, it is the
|
|
644
|
-
resting offset in every host and the keyframes keep `transform` to
|
|
645
|
-
themselves. Sides are Radix's `data-side` (where the surface SITS), so a
|
|
646
|
-
surface below its trigger moves further down. */
|
|
647
|
-
.matrx-popper-offset[data-side="bottom"] {
|
|
648
|
-
translate: 0 var(--matrx-popper-offset);
|
|
649
|
-
}
|
|
650
|
-
.matrx-popper-offset[data-side="top"] {
|
|
651
|
-
translate: 0 calc(-1 * var(--matrx-popper-offset));
|
|
652
|
-
}
|
|
653
|
-
.matrx-popper-offset[data-side="right"] {
|
|
654
|
-
translate: var(--matrx-popper-offset) 0;
|
|
655
|
-
}
|
|
656
|
-
.matrx-popper-offset[data-side="left"] {
|
|
657
|
-
translate: calc(-1 * var(--matrx-popper-offset)) 0;
|
|
658
|
-
}
|
|
659
|
-
|
|
660
611
|
/* --- the two indefinite loops -----------------------------------------
|
|
661
612
|
`animate-pulse` and `animate-spin` ARE core Tailwind, so they survive in a
|
|
662
613
|
Tailwind host — but a Skeleton that does not pulse is indistinguishable
|
package/dist/tokens.css
CHANGED
|
@@ -142,11 +142,6 @@
|
|
|
142
142
|
/* The distance a popper travels toward its anchor as it opens. 0.5rem is
|
|
143
143
|
the `slide-in-from-*-2` the primitives carried. */
|
|
144
144
|
--matrx-motion-popper-travel: 0.5rem;
|
|
145
|
-
/* The RESTING gap between a `popper`-positioned surface and its trigger —
|
|
146
|
-
not motion, geometry. 0.25rem is the `translate-y-1` the primitives
|
|
147
|
-
carried before 0.10.1 moved it off Tailwind's translate utilities and
|
|
148
|
-
into the `translate` property (see `.matrx-popper-offset`). */
|
|
149
|
-
--matrx-popper-offset: 0.25rem;
|
|
150
145
|
}
|
|
151
146
|
|
|
152
147
|
/* Dark theme. Matches the `.dark`-class convention (Tailwind v4 hosts wire
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-matrx/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "AI Matrx semantic React primitives shared across Vite, Next.js, desktop, and customer-built applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"react-resizable-panels": "^4.12.0",
|
|
67
67
|
"tailwind-merge": "^3.0.0",
|
|
68
68
|
"vaul": "^1.1.2",
|
|
69
|
-
"@ai-matrx/kit": "0.
|
|
69
|
+
"@ai-matrx/kit": "0.9.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"react": ">=18.0.0",
|
|
@@ -96,6 +96,10 @@
|
|
|
96
96
|
"sideEffects": [
|
|
97
97
|
"*.css"
|
|
98
98
|
],
|
|
99
|
+
"keywords": [
|
|
100
|
+
"confirm-dialog",
|
|
101
|
+
"alert-dialog"
|
|
102
|
+
],
|
|
99
103
|
"scripts": {
|
|
100
104
|
"build": "tsup && node ./scripts/stamp-client-boundary.mjs",
|
|
101
105
|
"clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\"",
|