From c1a9c2fcda00216dc0f939e289dcf747c82e9cf7 Mon Sep 17 00:00:00 2001 From: oldli <48485262@qq.com> Date: Thu, 23 Jul 2026 12:37:09 +0800 Subject: [PATCH] feat: add presentation JSON Schema with basic and full examples Co-Authored-By: Claude Sonnet 5 --- schema/examples/basic.json | 63 +++ schema/examples/full.json | 374 ++++++++++++++++ schema/presentation.schema.json | 758 ++++++++++++++++++++++++++++++++ 3 files changed, 1195 insertions(+) create mode 100644 schema/examples/basic.json create mode 100644 schema/examples/full.json create mode 100644 schema/presentation.schema.json diff --git a/schema/examples/basic.json b/schema/examples/basic.json new file mode 100644 index 0000000..20d5867 --- /dev/null +++ b/schema/examples/basic.json @@ -0,0 +1,63 @@ +{ + "presentation": { + "layout": "LAYOUT_16x9", + "author": "Demo Author", + "title": "Basic Presentation" + }, + "slides": [ + { + "objects": [ + { + "type": "text", + "text": "Welcome to PPTX Demo", + "options": { + "x": 1.0, + "y": 2.0, + "w": 8.0, + "h": 1.5, + "fontSize": 44, + "fontFace": "Arial", + "color": "2E75B6", + "bold": true, + "align": "center", + "valign": "middle" + } + } + ] + }, + { + "objects": [ + { + "type": "text", + "text": "Section Title", + "options": { + "x": 0.5, + "y": 0.3, + "w": 9.0, + "h": 0.8, + "fontSize": 28, + "fontFace": "Arial", + "color": "2E75B6", + "bold": true + } + }, + { + "type": "text", + "text": "This is the body content of the slide. It demonstrates a typical title and body layout used in presentations.", + "options": { + "x": 0.5, + "y": 1.5, + "w": 9.0, + "h": 3.0, + "fontSize": 18, + "fontFace": "Calibri", + "color": "333333", + "align": "left", + "valign": "top", + "wrap": true + } + } + ] + } + ] +} diff --git a/schema/examples/full.json b/schema/examples/full.json new file mode 100644 index 0000000..78b9da0 --- /dev/null +++ b/schema/examples/full.json @@ -0,0 +1,374 @@ +{ + "presentation": { + "layout": "LAYOUT_16x9", + "author": "Jane Developer", + "title": "Full Feature Demo", + "subject": "Demonstrating all PPTX slide object types", + "company": "Acme Corp", + "revision": "3", + "rtlMode": false, + "theme": { + "headFontFace": "Calibri Light", + "bodyFontFace": "Calibri" + } + }, + "slides": [ + { + "background": { + "color": "2E75B6", + "transparency": 0 + }, + "objects": [ + { + "type": "text", + "text": "Full Feature Demo", + "options": { + "x": 0, + "y": 1.5, + "w": 10, + "h": 1.5, + "fontSize": 48, + "fontFace": "Arial", + "color": "FFFFFF", + "bold": true, + "align": "center", + "valign": "middle" + } + }, + { + "type": "text", + "text": "PowerPoint Generation via JSON", + "options": { + "x": 0, + "y": 3.2, + "w": 10, + "h": 0.8, + "fontSize": 20, + "fontFace": "Calibri", + "color": "D9E2F3", + "align": "center", + "valign": "top" + } + } + ] + }, + { + "objects": [ + { + "type": "text", + "text": "Text Formatting", + "options": { + "x": 0.5, + "y": 0.2, + "w": 9.0, + "h": 0.6, + "fontSize": 28, + "fontFace": "Arial", + "color": "2E75B6", + "bold": true + } + }, + { + "type": "text", + "text": "Bold and italic text", + "options": { + "x": 0.5, + "y": 1.0, + "w": 4.0, + "h": 0.5, + "fontSize": 16, + "fontFace": "Calibri", + "bold": true, + "italic": true + } + }, + { + "type": "text", + "text": "Left aligned with underline", + "options": { + "x": 0.5, + "y": 1.7, + "w": 4.0, + "h": 0.5, + "fontSize": 14, + "fontFace": "Calibri", + "color": "0070C0", + "underline": { "style": "sng", "color": "0070C0" } + } + }, + { + "type": "text", + "text": "Right aligned text", + "options": { + "x": 5.5, + "y": 1.0, + "w": 4.0, + "h": 0.5, + "fontSize": 14, + "fontFace": "Calibri", + "color": "C00000", + "align": "right" + } + }, + { + "type": "text", + "text": "Bullet point 1\nBullet point 2\nBullet point 3", + "options": { + "x": 0.5, + "y": 2.5, + "w": 9.0, + "h": 1.5, + "fontSize": 14, + "fontFace": "Calibri", + "bullet": { "type": "bullet", "characterCode": "25BA" }, + "valign": "top" + } + } + ] + }, + { + "objects": [ + { + "type": "text", + "text": "Shapes", + "options": { + "x": 0.5, + "y": 0.2, + "w": 9.0, + "h": 0.6, + "fontSize": 28, + "fontFace": "Arial", + "color": "2E75B6", + "bold": true + } + }, + { + "type": "shape", + "shapeName": "rect", + "options": { + "x": 0.5, + "y": 1.2, + "w": 2.5, + "h": 2.0, + "fill": { "color": "4472C4", "transparency": 20 }, + "line": { "color": "000000", "width": 1 }, + "shadow": { "type": "outer", "blur": 8, "offset": 4, "angle": 45, "color": "999999" } + } + }, + { + "type": "shape", + "shapeName": "ellipse", + "options": { + "x": 3.8, + "y": 1.2, + "w": 2.5, + "h": 2.0, + "fill": { "color": "ED7D31" }, + "line": { "color": "333333", "width": 2 } + } + }, + { + "type": "shape", + "shapeName": "roundRect", + "options": { + "x": 7.0, + "y": 1.2, + "w": 2.5, + "h": 2.0, + "fill": { "color": "70AD47" }, + "line": { "color": "000000", "width": 1.5, "dashType": "dash" }, + "rectRadius": 0.2 + } + } + ] + }, + { + "slideNumber": { + "x": 9.0, + "y": 5.0, + "fontSize": 10, + "color": "888888" + }, + "objects": [ + { + "type": "text", + "text": "Images and Hyperlinks", + "options": { + "x": 0.5, + "y": 0.2, + "w": 9.0, + "h": 0.6, + "fontSize": 28, + "fontFace": "Arial", + "color": "2E75B6", + "bold": true + } + }, + { + "type": "image", + "options": { + "x": 0.5, + "y": 1.2, + "w": 4.0, + "h": 3.0, + "path": "https://via.placeholder.com/800x600.png?text=Sample+Image", + "sizing": { "type": "contain", "w": 4.0, "h": 3.0 }, + "shadow": { "type": "outer", "blur": 6, "offset": 3, "angle": 45, "color": "666666" }, + "hyperlink": { "url": "https://example.com", "tooltip": "Visit Example" } + } + }, + { + "type": "text", + "text": "Click the image above to visit Example.com", + "options": { + "x": 0.5, + "y": 4.5, + "w": 4.0, + "h": 0.5, + "fontSize": 12, + "fontFace": "Calibri", + "color": "4472C4", + "align": "center" + } + } + ] + }, + { + "objects": [ + { + "type": "text", + "text": "Table with colspan and rowspan", + "options": { + "x": 0.5, + "y": 0.2, + "w": 9.0, + "h": 0.6, + "fontSize": 28, + "fontFace": "Arial", + "color": "2E75B6", + "bold": true + } + }, + { + "type": "table", + "rows": [ + [ + { "text": "Product", "options": { "bold": true, "fill": { "color": "4472C4" }, "color": "FFFFFF", "fontSize": 14 } }, + { "text": "Q1 Sales", "options": { "bold": true, "fill": { "color": "4472C4" }, "color": "FFFFFF", "fontSize": 14 } }, + { "text": "Q2 Sales", "options": { "bold": true, "fill": { "color": "4472C4" }, "color": "FFFFFF", "fontSize": 14 } }, + { "text": "Total", "options": { "bold": true, "fill": { "color": "4472C4" }, "color": "FFFFFF", "fontSize": 14 } } + ], + [ + { "text": "Widget A", "options": { "fill": { "color": "D9E2F3" } } }, + { "text": "$12,000", "options": { "fill": { "color": "D9E2F3" }, "align": "right" } }, + { "text": "$15,000", "options": { "fill": { "color": "D9E2F3" }, "align": "right" } }, + { "text": "$27,000", "options": { "fill": { "color": "D9E2F3" }, "align": "right", "bold": true } } + ], + [ + { "text": "Widget B", "options": { "fill": { "color": "EDEDED" } } }, + { "text": "$8,500", "options": { "fill": { "color": "EDEDED" }, "align": "right" } }, + { "text": "$9,200", "options": { "fill": { "color": "EDEDED" }, "align": "right" } }, + { "text": "$17,700", "options": { "fill": { "color": "EDEDED" }, "align": "right", "bold": true } } + ], + [ + { "text": "Combined Regions", "options": { "bold": true, "fill": { "color": "E2EFDA" } }, "colspan": 3 }, + { "text": "$44,700", "options": { "bold": true, "fill": { "color": "E2EFDA" }, "align": "right" } } + ] + ], + "options": { + "x": 0.5, + "y": 1.2, + "w": 9.0, + "h": 3.5, + "colW": [3.0, 2.0, 2.0, 2.0], + "border": { "type": "solid", "color": "000000", "pt": 1 }, + "fontSize": 12 + } + } + ] + }, + { + "objects": [ + { + "type": "text", + "text": "Bar Chart Example", + "options": { + "x": 0.5, + "y": 0.2, + "w": 9.0, + "h": 0.6, + "fontSize": 28, + "fontFace": "Arial", + "color": "2E75B6", + "bold": true + } + }, + { + "type": "chart", + "chartType": "bar", + "data": [ + { + "name": "North Region", + "labels": ["Q1", "Q2", "Q3", "Q4"], + "values": [45, 52, 38, 61] + }, + { + "name": "South Region", + "labels": ["Q1", "Q2", "Q3", "Q4"], + "values": [33, 41, 47, 55] + } + ], + "options": { + "x": 0.5, + "y": 1.2, + "w": 9.0, + "h": 4.5, + "chartColors": ["4472C4", "ED7D31"], + "showTitle": true, + "showLegend": true, + "showValue": false, + "catAxisTitle": "Quarter", + "valAxisTitle": "Revenue ($K)", + "barGapWidthPct": 80 + } + } + ] + }, + { + "hidden": false, + "objects": [ + { + "type": "text", + "text": "Thank You!", + "options": { + "x": 0, + "y": 1.8, + "w": 10, + "h": 1.2, + "fontSize": 40, + "fontFace": "Arial", + "color": "2E75B6", + "bold": true, + "align": "center", + "valign": "middle" + } + }, + { + "type": "text", + "text": "Questions?", + "options": { + "x": 0, + "y": 3.2, + "w": 10, + "h": 0.8, + "fontSize": 20, + "fontFace": "Calibri", + "color": "666666", + "align": "center", + "valign": "top" + } + } + ] + } + ] +} diff --git a/schema/presentation.schema.json b/schema/presentation.schema.json new file mode 100644 index 0000000..ada94be --- /dev/null +++ b/schema/presentation.schema.json @@ -0,0 +1,758 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://example.com/pptx-presentation.schema.json", + "title": "PPTX Presentation Schema", + "description": "JSON Schema for PPTX presentation intermediate representation covering all pptxgenjs parameters", + "type": "object", + "definitions": { + "coord": { + "oneOf": [ + { "type": "number" }, + { "type": "string", "pattern": "^\\d+(\\.\\d+)?%$" } + ], + "description": "Coordinate value in inches (number) or percentage (e.g. '50%')" + }, + "hexColor": { + "type": "string", + "pattern": "^[0-9A-Fa-f]{6}$", + "description": "6-digit hex color without # prefix" + }, + "themeColor": { + "type": "string", + "enum": ["tx1", "tx2", "bg1", "bg2", "accent1", "accent2", "accent3", "accent4", "accent5", "accent6"], + "description": "PowerPoint theme/scheme color" + }, + "color": { + "oneOf": [ + { "$ref": "#/definitions/hexColor" }, + { "$ref": "#/definitions/themeColor" } + ], + "description": "Color value: hex string or theme color" + }, + "margin": { + "oneOf": [ + { "type": "number" }, + { "type": "array", "items": { "type": "number" }, "minItems": 4, "maxItems": 4 } + ], + "description": "Margin in points: single value or [top, right, bottom, left]" + }, + "position": { + "type": "object", + "properties": { + "x": { "$ref": "#/definitions/coord" }, + "y": { "$ref": "#/definitions/coord" }, + "w": { "$ref": "#/definitions/coord" }, + "h": { "$ref": "#/definitions/coord" } + }, + "description": "Position and size properties" + }, + "dataOrPath": { + "type": "object", + "properties": { + "path": { "type": "string", "description": "URL or local file path" }, + "data": { "type": "string", "description": "Base64-encoded data" } + } + }, + "borderProps": { + "type": "object", + "properties": { + "type": { "type": "string", "enum": ["none", "dash", "solid"] }, + "color": { "$ref": "#/definitions/hexColor" }, + "pt": { "type": "number", "description": "Border width in points" } + }, + "description": "Border properties" + }, + "shapeFill": { + "type": "object", + "properties": { + "color": { "$ref": "#/definitions/color" }, + "transparency": { "type": "number", "minimum": 0, "maximum": 100, "description": "Fill transparency percent" }, + "type": { "type": "string", "enum": ["none", "solid"] } + }, + "description": "Shape fill properties" + }, + "shapeLine": { + "allOf": [ + { "$ref": "#/definitions/shapeFill" }, + { + "type": "object", + "properties": { + "width": { "type": "number", "description": "Line width in points" }, + "dashType": { "type": "string", "enum": ["solid", "dash", "dashDot", "lgDash", "lgDashDot", "lgDashDotDot", "sysDash", "sysDot"] }, + "beginArrowType": { "type": "string", "enum": ["none", "arrow", "diamond", "oval", "stealth", "triangle"] }, + "endArrowType": { "type": "string", "enum": ["none", "arrow", "diamond", "oval", "stealth", "triangle"] } + } + } + ], + "description": "Shape line/border properties" + }, + "shadow": { + "type": "object", + "properties": { + "type": { "type": "string", "enum": ["outer", "inner", "none"] }, + "opacity": { "type": "number", "minimum": 0, "maximum": 1, "description": "Shadow opacity (0.0-1.0)" }, + "blur": { "type": "number", "minimum": 0, "maximum": 100, "description": "Shadow blur in points" }, + "angle": { "type": "number", "minimum": 0, "maximum": 359, "description": "Shadow angle in degrees" }, + "offset": { "type": "number", "minimum": 0, "maximum": 200, "description": "Shadow offset in points" }, + "color": { "$ref": "#/definitions/hexColor" }, + "rotateWithShape": { "type": "boolean" } + }, + "required": ["type"], + "description": "Shadow properties" + }, + "hyperlink": { + "type": "object", + "properties": { + "slide": { "type": "integer", "description": "Slide number to link to" }, + "url": { "type": "string", "description": "URL to link to" }, + "tooltip": { "type": "string" } + }, + "description": "Hyperlink properties" + }, + "textBaseProps": { + "type": "object", + "properties": { + "align": { "type": "string", "enum": ["left", "center", "right", "justify"] }, + "bold": { "type": "boolean" }, + "breakLine": { "type": "boolean" }, + "bullet": { + "oneOf": [ + { "type": "boolean" }, + { + "type": "object", + "properties": { + "type": { "type": "string", "enum": ["bullet", "number"] }, + "characterCode": { "type": "string" }, + "indent": { "type": "number" }, + "numberType": { + "type": "string", + "enum": ["alphaLcParenBoth", "alphaLcParenR", "alphaLcPeriod", "alphaUcParenBoth", "alphaUcParenR", "alphaUcPeriod", "arabicParenBoth", "arabicParenR", "arabicPeriod", "arabicPlain", "romanLcParenBoth", "romanLcParenR", "romanLcPeriod", "romanUcParenBoth", "romanUcParenR", "romanUcPeriod"] + }, + "numberStartAt": { "type": "number" } + } + } + ] + }, + "color": { "$ref": "#/definitions/color" }, + "fontFace": { "type": "string" }, + "fontSize": { "type": "number" }, + "highlight": { "$ref": "#/definitions/hexColor" }, + "italic": { "type": "boolean" }, + "lang": { "type": "string" }, + "textDirection": { "type": "string", "enum": ["horz", "vert", "vert270", "wordArtVert"] }, + "transparency": { "type": "number", "minimum": 0, "maximum": 100 }, + "underline": { + "type": "object", + "properties": { + "style": { + "type": "string", + "enum": ["dash", "dashHeavy", "dashLong", "dashLongHeavy", "dbl", "dotDash", "dotDashHeave", "dotDotDash", "dotDotDashHeavy", "dotted", "dottedHeavy", "heavy", "none", "sng", "wavy", "wavyDbl", "wavyHeavy"] + }, + "color": { "$ref": "#/definitions/color" } + } + }, + "valign": { "type": "string", "enum": ["top", "middle", "bottom"] }, + "softBreakBefore": { "type": "boolean" }, + "tabStops": { + "type": "array", + "items": { + "type": "object", + "properties": { + "position": { "type": "number" }, + "alignment": { "type": "string", "enum": ["l", "r", "ctr", "dec"] } + }, + "required": ["position"] + } + } + }, + "description": "Base text properties shared by text objects and table cells" + }, + "textOptions": { + "allOf": [ + { "$ref": "#/definitions/textBaseProps" }, + { "$ref": "#/definitions/position" }, + { "$ref": "#/definitions/shapeFill" }, + { "$ref": "#/definitions/dataOrPath" }, + { + "type": "object", + "properties": { + "objectName": { "type": "string" }, + "baseline": { "type": "number" }, + "charSpacing": { "type": "number" }, + "fit": { "type": "string", "enum": ["none", "shrink", "resize"] }, + "flipH": { "type": "boolean" }, + "flipV": { "type": "boolean" }, + "glow": { + "type": "object", + "properties": { + "color": { "$ref": "#/definitions/hexColor" }, + "opacity": { "type": "number" }, + "size": { "type": "number" } + }, + "required": ["opacity", "size"] + }, + "hyperlink": { "$ref": "#/definitions/hyperlink" }, + "indentLevel": { "type": "number" }, + "isTextBox": { "type": "boolean" }, + "line": { "$ref": "#/definitions/shapeLine" }, + "lineSpacing": { "type": "number" }, + "lineSpacingMultiple": { "type": "number", "minimum": 0, "maximum": 9.99 }, + "margin": { "$ref": "#/definitions/margin" }, + "outline": { + "type": "object", + "properties": { + "color": { "$ref": "#/definitions/color" }, + "size": { "type": "number" } + } + }, + "paraSpaceAfter": { "type": "number" }, + "paraSpaceBefore": { "type": "number" }, + "placeholder": { "type": "string" }, + "rectRadius": { "type": "number" }, + "rotate": { "type": "number" }, + "rtlMode": { "type": "boolean" }, + "shadow": { "$ref": "#/definitions/shadow" }, + "shape": { "type": "string", "description": "Valid pptxgenjs shape name" }, + "strike": { "oneOf": [{ "type": "boolean" }, { "type": "string", "enum": ["dblStrike", "sngStrike"] }] }, + "subscript": { "type": "boolean" }, + "superscript": { "type": "boolean" }, + "vert": { "type": "string", "enum": ["eaVert", "horz", "mongolianVert", "vert", "vert270", "wordArtVert", "wordArtVertRtl"] }, + "wrap": { "type": "boolean" } + } + } + ], + "description": "Full text object options including all TextPropsOptions parameters" + }, + "textObject": { + "type": "object", + "properties": { + "type": { "type": "string", "pattern": "^text$" }, + "text": { "type": "string", "description": "Text content" }, + "options": { "$ref": "#/definitions/textOptions" } + }, + "required": ["type", "text"], + "description": "Text slide object" + }, + "shapeOptions": { + "allOf": [ + { "$ref": "#/definitions/position" }, + { "$ref": "#/definitions/shapeFill" }, + { "$ref": "#/definitions/shapeLine" }, + { "$ref": "#/definitions/shadow" }, + { "$ref": "#/definitions/hyperlink" }, + { + "type": "object", + "properties": { + "objectName": { "type": "string" }, + "align": { "type": "string", "enum": ["left", "center", "right", "justify"] }, + "angleRange": { + "type": "array", + "items": { "type": "number" }, + "minItems": 2, + "maxItems": 2 + }, + "arcThicknessRatio": { "type": "number" }, + "flipH": { "type": "boolean" }, + "flipV": { "type": "boolean" }, + "points": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "x": { "$ref": "#/definitions/coord" }, + "y": { "$ref": "#/definitions/coord" }, + "moveTo": { "type": "boolean" } + }, + "required": ["x", "y"] + }, + { + "type": "object", + "properties": { + "x": { "$ref": "#/definitions/coord" }, + "y": { "$ref": "#/definitions/coord" }, + "curve": { "type": "object" } + }, + "required": ["x", "y", "curve"] + }, + { + "type": "object", + "properties": { + "close": { "type": "boolean", "const": true } + }, + "required": ["close"] + } + ] + } + }, + "rectRadius": { "type": "number", "description": "Rounded rectangle radius (0.0-1.0)" }, + "rotate": { "type": "number", "description": "Rotation in degrees (-360 to 360)" } + } + } + ], + "description": "Shape object options" + }, + "shapeObject": { + "type": "object", + "properties": { + "type": { "type": "string", "pattern": "^shape$" }, + "shapeName": { "type": "string", "description": "Valid pptxgenjs shape type (e.g. 'rect', 'ellipse', 'roundRect')" }, + "options": { "$ref": "#/definitions/shapeOptions" } + }, + "required": ["type", "shapeName"], + "description": "Shape slide object" + }, + "tableCell": { + "type": "object", + "properties": { + "text": { "type": "string" }, + "options": { + "allOf": [ + { "$ref": "#/definitions/textBaseProps" }, + { + "type": "object", + "properties": { + "border": { + "oneOf": [ + { "$ref": "#/definitions/borderProps" }, + { "type": "array", "items": { "$ref": "#/definitions/borderProps" }, "minItems": 4, "maxItems": 4 } + ] + }, + "colspan": { "type": "integer", "minimum": 1 }, + "fill": { "$ref": "#/definitions/shapeFill" }, + "hyperlink": { "$ref": "#/definitions/hyperlink" }, + "margin": { "$ref": "#/definitions/margin" }, + "rowspan": { "type": "integer", "minimum": 1 } + } + } + ] + } + }, + "description": "Table cell with text and styling options" + }, + "tableOptions": { + "allOf": [ + { "$ref": "#/definitions/position" }, + { "$ref": "#/definitions/textBaseProps" }, + { + "type": "object", + "properties": { + "objectName": { "type": "string" }, + "autoPage": { "type": "boolean" }, + "autoPageCharWeight": { "type": "number" }, + "autoPageLineWeight": { "type": "number" }, + "autoPageRepeatHeader": { "type": "boolean" }, + "autoPageHeaderRows": { "type": "integer", "minimum": 1 }, + "autoPageSlideStartY": { "type": "number" }, + "border": { + "oneOf": [ + { "$ref": "#/definitions/borderProps" }, + { "type": "array", "items": { "$ref": "#/definitions/borderProps" }, "minItems": 4, "maxItems": 4 } + ] + }, + "colW": { + "oneOf": [ + { "type": "number" }, + { "type": "array", "items": { "type": "number" } } + ] + }, + "fill": { "$ref": "#/definitions/shapeFill" }, + "margin": { "$ref": "#/definitions/margin" }, + "rowH": { + "oneOf": [ + { "type": "number" }, + { "type": "array", "items": { "type": "number" } } + ] + } + } + } + ], + "description": "Table options including all TableProps parameters" + }, + "tableObject": { + "type": "object", + "properties": { + "type": { "type": "string", "pattern": "^table$" }, + "rows": { + "type": "array", + "items": { + "type": "array", + "items": { "$ref": "#/definitions/tableCell" } + } + }, + "options": { "$ref": "#/definitions/tableOptions" } + }, + "required": ["type", "rows"], + "description": "Table slide object" + }, + "imageOptions": { + "allOf": [ + { "$ref": "#/definitions/position" }, + { "$ref": "#/definitions/dataOrPath" }, + { "$ref": "#/definitions/shadow" }, + { "$ref": "#/definitions/hyperlink" }, + { + "type": "object", + "properties": { + "objectName": { "type": "string" }, + "altText": { "type": "string" }, + "flipH": { "type": "boolean" }, + "flipV": { "type": "boolean" }, + "placeholder": { "type": "string" }, + "rotate": { "type": "number" }, + "rounding": { "type": "boolean" }, + "sizing": { + "type": "object", + "properties": { + "type": { "type": "string", "enum": ["contain", "cover", "crop"] }, + "w": { "$ref": "#/definitions/coord" }, + "h": { "$ref": "#/definitions/coord" }, + "x": { "$ref": "#/definitions/coord" }, + "y": { "$ref": "#/definitions/coord" } + }, + "required": ["type", "w", "h"] + }, + "transparency": { "type": "number", "minimum": 0, "maximum": 100 } + } + } + ], + "description": "Image options including all ImageProps parameters" + }, + "imageObject": { + "type": "object", + "properties": { + "type": { "type": "string", "pattern": "^image$" }, + "options": { "$ref": "#/definitions/imageOptions" } + }, + "required": ["type", "options"], + "description": "Image slide object" + }, + "chartData": { + "type": "object", + "properties": { + "name": { "type": "string", "description": "Series name" }, + "labels": { + "oneOf": [ + { "type": "array", "items": { "type": "string" } }, + { "type": "array", "items": { "type": "array", "items": { "type": "string" } } } + ] + }, + "sizes": { "type": "array", "items": { "type": "number" }, "description": "Bubble sizes" }, + "values": { "type": "array", "items": { "type": "number" }, "description": "Category values" } + }, + "description": "Chart data series" + }, + "optsChartGridLine": { + "type": "object", + "properties": { + "cap": { "type": "string", "enum": ["flat", "round", "square"] }, + "color": { "$ref": "#/definitions/hexColor" }, + "size": { "type": "number" }, + "style": { "type": "string", "enum": ["solid", "dash", "dot", "none"] } + }, + "description": "Chart grid line options" + }, + "chartOptions": { + "allOf": [ + { "$ref": "#/definitions/position" }, + { + "type": "object", + "properties": { + "objectName": { "type": "string" }, + "altText": { "type": "string" }, + + "axisPos": { "type": "string", "enum": ["b", "l", "r", "t"] }, + "chartColors": { "type": "array", "items": { "$ref": "#/definitions/hexColor" } }, + "chartColorsOpacity": { "type": "number" }, + "dataBorder": { "$ref": "#/definitions/borderProps" }, + "displayBlanksAs": { "type": "string" }, + "invertedColors": { "type": "array", "items": { "$ref": "#/definitions/hexColor" } }, + "lang": { "type": "string" }, + "layout": { "$ref": "#/definitions/position" }, + "shadow": { "$ref": "#/definitions/shadow" }, + "showLabel": { "type": "boolean" }, + "showLeaderLines": { "type": "boolean" }, + "showLegend": { "type": "boolean" }, + "showPercent": { "type": "boolean" }, + "showSerName": { "type": "boolean" }, + "showTitle": { "type": "boolean" }, + "showValue": { "type": "boolean" }, + + "v3DPerspective": { "type": "number", "minimum": 0, "maximum": 120 }, + "v3DRAngAx": { "type": "boolean" }, + "v3DRotX": { "type": "number", "minimum": 0, "maximum": 359.9 }, + "v3DRotY": { "type": "number", "minimum": 0, "maximum": 359.9 }, + + "chartArea": { + "type": "object", + "properties": { + "border": { "$ref": "#/definitions/borderProps" }, + "fill": { "$ref": "#/definitions/shapeFill" }, + "roundedCorners": { "type": "boolean" } + } + }, + "plotArea": { + "type": "object", + "properties": { + "border": { "$ref": "#/definitions/borderProps" }, + "fill": { "$ref": "#/definitions/shapeFill" } + } + }, + + "catAxes": { "type": "array", "items": { "type": "object" } }, + "catAxisBaseTimeUnit": { "type": "string" }, + "catAxisCrossesAt": { "oneOf": [{ "type": "number" }, { "type": "string", "enum": ["autoZero"] }] }, + "catAxisHidden": { "type": "boolean" }, + "catAxisLabelColor": { "type": "string" }, + "catAxisLabelFontBold": { "type": "boolean" }, + "catAxisLabelFontFace": { "type": "string" }, + "catAxisLabelFontItalic": { "type": "boolean" }, + "catAxisLabelFontSize": { "type": "number" }, + "catAxisLabelFrequency": { "type": "string" }, + "catAxisLabelPos": { "type": "string", "enum": ["none", "low", "high", "nextTo"] }, + "catAxisLabelRotate": { "type": "number" }, + "catAxisLineColor": { "type": "string" }, + "catAxisLineShow": { "type": "boolean" }, + "catAxisLineSize": { "type": "number" }, + "catAxisLineStyle": { "type": "string", "enum": ["solid", "dash", "dot"] }, + "catAxisMajorTickMark": { "type": "string", "enum": ["none", "inside", "outside", "cross"] }, + "catAxisMajorTimeUnit": { "type": "string" }, + "catAxisMajorUnit": { "type": "number" }, + "catAxisMaxVal": { "type": "number" }, + "catAxisMinorTickMark": { "type": "string", "enum": ["none", "inside", "outside", "cross"] }, + "catAxisMinorTimeUnit": { "type": "string" }, + "catAxisMinorUnit": { "type": "number" }, + "catAxisMinVal": { "type": "number" }, + "catAxisMultiLevelLabels": { "type": "boolean" }, + "catAxisOrientation": { "type": "string", "enum": ["minMax"] }, + "catAxisTitle": { "type": "string" }, + "catAxisTitleColor": { "type": "string" }, + "catAxisTitleFontFace": { "type": "string" }, + "catAxisTitleFontSize": { "type": "number" }, + "catAxisTitleRotate": { "type": "number" }, + "catGridLine": { "$ref": "#/definitions/optsChartGridLine" }, + "catLabelFormatCode": { "type": "string" }, + "secondaryCatAxis": { "type": "boolean" }, + "showCatAxisTitle": { "type": "boolean" }, + + "serAxisBaseTimeUnit": { "type": "string" }, + "serAxisHidden": { "type": "boolean" }, + "serAxisLabelColor": { "type": "string" }, + "serAxisLabelFontBold": { "type": "boolean" }, + "serAxisLabelFontFace": { "type": "string" }, + "serAxisLabelFontItalic": { "type": "boolean" }, + "serAxisLabelFontSize": { "type": "number" }, + "serAxisLabelFrequency": { "type": "string" }, + "serAxisLabelPos": { "type": "string", "enum": ["none", "low", "high", "nextTo"] }, + "serAxisLineColor": { "type": "string" }, + "serAxisLineShow": { "type": "boolean" }, + "serAxisMajorTimeUnit": { "type": "string" }, + "serAxisMajorUnit": { "type": "number" }, + "serAxisMinorTimeUnit": { "type": "string" }, + "serAxisMinorUnit": { "type": "number" }, + "serAxisOrientation": { "type": "string" }, + "serAxisTitle": { "type": "string" }, + "serAxisTitleColor": { "type": "string" }, + "serAxisTitleFontFace": { "type": "string" }, + "serAxisTitleFontSize": { "type": "number" }, + "serAxisTitleRotate": { "type": "number" }, + "serGridLine": { "$ref": "#/definitions/optsChartGridLine" }, + "serLabelFormatCode": { "type": "string" }, + "showSerAxisTitle": { "type": "boolean" }, + + "secondaryValAxis": { "type": "boolean" }, + "showValAxisTitle": { "type": "boolean" }, + "valAxes": { "type": "array", "items": { "type": "object" } }, + "valAxisCrossesAt": { "oneOf": [{ "type": "number" }, { "type": "string", "enum": ["autoZero"] }] }, + "valAxisDisplayUnit": { "type": "string", "enum": ["billions", "hundredMillions", "hundreds", "hundredThousands", "millions", "tenMillions", "tenThousands", "thousands", "trillions"] }, + "valAxisDisplayUnitLabel": { "type": "boolean" }, + "valAxisHidden": { "type": "boolean" }, + "valAxisLabelColor": { "type": "string" }, + "valAxisLabelFontBold": { "type": "boolean" }, + "valAxisLabelFontFace": { "type": "string" }, + "valAxisLabelFontItalic": { "type": "boolean" }, + "valAxisLabelFontSize": { "type": "number" }, + "valAxisLabelFormatCode": { "type": "string" }, + "valAxisLabelPos": { "type": "string", "enum": ["none", "low", "high", "nextTo"] }, + "valAxisLabelRotate": { "type": "number" }, + "valAxisLineColor": { "type": "string" }, + "valAxisLineShow": { "type": "boolean" }, + "valAxisLineSize": { "type": "number" }, + "valAxisLineStyle": { "type": "string", "enum": ["solid", "dash", "dot"] }, + "valAxisLogScaleBase": { "type": "number", "minimum": 2, "maximum": 99 }, + "valAxisMajorTickMark": { "type": "string", "enum": ["none", "inside", "outside", "cross"] }, + "valAxisMajorUnit": { "type": "number" }, + "valAxisMaxVal": { "type": "number" }, + "valAxisMinorTickMark": { "type": "string", "enum": ["none", "inside", "outside", "cross"] }, + "valAxisMinVal": { "type": "number" }, + "valAxisOrientation": { "type": "string", "enum": ["minMax"] }, + "valAxisTitle": { "type": "string" }, + "valAxisTitleColor": { "type": "string" }, + "valAxisTitleFontFace": { "type": "string" }, + "valAxisTitleFontSize": { "type": "number" }, + "valAxisTitleRotate": { "type": "number" }, + "valGridLine": { "$ref": "#/definitions/optsChartGridLine" }, + "valLabelFormatCode": { "type": "string" }, + + "bar3DShape": { "type": "string" }, + "barDir": { "type": "string" }, + "barGapDepthPct": { "type": "number" }, + "barGapWidthPct": { "type": "number" }, + "barGrouping": { "type": "string" }, + "barOverlapPct": { "type": "number" }, + + "dataNoEffects": { "type": "boolean" }, + "holeSize": { "type": "number" }, + + "lineCap": { "type": "string", "enum": ["flat", "round", "square"] }, + "lineDash": { "type": "string", "enum": ["dash", "dashDot", "lgDash", "lgDashDot", "lgDashDotDot", "solid", "sysDash", "sysDot"] }, + "lineDataSymbol": { "type": "string", "enum": ["circle", "dash", "diamond", "dot", "none", "square", "triangle"] }, + "lineDataSymbolLineColor": { "type": "string" }, + "lineDataSymbolLineSize": { "type": "number" }, + "lineDataSymbolSize": { "type": "number" }, + "lineSize": { "type": "number" }, + "lineSmooth": { "type": "boolean" }, + + "firstSliceAng": { "type": "number", "minimum": 0, "maximum": 359 }, + + "radarStyle": { "type": "string", "enum": ["standard", "marker", "filled"] }, + + "dataLabelBkgrdColors": { "type": "boolean" }, + "dataLabelColor": { "type": "string" }, + "dataLabelFontBold": { "type": "boolean" }, + "dataLabelFontFace": { "type": "string" }, + "dataLabelFontItalic": { "type": "boolean" }, + "dataLabelFontSize": { "type": "number" }, + "dataLabelFormatCode": { "type": "string" }, + "dataLabelFormatScatter": { "type": "string" }, + "dataLabelPosition": { "type": "string", "enum": ["b", "bestFit", "ctr", "l", "r", "t", "inEnd", "outEnd"] }, + + "dataTableFontSize": { "type": "number" }, + "dataTableFormatCode": { "type": "string" }, + "showDataTable": { "type": "boolean" }, + "showDataTableHorzBorder": { "type": "boolean" }, + "showDataTableKeys": { "type": "boolean" }, + "showDataTableOutline": { "type": "boolean" }, + "showDataTableVertBorder": { "type": "boolean" }, + + "legendColor": { "type": "string" }, + "legendFontFace": { "type": "string" }, + "legendFontSize": { "type": "number" }, + "legendPos": { "type": "string", "enum": ["b", "l", "r", "t", "tr"] }, + + "title": { "type": "string" }, + "titleAlign": { "type": "string" }, + "titleBold": { "type": "boolean" }, + "titleColor": { "type": "string" }, + "titleFontFace": { "type": "string" }, + "titleFontSize": { "type": "number" }, + "titlePos": { + "type": "object", + "properties": { + "x": { "type": "number" }, + "y": { "type": "number" } + } + }, + "titleRotate": { "type": "number" }, + + "cap": { "type": "string", "enum": ["flat", "round", "square"] }, + "color": { "$ref": "#/definitions/hexColor" }, + "size": { "type": "number" }, + "style": { "type": "string", "enum": ["solid", "dash", "dot", "none"] } + } + } + ], + "description": "Chart options including all IChartOpts parameters" + }, + "chartObject": { + "type": "object", + "properties": { + "type": { "type": "string", "pattern": "^chart$" }, + "chartType": { "type": "string", "enum": ["area", "bar", "bar3D", "bubble", "doughnut", "line", "pie", "radar", "scatter"] }, + "data": { "type": "array", "items": { "$ref": "#/definitions/chartData" } }, + "options": { "$ref": "#/definitions/chartOptions" } + }, + "required": ["type", "chartType", "data"], + "description": "Chart slide object" + }, + "slideNumberProps": { + "allOf": [ + { "$ref": "#/definitions/position" }, + { "$ref": "#/definitions/textBaseProps" }, + { + "type": "object", + "properties": { + "margin": { "$ref": "#/definitions/margin" } + } + } + ], + "description": "Slide number display properties" + }, + "backgroundProps": { + "allOf": [ + { "$ref": "#/definitions/dataOrPath" }, + { "$ref": "#/definitions/shapeFill" }, + { + "type": "object", + "properties": { + "fill": { "$ref": "#/definitions/hexColor", "description": "Deprecated: use shapeFill.color instead" } + } + } + ], + "description": "Slide background properties (color or image with DataOrPathProps + ShapeFillProps)" + }, + "slideObject": { + "type": "object", + "properties": { + "background": { "$ref": "#/definitions/backgroundProps" }, + "color": { "$ref": "#/definitions/hexColor", "description": "Default text color for this slide" }, + "hidden": { "type": "boolean", "description": "Whether slide is hidden" }, + "slideNumber": { "$ref": "#/definitions/slideNumberProps" }, + "objects": { + "type": "array", + "items": { + "oneOf": [ + { "$ref": "#/definitions/textObject" }, + { "$ref": "#/definitions/shapeObject" }, + { "$ref": "#/definitions/tableObject" }, + { "$ref": "#/definitions/imageObject" }, + { "$ref": "#/definitions/chartObject" } + ] + } + } + }, + "description": "A single slide with background, properties, and content objects" + } + }, + "properties": { + "presentation": { + "type": "object", + "properties": { + "layout": { "type": "string", "description": "Presentation layout (e.g. LAYOUT_16x9, LAYOUT_4x3)" }, + "author": { "type": "string" }, + "title": { "type": "string" }, + "subject": { "type": "string" }, + "company": { "type": "string" }, + "revision": { "type": "string" }, + "rtlMode": { "type": "boolean" }, + "theme": { + "type": "object", + "properties": { + "headFontFace": { "type": "string" }, + "bodyFontFace": { "type": "string" } + } + } + }, + "description": "Presentation-level metadata and layout settings" + }, + "slides": { + "type": "array", + "items": { "$ref": "#/definitions/slideObject" }, + "minItems": 1, + "description": "Array of slides in the presentation" + } + }, + "required": ["slides"], + "additionalProperties": true +}