@@ -4595,7 +4595,8 @@ export interface TokenFontWeights extends TokenBase {
45954595 * The value calculated by finding all tokens with the same name in active sets
45964596 * and resolving the references.
45974597 *
4598- * It's a weight string, or undefined if no value has been found in active sets.
4598+ * It's a weight string ("bold", "strong", etc.), or undefined if no value has
4599+ * been found in active sets.
45994600 */
46004601 readonly resolvedValue : string | undefined ;
46014602}
@@ -4797,7 +4798,8 @@ export interface TokenTextCase extends TokenBase {
47974798 * The value calculated by finding all tokens with the same name in active sets
47984799 * and resolving the references.
47994800 *
4800- * It's a case string, or undefined if no value has been found in active sets.
4801+ * It's a case string ("none", "uppercase", "lowercase", "capitalize"), or
4802+ * undefined if no value has been found in active sets.
48014803 */
48024804 readonly resolvedValue : string | undefined ;
48034805}
@@ -4828,6 +4830,118 @@ export interface TokenTextDecoration extends TokenBase {
48284830 readonly resolvedValue : string | undefined ;
48294831}
48304832
4833+ /*
4834+ * The value of a TokenTypography in its composite form.
4835+ */
4836+ export interface TokenTypographyValue {
4837+ /**
4838+ * The letter spacing, as a number.
4839+ */
4840+ letterSpacing : number ;
4841+
4842+ /**
4843+ * The list of font families.
4844+ */
4845+ fontFamilies : string [ ] ;
4846+
4847+ /**
4848+ * The font size, as a positive number.
4849+ */
4850+ fontSizes : number ;
4851+
4852+ /**
4853+ * The font weight, as a weight string ("bold", "strong", etc.).
4854+ */
4855+ fontWeights : string ;
4856+
4857+ /**
4858+ * The line height, as a number.
4859+ */
4860+ lineHeight : number ;
4861+
4862+ /**
4863+ * The text case as a string ("none", "uppercase", "lowercase" "capitalize").
4864+ */
4865+ textCase : string ;
4866+
4867+ /**
4868+ * The text decoration as a string ("none", "underline", "strike-through").
4869+ */
4870+ textDecoration : string ;
4871+ }
4872+
4873+ /*
4874+ * The value of a TokenTypography in its composite of strings form.
4875+ */
4876+ export interface TokenTypographyValueString {
4877+ /**
4878+ * The letter spacing, as a number, or a reference to a TokenLetterSpacing.
4879+ */
4880+ letterSpacing : string ;
4881+
4882+ /**
4883+ * The list of font families, or a reference to a TokenFontFamilies.
4884+ */
4885+ fontFamilies : string | string [ ] ;
4886+
4887+ /**
4888+ * The font size, as a positive number, or a reference to a TokenFontSizes.
4889+ */
4890+ fontSizes : string ;
4891+
4892+ /**
4893+ * The font weight, as a weight string ("bold", "strong", etc.), or a
4894+ * reference to a TokenFontWeights.
4895+ */
4896+ fontWeight : string ;
4897+
4898+ /**
4899+ * The line height, as a number. Note that there not exists an individual
4900+ * token type line height, only part of a Typography token. If you need to
4901+ * put here a reference, use a NumberToken.
4902+ */
4903+ lineHeight : string ;
4904+
4905+ /**
4906+ * The text case as a string ("none", "uppercase", "lowercase" "capitalize"),
4907+ * or a reference to a TokenTextCase.
4908+ */
4909+ textCase : string ;
4910+
4911+ /**
4912+ * The text decoration as a string ("none", "underline", "strike-through"),
4913+ * or a reference to a TokenTextDecoration.
4914+ */
4915+ textDecoration : string ;
4916+ }
4917+
4918+ /**
4919+ * Represents a token of type Typography.
4920+ * This interface extends `TokenBase` and specifies the data type of the value.
4921+ */
4922+ export interface TokenTypography extends TokenBase {
4923+ /**
4924+ * The type of the token.
4925+ */
4926+ readonly type : 'typography' ;
4927+
4928+ /**
4929+ * The value as defined in the token itself.
4930+ * It may be a string with a reference to other token, or a
4931+ * TokenTypographyValueString.
4932+ */
4933+ value : string | TokenTypographyValueString ;
4934+
4935+ /**
4936+ * The value calculated by finding all tokens with the same name in active sets
4937+ * and resolving the references.
4938+ *
4939+ * It's a TokenTypographyValue, or undefined if no value has been found
4940+ * in active sets.
4941+ */
4942+ readonly resolvedValue : TokenTypographyValue [ ] | undefined ;
4943+ }
4944+
48314945/**
48324946 * The supported Design Tokens in Penpot.
48334947 */
@@ -4836,12 +4950,19 @@ export type Token =
48364950 | TokenShadow
48374951 | TokenColor
48384952 | TokenDimension
4953+ | TokenFontFamilies
48394954 | TokenFontSizes
4955+ | TokenFontWeights
4956+ | TokenLetterSpacing
4957+ | TokenNumber
48404958 | TokenOpacity
48414959 | TokenRotation
48424960 | TokenSizing
48434961 | TokenSpacing
4844- | TokenBorderWidth ;
4962+ | TokenBorderWidth
4963+ | TokenTextCase
4964+ | TokenTextDecoration
4965+ | TokenTypography ;
48454966
48464967/**
48474968 * The collection of all tokens in a Penpot file's library.
@@ -5143,6 +5264,11 @@ type TokenTextCaseProps = 'text-case';
51435264 */
51445265type TokenTextDecorationProps = 'text-decoration' ;
51455266
5267+ /**
5268+ * The properties that a Typography token can be applied to.
5269+ */
5270+ type TokenTypographyProps = 'typography' ;
5271+
51465272/**
51475273 * All the properties that a token can be applied to.
51485274 * Not always correspond to Shape properties. For example,
@@ -5166,7 +5292,8 @@ export type TokenProperty =
51665292 | TokenSpacingProps
51675293 | TokenBorderWidthProps
51685294 | TokenTextCaseProps
5169- | TokenTextDecorationProps ;
5295+ | TokenTextDecorationProps
5296+ | TokenTypographyProps ;
51705297
51715298/**
51725299 * The supported types of Design Tokens in Penpot.
0 commit comments