lukasoppermann / design-tokens

🎨 Figma plugin to export design tokens to json in an amazon style dictionary compatible format.
https://www.figma.com/community/plugin/888356646278934516/Design-Tokens
MIT License
964 stars 134 forks source link

Double neasted mode name in json output #279

Open rganko opened 1 year ago

rganko commented 1 year ago

When value from collection A is pointing to collection B, json output schema includes double/neasted mode name. Please refer to attached screens. In this example only one mode was applied. In case of multi modes, resulted json contains variables in recursive-like schema.

EDIT: it just starts working again. Mode name is not presented in case of single mode. It case of multi-modes, json construction seams to be valid.

{
  "collection 1": {
    "mode 1": {
      "purple 1": {
        "type": "color",
        "value": "#5200ffff",
        "blendMode": "normal"
      },
      "green 1": {
        "type": "color",
        "value": "#5bea18ff",
        "blendMode": "normal"
      }
    }
  },
  "collection 2": {
    "mode 1": {
      "mode 1": {
        "green 2": {
          "type": "color",
          "value": "{collection 1.green 1}"
        },
        "purple 2": {
          "type": "color",
          "value": "{collection 1.purple 1}"
        }
      }
    }
  },
  "collection 3": {
    "mode 1": {
      "blue 3": {
        "type": "color",
        "value": "#4832cdff",
        "blendMode": "normal"
      }
    }
  }
}

image-1 image-2 image-3 image-4 image-5