Commit a67b2c9
fix(components): resizable is a diverged file, not a synced one — stop the sync from breaking the build, and finish the v4 migration in it
`ui/resizable.tsx` looks like a Shadcn-synced no-touch file (AGENTS.md #7).
It is not one, and has not been since `00b61d6d8` ("upgrade shadcn
components and fix build issues") hand-migrated its imports from v3's
`import * as ResizablePrimitive` to v4's `{ Group, Panel, Separator }`.
Upstream never followed. Both registry endpoints — `styles/default` and
`styles/new-york` — still serve the v3 file, which reaches for
`ResizablePrimitive.PanelGroup` and `PanelResizeHandle`. Neither name
exists in react-resizable-panels v4.12.2: it exports only `Group`,
`Panel` and `Separator`. So `pnpm shadcn:update-all` — an advertised
script — overwrites this file with code that cannot compile. The commit
title above is what that looks like after the fact; it has already
happened once.
Defused by listing `resizable` under `customComponents` in
`shadcn-components.json`, which is the manifest's existing mechanism for
this: `--update-all` iterates `Object.keys(manifest.components)`, and
`--update resizable` now refuses with "not found in Shadcn registry".
With the file no longer synced, the v4 fix belongs in it rather than in a
wrapper built to avoid touching it. #3024 added
`custom/resizable.tsx` to re-key the stacked-divider styles off the dead
`data-[panel-group-direction=vertical]` and onto the `aria-orientation`
attribute v4 actually emits — 8 compensating classes shadowing 8 dead
ones in a file one import away. Those 8 now live in `ui/resizable.tsx`
directly and `custom/resizable.tsx` is a plain re-export, kept as the
sole public export site because `src/index.ts` star-exports `./ui` and
`./custom` side by side and exporting `Resizable*` from both collides
(TS2308).
The group's `data-[panel-group-direction=vertical]:flex-col` is dropped
outright: v4 writes `flex-direction: row | column` as an inline style off
`orientation`, which outranks any class.
Behaviour is unchanged, and provably so — diffing the merged class string
before against after yields exactly the 8 dead selectors removed and
nothing added, with `tailwind-merge` dropping none of the 23 survivors
now that base and variants share one `cn()` call.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent bc1ec54 commit a67b2c9
5 files changed
Lines changed: 90 additions & 93 deletions
File tree
- packages/components
- src
- __tests__
- custom
- ui
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | 233 | | |
241 | 234 | | |
242 | 235 | | |
| |||
421 | 414 | | |
422 | 415 | | |
423 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| |||
Lines changed: 16 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| |||
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
70 | | - | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| |||
123 | 129 | | |
124 | 130 | | |
125 | 131 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
130 | 136 | | |
131 | 137 | | |
132 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 11 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
53 | 28 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 29 | + | |
67 | 30 | | |
68 | | - | |
| 31 | + | |
69 | 32 | | |
70 | | - | |
71 | | - | |
72 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
73 | 36 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | 37 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments