# net.wireservice.defs

> Published by [wireservice.net](https://lexicon.garden/identity/did:plc:lktj64hp7lc3fzuf6iyy7lwj)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:lktj64hp7lc3fzuf6iyy7lwj/net.wireservice.defs)
- [Documentation](https://lexicon.garden/lexicon/did:plc:lktj64hp7lc3fzuf6iyy7lwj/net.wireservice.defs/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:lktj64hp7lc3fzuf6iyy7lwj/net.wireservice.defs/examples)

## Definitions

### `net.wireservice.defs#aspectRatio`

**Type**: `object`

Aspect ratio as a pair of integers, avoiding floating-point values.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `height` | `integer` | Yes |  |
| `width` | `integer` | Yes |  |

### `net.wireservice.defs#condition`

**Type**: `object`

A condition for conditional design. Retained conditions are viewport dimensions, color scheme, and column count. Apple-specific conditions (app, platform, territory, subscriptionStatus) are intentionally omitted.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `maxColumns` | `integer` | No | Maximum number of layout columns. |
| `maxViewportAspectRatio` | `integer` | No | Maximum viewport aspect ratio, expressed as width-over-height times 100 (e.g., 178 for 16:9). |
| `maxViewportWidth` | `integer` | No | Maximum viewport width in points. |
| `minColumns` | `integer` | No | Minimum number of layout columns. |
| `minViewportAspectRatio` | `integer` | No | Minimum viewport aspect ratio, expressed as width-over-height times 100. |
| `minViewportWidth` | `integer` | No | Minimum viewport width in points. |
| `preferredColorScheme` | `string` | No | Color scheme condition for light/dark mode. |

### `net.wireservice.defs#margin`

**Type**: `object`

Margin with top and bottom values.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bottom` | `ref` → `#measurement` | No |  |
| `top` | `ref` → `#measurement` | No |  |

### `net.wireservice.defs#measurement`

**Type**: `object`

A numeric value with a unit, replacing ANF's SupportedUnits string format (e.g., '10vw').

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `unit` | `string` | Yes |  |
| `value` | `integer` | Yes |  |

### `net.wireservice.defs#padding`

**Type**: `object`

Padding with top, bottom, left, and right values.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bottom` | `ref` → `#measurement` | No |  |
| `left` | `ref` → `#measurement` | No |  |
| `right` | `ref` → `#measurement` | No |  |
| `top` | `ref` → `#measurement` | No |  |

### `net.wireservice.defs#strokeStyle`

**Type**: `object`

Stroke style for borders and dividers.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `color` | `string` | No | Hex color string (e.g., '#FF0000'). |
| `lineStyle` | `string` | No |  |
| `width` | `integer` | No |  |

### `net.wireservice.defs#textRun`

**Type**: `object`

A run of text with optional formatting marks.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `marks` | `array` | No |  |
| `text` | `string` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "aspectRatio": {
      "description": "Aspect ratio as a pair of integers, avoiding floating-point values.",
      "properties": {
        "height": {
          "minimum": 1,
          "type": "integer"
        },
        "width": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "width",
        "height"
      ],
      "type": "object"
    },
    "condition": {
      "description": "A condition for conditional design. Retained conditions are viewport dimensions, color scheme, and column count. Apple-specific conditions (app, platform, territory, subscriptionStatus) are intentionally omitted.",
      "properties": {
        "maxColumns": {
          "description": "Maximum number of layout columns.",
          "minimum": 1,
          "type": "integer"
        },
        "maxViewportAspectRatio": {
          "description": "Maximum viewport aspect ratio, expressed as width-over-height times 100 (e.g., 178 for 16:9).",
          "minimum": 0,
          "type": "integer"
        },
        "maxViewportWidth": {
          "description": "Maximum viewport width in points.",
          "minimum": 0,
          "type": "integer"
        },
        "minColumns": {
          "description": "Minimum number of layout columns.",
          "minimum": 1,
          "type": "integer"
        },
        "minViewportAspectRatio": {
          "description": "Minimum viewport aspect ratio, expressed as width-over-height times 100.",
          "minimum": 0,
          "type": "integer"
        },
        "minViewportWidth": {
          "description": "Minimum viewport width in points.",
          "minimum": 0,
          "type": "integer"
        },
        "preferredColorScheme": {
          "description": "Color scheme condition for light/dark mode.",
          "knownValues": [
            "any",
            "light",
            "dark"
          ],
          "maxLength": 64,
          "type": "string"
        }
      },
      "type": "object"
    },
    "margin": {
      "description": "Margin with top and bottom values.",
      "properties": {
        "bottom": {
          "ref": "#measurement",
          "type": "ref"
        },
        "top": {
          "ref": "#measurement",
          "type": "ref"
        }
      },
      "type": "object"
    },
    "measurement": {
      "description": "A numeric value with a unit, replacing ANF's SupportedUnits string format (e.g., '10vw').",
      "properties": {
        "unit": {
          "knownValues": [
            "pt",
            "vw",
            "vh",
            "vmin",
            "vmax",
            "dg",
            "dm",
            "cw",
            "gut"
          ],
          "maxLength": 64,
          "type": "string"
        },
        "value": {
          "type": "integer"
        }
      },
      "required": [
        "value",
        "unit"
      ],
      "type": "object"
    },
    "padding": {
      "description": "Padding with top, bottom, left, and right values.",
      "properties": {
        "bottom": {
          "ref": "#measurement",
          "type": "ref"
        },
        "left": {
          "ref": "#measurement",
          "type": "ref"
        },
        "right": {
          "ref": "#measurement",
          "type": "ref"
        },
        "top": {
          "ref": "#measurement",
          "type": "ref"
        }
      },
      "type": "object"
    },
    "strokeStyle": {
      "description": "Stroke style for borders and dividers.",
      "properties": {
        "color": {
          "description": "Hex color string (e.g., '#FF0000').",
          "maxLength": 64,
          "type": "string"
        },
        "lineStyle": {
          "knownValues": [
            "solid",
            "dashed",
            "dotted"
          ],
          "maxLength": 64,
          "type": "string"
        },
        "width": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "textRun": {
      "description": "A run of text with optional formatting marks.",
      "properties": {
        "marks": {
          "items": {
            "closed": false,
            "refs": [
              "net.wireservice.richtext.bold",
              "net.wireservice.richtext.code",
              "net.wireservice.richtext.italic",
              "net.wireservice.richtext.link",
              "net.wireservice.richtext.strikethrough",
              "net.wireservice.richtext.subscript",
              "net.wireservice.richtext.superscript",
              "net.wireservice.richtext.underline"
            ],
            "type": "union"
          },
          "type": "array"
        },
        "text": {
          "maxGraphemes": 10000,
          "maxLength": 100000,
          "type": "string"
        }
      },
      "required": [
        "text"
      ],
      "type": "object"
    }
  },
  "id": "net.wireservice.defs",
  "lexicon": 1
}
```
