export default {
  "metadata": {
    "section": "Table"
  },
  "definitions": {
    "TableNode": {
      "metadata": {
        "tsRicosNode": true,
        "examples": [
          "table"
        ],
        "features": [
          "TABLE"
        ],
        "description": "Data in rows and columns."
      },
      "properties": {
        "type": {
          "enum": [
            "TABLE"
          ],
          "metadata": {
            "description": "Node type. \n Must be `TABLE`."
          }
        },
        "nodes": {
          "elements": {
            "ref": "TableRowNode"
          },
          "metadata": {
            "tsRicosNodesChildren": true,
            "description": "Child nodes to define table rows.",
            "validation": {
              "minSize": 1
            }
          }
        }
      },
      "optionalProperties": {
        "id": {
          "type": "string",
          "metadata": {
            "format": "NODE_ID",
            "description": "[Node ID](#node-ids)."
          }
        },
        "tableData": {
          "ref": "TableData",
          "metadata": {
            "description": "Table details."
          }
        }
      }
    },
    "TableRowNode": {
      "metadata": {
        "tsRicosNode": true
      },
      "properties": {
        "type": {
          "enum": [
            "TABLE_ROW"
          ],
          "metadata": {
            "description": "Node type. \n Must be `TABLE_ROW`."
          }
        }
      },
      "optionalProperties": {
        "id": {
          "type": "string",
          "metadata": {
            "format": "NODE_ID",
            "description": "[Node ID](#node-ids)."
          }
        },
        "nodes": {
          "elements": {
            "ref": "TableCellNode"
          },
          "metadata": {
            "tsRicosNodesChildren": true,
            "description": "Child nodes to define table cells."
          }
        }
      }
    },
    "TableData": {
      "optionalProperties": {
        "containerData": {
          "metadata": {
            "description": "Table container styling."
          },
          "ref": "PluginContainerData"
        },
        "dimensions": {
          "metadata": {
            "description": "Table dimensions."
          },
          "ref": "TableData_Dimensions"
        },
        "rowHeader": {
          "metadata": {
            "description": "Whether the table's first row is a heading. <br> Default: `false`"
          },
          "type": "boolean"
        },
        "columnHeader": {
          "metadata": {
            "description": "Whether the table's first column is a heading. <br> Default: `false`"
          },
          "type": "boolean"
        },
        "cellSpacing": {
          "metadata": {
            "description": "The spacing between cells."
          },
          "type": "uint32"
        },
        "cellPadding": {
          "elements": {
            "type": "uint32"
          },
          "metadata": {
            "description": "Padding in pixels for cells. Follows CSS order: top, right, bottom, left."
          }
        },
        "altText": {
          "type": "string",
          "metadata": {
            "description": "Table's alternative text."
          }
        }
      }
    },
    "TableData_Dimensions": {
      "optionalProperties": {
        "colsWidthRatio": {
          "elements": {
            "type": "float64"
          },
          "metadata": {
            "description": "Each column width as a fraction to the width of table."
          }
        },
        "rowsHeight": {
          "elements": {
            "type": "uint32"
          },
          "metadata": {
            "description": "Height of each row."
          }
        },
        "colsMinWidth": {
          "elements": {
            "type": "uint32"
          },
          "metadata": {
            "description": "Minimum width of each column."
          }
        }
      }
    }
  }
}