export default {
  "metadata": {
    "formats": {
      "WEB_URL": {
        "description": "A URL that starts with `http://` or `https://`.",
        "validation": {
          "type": "web_url"
        }
      },
      "COLOR_HEX": {
        "description": "A color in hexadecimal RGB or RGBA format, for example `#FF0000` or `#FF000050`. `COLOR_HEX` accepts shorthand, for example #F00 or #F005.",
        "validation": {
          "type": "regex",
          "regex": "^#(?:[0-9A-Fa-f]{3,4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$"
        }
      },
      "COLOR_VALUE": {
        "description": "A color value: either a hex color (`#FF0000`, `#F00`) or a theme color token (`$theme-color-1` through `$theme-color-9`), optionally with an opacity suffix such as `$theme-color-2-50`.",
        "validation": {
          "type": "regex",
          "regex": "^(#(?:[0-9A-Fa-f]{3,4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})|\\$theme-color-[1-9](?:-(?:100|[1-9]\\d|[0-9]))?)$"
        }
      },
      "NODE_ID": {
        "description": "See [Node ID](#node-ids).",
        "validation": {
          "type": "regex",
          "regex": "^[-_\\w]*$"
        }
      },
      "CURRENCY": {
        "description": "Currency in ISO 4217 format, for example `USD`, `EUR`.",
        "validation": {
          "type": "regex",
          "regex": "^[A-Z]{3}$"
        }
      },
      "GUID": {
        "description": "Global unique identifier in format, for example `d35f5c5f-8391-4f43-b447-75e7b63076f9`",
        "validation": {
          "type": "regex",
          "regex": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"
        }
      },
      "DECIMAL": {
        "description": "A decimal with max_scale of 2 of format, for example `1.02`, `21.3`",
        "validation": {
          "type": "regex",
          "regex": "^[-]?\\d+(?:\\.\\d{1,2})?$"
        }
      }
    }
  },
  "properties": {
    "nodes": {
      "metadata": {
        "tsRicosNodesChildren": true,
        "description": "Array of nodes representing content elements, such as `ParagraphNode` or `HeadingNode`."
      },
      "elements": {
        "ref": "RootNode"
      }
    }
  },
  "optionalProperties": {
    "metadata": {
      "ref": "Metadata",
      "metadata": {
        "description": "Information about the Ricos document itself, such as its version. Only relevant when building the Ricos document using the [Ricos playground](https:/ricos.dev), in which case it is auto-generated."
      }
    },
    "documentStyle": {
      "ref": "DocumentStyle",
      "metadata": {
        "description": "Includes styling to be applied throughout the Ricos document for the specified node types. For example, you can define general styling for `headerOne`, and then override some of the properties separately for a specific header."
      }
    }
  },
  "definitions": {
    "NodeStyle": {
      "metadata": { "features": ["LINE_SPACING"] },
      "optionalProperties": {
        "paddingTop": {
          "metadata": { "description": "The top padding value in pixels." },
          "type": "string"
        },
        "paddingBottom": {
          "metadata": { "description": "The bottom padding value in pixels." },
          "type": "string"
        },
        "backgroundColor": {
          "metadata": { "deprecated": true },
          "type": "string"
        }
      }
    },
    "DocumentStyle": {
      "metadata": {
        "description": "Sets a default styling for specific node types throughout the entire Ricos Document. For example, you can set the text color for all Heading 1 nodes.\nYou can override the styling of specific Text nodes separately using [decorations](#decorations).",
        "examples": ["document-style"],
        "section": "Document Styles"
      },
      "optionalProperties": {
        "headerOne": {
          "metadata": { "description": "Style for the H1 nodes." },
          "ref": "TextNodeStyle"
        },
        "headerTwo": {
          "metadata": { "description": "Style for the H2 nodes." },
          "ref": "TextNodeStyle"
        },
        "headerThree": {
          "metadata": { "description": "Style for the H3 nodes." },
          "ref": "TextNodeStyle"
        },
        "headerFour": {
          "metadata": { "description": "Style for the H4 nodes." },
          "ref": "TextNodeStyle"
        },
        "headerFive": {
          "metadata": { "description": "Style for the H5 nodes." },
          "ref": "TextNodeStyle"
        },
        "headerSix": {
          "metadata": { "description": "Style for the H6 nodes." },
          "ref": "TextNodeStyle"
        },
        "paragraph": {
          "metadata": { "description": "Style for the paragraph nodes." },
          "ref": "TextNodeStyle"
        },
        "blockquote": {
          "metadata": { "description": "Style for the block quote nodes." },
          "ref": "TextNodeStyle"
        },
        "codeBlock": {
          "metadata": { "description": "Style for the codeblock nodes." },
          "ref": "TextNodeStyle"
        }
      }
    },
    "TextNodeStyle": {
      "metadata": { "section": "Document Styles" },
      "optionalProperties": {
        "decorations": {
          "elements": {
            "ref": "Decoration"
          },
          "metadata": {
            "description": "Text node decorations."
          }
        },
        "nodeStyle": {
          "ref": "NodeStyle",
          "metadata": {
            "description": "Node style, such as padding. \n **Note:** This node requires the [lineSpacing](#plugins) plugin to be enabled."
          }
        },
        "lineHeight": {
          "type": "string",
          "metadata": { "description": "Text line height." }
        }
      }
    },
    "Metadata": {
      "metadata": { "section": "Metadata" },
      "optionalProperties": {
        "version": {
          "type": "int32",
          "metadata": {
            "description": "Ricos document version."
          }
        },
        "id": {
          "metadata": { "deprecated": true }
        },
        "createdTimestamp": {
          "metadata": { "deprecated": true }
        },
        "updatedTimestamp": {
          "metadata": { "deprecated": true }
        }
      }
    }
  }
}