{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://docspring.com/schemas/page-designer/layout.v1.json","title":"Page Designer layout","description":"A page design: the page setup, optional header and footer bands, and the sections that flow down the page. Lengths are in points (1/72 inch).","type":"object","additionalProperties":false,"required":["version","page","sections"],"properties":{"version":{"const":1},"page":{"$ref":"#/$defs/page"},"header":{"anyOf":[{"$ref":"#/$defs/band"},{"type":"null"}]},"footer":{"anyOf":[{"$ref":"#/$defs/band"},{"type":"null"}]},"sections":{"type":"array","items":{"$ref":"#/$defs/section"},"maxItems":500}},"$defs":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"length":{"type":"number","minimum":0,"maximum":14400},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"edges":{"type":"object","properties":{"top":{"type":"number","minimum":0,"maximum":14400},"right":{"type":"number","minimum":0,"maximum":14400},"bottom":{"type":"number","minimum":0,"maximum":14400},"left":{"type":"number","minimum":0,"maximum":14400}},"additionalProperties":false,"required":["top","right","bottom","left"]},"condition":{"anyOf":[{"type":"string","minLength":1,"maxLength":1000},{"type":"null"}]},"path":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]*(\\.[A-Za-z_][A-Za-z0-9_]*)*$"},"local":{"type":"string","pattern":"^[a-z_][a-z0-9_]{0,63}$"},"font":{"type":"object","properties":{"family":{"type":"string","enum":["Liberation Sans","Liberation Serif","Liberation Mono","Roboto","Open Sans","Lato","Poppins","Public Sans","Questrial","DejaVu Sans","Inconsolata","Roboto Mono","Ubuntu Mono","Dancing Script","Caveat","Great Vibes","Sacramento","Satisfy","Cookie"]},"size":{"type":"number","exclusiveMinimum":0,"maximum":400},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"lineHeight":{"type":"number","minimum":0.5,"maximum":5}},"additionalProperties":false},"stroke":{"type":"object","properties":{"width":{"type":"number","exclusiveMinimum":0,"maximum":72},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"style":{"type":"string","enum":["solid","dashed","dotted"]}},"additionalProperties":false,"required":["width","color"]},"boxStyle":{"type":"object","properties":{"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"border":{"anyOf":[{"$ref":"#/$defs/stroke"},{"type":"null"}]},"radius":{"type":"number","minimum":0,"maximum":14400},"padding":{"$ref":"#/$defs/edges"},"opacity":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false},"page":{"type":"object","properties":{"size":{"type":"string","enum":["letter","legal","tabloid","a3","a4","a5","custom"]},"width":{"type":"number","minimum":36,"maximum":14400},"height":{"type":"number","minimum":36,"maximum":14400},"orientation":{"type":"string","enum":["portrait","landscape"]},"margins":{"$ref":"#/$defs/edges"},"font":{"$ref":"#/$defs/font"},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"backgroundImage":{"anyOf":[{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9_]{1,200}$"},"scaleType":{"type":"string","enum":["fit","fill","stretch"]}},"additionalProperties":false,"required":["slug"]},{"type":"null"}]},"watermark":{"anyOf":[{"type":"object","properties":{"text":{"$ref":"#/$defs/inlineContent"},"font":{"$ref":"#/$defs/font"},"opacity":{"type":"number","minimum":0,"maximum":1},"rotation":{"type":"number","minimum":-360,"maximum":360},"layer":{"type":"string","enum":["above","below"]},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":false,"required":["text"]},{"type":"null"}]}},"additionalProperties":false,"required":["size","orientation","margins"],"if":{"properties":{"size":{"const":"custom"}}},"then":{"required":["width","height"]},"else":{"not":{"anyOf":[{"required":["width"]},{"required":["height"]}]}}},"band":{"type":"object","properties":{"elements":{"type":"array","items":{"$ref":"#/$defs/placedElement"},"maxItems":500},"pageNumbers":{"type":"array","items":{"$ref":"#/$defs/pageNumber"},"maxItems":3}},"additionalProperties":false,"required":["elements"]},"pageNumber":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"align":{"type":"string","enum":["left","center","right"]},"format":{"type":"string","minLength":1,"maxLength":200},"font":{"$ref":"#/$defs/font"}},"additionalProperties":false,"required":["id","align","format"]},"section":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["free","stack","columns","repeat","page_break"]}},"allOf":[{"if":{"properties":{"type":{"const":"free"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"height":{"type":"number","minimum":0,"maximum":14400},"style":{"$ref":"#/$defs/boxStyle"},"elements":{"type":"array","items":{"$ref":"#/$defs/placedElement"},"maxItems":500}},"additionalProperties":false,"required":["id","type","height","elements"]}},{"if":{"properties":{"type":{"const":"stack"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"direction":{"type":"string","enum":["vertical","horizontal"]},"gap":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["start","center","end","stretch"]},"style":{"$ref":"#/$defs/boxStyle"},"elements":{"type":"array","items":{"$ref":"#/$defs/flowElement"},"maxItems":500}},"additionalProperties":false,"required":["id","type","direction","elements"]}},{"if":{"properties":{"type":{"const":"columns"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"gap":{"type":"number","minimum":0,"maximum":14400},"style":{"$ref":"#/$defs/boxStyle"},"columns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"width":{"type":"number","exclusiveMinimum":0,"maximum":1000},"elements":{"type":"array","items":{"$ref":"#/$defs/flowElement"},"maxItems":500}},"additionalProperties":false,"required":["id","elements"]},"maxItems":12,"minItems":1}},"additionalProperties":false,"required":["id","type","columns"]}},{"if":{"properties":{"type":{"const":"repeat"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"source":{"$ref":"#/$defs/path"},"as":{"$ref":"#/$defs/local"},"gap":{"type":"number","minimum":0,"maximum":14400},"item":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["free","stack"]}},"allOf":[{"if":{"properties":{"type":{"const":"free"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"height":{"type":"number","minimum":0,"maximum":14400},"style":{"$ref":"#/$defs/boxStyle"},"elements":{"type":"array","items":{"$ref":"#/$defs/placedElement"},"maxItems":500}},"additionalProperties":false,"required":["id","type","height","elements"]}},{"if":{"properties":{"type":{"const":"stack"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"direction":{"type":"string","enum":["vertical","horizontal"]},"gap":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["start","center","end","stretch"]},"style":{"$ref":"#/$defs/boxStyle"},"elements":{"type":"array","items":{"$ref":"#/$defs/flowElement"},"maxItems":500}},"additionalProperties":false,"required":["id","type","direction","elements"]}}]}},"additionalProperties":false,"required":["id","type","source","as","item"]}},{"if":{"properties":{"type":{"const":"page_break"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"}},"additionalProperties":false,"required":["id","type"]}}]},"placedElement":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["text","image","shape","line","table","chart","checkbox","form_field","qr_code","barcode","html"]}},"allOf":[{"if":{"properties":{"type":{"const":"text"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"x":{"type":"number","minimum":0,"maximum":14400},"y":{"type":"number","minimum":0,"maximum":14400},"width":{"type":"number","minimum":0,"maximum":14400},"height":{"type":"number","minimum":0,"maximum":14400},"content":{"$ref":"#/$defs/richText"},"overflow":{"type":"string","enum":["grow","fixed","shrink"]},"minFontSize":{"type":"number","exclusiveMinimum":0,"maximum":400},"verticalAlign":{"type":"string","enum":["top","middle","bottom"]},"font":{"$ref":"#/$defs/font"},"style":{"$ref":"#/$defs/boxStyle"}},"additionalProperties":false,"required":["id","type","x","y","width","height","content"]}},{"if":{"properties":{"type":{"const":"image"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"x":{"type":"number","minimum":0,"maximum":14400},"y":{"type":"number","minimum":0,"maximum":14400},"width":{"type":"number","minimum":0,"maximum":14400},"height":{"type":"number","minimum":0,"maximum":14400},"source":{"$ref":"#/$defs/imageSource"},"scaleType":{"type":"string","enum":["fit","fill","stretch"]},"gravity":{"type":"string","enum":["NorthWest","North","NorthEast","West","Center","East","SouthWest","South","SouthEast"]},"style":{"$ref":"#/$defs/boxStyle"}},"additionalProperties":false,"required":["id","type","x","y","width","height","source"]}},{"if":{"properties":{"type":{"const":"shape"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"x":{"type":"number","minimum":0,"maximum":14400},"y":{"type":"number","minimum":0,"maximum":14400},"width":{"type":"number","minimum":0,"maximum":14400},"height":{"type":"number","minimum":0,"maximum":14400},"shape":{"type":"string","enum":["rectangle","ellipse"]},"fill":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"stroke":{"anyOf":[{"$ref":"#/$defs/stroke"},{"type":"null"}]},"radius":{"type":"number","minimum":0,"maximum":14400}},"additionalProperties":false,"required":["id","type","x","y","width","height","shape"]}},{"if":{"properties":{"type":{"const":"line"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"x":{"type":"number","minimum":0,"maximum":14400},"y":{"type":"number","minimum":0,"maximum":14400},"width":{"type":"number","minimum":0,"maximum":14400},"height":{"type":"number","minimum":0,"maximum":14400},"direction":{"type":"string","enum":["horizontal","vertical"]},"stroke":{"$ref":"#/$defs/stroke"}},"additionalProperties":false,"required":["id","type","x","y","width","height","direction","stroke"]}},{"if":{"properties":{"type":{"const":"table"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"x":{"type":"number","minimum":0,"maximum":14400},"y":{"type":"number","minimum":0,"maximum":14400},"width":{"type":"number","minimum":0,"maximum":14400},"height":{"type":"number","minimum":0,"maximum":14400},"source":{"$ref":"#/$defs/path"},"as":{"$ref":"#/$defs/local"},"columns":{"type":"array","items":{"$ref":"#/$defs/tableColumn"},"maxItems":30,"minItems":1},"header":{"type":"object","properties":{"font":{"$ref":"#/$defs/font"},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"repeat":{"type":"boolean"}},"additionalProperties":false},"rows":{"type":"object","properties":{"font":{"$ref":"#/$defs/font"},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"alternateBackground":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"keepTogether":{"type":"boolean"},"condition":{"type":"string","minLength":1,"maxLength":1000}},"additionalProperties":false},"sort":{"type":"array","items":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":1000},"order":{"type":"string","enum":["asc","desc"]}},"additionalProperties":false,"required":["by"]},"maxItems":3,"minItems":1},"groups":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":1000},"header":{"$ref":"#/$defs/richText"},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"font":{"$ref":"#/$defs/font"}},"additionalProperties":false,"required":["by","header"]},"footer":{"type":"object","properties":{"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"font":{"$ref":"#/$defs/font"}},"additionalProperties":false},"border":{"anyOf":[{"$ref":"#/$defs/stroke"},{"type":"null"}]},"cellPadding":{"$ref":"#/$defs/edges"}},"additionalProperties":false,"required":["id","type","x","y","width","height","source","as","columns"]}},{"if":{"properties":{"type":{"const":"chart"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"x":{"type":"number","minimum":0,"maximum":14400},"y":{"type":"number","minimum":0,"maximum":14400},"width":{"type":"number","minimum":0,"maximum":14400},"height":{"type":"number","minimum":0,"maximum":14400},"chartType":{"type":"string","enum":["bar","horizontal_bar","line","area","scatter","pie","doughnut","radar"]},"source":{"$ref":"#/$defs/path"},"as":{"$ref":"#/$defs/local"},"label":{"type":"string","minLength":1,"maxLength":1000},"series":{"type":"array","items":{"$ref":"#/$defs/chartSeries"},"maxItems":20,"minItems":1},"title":{"type":"string","maxLength":200},"legend":{"type":"string","enum":["none","top","bottom","right"]},"stacked":{"type":"boolean"},"dataLabels":{"type":"string","enum":["none","value","percent"]},"numberFormat":{"type":"object","properties":{"prefix":{"type":"string","maxLength":20},"suffix":{"type":"string","maxLength":20},"decimals":{"type":"integer","minimum":0,"maximum":6},"thousands":{"type":"boolean"}},"additionalProperties":false},"xAxis":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"labelRotation":{"enum":[0,45,90]}},"additionalProperties":false},"yAxis":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"gridlines":{"type":"boolean"}},"additionalProperties":false},"colors":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"maxItems":50},"font":{"$ref":"#/$defs/font"},"style":{"$ref":"#/$defs/boxStyle"}},"additionalProperties":false,"required":["id","type","x","y","width","height","chartType","source","as","label","series"]}},{"if":{"properties":{"type":{"const":"checkbox"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"x":{"type":"number","minimum":0,"maximum":14400},"y":{"type":"number","minimum":0,"maximum":14400},"width":{"type":"number","minimum":0,"maximum":14400},"height":{"type":"number","minimum":0,"maximum":14400},"checked":{"type":"string","minLength":1,"maxLength":1000},"mark":{"type":"string","enum":["check","cross","dot","fill"]},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"border":{"anyOf":[{"$ref":"#/$defs/stroke"},{"type":"null"}]},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"radius":{"type":"number","minimum":0,"maximum":14400}},"additionalProperties":false,"required":["id","type","x","y","width","height","checked"]}},{"if":{"properties":{"type":{"const":"form_field"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"x":{"type":"number","minimum":0,"maximum":14400},"y":{"type":"number","minimum":0,"maximum":14400},"width":{"type":"number","minimum":0,"maximum":14400},"height":{"type":"number","minimum":0,"maximum":14400},"kind":{"type":"string","enum":["text","checkbox","radio","dropdown"]},"fieldName":{"type":"string","pattern":"^[^.]{1,100}$"},"value":{"$ref":"#/$defs/inlineContent"},"multiline":{"type":"boolean"},"maxLength":{"type":"integer","minimum":1,"maximum":10000},"options":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":200,"minItems":1},"option":{"type":"string","minLength":1,"maxLength":200},"checked":{"type":"string","minLength":1,"maxLength":1000},"readOnly":{"type":"boolean"},"fontSize":{"type":"number","minimum":4,"maximum":72},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"align":{"type":"string","enum":["left","center","right"]},"border":{"anyOf":[{"$ref":"#/$defs/stroke"},{"type":"null"}]},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"radius":{"type":"number","minimum":0,"maximum":14400}},"additionalProperties":false,"required":["id","type","x","y","width","height","kind","fieldName"]}},{"if":{"properties":{"type":{"const":"qr_code"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"x":{"type":"number","minimum":0,"maximum":14400},"y":{"type":"number","minimum":0,"maximum":14400},"width":{"type":"number","minimum":0,"maximum":14400},"height":{"type":"number","minimum":0,"maximum":14400},"value":{"$ref":"#/$defs/inlineContent"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]}},"additionalProperties":false,"required":["id","type","x","y","width","height","value"]}},{"if":{"properties":{"type":{"const":"barcode"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"x":{"type":"number","minimum":0,"maximum":14400},"y":{"type":"number","minimum":0,"maximum":14400},"width":{"type":"number","minimum":0,"maximum":14400},"height":{"type":"number","minimum":0,"maximum":14400},"value":{"$ref":"#/$defs/inlineContent"},"symbology":{"type":"string","enum":["code_25","code_39","code_93","code_128","ean_13","ean_8","upc_a"]}},"additionalProperties":false,"required":["id","type","x","y","width","height","value","symbology"]}},{"if":{"properties":{"type":{"const":"html"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"x":{"type":"number","minimum":0,"maximum":14400},"y":{"type":"number","minimum":0,"maximum":14400},"width":{"type":"number","minimum":0,"maximum":14400},"height":{"type":"number","minimum":0,"maximum":14400},"html":{"type":"string","maxLength":100000},"scss":{"type":"string","maxLength":100000},"overflow":{"type":"string","enum":["grow","fixed"]}},"additionalProperties":false,"required":["id","type","x","y","width","height","html"]}}]},"flowElement":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["text","image","shape","line","table","chart","checkbox","form_field","qr_code","barcode","html"]}},"allOf":[{"if":{"properties":{"type":{"const":"text"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"width":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"height":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"x":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["left","center","right"]},"content":{"$ref":"#/$defs/richText"},"overflow":{"type":"string","enum":["grow","fixed","shrink"]},"minFontSize":{"type":"number","exclusiveMinimum":0,"maximum":400},"verticalAlign":{"type":"string","enum":["top","middle","bottom"]},"font":{"$ref":"#/$defs/font"},"style":{"$ref":"#/$defs/boxStyle"}},"additionalProperties":false,"required":["id","type","content"]}},{"if":{"properties":{"type":{"const":"image"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"width":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"height":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"x":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["left","center","right"]},"source":{"$ref":"#/$defs/imageSource"},"scaleType":{"type":"string","enum":["fit","fill","stretch"]},"gravity":{"type":"string","enum":["NorthWest","North","NorthEast","West","Center","East","SouthWest","South","SouthEast"]},"style":{"$ref":"#/$defs/boxStyle"}},"additionalProperties":false,"required":["id","type","source"]}},{"if":{"properties":{"type":{"const":"shape"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"width":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"height":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"x":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["left","center","right"]},"shape":{"type":"string","enum":["rectangle","ellipse"]},"fill":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"stroke":{"anyOf":[{"$ref":"#/$defs/stroke"},{"type":"null"}]},"radius":{"type":"number","minimum":0,"maximum":14400}},"additionalProperties":false,"required":["id","type","shape"]}},{"if":{"properties":{"type":{"const":"line"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"width":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"height":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"x":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["left","center","right"]},"direction":{"type":"string","enum":["horizontal","vertical"]},"stroke":{"$ref":"#/$defs/stroke"}},"additionalProperties":false,"required":["id","type","direction","stroke"]}},{"if":{"properties":{"type":{"const":"table"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"width":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"height":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"x":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["left","center","right"]},"source":{"$ref":"#/$defs/path"},"as":{"$ref":"#/$defs/local"},"columns":{"type":"array","items":{"$ref":"#/$defs/tableColumn"},"maxItems":30,"minItems":1},"header":{"type":"object","properties":{"font":{"$ref":"#/$defs/font"},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"repeat":{"type":"boolean"}},"additionalProperties":false},"rows":{"type":"object","properties":{"font":{"$ref":"#/$defs/font"},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"alternateBackground":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"keepTogether":{"type":"boolean"},"condition":{"type":"string","minLength":1,"maxLength":1000}},"additionalProperties":false},"sort":{"type":"array","items":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":1000},"order":{"type":"string","enum":["asc","desc"]}},"additionalProperties":false,"required":["by"]},"maxItems":3,"minItems":1},"groups":{"type":"object","properties":{"by":{"type":"string","minLength":1,"maxLength":1000},"header":{"$ref":"#/$defs/richText"},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"font":{"$ref":"#/$defs/font"}},"additionalProperties":false,"required":["by","header"]},"footer":{"type":"object","properties":{"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"font":{"$ref":"#/$defs/font"}},"additionalProperties":false},"border":{"anyOf":[{"$ref":"#/$defs/stroke"},{"type":"null"}]},"cellPadding":{"$ref":"#/$defs/edges"}},"additionalProperties":false,"required":["id","type","source","as","columns"]}},{"if":{"properties":{"type":{"const":"chart"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"width":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"height":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"x":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["left","center","right"]},"chartType":{"type":"string","enum":["bar","horizontal_bar","line","area","scatter","pie","doughnut","radar"]},"source":{"$ref":"#/$defs/path"},"as":{"$ref":"#/$defs/local"},"label":{"type":"string","minLength":1,"maxLength":1000},"series":{"type":"array","items":{"$ref":"#/$defs/chartSeries"},"maxItems":20,"minItems":1},"title":{"type":"string","maxLength":200},"legend":{"type":"string","enum":["none","top","bottom","right"]},"stacked":{"type":"boolean"},"dataLabels":{"type":"string","enum":["none","value","percent"]},"numberFormat":{"type":"object","properties":{"prefix":{"type":"string","maxLength":20},"suffix":{"type":"string","maxLength":20},"decimals":{"type":"integer","minimum":0,"maximum":6},"thousands":{"type":"boolean"}},"additionalProperties":false},"xAxis":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"labelRotation":{"enum":[0,45,90]}},"additionalProperties":false},"yAxis":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]},"gridlines":{"type":"boolean"}},"additionalProperties":false},"colors":{"type":"array","items":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"maxItems":50},"font":{"$ref":"#/$defs/font"},"style":{"$ref":"#/$defs/boxStyle"}},"additionalProperties":false,"required":["id","type","chartType","source","as","label","series"]}},{"if":{"properties":{"type":{"const":"checkbox"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"width":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"height":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"x":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["left","center","right"]},"checked":{"type":"string","minLength":1,"maxLength":1000},"mark":{"type":"string","enum":["check","cross","dot","fill"]},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"border":{"anyOf":[{"$ref":"#/$defs/stroke"},{"type":"null"}]},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"radius":{"type":"number","minimum":0,"maximum":14400}},"additionalProperties":false,"required":["id","type","checked"]}},{"if":{"properties":{"type":{"const":"form_field"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"width":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"height":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"x":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["left","center","right"]},"kind":{"type":"string","enum":["text","checkbox","radio","dropdown"]},"fieldName":{"type":"string","pattern":"^[^.]{1,100}$"},"value":{"$ref":"#/$defs/inlineContent"},"multiline":{"type":"boolean"},"maxLength":{"type":"integer","minimum":1,"maximum":10000},"options":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"maxItems":200,"minItems":1},"option":{"type":"string","minLength":1,"maxLength":200},"checked":{"type":"string","minLength":1,"maxLength":1000},"readOnly":{"type":"boolean"},"fontSize":{"type":"number","minimum":4,"maximum":72},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"border":{"anyOf":[{"$ref":"#/$defs/stroke"},{"type":"null"}]},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"radius":{"type":"number","minimum":0,"maximum":14400}},"additionalProperties":false,"required":["id","type","kind","fieldName"]}},{"if":{"properties":{"type":{"const":"qr_code"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"width":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"height":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"x":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["left","center","right"]},"value":{"$ref":"#/$defs/inlineContent"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"background":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]}},"additionalProperties":false,"required":["id","type","value"]}},{"if":{"properties":{"type":{"const":"barcode"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"width":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"height":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"x":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["left","center","right"]},"value":{"$ref":"#/$defs/inlineContent"},"symbology":{"type":"string","enum":["code_25","code_39","code_93","code_128","ean_13","ean_8","upc_a"]}},"additionalProperties":false,"required":["id","type","value","symbology"]}},{"if":{"properties":{"type":{"const":"html"}}},"then":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"type":true,"name":{"type":"string","maxLength":200},"condition":{"$ref":"#/$defs/condition"},"hidden":{"type":"boolean"},"locked":{"type":"boolean"},"rotation":{"type":"number","minimum":-360,"maximum":360},"width":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"height":{"anyOf":[{"type":"number","minimum":0,"maximum":14400},{"type":"null"}]},"x":{"type":"number","minimum":0,"maximum":14400},"align":{"type":"string","enum":["left","center","right"]},"html":{"type":"string","maxLength":100000},"scss":{"type":"string","maxLength":100000},"overflow":{"type":"string","enum":["grow","fixed"]}},"additionalProperties":false,"required":["id","type","html"]}}]},"imageSource":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["upload","field"]}},"allOf":[{"if":{"properties":{"kind":{"const":"upload"}}},"then":{"type":"object","properties":{"kind":true,"slug":{"type":"string","pattern":"^[a-z0-9_]{1,200}$"}},"additionalProperties":false,"required":["kind","slug"]}},{"if":{"properties":{"kind":{"const":"field"}}},"then":{"type":"object","properties":{"kind":true,"field":{"$ref":"#/$defs/path"}},"additionalProperties":false,"required":["kind","field"]}}]},"chartSeries":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"name":{"type":"string","maxLength":200},"value":{"type":"string","minLength":1,"maxLength":1000},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"additionalProperties":false,"required":["id","name","value"]},"tableColumn":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"},"width":{"type":"number","exclusiveMinimum":0,"maximum":1000},"align":{"type":"string","enum":["left","center","right"]},"header":{"$ref":"#/$defs/richText"},"cell":{"$ref":"#/$defs/richText"},"footer":{"$ref":"#/$defs/richText"}},"additionalProperties":false,"required":["id","header","cell"]},"mark":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["bold","italic","underline","strike","link","fontFamily","fontSize","textColor","highlight"]}},"allOf":[{"if":{"properties":{"type":{"const":"bold"}}},"then":{"type":"object","properties":{"type":true},"additionalProperties":false}},{"if":{"properties":{"type":{"const":"italic"}}},"then":{"type":"object","properties":{"type":true},"additionalProperties":false}},{"if":{"properties":{"type":{"const":"underline"}}},"then":{"type":"object","properties":{"type":true},"additionalProperties":false}},{"if":{"properties":{"type":{"const":"strike"}}},"then":{"type":"object","properties":{"type":true},"additionalProperties":false}},{"if":{"properties":{"type":{"const":"link"}}},"then":{"type":"object","properties":{"type":true,"attrs":{"type":"object","properties":{"href":{"type":"string","pattern":"^(https?:|mailto:)","maxLength":2000}},"additionalProperties":false,"required":["href"]}},"additionalProperties":false,"required":["attrs"]}},{"if":{"properties":{"type":{"const":"fontFamily"}}},"then":{"type":"object","properties":{"type":true,"attrs":{"type":"object","properties":{"family":{"type":"string","enum":["Liberation Sans","Liberation Serif","Liberation Mono","Roboto","Open Sans","Lato","Poppins","Public Sans","Questrial","DejaVu Sans","Inconsolata","Roboto Mono","Ubuntu Mono","Dancing Script","Caveat","Great Vibes","Sacramento","Satisfy","Cookie"]}},"additionalProperties":false,"required":["family"]}},"additionalProperties":false,"required":["attrs"]}},{"if":{"properties":{"type":{"const":"fontSize"}}},"then":{"type":"object","properties":{"type":true,"attrs":{"type":"object","properties":{"size":{"type":"string","pattern":"^\\d{1,3}(\\.\\d{1,2})?pt$"}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false,"required":["attrs"]}},{"if":{"properties":{"type":{"const":"textColor"}}},"then":{"type":"object","properties":{"type":true,"attrs":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"additionalProperties":false,"required":["color"]}},"additionalProperties":false,"required":["attrs"]}},{"if":{"properties":{"type":{"const":"highlight"}}},"then":{"type":"object","properties":{"type":true,"attrs":{"type":"object","properties":{"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"additionalProperties":false,"required":["color"]}},"additionalProperties":false,"required":["attrs"]}}]},"inline":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["text","hard_break","field"]}},"allOf":[{"if":{"properties":{"type":{"const":"text"}}},"then":{"type":"object","properties":{"type":true,"text":{"type":"string","minLength":1,"maxLength":100000},"marks":{"type":"array","items":{"$ref":"#/$defs/mark"},"maxItems":20}},"additionalProperties":false,"required":["text"]}},{"if":{"properties":{"type":{"const":"hard_break"}}},"then":{"type":"object","properties":{"type":true,"marks":{"type":"array","items":{"$ref":"#/$defs/mark"},"maxItems":20}},"additionalProperties":false}},{"if":{"properties":{"type":{"const":"field"}}},"then":{"type":"object","properties":{"type":true,"attrs":{"type":"object","properties":{"expression":{"type":"string","minLength":1,"maxLength":1000}},"additionalProperties":false,"required":["expression"]},"marks":{"type":"array","items":{"$ref":"#/$defs/mark"},"maxItems":20}},"additionalProperties":false,"required":["attrs"]}}]},"block":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["paragraph","bullet_list","ordered_list"]}},"allOf":[{"if":{"properties":{"type":{"const":"paragraph"}}},"then":{"type":"object","properties":{"type":true,"attrs":{"type":"object","properties":{"align":{"anyOf":[{"type":"string","enum":["left","center","right","justify"]},{"type":"null"}]},"lineHeight":{"anyOf":[{"type":"number","minimum":0.5,"maximum":5},{"type":"null"}]},"spaceBefore":{"anyOf":[{"type":"number","minimum":0,"maximum":1000},{"type":"null"}]},"spaceAfter":{"anyOf":[{"type":"number","minimum":0,"maximum":1000},{"type":"null"}]}},"additionalProperties":false},"content":{"type":"array","items":{"$ref":"#/$defs/inline"},"maxItems":10000}},"additionalProperties":false}},{"if":{"properties":{"type":{"const":"bullet_list"}}},"then":{"type":"object","properties":{"type":true,"content":{"type":"array","items":{"type":"object","properties":{"type":{"const":"list_item"},"content":{"type":"array","items":{"$ref":"#/$defs/block"},"maxItems":100,"minItems":1}},"additionalProperties":false,"required":["type","content"]},"maxItems":1000,"minItems":1}},"additionalProperties":false,"required":["content"]}},{"if":{"properties":{"type":{"const":"ordered_list"}}},"then":{"type":"object","properties":{"type":true,"attrs":{"type":"object","properties":{"order":{"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false},"content":{"type":"array","items":{"type":"object","properties":{"type":{"const":"list_item"},"content":{"type":"array","items":{"$ref":"#/$defs/block"},"maxItems":100,"minItems":1}},"additionalProperties":false,"required":["type","content"]},"maxItems":1000,"minItems":1}},"additionalProperties":false,"required":["content"]}}]},"richText":{"type":"object","properties":{"type":{"const":"doc"},"content":{"type":"array","items":{"$ref":"#/$defs/block"},"maxItems":10000,"minItems":1}},"additionalProperties":false,"required":["type","content"]},"inlineContent":{"type":"array","items":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["text","field"]}},"allOf":[{"if":{"properties":{"type":{"const":"text"}}},"then":{"type":"object","properties":{"type":true,"text":{"type":"string","minLength":1,"maxLength":4000}},"additionalProperties":false,"required":["text"]}},{"if":{"properties":{"type":{"const":"field"}}},"then":{"type":"object","properties":{"type":true,"attrs":{"type":"object","properties":{"expression":{"type":"string","minLength":1,"maxLength":1000}},"additionalProperties":false,"required":["expression"]}},"additionalProperties":false,"required":["attrs"]}}]},"maxItems":100,"minItems":1}}}
