fix: expand JSON Schema scope detection to handle and logical keywords #2029
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Bugfix and Refactoring of the schema scope detection logic.
Issue Number:
Closes #2012
Screenshots/videos:

If relevant, did you update the documentation?
N/A (This change improves the documentation's interactive tools).
Summary
This PR solves a limitation in the JsonEditor where subschemas inside keywords like $defs, definitions, allOf, anyOf, oneOf, and if/then/else were not recognized as interactive "scopes."
The Problem:
Users browsing the documentation (e.g., the Structuring page) could not click on keywords like type or items when they appeared inside a $defs block or a logical combinator. This made the documentation feel disconnected.
The Solution:
I refactored lib/getScopesOfParsedJsonSchema.ts to use a keyword-driven traversal approach. Instead of relying on a restrictive type: object check, it now systematically recurses into Map-based keywords ($defs, properties), Array-based keywords (allOf, anyOf, etc.), and single-subschema keywords (not, if).
Does this PR introduce a breaking change?
No. It is a backwards-compatible improvement to the website's syntax highlighting and interactivity.
Checklist
Please ensure the following tasks are completed before submitting this pull request.
Read, understood, and followed the contributing guidelines.