org.designtxt.defs
Shared type definitions for Design Tokens, based on DTCG 2025.10 stable specification. Defines scalar value types (color, dimension, duration, etc.) and composite value types (border, shadow, typography, etc.) used by token and resolver records.
Details · defs
| Kind | defs |
|---|---|
| Authority | designtxt.org |
| Indexed |
Checks
Valid Lint pass{
"$type": "com.atproto.lexicon.schema",
"defs": {
"borderValue": {
"description": "A composite border value combining width, line style, and color.",
"properties": {
"color": {
"description": "Border color.",
"ref": "#colorValue",
"type": "ref"
},
"style": {
"description": "Border line style.",
"knownValues": [
"solid",
"dashed",
"dotted",
"double",
"groove",
"ridge",
"inset",
"outset",
"none"
],
"maxLength": 8,
"type": "string"
},
"width": {
"description": "Border width.",
"ref": "#dimensionValue",
"type": "ref"
}
},
"type": "object"
},
"colorStop": {
"description": "A single gradient color stop. Position is a string-encoded float.",
"properties": {
"color": {
"description": "Color at this stop.",
"ref": "#colorValue",
"type": "ref"
},
"position": {
"description": "Stop position as a string-encoded float (0-1 for proportional, or unitless percentage like '50').",
"maxLength": 64,
"type": "string"
}
},
"type": "object"
},
"colorValue": {
"description": "A color value expressed in a specific color space with optional alpha and hex fallback. Float components are stored as strings because the atproto data model does not support floating-point numbers.",
"properties": {
"alpha": {
"description": "Opacity as a string-encoded float between '0' and '1'. Assumed '1' if omitted.",
"maxLength": 64,
"type": "string"
},
"colorSpace": {
"description": "The color space identifier.",
"knownValues": [
"srgb",
"srgb-linear",
"hsl",
"hwb",
"lab",
"lch",
"oklab",
"oklch",
"display-p3",
"a98-rgb",
"prophoto-rgb",
"rec2020",
"xyz-d65",
"xyz-d50"
],
"maxLength": 16,
"type": "string"
},
"components": {
"description": "Color component values (positional, depending on colorSpace). Each element is a string-encoded float (e.g. '0.4', '1.0') or the string 'none'.",
"items": {
"maxLength": 64,
"type": "string"
},
"type": "array"
},
"hex": {
"description": "6-digit CSS hex fallback (e.g. #ff00ff).",
"maxGraphemes": 7,
"maxLength": 7,
"type": "string"
}
},
"required": [
"colorSpace",
"components"
],
"type": "object"
},
"cubicBezierValue": {
"description": "A cubic Bezier curve defined by exactly 4 control-point string-encoded floats (x1, y1, x2, y2).",
"items": {
"maxLength": 64,
"type": "string"
},
"maxItems": 4,
"minItems": 4,
"type": "array"
},
"dimensionValue": {
"description": "A dimension with a numeric value and CSS-compatible unit. The value is a string-encoded float because atproto does not support floating-point numbers.",
"properties": {
"unit": {
"description": "The unit of measurement.",
"knownValues": [
"px",
"rem",
"em",
"pt",
"pc",
"in",
"cm",
"mm",
"%",
"vw",
"vh",
"vmin",
"vmax",
"ch",
"ex"
],
"maxLength": 8,
"type": "string"
},
"value": {
"description": "The numeric magnitude as a string-encoded float (e.g. '16.5', '100', '0.25').",
"maxLength": 64,
"type": "string"
}
},
"required": [
"value",
"unit"
],
"type": "object"
},
"durationValue": {
"description": "A duration with a numeric value and time unit. The value is a string-encoded float because atproto does not support floating-point numbers.",
"properties": {
"unit": {
"description": "The time unit.",
"knownValues": [
"ms",
"s"
],
"maxLength": 4,
"type": "string"
},
"value": {
"description": "The numeric magnitude as a string-encoded float (e.g. '150', '300.5').",
"maxLength": 64,
"type": "string"
}
},
"required": [
"value",
"unit"
],
"type": "object"
},
"fontFamilyValue": {
"description": "A font family name or comma-separated fallback string.",
"maxLength": 512,
"type": "string"
},
"fontWeightKeyword": {
"knownValues": [
"thin",
"hairline",
"extraLight",
"ultraLight",
"light",
"normal",
"regular",
"book",
"medium",
"semiBold",
"demiBold",
"bold",
"extraBold",
"ultraBold",
"black",
"heavy",
"extraBlack",
"ultraBlack"
],
"maxLength": 16,
"type": "string"
},
"fontWeightNumber": {
"maximum": 1000,
"minimum": 1,
"type": "integer"
},
"gradientValue": {
"description": "A composite gradient value with type and color stops.",
"properties": {
"angles": {
"description": "Angle values in degrees as string-encoded floats.",
"items": {
"maxLength": 64,
"type": "string"
},
"type": "array"
},
"colorStops": {
"description": "Color stops defining the gradient.",
"items": {
"ref": "#colorStop",
"type": "ref"
},
"type": "array"
},
"type": {
"description": "Gradient type.",
"knownValues": [
"linear",
"radial",
"conic"
],
"maxLength": 8,
"type": "string"
}
},
"type": "object"
},
"numberValue": {
"description": "A numeric value encoded as a string (e.g. '42', '3.14159'). Encoded as string because atproto does not support floating-point numbers and cannot distinguish integer from float at the type level.",
"maxLength": 128,
"type": "string"
},
"shadowValue": {
"description": "A composite shadow value (drop shadow / box-shadow) with color, offsets, blur, spread.",
"properties": {
"blur": {
"description": "Blur radius.",
"ref": "#dimensionValue",
"type": "ref"
},
"color": {
"description": "Shadow color.",
"ref": "#colorValue",
"type": "ref"
},
"inset": {
"description": "Whether the shadow is inset (inner shadow).",
"type": "boolean"
},
"offsetX": {
"description": "Horizontal offset.",
"ref": "#dimensionValue",
"type": "ref"
},
"offsetY": {
"description": "Vertical offset.",
"ref": "#dimensionValue",
"type": "ref"
},
"spread": {
"description": "Spread radius.",
"ref": "#dimensionValue",
"type": "ref"
}
},
"type": "object"
},
"strokeStyleValue": {
"description": "Stroke style properties (dash array, line cap/join, miter limit). Corresponds to DTCG 'strokeStyle' composite type. Dash lengths and miter limit are string-encoded floats.",
"properties": {
"dashArray": {
"description": "Dash and gap lengths as string-encoded floats.",
"items": {
"maxLength": 64,
"type": "string"
},
"type": "array"
},
"lineCap": {
"description": "Shape at the end of open subpaths.",
"knownValues": [
"round",
"butt",
"square"
],
"maxLength": 8,
"type": "string"
},
"lineJoin": {
"description": "Shape at the corners of paths.",
"knownValues": [
"miter",
"bevel",
"round"
],
"maxLength": 8,
"type": "string"
},
"miterLimit": {
"description": "Maximum miter length when lineJoin is 'miter', as a string-encoded float.",
"maxLength": 64,
"type": "string"
}
},
"type": "object"
},
"transitionValue": {
"description": "A composite transition value with duration, delay, and timing function.",
"properties": {
"delay": {
"description": "Transition delay.",
"ref": "#durationValue",
"type": "ref"
},
"duration": {
"description": "Transition duration.",
"ref": "#durationValue",
"type": "ref"
},
"timingFunction": {
"description": "Timing function as a cubic Bezier curve.",
"ref": "#cubicBezierValue",
"type": "ref"
}
},
"type": "object"
},
"typographyValue": {
"description": "A composite typography value aggregating font family, weight, size, line metrics, and text transforms. Numeric values are string-encoded floats to accommodate the atproto data model.",
"properties": {
"fontFamily": {
"description": "Ordered list of font family names (primary and fallbacks).",
"items": {
"maxLength": 256,
"type": "string"
},
"type": "array"
},
"fontSize": {
"description": "Font size.",
"ref": "#dimensionValue",
"type": "ref"
},
"fontWeight": {
"description": "Font weight.",
"refs": [
"#fontWeightKeyword",
"#fontWeightNumber"
],
"type": "union"
},
"letterSpacing": {
"description": "Letter spacing.",
"ref": "#dimensionValue",
"type": "ref"
},
"lineHeight": {
"description": "Line height as a string-encoded unitless multiplier (e.g. '1.5', '1.2').",
"maxLength": 64,
"type": "string"
},
"paragraphIndent": {
"description": "Paragraph indent.",
"ref": "#dimensionValue",
"type": "ref"
},
"paragraphSpacing": {
"description": "Paragraph spacing.",
"ref": "#dimensionValue",
"type": "ref"
},
"textCase": {
"description": "Text case transformation.",
"knownValues": [
"uppercase",
"lowercase",
"capitalize",
"none"
],
"maxLength": 12,
"type": "string"
},
"textDecoration": {
"description": "Text decoration.",
"knownValues": [
"underline",
"overline",
"line-through",
"none"
],
"maxLength": 12,
"type": "string"
}
},
"type": "object"
}
},
"description": "Shared type definitions for Design Tokens, based on DTCG 2025.10 stable specification. Defines scalar value types (color, dimension, duration, etc.) and composite value types (border, shadow, typography, etc.) used by token and resolver records.",
"id": "org.designtxt.defs",
"lexicon": 1
}