{
  "lexicon": 1,
  "id": "pub.leaflet.publication",
  "defs": {
    "main": {
      "type": "record",
      "key": "tid",
      "description": "Record declaring a publication",
      "record": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 2000
          },
          "base_path": {
            "type": "string"
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "icon": {
            "type": "blob",
            "accept": [
              "image/*"
            ],
            "maxSize": 1000000
          },
          "theme": {
            "type": "ref",
            "ref": "#theme"
          },
          "preferences": {
            "type": "ref",
            "ref": "#preferences"
          }
        }
      }
    },
    "preferences": {
      "type": "object",
      "properties": {
        "showInDiscover": {
          "type": "boolean",
          "default": true
        },
        "showComments": {
          "type": "boolean",
          "default": true
        },
        "showMentions": {
          "type": "boolean",
          "default": true
        },
        "showPrevNext": {
          "type": "boolean",
          "default": true
        },
        "showRecommends": {
          "type": "boolean",
          "default": true
        }
      }
    },
    "theme": {
      "type": "object",
      "properties": {
        "backgroundColor": {
          "type": "union",
          "refs": [
            "pub.leaflet.theme.color#rgba",
            "pub.leaflet.theme.color#rgb"
          ]
        },
        "backgroundImage": {
          "type": "ref",
          "ref": "pub.leaflet.theme.backgroundImage"
        },
        "pageWidth": {
          "type": "integer",
          "minimum": 0,
          "maximum": 1600
        },
        "primary": {
          "type": "union",
          "refs": [
            "pub.leaflet.theme.color#rgba",
            "pub.leaflet.theme.color#rgb"
          ]
        },
        "pageBackground": {
          "type": "union",
          "refs": [
            "pub.leaflet.theme.color#rgba",
            "pub.leaflet.theme.color#rgb"
          ]
        },
        "showPageBackground": {
          "type": "boolean",
          "default": false
        },
        "accentBackground": {
          "type": "union",
          "refs": [
            "pub.leaflet.theme.color#rgba",
            "pub.leaflet.theme.color#rgb"
          ]
        },
        "accentText": {
          "type": "union",
          "refs": [
            "pub.leaflet.theme.color#rgba",
            "pub.leaflet.theme.color#rgb"
          ]
        },
        "headingFont": {
          "type": "string",
          "maxLength": 100
        },
        "bodyFont": {
          "type": "string",
          "maxLength": 100
        }
      }
    }
  }
}