 {
  "$schema": "https://schemas.wp.org/trunk/block.json",
  "apiVersion": 3,
  "name": "flexa/data-table",
  "version": "1.0.0",
  "title": "Data Table",
  "category": "flexa",
  "description": "Build a responsive data table from your own columns and rows — toggle and style the header, stripe alternating rows, highlight rows on hover and the first column, align each column, set cell borders, padding and typography, and cap the table width so wider content scrolls horizontally.",
  "keywords": [
    "flexa",
    "table",
    "data",
    "grid",
    "rows",
    "columns"
  ],
  "textdomain": "flexa-block",
  "example": {
    "attributes": {
      "isExamplePreview": true
    },
    "viewportWidth": 600
  },
  "attributes": {
    "isExamplePreview": {
      "type": "boolean",
      "default": false
    },
    "blockId": {
      "type": "string"
    },
    "htmlTag": {
      "type": "string",
      "default": "div"
    },
    "columns": {
      "type": "array",
      "default": [
        {
          "label": "Name",
          "align": "left"
        },
        {
          "label": "Role",
          "align": "left"
        },
        {
          "label": "Location",
          "align": "left"
        }
      ]
    },
    "rows": {
      "type": "array",
      "default": [
        {
          "values": [
            "Jane Doe",
            "Designer",
            "Berlin"
          ]
        },
        {
          "values": [
            "John Smith",
            "Developer",
            "Lisbon"
          ]
        }
      ]
    },
    "maxWidth": {
      "type": "object",
      "default": {}
    },
    "showHeader": {
      "type": "boolean",
      "default": true
    },
    "headerBackground": {
      "type": "object",
      "default": {
        "light": "",
        "dark": ""
      }
    },
    "headerColor": {
      "type": "object",
      "default": {
        "light": "",
        "dark": ""
      }
    },
    "headerColorHover": {
      "type": "object",
      "default": {
        "light": "",
        "dark": ""
      }
    },
    "headerTypography": {
      "type": "object",
      "default": {
        "desktop": {},
        "tablet": {},
        "mobile": {}
      }
    },
    "striped": {
      "type": "boolean",
      "default": true
    },
    "stripedColor": {
      "type": "object",
      "default": {
        "light": "",
        "dark": ""
      }
    },
    "hoverHighlight": {
      "type": "boolean",
      "default": true
    },
    "hoverColor": {
      "type": "object",
      "default": {
        "light": "",
        "dark": ""
      }
    },
    "cellTypography": {
      "type": "object",
      "default": {
        "desktop": {},
        "tablet": {},
        "mobile": {}
      }
    },
    "cellColor": {
      "type": "object",
      "default": {
        "light": "",
        "dark": ""
      }
    },
    "cellColorHover": {
      "type": "object",
      "default": {
        "light": "",
        "dark": ""
      }
    },
    "cellPadding": {
      "type": "object",
      "default": {
        "desktop": {
          "top": "10",
          "right": "14",
          "bottom": "10",
          "left": "14",
          "unit": "px"
        },
        "tablet": {},
        "mobile": {}
      }
    },
    "showCellBorders": {
      "type": "boolean",
      "default": true
    },
    "cellBorderColor": {
      "type": "object",
      "default": {
        "light": "",
        "dark": ""
      }
    },
    "cellBorderWidth": {
      "type": "object",
      "default": {
        "value": "1",
        "unit": "px"
      }
    },
    "firstColumnHighlight": {
      "type": "boolean",
      "default": false
    },
    "firstColumnBackground": {
      "type": "object",
      "default": {
        "light": "",
        "dark": ""
      }
    },
    "firstColumnColor": {
      "type": "object",
      "default": {
        "light": "",
        "dark": ""
      }
    },
    "spacing": {
      "type": "object",
      "default": {
        "desktop": {},
        "tablet": {},
        "mobile": {}
      }
    },
    "background": {
      "type": "object",
      "default": {
        "type": "none",
        "color": {
          "light": "",
          "dark": ""
        },
        "gradient": {
          "light": "",
          "dark": ""
        },
        "image": {
          "url": "",
          "id": null,
          "position": "center center",
          "repeat": "no-repeat",
          "size": "cover",
          "attachment": "scroll"
        },
        "lazyLoad": false
      }
    },
    "border": {
      "type": "object",
      "default": {
        "desktop": {
          "style": "",
          "width": {
            "top": "",
            "right": "",
            "bottom": "",
            "left": "",
            "unit": "px"
          },
          "color": {
            "light": "",
            "dark": ""
          },
          "radius": {
            "topLeft": "",
            "topRight": "",
            "bottomRight": "",
            "bottomLeft": "",
            "unit": "px"
          }
        },
        "tablet": {},
        "mobile": {}
      }
    },
    "boxShadow": {
      "type": "object",
      "default": {
        "horizontal": "0",
        "vertical": "4",
        "blur": "12",
        "spread": "0",
        "color": {
          "light": "rgba(0,0,0,0.1)",
          "dark": ""
        },
        "inset": false,
        "enabled": false
      }
    },
    "advancedLayout": {
      "type": "object",
      "default": {
        "desktop": {
          "zIndex": "",
          "overflow": "",
          "position": ""
        },
        "tablet": {},
        "mobile": {}
      }
    },
    "responsiveVisibility": {
      "type": "object",
      "default": {
        "hideOnDesktop": false,
        "hideOnTablet": false,
        "hideOnMobile": false
      }
    },
    "animation": {
      "type": "object",
      "default": {
        "type": "none",
        "duration": "normal",
        "delay": ""
      }
    },
    "htmlAttributes": {
      "type": "object",
      "default": {
        "customAttributes": []
      }
    }
  },
  "supports": {
    "anchor": true,
    "className": true,
    "html": false,
    "align": false
  },
  "editorScript": "file:./index.js",
  "editorStyle": "file:./index.css",
  "style": "file:./style-index.css",
  "render": "file:./render.php"
}