mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-09 14:03:33 +09:00
## What changed - Remap pasted breakpoint IDs when the same ID already belongs to a different breakpoint in the destination project. - Carry the remapped ID into pasted style declarations. - Add a regression test for inserting a fragment whose breakpoint ID conflicts with an existing project breakpoint. ## Why HTML and Tailwind conversion uses compact fragment-local breakpoint IDs such as `"0"` and `"1"`. In non-empty projects, one of those IDs can already identify a different breakpoint. The fragment copy path previously retained the incoming ID, causing the runtime to reject the mutation with `Generated record id "1" already exists`. ## Impact Pasting HTML with Tailwind classes now works in existing projects even when generated fragment breakpoint IDs overlap project breakpoint IDs. Matching breakpoints continue to be reused. ## Validation - `pnpm --filter @webstudio-is/project-build test -- src/runtime/components.test.ts` - `pnpm --filter @webstudio-is/project-build test -- src/runtime/fragment.test.tsx src/runtime/breakpoints.test.ts` - `pnpm --filter @webstudio-is/project-build typecheck` - `pnpm exec oxlint packages/project-build/src/runtime/fragment.ts packages/project-build/src/runtime/components.test.ts` - `pnpm exec oxfmt --check packages/project-build/src/runtime/fragment.ts packages/project-build/src/runtime/components.test.ts` - `git diff --check`