From dd06be3694488404718b0f3455c4d2d327e14579 Mon Sep 17 00:00:00 2001 From: Robbie Byrd Date: Tue, 17 Nov 2026 19:45:15 +0000 Subject: [PATCH] Upgrade Classicy from 0.6.31 to 3.4.0 Classicy 3 is published as `@classicy/classicy` with its Platinum look split into `@classicy/appearance-platinum`. This swaps the dependency and adapts the `@city/classicyui` wrapper to the v3 styling model: - Import the Platinum package (registers it and injects its CSS/fonts) and drop the hand-rolled `classicy.css?raw` injection; the core self-injects. - Render the `.classicyDesktop[data-classicy-appearance=platinum]` scope that all Platinum rules require, as a `display: contents` element so the core's desktop box rules do not affect layout. Tooltip and popover portals mount into that scope via a new `useClassicyPortalContainer` context. - Classicy 3 ships its CSS in `@layer classicy.*` and prepends it to , so Tailwind's preflight was erasing button borders, radii and disabled faces. Pin the layer order with Classicy last, which preserves the precedence of the old unlayered 0.x stylesheet (`!` utilities still win). - Follow v3 class renames: `classicyButtonDefault` -> `default`, `ClassicyCheckbox` -> `classicyCheckbox classicyCheckboxX`, `ClassicyCheckboxMixed` -> `mixed`; drop `classicyWindowActive`. - Apply v3's default `md` padding/margin variant classes in ClassicyButton, as upstream's own button does (v3 moved padding off `.classicyButton`). - Mark explicit app min/height sizes on buttons `!important` where v3's new min-width/min-height rules would otherwise override them. - Exclude both packages from Vite dep pre-bundling (asset URLs rely on `import.meta.url`), per the Platinum README. Co-Authored-By: Claude Opus 5.5 --- .../scenario-editor/src/routes/-editor-ui.tsx | 4 +- .../src/routes/-section-map.tsx | 2 +- apps/scenario-editor/src/routes/__root.tsx | 4 +- apps/scenario-editor/vite.config.ts | 5 + .../runtime-panel/sections/sidebar.tsx | 2 +- .../runtime-panel/sections/top-bar.tsx | 4 +- apps/web/vite.config.ts | 5 + packages/classicyui/package.json | 3 +- packages/classicyui/src/classicy-button.tsx | 10 +- packages/classicyui/src/classicy-checkbox.tsx | 5 +- packages/classicyui/src/classicy-dialog.tsx | 2 +- packages/classicyui/src/classicy-popover.tsx | 4 +- .../src/classicy-portal-container.ts | 17 + packages/classicyui/src/classicy-runtime.tsx | 68 +- .../classicyui/src/classicy-toggle-group.tsx | 2 +- packages/classicyui/src/classicy-tooltip.tsx | 5 +- packages/classicyui/src/classicy-window.tsx | 6 +- packages/classicyui/src/index.ts | 3 +- packages/classicyui/src/vite-env.d.ts | 4 - pnpm-lock.yaml | 3087 ++--------------- 20 files changed, 446 insertions(+), 2796 deletions(-) create mode 100644 packages/classicyui/src/classicy-portal-container.ts delete mode 100644 packages/classicyui/src/vite-env.d.ts diff --git a/apps/scenario-editor/src/routes/-editor-ui.tsx b/apps/scenario-editor/src/routes/-editor-ui.tsx index f9f84a77..d3731af7 100644 --- a/apps/scenario-editor/src/routes/-editor-ui.tsx +++ b/apps/scenario-editor/src/routes/-editor-ui.tsx @@ -150,7 +150,5 @@ export function EditorSecondaryButton({ className, ...props }: ComponentPropsWit * Not from Micropolis C: editor-only export action styling. */ export function EditorPrimaryButton({ className, ...props }: ComponentPropsWithoutRef<'button'>) { - return ( -