| refactor(web): convert physical direction utilities to logical ones Machine-applied output of scripts/codemod-logical.mjs across the app, plus the handful of transforms it cannot do safely. ml-/mr- become ms-/me-, pl-/pr- become ps-/pe-, left-/right- become start-/end-, and text-left, border-l and the rounded corners follow. This is a pure rename: every pair emits identical CSS under dir=ltr, verified against tailwindcss 4.2.1, so left-to-right rendering is unchanged and any visual diff there is a bug rather than a judgement call. Transforms carry a physical sign, so renaming them is wrong. Toggle knobs, hover nudges and sliding panels get explicit rtl: pairs, and motion x-offsets multiply by the direction factor from useDirection. The step wizard folds text direction into its slide axis so "next" always moves toward the inline end. Flyout menus needed a real fix rather than a rename. HoverMenu positioned itself with `left: rect.right + 8`, which is fine with the sidebar on the left but placed the menu past the viewport once the sidebar moved to the right edge — in Arabic the menus simply did not appear. It now anchors to whichever edge it grows away from, which also avoids needing the menu's width before it renders. The admin list tooltips had the same bug. Inline styles stay physical wherever the value comes from a measured DOM rect: those are already in viewport coordinates, so converting them would flip twice. Only static design offsets moved to logical properties. Also removes the dead nx-* classes on the 404 page. They came from a Nextra template and never existed in this project's Tailwind build, so they emitted nothing — including the ltr:/rtl: pair, which looked like RTL support but was not. | 29 天前 |