fix: Filter custom selectors to current instance only by kof · Pull Request #5575 · webstudio-is/webstudio

@kof

Custom selectors like ::before were persisting in the style source menu
after clearing styles because the code iterated over ALL project styles
instead of filtering to the current instance's style sources.

- Extract getComponentStates as pure function
- Filter styles by instanceStyleSourceIds from styleSourceSelections
- Add regression tests for the bug fix

@kof kof deleted the custom-selector-only-own branch

January 19, 2026 23:48