Skip to content

Commit

Permalink
resolve only if extension
Browse files Browse the repository at this point in the history
  • Loading branch information
zarcode committed Dec 13, 2023
1 parent e8be20d commit cab3f7c
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 50 deletions.
2 changes: 1 addition & 1 deletion scripts/resolveObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function resolveObject(object, opts) {
const isReference = (value) =>
typeof value === "string" && value.startsWith("{") && value.endsWith("}");

const hasModifier = (value) => !!value?.$extensions?.["studio.tokens"]?.modify;
const hasModifier = (value) => !!value?.$extensions;

function traverseObj(obj) {
let key;
Expand Down
26 changes: 13 additions & 13 deletions transformed/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,24 +123,24 @@
},
"color": {
"bg": {
"canvas": "{color.bodyBg}",
"surface": "{color.bodyFrontBg}",
"canvas": "#f6f6f8",
"surface": "#ffffff",
"muted": "#adadad",
"subtle": "#ebebeb",
"on-subtle": "{color.coverImageBg}",
"cover": "{color.coverImageBg}"
"on-subtle": "#EDEEF2",
"cover": "#EDEEF2"
},
"fg": {
"default": "{color.textColor}",
"emphasis": "{color.headingsColor}",
"muted": "{color.descTextColor}",
"subtle": "{color.descLightTextColor}",
"inverse": "{color.bodyFrontBg}",
"default": "#000000",
"emphasis": "#000000",
"muted": "#737679",
"subtle": "#838A98",
"inverse": "#ffffff",
"disabled": "#d6d6d6",
"on-disabled": "#adadad"
},
"accent": {
"default": "{color.primaryColor}",
"default": "#007cff",
"emphasis": "#57a9ff",
"muted": "#6092ff",
"subtle": "#0a81ff",
Expand All @@ -149,7 +149,7 @@
"on-disabled": "#fff"
},
"info": {
"default": "{color.primaryColor}",
"default": "#007cff",
"emphasis": "#57a9ff",
"muted": "#6092ff",
"subtle": "#0a81ff",
Expand All @@ -158,7 +158,7 @@
"on-disabled": "#fff"
},
"border": {
"default": "{color.borderColor}",
"default": "#C6C6C8",
"subtle": "#ebebeb",
"disabled": "#d6d6d6"
}
Expand Down Expand Up @@ -520,4 +520,4 @@
"menu": "System",
"code": "System"
}
}
}
24 changes: 12 additions & 12 deletions transformed/financial.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,24 +123,24 @@
},
"color": {
"bg": {
"canvas": "{color.bodyBg}",
"surface": "{color.bodyFrontBg}",
"canvas": "#f6f6f8",
"surface": "#ffffff",
"muted": "#adadad",
"subtle": "#ebebeb",
"on-subtle": "{color.coverImageBg}",
"cover": "{color.coverImageBg}"
"on-subtle": "#EDEEF2",
"cover": "#EDEEF2"
},
"fg": {
"default": "{color.textColor}",
"emphasis": "{color.headingsColor}",
"muted": "{color.descTextColor}",
"subtle": "{color.descLightTextColor}",
"inverse": "{color.bodyFrontBg}",
"default": "#000000",
"emphasis": "#000000",
"muted": "#737679",
"subtle": "#838A98",
"inverse": "#ffffff",
"disabled": "#d6d6d6",
"on-disabled": "#adadad"
},
"accent": {
"default": "{color.primaryColor}",
"default": "#007cff",
"emphasis": "#57a9ff",
"muted": "#6092ff",
"subtle": "#0a81ff",
Expand All @@ -149,7 +149,7 @@
"on-disabled": "#fff"
},
"info": {
"default": "{color.primaryColor}",
"default": "#007cff",
"emphasis": "#57a9ff",
"muted": "#6092ff",
"subtle": "#0a81ff",
Expand All @@ -158,7 +158,7 @@
"on-disabled": "#fff"
},
"border": {
"default": "{color.borderColor}",
"default": "#C6C6C8",
"subtle": "#ebebeb",
"disabled": "#d6d6d6"
}
Expand Down
24 changes: 12 additions & 12 deletions transformed/fitness.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,24 +123,24 @@
},
"color": {
"bg": {
"canvas": "{color.bodyBg}",
"surface": "{color.bodyFrontBg}",
"canvas": "#f6f6f8",
"surface": "#ffffff",
"muted": "#adadad",
"subtle": "#ebebeb",
"on-subtle": "{color.coverImageBg}",
"cover": "{color.coverImageBg}"
"on-subtle": "#EDEEF2",
"cover": "#EDEEF2"
},
"fg": {
"default": "{color.textColor}",
"emphasis": "{color.headingsColor}",
"muted": "{color.descTextColor}",
"subtle": "{color.descLightTextColor}",
"inverse": "{color.bodyFrontBg}",
"default": "#000000",
"emphasis": "#000000",
"muted": "#737679",
"subtle": "#838A98",
"inverse": "#ffffff",
"disabled": "#d6d6d6",
"on-disabled": "#adadad"
},
"accent": {
"default": "{color.primaryColor}",
"default": "#007cff",
"emphasis": "#57a9ff",
"muted": "#6092ff",
"subtle": "#0a81ff",
Expand All @@ -149,7 +149,7 @@
"on-disabled": "#fff"
},
"info": {
"default": "{color.primaryColor}",
"default": "#007cff",
"emphasis": "#57a9ff",
"muted": "#6092ff",
"subtle": "#0a81ff",
Expand All @@ -158,7 +158,7 @@
"on-disabled": "#fff"
},
"border": {
"default": "{color.borderColor}",
"default": "#C6C6C8",
"subtle": "#ebebeb",
"disabled": "#d6d6d6"
}
Expand Down
24 changes: 12 additions & 12 deletions transformed/gaming.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,24 +123,24 @@
},
"color": {
"bg": {
"canvas": "{color.bodyBg}",
"surface": "{color.bodyFrontBg}",
"canvas": "#f6f6f8",
"surface": "#ffffff",
"muted": "#adadad",
"subtle": "#ebebeb",
"on-subtle": "{color.coverImageBg}",
"cover": "{color.coverImageBg}"
"on-subtle": "#EDEEF2",
"cover": "#EDEEF2"
},
"fg": {
"default": "{color.textColor}",
"emphasis": "{color.headingsColor}",
"muted": "{color.descTextColor}",
"subtle": "{color.descLightTextColor}",
"inverse": "{color.bodyFrontBg}",
"default": "#000000",
"emphasis": "#000000",
"muted": "#737679",
"subtle": "#838A98",
"inverse": "#ffffff",
"disabled": "#d6d6d6",
"on-disabled": "#adadad"
},
"accent": {
"default": "{color.primaryColor}",
"default": "#007cff",
"emphasis": "#57a9ff",
"muted": "#6092ff",
"subtle": "#0a81ff",
Expand All @@ -149,7 +149,7 @@
"on-disabled": "#fff"
},
"info": {
"default": "{color.primaryColor}",
"default": "#007cff",
"emphasis": "#57a9ff",
"muted": "#6092ff",
"subtle": "#0a81ff",
Expand All @@ -158,7 +158,7 @@
"on-disabled": "#fff"
},
"border": {
"default": "{color.borderColor}",
"default": "#C6C6C8",
"subtle": "#ebebeb",
"disabled": "#d6d6d6"
}
Expand Down

0 comments on commit cab3f7c

Please sign in to comment.