Skip to content

Conversation

@azu
Copy link
Contributor

@azu azu commented Nov 5, 2025

📝 Description

Add endLineNumber and endColumn fields to the AST JSON output generated by panda debug command. This provides complete position information for detected CSS usage locations
in source files.

⛳️ Current behavior (updates)

The *.ast.json files generated by panda debug currently include only start position information:

  • line: Start line number
  • column: Start column number

This incomplete position data makes it difficult to anlyze the AST.

🚀 New behavior

The AST JSON output now includes complete position information:

  • line: Start line number
  • column: Start column number
  • endLineNumber: End line number ✨ NEW
  • endColumn: End column number ✨ NEW

Example output:

{
  "box": {
    "type": "map",
    "node": "JsxSelfClosingElement",
    "line": 1,
    "column": 1,
    "endLineNumber": 1,
    "endColumn": 29,
    "value": {
      "color": {
        "line": 1,
        "column": 17,
        "endLineNumber": 1,
        "endColumn": 26,
        "value": "red.200"
      }
    }
  }
}

💣 Is this a breaking change (Yes/No): No

This is a non-breaking change. It only adds new fields to the JSON output while preserving all existing fields. Any tools currently reading the AST JSON will continue to work
unchanged, and can optionally use the new fields.

📝 Additional Information

  • The underlying infrastructure (getNodeRange()) already computed these values - they were simply not being exported
  • Added unit test with inline snapshot to verify the new fields are present

@changeset-bot
Copy link

changeset-bot bot commented Nov 5, 2025

🦋 Changeset detected

Latest commit: 53c772c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 20 packages
Name Type
@pandacss/extractor Patch
@pandacss/parser Patch
@pandacss/types Patch
@pandacss/node Patch
@pandacss/astro-plugin-studio Patch
@pandacss/dev Patch
@pandacss/postcss Patch
@pandacss/studio Patch
@pandacss/config Patch
@pandacss/core Patch
@pandacss/generator Patch
@pandacss/is-valid-prop Patch
@pandacss/logger Patch
@pandacss/preset-atlaskit Patch
@pandacss/preset-base Patch
@pandacss/preset-open-props Patch
@pandacss/preset-panda Patch
@pandacss/reporter Patch
@pandacss/shared Patch
@pandacss/token-dictionary Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Nov 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
panda-docs Ready Ready Preview Nov 5, 2025 7:57am

@vercel
Copy link

vercel bot commented Nov 5, 2025

@azu is attempting to deploy a commit to the Chakra UI Team on Vercel.

A member of the Team first needs to authorize it.

@segunadebayo segunadebayo merged commit 1b85b61 into chakra-ui:main Nov 5, 2025
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panda debug 's *.ast.json should include endColumn and endLine

2 participants