github chakra-ui/panda @pandacss/extractor@0.5.1

latest releases: @pandacss/token-dictionary@0.51.1, @pandacss/types@0.51.1, @pandacss/studio@0.51.1...
18 months ago

Patch Changes

  • 6f03ead: Fix issue where operation tokens did not get extracted.

    This means that values such as 1 / 2, 3*5, 2 **4, 8- 1 will now properly be extracted

  • e48b130: - Remove stack from box.toJSON() so that generated JSON files have less noise, mostly useful to get make
    the panda debug command easier to read

    • Also use the ParserResult.toJSON() method on panda debug command for the same reason

    instead of:

    [
      {
        "type": "map",
        "value": {
          "padding": {
            "type": "literal",
            "value": "25px",
            "node": "StringLiteral",
            "stack": [
              "CallExpression",
              "ObjectLiteralExpression",
              "PropertyAssignment",
              "Identifier",
              "Identifier",
              "VariableDeclaration",
              "StringLiteral"
            ],
            "line": 10,
            "column": 20
          },
          "fontSize": {
            "type": "literal",
            "value": "2xl",
            "node": "StringLiteral",
            "stack": [
              "CallExpression",
              "ObjectLiteralExpression",
              "PropertyAssignment",
              "ConditionalExpression"
            ],
            "line": 11,
            "column": 67
          }
        },
        "node": "CallExpression",
        "stack": [
          "CallExpression",
          "ObjectLiteralExpression"
        ],
        "line": 11,
        "column": 21
      },

    we now have:

    {
      "css": [
        {
          "type": "object",
          "name": "css",
          "box": {
            "type": "map",
            "value": {},
            "node": "CallExpression",
            "line": 15,
            "column": 27
          },
          "data": [
            {
              "alignItems": "center",
              "backgroundColor": "white",
              "border": "1px solid black",
              "borderRadius": "8px",
              "display": "flex",
              "gap": "16px",
              "p": "8px",
              "pr": "16px"
            }
          ]
        }
      ],
      "cva": [],
      "recipe": {
        "checkboxRoot": [
          {
            "type": "recipe",
            "name": "checkboxRoot",
            "box": {
              "type": "map",
              "value": {},
              "node": "CallExpression",
              "line": 38,
              "column": 47
            },
            "data": [
              {}
            ]
          }
        ],
  • d9bc63e: Fix ShorthandPropertyAssignment handling on root objects, it was only handled when accessing an object
    from a prop acces / element access

    this was fine:

    const aliased = 'green.600'
    const colorMap = { aliased }
    const className = css({ color: colorMap['aliased'] })

    this was not (weirdly):

    const color = 'green.600'
    const className = css({ color })
  • Updated dependencies [f9247e5]

    • @pandacss/logger@0.5.1

Don't miss a new panda release

NewReleases is sending notifications on new releases.