{"name":"OPF dynamic composition","description":"Slide.composition overrides layout composition defaults. Groups compose their blocks independently. Gap and padding are fractions of the container short edge. Text metrics are deterministic estimates; inspect final output with your fonts.","schema":{"type":"object","additionalProperties":false,"description":"Portable dynamic composition. Slide fields override the resolved layout. Nested groups arrange their children independently, inheriting only minFontSize and overflow. Explicit promoted regions retain their positions.","properties":{"mode":{"type":"string","enum":["auto","grid","row","column"],"description":"auto chooses a grid from available space and content; grid uses columns; row and column use one horizontal or vertical track."},"columns":{"type":"integer","minimum":1,"maximum":12,"description":"Column count for grid. In auto mode this caps the number of columns."},"gap":{"type":"number","minimum":0,"maximum":0.1,"description":"Space between cells as a fraction of the container short edge (canvas at slide root). Default 0.03333333333333333."},"padding":{"type":"number","minimum":0,"maximum":0.2,"description":"Inset as a fraction of the container short edge. Default 0.08 on a slide, 0 inside a group."},"weights":{"type":"array","minItems":1,"maxItems":12,"items":{"type":"number","exclusiveMinimum":0,"maximum":100},"description":"Relative track sizes: columns for row/grid/auto, rows for column. Omitted tracks have weight 1; extra weights are ignored."},"minFontSize":{"type":"number","minimum":8,"maximum":32,"description":"Minimum readable text size in reference pixels at a 720-pixel canvas short edge. Default 16. Overflow is diagnosed when text cannot fit at this size."},"overflow":{"type":"string","enum":["warn","error"],"description":"warn returns diagnostics for content that does not fit; error rejects layout. Content is never silently removed. Default warn."}}},"contentSchema":{"type":"object","description":"A content leaf or recursively composed group. A group contains blocks and optional composition; it cannot mix blocks with leaf payload fields. Groups may nest up to 32 levels.","additionalProperties":false,"properties":{"type":{"type":"string","enum":["text","list","image","chart","table","video","code","metric","quote","timeline","group"],"description":"Optional content kind. When omitted, engines infer the kind from the fields present."},"text":{"oneOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/$defs/TextRun"}}],"description":"Text payload. Use a string for plain text or TextRun[] for inline rich text. TextRun items may be plain strings or formatted run objects.","examples":["Hello, world",["Revenue grew ",{"text":"42%","bold":true,"color":"#16A34A"}," year over year."]]},"items":{"type":"array","items":{"$ref":"#/$defs/ListItem"},"description":"Generic list payload. Each item is either a plain string, a TextRun[] rich text sequence, or a ListItem object. List nesting uses item.level rather than nested content payloads.","examples":[["Sub-second agent latency",["Drop-in compatible with ",{"text":"OpenAI tool-calling","bold":true}],{"text":"SOC 2 Type II","description":"Security review ready for enterprise procurement."}]]},"bullets":{"type":"array","items":{"$ref":"#/$defs/BulletItem"},"description":"Text-style bullet payload. Presence of this field infers type 'text'.","examples":[["Sub-second agent latency","Drop-in compatible with OpenAI tool-calling","SOC 2 Type II"]]},"image":{"$ref":"#/$defs/Asset","description":"Source for an image item.","examples":["https://cdn.acme.com/images/diagram.png","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAusB9V3iWggAAAAASUVORK5CYII=","./images/diagram.png","asset:img-diagram"]},"video":{"$ref":"#/$defs/Asset","description":"Source for a video item.","examples":["asset:demo-video","./media/demo.mp4"]},"chart":{"$ref":"#/$defs/Chart","description":"Chart payload. Presence of this field infers type 'chart'."},"table":{"$ref":"#/$defs/Table","description":"Table payload. Presence of this field infers type 'table'."},"code":{"oneOf":[{"type":"string"},{"$ref":"#/$defs/Code"}],"description":"Code payload. A string is shorthand for { \"source\": value }; object form carries optional syntax language and filename metadata.","examples":["def greet(name: str) -> str:\n    return f\"Hello, {name}!\"",{"source":"export function greet(name: string) {\n  return `Hello, ${name}`;\n}","language":"ts","filename":"greet.ts"}]},"metric":{"oneOf":[{"type":"string"},{"type":"number"},{"$ref":"#/$defs/Metric"}],"description":"Metric payload. A string or number is shorthand for { \"value\": value }; object form carries optional label, description, unit, delta, and trend metadata. Numeric values remain numbers; renderers format them for display.","examples":["98%",42,{"value":"$12.4M","label":"Revenue","description":"Recognized revenue for the quarter.","delta":"+12%","trend":"up"}]},"quote":{"oneOf":[{"type":"string"},{"$ref":"#/$defs/Quote"}],"description":"Quote payload. A string is shorthand for { \"text\": value }; object form carries optional attribution and source metadata.","examples":["This changed how our team handles reviews.",{"text":"This changed how our team handles reviews.","attribution":"VP Operations, Acme Corp","source":"Customer interview, March 2026"}]},"timeline":{"$ref":"#/$defs/Timeline","description":"Timeline payload ordered by narrative or chronology.","examples":[[{"when":"2026-01","what":"Pilot","description":"Launch with the first operations team."},{"when":"2026-04","what":"Rollout","description":"Expand to all regions."}],{"name":"Rollout Plan","description":"Major milestones for the regional rollout.","events":[{"when":"Q1","what":"Pilot"},{"when":"Q2","what":"Rollout"}]}]},"blocks":{"type":"array","minItems":1,"items":{"$ref":"#/$defs/ContentPayload"},"description":"Ordered children of a group. Each child is a leaf or another group."},"composition":{"$ref":"#/$defs/Composition","description":"Arrangement within this group. Only minFontSize and overflow inherit from the parent; strict overflow cannot be weakened."}},"allOf":[{"if":{"required":["type"],"properties":{"type":{"const":"list"}}},"then":{"required":["items"]}},{"if":{"required":["type"],"properties":{"type":{"const":"image"}}},"then":{"required":["image"]}},{"if":{"required":["type"],"properties":{"type":{"const":"chart"}}},"then":{"required":["chart"]}},{"if":{"required":["type"],"properties":{"type":{"const":"table"}}},"then":{"required":["table"]}},{"if":{"required":["type"],"properties":{"type":{"const":"video"}}},"then":{"required":["video"]}},{"if":{"required":["type"],"properties":{"type":{"const":"code"}}},"then":{"required":["code"]}},{"if":{"required":["type"],"properties":{"type":{"const":"metric"}}},"then":{"required":["metric"]}},{"if":{"required":["type"],"properties":{"type":{"const":"quote"}}},"then":{"required":["quote"]}},{"if":{"required":["type"],"properties":{"type":{"const":"timeline"}}},"then":{"required":["timeline"]}},{"if":{"required":["type"],"properties":{"type":{"const":"group"}}},"then":{"required":["blocks"]}},{"if":{"required":["composition"]},"then":{"required":["blocks"]}},{"if":{"required":["blocks"]},"then":{"properties":{"type":{"const":"group"}},"not":{"anyOf":[{"required":["text"]},{"required":["items"]},{"required":["bullets"]},{"required":["image"]},{"required":["video"]},{"required":["chart"]},{"required":["table"]},{"required":["code"]},{"required":["metric"]},{"required":["quote"]},{"required":["timeline"]}]}}}]},"nesting":{"maxDepth":32,"inherited":["minFontSize","overflow"],"groupPaddingDefault":0},"examples":[{"$schema":"https://openpresentation.org/schema/opf/v1","name":"auto composition","slides":[{"title":"Content with room to breathe","composition":{"mode":"auto"},"blocks":[{"text":"State the decision."},{"text":"Show the evidence."},{"text":"Name the next step."}]}]},{"$schema":"https://openpresentation.org/schema/opf/v1","name":"row composition","slides":[{"title":"Content with room to breathe","composition":{"mode":"row"},"blocks":[{"text":"State the decision."},{"text":"Show the evidence."},{"text":"Name the next step."}]}]},{"$schema":"https://openpresentation.org/schema/opf/v1","name":"column composition","slides":[{"title":"Content with room to breathe","composition":{"mode":"column"},"blocks":[{"text":"State the decision."},{"text":"Show the evidence."},{"text":"Name the next step."}]}]},{"$schema":"https://openpresentation.org/schema/opf/v1","name":"grid composition","slides":[{"title":"Content with room to breathe","composition":{"mode":"grid"},"blocks":[{"text":"State the decision."},{"text":"Show the evidence."},{"text":"Name the next step."}]}]}]}