Skip to content

Commit

Permalink
Figma mode improvements (#1093)
Browse files Browse the repository at this point in the history
* changes

* f
  • Loading branch information
lukasoppermann authored Nov 29, 2024
1 parent 68b7a35 commit e00e02e
Show file tree
Hide file tree
Showing 25 changed files with 4,526 additions and 1,187 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/utilities/addSummary.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = (content, overwrite = false) => {
}
else {
core.warning('Summary character limit reached, content will be truncated.')
core.info('---------------',`${title}:`, body, '---------------')
core.info(`---------------\n${title}:\n${body}\n---------------`)
}
})
}
Expand Down
3 changes: 2 additions & 1 deletion src/schemas/colorToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const colorToken = baseToken
'mode',
'pattern/mode',
]).optional(),
mode: mode([
modeOverride: mode([
'light',
'dark',
'dark dimmed',
Expand All @@ -45,6 +45,7 @@ export const colorToken = baseToken
'dark tritanopia',
]).optional(),
scopes: scopes(['all', 'bgColor', 'fgColor', 'borderColor', 'effectColor']).optional(),
group: z.string().optional(),
})
.optional(),
})
Expand Down
1 change: 1 addition & 0 deletions src/schemas/dimensionToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const dimensionToken = baseToken
'paragraphSpacing',
'paragraphIndent',
]),
group: z.string().optional(),
}),
})
.optional(),
Expand Down
31 changes: 17 additions & 14 deletions src/schemas/shadowToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,23 @@ export const shadowToken = baseToken
$type: tokenType('shadow'),
$extensions: z
.object({
'org.primer.figma': z.object({
collection: collection(['mode']).optional(),
mode: mode([
'light',
'dark',
'dark dimmed',
'light high contrast',
'dark high contrast',
'light colorblind',
'dark colorblind',
'light tritanopia',
'dark tritanopia',
]).optional(),
}),
'org.primer.figma': z
.object({
collection: collection(['mode']).optional(),
modeOverride: mode([
'light',
'dark',
'dark dimmed',
'light high contrast',
'dark high contrast',
'light colorblind',
'dark colorblind',
'light tritanopia',
'dark tritanopia',
]).optional(),
group: z.string().optional(),
})
.strict(),
})
.optional(),
})
Expand Down
Loading

0 comments on commit e00e02e

Please sign in to comment.