-
-
Notifications
You must be signed in to change notification settings - Fork 270
Description
Description
https://panda-css.com/docs/guides/debugging#panda-debug
The panda debug is useful for detecting Panda CSS usage locations such as css(), but currently only includes start line/column position information, which makes it incomplete.
Therefore, I propose including end line/column information as well.
Problem Statement/Justification
Current *.ast.json does not include end line/column.
[
{
"name": "css",
"type": "object",
"data": [
{
"transitionProperty": "all",
"opacity": "0.5",
"border": "1px solid",
"borderColor": "black",
"color": "gray.600",
"_hover": {
"color": "gray.900"
},
"rounded": "md",
"p": "1.5",
"_dark": {
"borderColor": "rgba(255, 255, 255, 0.1)",
"color": "gray.400",
"_hover": {
"color": "gray.50"
}
}
}
],
"kind": "CallExpression",
"line": 13,
"column": 9
}
]Proposed Solution or API
Add endColumn and endLineNumber to *.ast.json
Alternatives
No response
Additional Information
panda/packages/extractor/src/get-node-range.ts
Lines 10 to 17 in f60faf2
return { startPosition, startLineNumber: startInfo.line, startColumn: startInfo.column, endPosition, endLineNumber: endInfo.line, endColumn: endInfo.column, } panda/packages/extractor/src/box-factory.ts
Lines 91 to 101 in f60faf2
toJSON() { const range = this.getRange() return { type: this.type, // @ts-expect-error value: this.value, node: this.node.getKindName(), line: range.startLineNumber, column: range.startColumn, }
Metadata
Metadata
Assignees
Labels
No labels