@blockslides/ai-context 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +132 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +103 -10
- package/dist/index.d.ts +103 -10
- package/dist/index.js +132 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/contexts/v1/column.ts +5 -0
- package/src/contexts/v1/editingRules.ts +11 -0
- package/src/contexts/v1/row.ts +6 -0
- package/src/contexts/v1/slide.ts +6 -0
- package/src/schemas/v1/column.schema.json +8 -1
- package/src/schemas/v1/row.schema.json +8 -1
- package/src/schemas/v1/slide.schema.json +8 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/contexts/v1/index.ts","../src/contexts/v1/core.ts","../src/contexts/v1/output.fullDocument.ts","../src/contexts/v1/imageBlock.ts","../src/contexts/v1/row.ts","../src/contexts/v1/column.ts","../src/contexts/v1/slide.ts","../src/contexts/v1/style.ts","../src/contexts/v1/editingRules.ts","../src/contexts/v1/sizing.ts","../src/contexts/v1/blockquote.ts","../src/contexts/v1/bulletList.ts","../src/contexts/v1/codeBlock.ts","../src/contexts/v1/hardBreak.ts","../src/contexts/v1/horizontalRule.ts","../src/contexts/v1/image.ts","../src/contexts/v1/heading.ts","../src/contexts/v1/paragraph.ts","../src/contexts/v1/youtube.ts","../src/examples/v1/index.ts","../src/examples/v1/slides.ts","../src/examples/v1/flyers.ts","../src/bundles/v1/index.ts","../src/bundles/v1/minimalCreate.ts","../src/bundles/v1/imageEditing.ts","../src/bundles/v1/all.ts","../src/schemas/v1/index.ts","../src/schemas/v1/imageBlock.schema.json","../src/schemas/v1/row.schema.json","../src/schemas/v1/column.schema.json","../src/schemas/v1/slide.schema.json","../src/schemas/v1/blockquote.schema.json","../src/schemas/v1/bulletList.schema.json","../src/schemas/v1/codeBlock.schema.json","../src/schemas/v1/hardBreak.schema.json","../src/schemas/v1/horizontalRule.schema.json","../src/schemas/v1/image.schema.json","../src/schemas/v1/heading.schema.json","../src/schemas/v1/paragraph.schema.json","../src/schemas/v1/youtube.schema.json","../src/bundles/v1/allSchemas.ts","../src/bundles/v1/allContexts.ts","../src/recipes/v1/index.ts","../src/recipes/v1/createSlide.ts","../src/recipes/v1/addTwoColumns.ts","../src/recipes/v1/editImageToCover.ts"],"sourcesContent":["export { core } from \"./core\";\nexport { fullDocument } from \"./output.fullDocument\";\nexport { imageBlock } from \"./imageBlock\";\nexport { row } from \"./row\";\nexport { column } from \"./column\";\nexport { slide } from \"./slide\";\nexport { style } from \"./style\";\nexport { editingRules } from \"./editingRules\";\nexport { sizing } from \"./sizing\";\nexport { blockquote } from \"./blockquote\";\nexport { bulletList } from \"./bulletList\";\nexport { codeBlock } from \"./codeBlock\";\nexport { hardBreak } from \"./hardBreak\";\nexport { horizontalRule } from \"./horizontalRule\";\nexport { image } from \"./image\";\nexport { heading } from \"./heading\";\nexport { paragraph } from \"./paragraph\";\nexport { youtube } from \"./youtube\";\n\n","export const core = `\nYou are given a BlockSlides document to CREATE or EDIT.\n\nDocument shape:\n- doc: { type: \"doc\", content: slide[] }\n- slide: { type: \"slide\", attrs?, content: row[] }\n- row: { type: \"row\", attrs?, content: column[] | block[] }\n- column: { type: \"column\", attrs?, content: (block | row)[] }\n- block: includes nodes like paragraph, heading, imageBlock, etc.\n\nRules:\n- Use only known node types and valid attrs. Do not invent attributes.\n- Prefer stable references: preserve slide.attrs.id if present.\n- Slides and flyers share the same JSON; flyers are slides sized via attrs and theme.\n`.trim();\n\n\n","export const fullDocument = `\nOutput contract:\n- Return exactly one JSON object representing the ENTIRE document.\n- No prose, no markdown, no code fences, no comments. JSON only.\n- Include all required attrs. Use allowed enum values only.\n`.trim();\n\n\n","export const imageBlock = `\nNode: imageBlock\nAttrs:\n- src (required): string (URL)\n- alt (optional): string\n- caption (optional): string\n- credit (optional): string\n- layout (optional): \"cover\" | \"contain\" | \"fill\" | \"focus\" | \"pattern\"\n- align (optional): \"left\" | \"center\" | \"right\" | \"stretch\" (default \"center\")\n- width (optional): number (px) or string (\"%\"/\"px\")\n- height (optional): number (px) or string (\"%\"/\"px\")\n- fullBleed (optional): boolean (removes radius; stretches width)\n- assetId (optional): string\n- focalX, focalY (optional): 0–100; spotlight position (when relevant)\n\nBehavior:\n- Numbers for width/height are interpreted as pixels.\n- layout:\n - cover: Fill container; crop edges as needed.\n - contain: Fit entirely; may letterbox.\n - fill: Stretch to container (may distort).\n - focus: Cover + radial spotlight at focalX/focalY.\n - pattern: Hide <img>; use tiled background (from src).\n- Do not set unknown attributes. Preserve existing valid attrs.\n`.trim();\n\n\n","export const row = `\nNode: row\nAttrs:\n- layout (optional): \"\", \"1\", \"1-1\", \"2-1\", \"1-2\", \"1-1-1\", \"2-1-1\", \"1-2-1\", \"1-1-2\", \"1-1-1-1\"\n- className (optional): string (CSS classes)\n\nSemantics:\n- Fractions determine relative column flex:\n - 1-1: two equal columns\n - 2-1: first column is double width\n - 1-2: second column is double width\n - 1-1-1: three equal columns\n - 1-1-1-1: four equal columns\n- Empty layout (\"\", \"1\") acts as a single full-width column.\n`.trim();\n\n\n","export const column = `\nNode: column\nAttrs:\n- className (optional): string\n- contentMode (optional): \"default\" (future-friendly)\n- verticalAlign (optional): \"top\" | \"center\" | \"bottom\" (default \"top\")\n- horizontalAlign (optional): \"left\" | \"center\" | \"right\" | \"stretch\" (default \"left\")\n- padding (optional): \"none\" (future-friendly)\n\nNotes:\n- Use className for spacing, colors, typography (e.g., Tailwind).\n- Keep nesting shallow; columns can contain rows or blocks as needed.\n`.trim();\n\n\n","export const slide = `\nNode: slide\nAttrs:\n- id (optional): string (stable identifier; preserve if present)\n- className (optional): string (styling)\n- size (optional): \"16x9\" | \"4x3\" | \"a4-portrait\" | \"a4-landscape\" | \"letter-portrait\" | \"letter-landscape\" | \"linkedin-banner\"\n\nContent:\n- slide contains one or more rows.\n\nNotes:\n- Flyers are slides sized for paper (e.g., size: \"a4-portrait\").\n- Set size to control canvas dimensions; theme applies the exact width/height.\n`.trim();\n\n\n","export const style = `\nStyling\n- Prefer using attrs.className for styling (e.g., Tailwind classes).\n- Use enums for canonical behaviors (e.g., imageBlock.layout).\n- When enums are insufficient (spacing, backgrounds), use className.\n`.trim();\n\n\n","export const editingRules = `\nEditing rules\n- Preserve existing ids and valid attributes. Do not remove or rename known attrs.\n- Use only allowed enum values. Do not invent new enum values.\n- Avoid introducing new attrs. If styling is needed, prefer className.\n- Keep the document valid: slide > row > column > blocks.\n`.trim();\n\n\n","export const sizing = `\nSizing\n- Slides and flyers share the same JSON. Flyers are slides sized via slide.attrs.size and theme rules.\n- Allowed sizes: \"16x9\" | \"4x3\" | \"a4-portrait\" | \"a4-landscape\" | \"letter-portrait\" | \"letter-landscape\" | \"linkedin-banner\".\n- Editors may render with fixed canvases or dynamic mode. The default is fixed; dynamic stretches to container with preserved aspect.\n`.trim();\n\n\n","export const blockquote = `\nNode: blockquote\nAttrs:\n- HTML-only; no required JSON attrs beyond optional styling such as className.\n\nContent:\n- One or more block nodes (typically paragraphs, headings, lists).\n\nSemantics:\n- Use for quoted text or callouts inside a column or row.\n- Styling should be applied via className on the surrounding column/slide, not by inventing new attrs here.\n`.trim();\n\n\n","export const bulletList = `\nNode: bulletList\nAttrs:\n- HTML-only; no required JSON attrs beyond optional styling such as className.\n\nContent:\n- One or more list item nodes (listItem) that contain paragraphs or inline content.\n\nSemantics:\n- Represents an unordered list rendered as <ul>.\n- Use when you need bullet points inside a column or blockquote.\n- Do not use bulletList as a top-level child of doc; it belongs inside a column/row structure.\n`.trim();\n\n\n","export const codeBlock = `\nNode: codeBlock\nAttrs:\n- language (optional): string | null (e.g., \"js\", \"ts\", \"python\").\n\nContent:\n- Plain text only (no child nodes); used for preformatted code samples.\n\nSemantics:\n- Renders as <pre><code>…</code></pre>.\n- language controls a CSS class (e.g., \"language-js\") for syntax highlighting.\n- Use when the user explicitly wants a fenced code block, not inline code in a paragraph.\n`.trim();\n\n\n","export const hardBreak = `\nNode: hardBreak\nAttrs:\n- None (HTML-only); behaves like a manual line break.\n\nContent:\n- Inline-only; used within paragraphs or headings.\n\nSemantics:\n- Renders as <br> and as a newline in plain text exports.\n- Use when the user requests a line break without starting a new paragraph.\n`.trim();\n\n\n","export const horizontalRule = `\nNode: horizontalRule\nAttrs:\n- HTML-only; no JSON attrs beyond optional styling via surrounding layout.\n\nContent:\n- No children; this is a self-contained separator.\n\nSemantics:\n- Renders as <hr>.\n- Use to visually separate sections within a slide (for example, between rows of text).\n`.trim();\n\n\n","export const image = `\nNode: image\nAttrs:\n- src (required): string (URL to the image).\n- alt (optional): string (accessibility text).\n- title (optional): string (tooltip / caption).\n- width, height (optional): numbers (px) used as hints for rendering.\n\nContent:\n- No children; this is an atomic inline or block-level image node depending on editor configuration.\n\nSemantics:\n- Renders as a simple <img>, unlike imageBlock which adds rich framing/caption UI.\n- Prefer imageBlock for designed layouts; use image for simple inline images in paragraphs.\n`.trim();\n\n\n","export const heading = `\nNode: heading\nAttrs:\n- level (required): 1 | 2 | 3 | 4 | 5 | 6.\n\nContent:\n- Inline content (text, marks, inline nodes).\n\nSemantics:\n- Renders as <h1>…<h6> depending on level.\n- Use level 1–2 for main slide titles, 3–4 for section headings, 5–6 for subtle labels.\n- Do not invent other attrs; typography/styling should come from className on columns/slides.\n`.trim();\n\n\n","export const paragraph = `\nNode: paragraph\nAttrs:\n- HTML-only; no structured JSON attrs beyond optional styling such as className.\n\nContent:\n- Inline content (text with marks, inline nodes such as image or hardBreak).\n\nSemantics:\n- Default text block inside columns and rows.\n- Multiple paragraphs can be stacked within the same column to create vertical rhythm.\n`.trim();\n\n\n","export const youtube = `\nNode: youtube\nAttrs:\n- src (required): string (public YouTube URL).\n- start (optional): number (start time in seconds).\n- width (optional): number (frame width in px).\n- height (optional): number (frame height in px).\n\nContent:\n- No children; this is an atomic embed node.\n\nSemantics:\n- Renders as an embedded YouTube iframe wrapped in a container <div>.\n- Use for video embeds inside a column or row; keep other text in separate paragraphs/columns.\n- Do not embed raw <iframe> HTML directly; always use the youtube node with attrs.\n`.trim();\n\n\n","export { slides } from \"./slides\";\nexport { flyers } from \"./flyers\";\n\n\n","export const slides = `\nExamples: Slides (full-document output)\n\n{\n \"type\": \"doc\",\n \"content\": [\n {\n \"type\": \"slide\",\n \"attrs\": { \"id\": \"intro\", \"size\": \"16x9\" },\n \"content\": [\n {\n \"type\": \"row\",\n \"attrs\": { \"layout\": \"1-1\" },\n \"content\": [\n { \"type\": \"column\", \"content\": [\n { \"type\": \"heading\", \"attrs\": { \"level\": 2 }, \"content\": [{ \"type\": \"text\", \"text\": \"Welcome\" }] }\n ]},\n { \"type\": \"column\", \"content\": [\n { \"type\": \"imageBlock\", \"attrs\": { \"src\": \"https://picsum.photos/seed/welcome/1200/800\", \"layout\": \"cover\", \"align\": \"center\" } }\n ]}\n ]\n }\n ]\n }\n ]\n}\n\n/* more-slide-examples to be added here */\n`.trim();\n\n\n","export const flyers = `\nExamples: Flyers (A4 slides; full-document output)\n\n{\n \"type\": \"doc\",\n \"content\": [\n {\n \"type\": \"slide\",\n \"attrs\": { \"id\": \"a4-flyer\", \"size\": \"a4-portrait\", \"className\": \"bg-white text-slate-900\" },\n \"content\": [\n {\n \"type\": \"row\",\n \"attrs\": { \"layout\": \"1\" },\n \"content\": [\n { \"type\": \"column\", \"content\": [\n { \"type\": \"heading\", \"attrs\": { \"level\": 2 }, \"content\": [{ \"type\": \"text\", \"text\": \"Event Title\" }] },\n { \"type\": \"paragraph\", \"content\": [{ \"type\": \"text\", \"text\": \"Date · Location\" }] },\n { \"type\": \"imageBlock\", \"attrs\": { \"src\": \"https://picsum.photos/seed/a4/1600/1000\", \"layout\": \"contain\", \"align\": \"center\", \"height\": 320 } }\n ]}\n ]\n }\n ]\n }\n ]\n}\n\n/* more-flyer-examples to be added here */\n`.trim();\n\n\n","export { minimalCreate } from \"./minimalCreate\";\nexport { imageEditing } from \"./imageEditing\";\nexport { all } from \"./all\";\nexport { allSchemas } from \"./allSchemas\";\nexport { allContexts } from \"./allContexts\";\n\n","import { core, fullDocument, slide, row, column, style } from \"../../contexts/v1\";\n\nexport const minimalCreate = [core, fullDocument, slide, row, column, style].join(\"\\n\\n\");\n\n\n","import { core, fullDocument, imageBlock, editingRules } from \"../../contexts/v1\";\n\nexport const imageEditing = [core, fullDocument, imageBlock, editingRules].join(\"\\n\\n\");\n\n\n","import * as ctx from \"../../contexts/v1\";\n\nexport const all = [\n ctx.core,\n ctx.fullDocument,\n ctx.slide,\n ctx.row,\n ctx.column,\n ctx.style,\n ctx.sizing,\n // Core content blocks and media\n ctx.imageBlock,\n ctx.blockquote,\n ctx.bulletList,\n ctx.heading,\n ctx.paragraph,\n ctx.image,\n ctx.codeBlock,\n ctx.hardBreak,\n ctx.horizontalRule,\n ctx.youtube,\n // Editing behavior\n ctx.editingRules,\n].join(\"\\n\\n\");\n\n\n","export { default as imageBlock } from \"./imageBlock.schema.json\";\nexport { default as row } from \"./row.schema.json\";\nexport { default as column } from \"./column.schema.json\";\nexport { default as slide } from \"./slide.schema.json\";\nexport { default as blockquote } from \"./blockquote.schema.json\";\nexport { default as bulletList } from \"./bulletList.schema.json\";\nexport { default as codeBlock } from \"./codeBlock.schema.json\";\nexport { default as hardBreak } from \"./hardBreak.schema.json\";\nexport { default as horizontalRule } from \"./horizontalRule.schema.json\";\nexport { default as image } from \"./image.schema.json\";\nexport { default as heading } from \"./heading.schema.json\";\nexport { default as paragraph } from \"./paragraph.schema.json\";\nexport { default as youtube } from \"./youtube.schema.json\";\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"imageBlock\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"imageBlock\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"src\": { \"type\": \"string\", \"minLength\": 1 },\n \"alt\": { \"type\": \"string\" },\n \"caption\": { \"type\": \"string\" },\n \"credit\": { \"type\": \"string\" },\n \"layout\": { \"enum\": [\"cover\", \"contain\", \"fill\", \"focus\", \"pattern\", null] },\n \"align\": { \"enum\": [\"left\", \"center\", \"right\", \"stretch\", null] },\n \"width\": { \"type\": [\"number\", \"string\", \"null\"] },\n \"height\": { \"type\": [\"number\", \"string\", \"null\"] },\n \"fullBleed\": { \"type\": \"boolean\" },\n \"assetId\": { \"type\": [\"string\", \"null\"] },\n \"focalX\": { \"type\": [\"number\", \"null\"], \"minimum\": 0, \"maximum\": 100 },\n \"focalY\": { \"type\": [\"number\", \"null\"], \"minimum\": 0, \"maximum\": 100 }\n },\n \"required\": [\"src\"],\n \"additionalProperties\": false\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"row\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"row\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"layout\": {\n \"enum\": [\"\", \"1\", \"1-1\", \"2-1\", \"1-2\", \"1-1-1\", \"2-1-1\", \"1-2-1\", \"1-1-2\", \"1-1-1-1\", null]\n },\n \"className\": { \"type\": [\"string\", \"null\"] }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"column\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"column\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"className\": { \"type\": [\"string\", \"null\"] },\n \"contentMode\": { \"enum\": [\"default\", null] },\n \"verticalAlign\": { \"enum\": [\"top\", \"center\", \"bottom\", null] },\n \"horizontalAlign\": { \"enum\": [\"left\", \"center\", \"right\", \"stretch\", null] },\n \"padding\": { \"enum\": [\"none\", null] }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"slide\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"slide\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": [\"string\", \"null\"] },\n \"className\": { \"type\": [\"string\", \"null\"] },\n \"size\": {\n \"enum\": [\n \"16x9\",\n \"4x3\",\n \"a4-portrait\",\n \"a4-landscape\",\n \"letter-portrait\",\n \"letter-landscape\",\n \"linkedin-banner\",\n null\n ]\n }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"blockquote\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"blockquote\" },\n \"attrs\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"bulletList\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"bulletList\" },\n \"attrs\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"codeBlock\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"codeBlock\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"language\": { \"type\": [\"string\", \"null\"] }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"hardBreak\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"hardBreak\" },\n \"attrs\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"horizontalRule\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"horizontalRule\" },\n \"attrs\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"image\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"image\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"src\": { \"type\": [\"string\", \"null\"] },\n \"alt\": { \"type\": [\"string\", \"null\"] },\n \"title\": { \"type\": [\"string\", \"null\"] },\n \"width\": { \"type\": [\"number\", \"null\"] },\n \"height\": { \"type\": [\"number\", \"null\"] }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"heading\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"heading\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"level\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 6\n }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"paragraph\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"paragraph\" },\n \"attrs\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"youtube\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"youtube\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"src\": { \"type\": [\"string\", \"null\"] },\n \"start\": { \"type\": \"number\" },\n \"width\": { \"type\": \"number\" },\n \"height\": { \"type\": \"number\" }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","import * as schemas from \"../../schemas/v1\";\n\n/**\n * Human- and AI-readable bundle of all v1 JSON Schemas.\n *\n * This is intended for:\n * - LLMs that want to see the exact JSON Schema contracts\n * - Tools that want a single text blob containing every schema\n *\n * Each schema is pretty-printed and prefixed with its key name.\n */\nexport const allSchemas = Object.entries(schemas)\n .map(\n ([name, schema]) =>\n `Schema \"${name}\":\\n` + JSON.stringify(schema as unknown, null, 2)\n )\n .join(\"\\n\\n\");\n\n\n\n","import * as ctx from \"../../contexts/v1\";\n\n/**\n * All v1 context atoms concatenated into a single string.\n *\n * Intended for:\n * - LLMs that should know about every supported node type and layout primitive\n * - Power users who want a “maximal” context (structure + nodes + editing rules + sizing)\n */\nexport const allContexts = [\n ctx.core,\n ctx.fullDocument,\n ctx.slide,\n ctx.row,\n ctx.column,\n ctx.style,\n ctx.sizing,\n ctx.imageBlock,\n ctx.blockquote,\n ctx.bulletList,\n ctx.heading,\n ctx.paragraph,\n ctx.image,\n ctx.codeBlock,\n ctx.hardBreak,\n ctx.horizontalRule,\n ctx.youtube,\n ctx.editingRules,\n].join(\"\\n\\n\");\n\n\n\n","export { createSlide } from \"./createSlide\";\nexport { addTwoColumns } from \"./addTwoColumns\";\nexport { editImageToCover } from \"./editImageToCover\";\n\n\n","import { core, fullDocument, slide, row, column } from \"../../contexts/v1\";\n\nexport const createSlide = [\n core,\n fullDocument,\n slide,\n row,\n column,\n `\nReturn a single JSON document that creates one 16x9 slide with a 1-1 row:\n{\n \"type\": \"doc\",\n \"content\": [\n {\n \"type\": \"slide\",\n \"attrs\": { \"size\": \"16x9\" },\n \"content\": [\n { \"type\": \"row\", \"attrs\": { \"layout\": \"1-1\" }, \"content\": [\n { \"type\": \"column\", \"content\": [{ \"type\": \"paragraph\", \"content\": [{ \"type\": \"text\", \"text\": \"Left\" }] }] },\n { \"type\": \"column\", \"content\": [{ \"type\": \"paragraph\", \"content\": [{ \"type\": \"text\", \"text\": \"Right\" }] }] }\n ] }\n ]\n }\n ]\n}\n`.trim(),\n].join(\"\\n\\n\");\n\n\n","import { core, fullDocument, row, column } from \"../../contexts/v1\";\n\nexport const addTwoColumns = [\n core,\n fullDocument,\n row,\n column,\n `\nReturn a full document where the first slide contains a row with layout \"1-1\" and two columns with simple text paragraphs.\n`.trim(),\n].join(\"\\n\\n\");\n\n\n","import { core, fullDocument, imageBlock, editingRules } from \"../../contexts/v1\";\n\nexport const editImageToCover = [\n core,\n fullDocument,\n imageBlock,\n editingRules,\n `\nUpdate an existing imageBlock on the first slide so it uses layout \"cover\" and align \"center\". Preserve all other attributes.\n`.trim(),\n].join(\"\\n\\n\");\n\n\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAclB,KAAK;;;ACdA,IAAM,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA,EAK1B,KAAK;;;ACLA,IAAM,aAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAwBxB,KAAK;;;ACxBA,IAAM,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcjB,KAAK;;;ACdA,IAAM,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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,EAAE,KAAK,MAAM;;;ACxBN,IAAM,gBAAgB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA,KAAK;AACP,EAAE,KAAK,MAAM;;;ACRN,IAAM,mBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA,KAAK;AACP,EAAE,KAAK,MAAM;","names":["v1_exports","v1_exports","v1_exports","v1_exports","v1_exports"]}
|
|
1
|
+
{"version":3,"sources":["../src/contexts/v1/index.ts","../src/contexts/v1/core.ts","../src/contexts/v1/output.fullDocument.ts","../src/contexts/v1/imageBlock.ts","../src/contexts/v1/row.ts","../src/contexts/v1/column.ts","../src/contexts/v1/slide.ts","../src/contexts/v1/style.ts","../src/contexts/v1/editingRules.ts","../src/contexts/v1/sizing.ts","../src/contexts/v1/blockquote.ts","../src/contexts/v1/bulletList.ts","../src/contexts/v1/codeBlock.ts","../src/contexts/v1/hardBreak.ts","../src/contexts/v1/horizontalRule.ts","../src/contexts/v1/image.ts","../src/contexts/v1/heading.ts","../src/contexts/v1/paragraph.ts","../src/contexts/v1/youtube.ts","../src/examples/v1/index.ts","../src/examples/v1/slides.ts","../src/examples/v1/flyers.ts","../src/bundles/v1/index.ts","../src/bundles/v1/minimalCreate.ts","../src/bundles/v1/imageEditing.ts","../src/bundles/v1/all.ts","../src/schemas/v1/index.ts","../src/schemas/v1/imageBlock.schema.json","../src/schemas/v1/row.schema.json","../src/schemas/v1/column.schema.json","../src/schemas/v1/slide.schema.json","../src/schemas/v1/blockquote.schema.json","../src/schemas/v1/bulletList.schema.json","../src/schemas/v1/codeBlock.schema.json","../src/schemas/v1/hardBreak.schema.json","../src/schemas/v1/horizontalRule.schema.json","../src/schemas/v1/image.schema.json","../src/schemas/v1/heading.schema.json","../src/schemas/v1/paragraph.schema.json","../src/schemas/v1/youtube.schema.json","../src/bundles/v1/allSchemas.ts","../src/bundles/v1/allContexts.ts","../src/recipes/v1/index.ts","../src/recipes/v1/createSlide.ts","../src/recipes/v1/addTwoColumns.ts","../src/recipes/v1/editImageToCover.ts"],"sourcesContent":["export { core } from \"./core\";\nexport { fullDocument } from \"./output.fullDocument\";\nexport { imageBlock } from \"./imageBlock\";\nexport { row } from \"./row\";\nexport { column } from \"./column\";\nexport { slide } from \"./slide\";\nexport { style } from \"./style\";\nexport { editingRules } from \"./editingRules\";\nexport { sizing } from \"./sizing\";\nexport { blockquote } from \"./blockquote\";\nexport { bulletList } from \"./bulletList\";\nexport { codeBlock } from \"./codeBlock\";\nexport { hardBreak } from \"./hardBreak\";\nexport { horizontalRule } from \"./horizontalRule\";\nexport { image } from \"./image\";\nexport { heading } from \"./heading\";\nexport { paragraph } from \"./paragraph\";\nexport { youtube } from \"./youtube\";\n\n","export const core = `\n<core>\nYou are given a BlockSlides document to CREATE or EDIT.\n\nDocument shape:\n- doc: { type: \"doc\", content: slide[] }\n- slide: { type: \"slide\", attrs?, content: row[] }\n- row: { type: \"row\", attrs?, content: column[] | block[] }\n- column: { type: \"column\", attrs?, content: (block | row)[] }\n- block: includes nodes like paragraph, heading, imageBlock, etc.\n\nRules:\n- Use only known node types and valid attrs. Do not invent attributes.\n- Prefer stable references: preserve slide.attrs.id if present.\n- Slides and flyers share the same JSON; flyers are slides sized via attrs and theme.\n</core>\n`.trim();\n\n\n","export const fullDocument = `\nOutput contract:\n- Return exactly one JSON object representing the ENTIRE document.\n- No prose, no markdown, no code fences, no comments. JSON only.\n- Include all required attrs. Use allowed enum values only.\n`.trim();\n\n\n","export const imageBlock = `\n<imageBlock>\nNode: imageBlock\nAttrs:\n- src (required): string (URL)\n- alt (optional): string\n- caption (optional): string\n- credit (optional): string\n- layout (optional): \"cover\" | \"contain\" | \"fill\" | \"focus\" | \"pattern\"\n- align (optional): \"left\" | \"center\" | \"right\" | \"stretch\" (default \"center\")\n- width (optional): number (px) or string (\"%\"/\"px\")\n- height (optional): number (px) or string (\"%\"/\"px\")\n- fullBleed (optional): boolean (removes radius; stretches width)\n- assetId (optional): string\n- focalX, focalY (optional): 0–100; spotlight position (when relevant)\n\nBehavior:\n- Numbers for width/height are interpreted as pixels.\n- layout:\n - cover: Fill container; crop edges as needed.\n - contain: Fit entirely; may letterbox.\n - fill: Stretch to container (may distort).\n - focus: Cover + radial spotlight at focalX/focalY.\n - pattern: Hide <img>; use tiled background (from src).\n- Do not set unknown attributes. Preserve existing valid attrs.\n</imageBlock>\n`.trim();\n\n\n","export const row = `\n<row>\nNode: row\nAttrs:\n- layout (optional): \"\", \"1\", \"1-1\", \"2-1\", \"1-2\", \"1-1-1\", \"2-1-1\", \"1-2-1\", \"1-1-2\", \"1-1-1-1\"\n- className (optional): string (CSS classes)\n- backgroundMode (optional): \"none\" | \"color\" | \"image\" | \"imageOverlay\"\n- backgroundColor (optional): string (CSS color for row background)\n- backgroundImage (optional): string (URL for row-level background image)\n- backgroundOverlayColor (optional): string (overlay color when using imageOverlay)\n- backgroundOverlayOpacity (optional): number (0–1, overlay opacity)\n\nSemantics:\n- Fractions determine relative column flex:\n - 1-1: two equal columns\n - 2-1: first column is double width\n - 1-2: second column is double width\n - 1-1-1: three equal columns\n - 1-1-1-1: four equal columns\n- Empty layout (\"\", \"1\") acts as a single full-width column.\n- Use row backgrounds for horizontal bands (e.g., header strip) instead of attaching everything to the slide.\n</row>\n`.trim();\n\n\n","export const column = `\n<column>\nNode: column\nAttrs:\n- className (optional): string\n- contentMode (optional): \"default\" (future-friendly)\n- verticalAlign (optional): \"top\" | \"center\" | \"bottom\" (default \"top\")\n- horizontalAlign (optional): \"left\" | \"center\" | \"right\" | \"stretch\" (default \"left\")\n- padding (optional): \"none\" (future-friendly)\n- backgroundMode (optional): \"none\" | \"color\" | \"image\" | \"imageOverlay\"\n- backgroundColor (optional): string (CSS color for the column background)\n- backgroundImage (optional): string (URL for column-level background image)\n- backgroundOverlayColor (optional): string (overlay color when using imageOverlay)\n- backgroundOverlayOpacity (optional): number (0–1, overlay opacity)\n\nNotes:\n- Use className for spacing, colors, typography (e.g., Tailwind).\n- Keep nesting shallow; columns can contain rows or blocks as needed.\n</column>\n`.trim();\n\n\n","export const slide = `\n<slide>\nNode: slide\nAttrs:\n- id (optional): string (stable identifier; preserve if present)\n- className (optional): string (styling)\n- size (optional): \"16x9\" | \"4x3\" | \"a4-portrait\" | \"a4-landscape\" | \"letter-portrait\" | \"letter-landscape\" | \"linkedin-banner\"\n- backgroundMode (optional): \"none\" | \"color\" | \"image\" | \"imageOverlay\"\n- backgroundColor (optional): string (CSS color for solid backgrounds)\n- backgroundImage (optional): string (URL for slide-level background image)\n- backgroundOverlayColor (optional): string (color for the overlay when using imageOverlay)\n- backgroundOverlayOpacity (optional): number (0–1, opacity for the overlay)\n\nContent:\n- slide contains one or more rows.\n\nNotes:\n- Flyers are slides sized for paper (e.g., size: \"a4-portrait\").\n- Set size to control canvas dimensions; theme applies the exact width/height.\n- For background images, prefer backgroundMode/backgroundImage over Tailwind bg-[url(...)]; the extension will inject the correct CSS.\n</slide>\n`.trim();\n\n\n","export const style = `\n<style>\nStyling\n- Prefer using attrs.className for styling (e.g., Tailwind classes).\n- Use enums for canonical behaviors (e.g., imageBlock.layout).\n- When enums are insufficient (spacing, backgrounds), use className.\n</style>\n`.trim();\n\n\n","export const editingRules = `\n<General editing rules>\n- Preserve existing ids and valid attributes. Do not remove or rename known attrs.\n- Use only allowed enum values. Do not invent new enum values.\n- Avoid introducing new attributes that are not documented. If styling is needed, prefer className.\n- Keep the document valid: slide > row > column > blocks.\n</General editing rules>\n\n<Centering content in a column>\n- Columns are flex containers. Use their alignment attrs instead of per-block hacks.\n- To center all content vertically and horizontally inside a column:\n - Set column.attrs.verticalAlign = \"center\".\n - Set column.attrs.horizontalAlign = \"center\".\n- This will apply to headings, paragraphs, imageBlocks, and other blocks inside that column.\n- Example:\n - Before: column.attrs = { verticalAlign: \"top\", horizontalAlign: \"left\", padding: \"none\" }\n - After: column.attrs = { verticalAlign: \"center\", horizontalAlign: \"center\", padding: \"none\" }\n</Centering content in a column>\n\n<Backgrounds (slides, rows, columns)>\n- Prefer structured background attrs over raw Tailwind bg-[url(...)] when setting background images.\n- For slide-level backgrounds (hero/flyer):\n - Use slide.attrs.backgroundMode = \"color\" | \"image\" | \"imageOverlay\".\n - For images, set slide.attrs.backgroundImage to the image URL.\n - For overlays, set slide.attrs.backgroundOverlayColor (e.g., \"rgba(0,0,0,0.8)\") and slide.attrs.backgroundOverlayOpacity (0–1).\n- For horizontal bands, use row-level backgrounds (row.attrs.background*).\n- For panel-style sections, use column-level backgrounds (column.attrs.background*).\n- Do not mix multiple background images on the same node; prefer one backgroundMode per slide/row/column and layer additional visuals as imageBlock nodes.\n</Backgrounds (slides, rows, columns)>\n\n<Text editing (headings and paragraphs)>\n- Preserve semantic types: do not turn headings into paragraphs or vice versa unless explicitly asked.\n- To change heading level, update heading.attrs.level (1–6) without changing its id.\n- To change the text, edit the text nodes inside content, keeping marks and structure when possible.\n- For alignment of text itself, prefer using the textAlign extension (textAlign: \"left\" | \"center\" | \"right\" | \"justify\") if configured.\n- Do not introduce inline HTML; represent formatting via marks (bold, italic, underline, etc.).\n</Text editing (headings and paragraphs)>\n\n<Image blocks>\n- Use imageBlock for rich images; preserve src, assetId, and metadata unless the user explicitly asks to change them.\n- To change the alignment of an imageBlock within its column, set imageBlock.attrs.align to \"left\", \"center\", \"right\", or \"stretch\".\n- To change how the image is fit, adjust imageBlock.attrs.layout (for example: \"cover\", \"contain\", \"fill\", \"focus\", or a configured layout key).\n- When centering both text and image in a column, combine:\n - column verticalAlign/horizontalAlign for layout, and\n - imageBlock align for how the image itself sits in the column.\n- Do not invent new layout or align values that are not documented in the schema.\n</Image blocks>\n\n`.trim();\n\n\n","export const sizing = `\n<sizing>\nSizing\n- Slides and flyers share the same JSON. Flyers are slides sized via slide.attrs.size and theme rules.\n- Allowed sizes: \"16x9\" | \"4x3\" | \"a4-portrait\" | \"a4-landscape\" | \"letter-portrait\" | \"letter-landscape\" | \"linkedin-banner\".\n- Editors may render with fixed canvases or dynamic mode. The default is fixed; dynamic stretches to container with preserved aspect.\n</sizing>\n`.trim();\n\n\n","export const blockquote = `\n<blockquote>\nNode: blockquote\nAttrs:\n- HTML-only; no required JSON attrs beyond optional styling such as className.\n\nContent:\n- One or more block nodes (typically paragraphs, headings, lists).\n\nSemantics:\n- Use for quoted text or callouts inside a column or row.\n- Styling should be applied via className on the surrounding column/slide, not by inventing new attrs here.\n</blockquote>\n`.trim();\n\n\n","export const bulletList = `\n<bulletList>\nNode: bulletList\nAttrs:\n- HTML-only; no required JSON attrs beyond optional styling such as className.\n\nContent:\n- One or more list item nodes (listItem) that contain paragraphs or inline content.\n\nSemantics:\n- Represents an unordered list rendered as <ul>.\n- Use when you need bullet points inside a column or blockquote.\n- Do not use bulletList as a top-level child of doc; it belongs inside a column/row structure.\n</bulletList>\n`.trim();\n\n\n","export const codeBlock = `\n<codeBlock>\nNode: codeBlock\nAttrs:\n- language (optional): string | null (e.g., \"js\", \"ts\", \"python\").\n\nContent:\n- Plain text only (no child nodes); used for preformatted code samples.\n\nSemantics:\n- Renders as <pre><code>…</code></pre>.\n- language controls a CSS class (e.g., \"language-js\") for syntax highlighting.\n- Use when the user explicitly wants a fenced code block, not inline code in a paragraph.\n</codeBlock>\n`.trim();\n\n\n","export const hardBreak = `\n<hardBreak>\nNode: hardBreak\nAttrs:\n- None (HTML-only); behaves like a manual line break.\n\nContent:\n- Inline-only; used within paragraphs or headings.\n\nSemantics:\n- Renders as <br> and as a newline in plain text exports.\n- Use when the user requests a line break without starting a new paragraph.\n</hardBreak>\n`.trim();\n\n\n","export const horizontalRule = `\n<horizontalRule>\nNode: horizontalRule\nAttrs:\n- HTML-only; no JSON attrs beyond optional styling via surrounding layout.\n\nContent:\n- No children; this is a self-contained separator.\n\nSemantics:\n- Renders as <hr>.\n- Use to visually separate sections within a slide (for example, between rows of text).\n</horizontalRule>\n`.trim();\n\n\n","export const image = `\n<image>\nNode: image\nAttrs:\n- src (required): string (URL to the image).\n- alt (optional): string (accessibility text).\n- title (optional): string (tooltip / caption).\n- width, height (optional): numbers (px) used as hints for rendering.\n\nContent:\n- No children; this is an atomic inline or block-level image node depending on editor configuration.\n\nSemantics:\n- Renders as a simple <img>, unlike imageBlock which adds rich framing/caption UI.\n- Prefer imageBlock for designed layouts; use image for simple inline images in paragraphs.\n</image>\n`.trim();\n\n\n","export const heading = `\n<heading>\nNode: heading\nAttrs:\n- level (required): 1 | 2 | 3 | 4 | 5 | 6.\n\nContent:\n- Inline content (text, marks, inline nodes).\n\nSemantics:\n- Renders as <h1>…<h6> depending on level.\n- Use level 1–2 for main slide titles, 3–4 for section headings, 5–6 for subtle labels.\n- Do not invent other attrs; typography/styling should come from className on columns/slides.\n</heading>\n`.trim();\n\n\n","export const paragraph = `\n<paragraph>\nNode: paragraph\nAttrs:\n- HTML-only; no structured JSON attrs beyond optional styling such as className.\n\nContent:\n- Inline content (text with marks, inline nodes such as image or hardBreak).\n\nSemantics:\n- Default text block inside columns and rows.\n- Multiple paragraphs can be stacked within the same column to create vertical rhythm.\n</paragraph>\n`.trim();\n\n\n","export const youtube = `\n<youtube>\nNode: youtube\nAttrs:\n- src (required): string (public YouTube URL).\n- start (optional): number (start time in seconds).\n- width (optional): number (frame width in px).\n- height (optional): number (frame height in px).\n\nContent:\n- No children; this is an atomic embed node.\n\nSemantics:\n- Renders as an embedded YouTube iframe wrapped in a container <div>.\n- Use for video embeds inside a column or row; keep other text in separate paragraphs/columns.\n- Do not embed raw <iframe> HTML directly; always use the youtube node with attrs.\n</youtube>\n`.trim();\n\n\n","export { slides } from \"./slides\";\nexport { flyers } from \"./flyers\";\n\n\n","export const slides = `\nExamples: Slides (full-document output)\n\n{\n \"type\": \"doc\",\n \"content\": [\n {\n \"type\": \"slide\",\n \"attrs\": { \"id\": \"intro\", \"size\": \"16x9\" },\n \"content\": [\n {\n \"type\": \"row\",\n \"attrs\": { \"layout\": \"1-1\" },\n \"content\": [\n { \"type\": \"column\", \"content\": [\n { \"type\": \"heading\", \"attrs\": { \"level\": 2 }, \"content\": [{ \"type\": \"text\", \"text\": \"Welcome\" }] }\n ]},\n { \"type\": \"column\", \"content\": [\n { \"type\": \"imageBlock\", \"attrs\": { \"src\": \"https://picsum.photos/seed/welcome/1200/800\", \"layout\": \"cover\", \"align\": \"center\" } }\n ]}\n ]\n }\n ]\n }\n ]\n}\n\n/* more-slide-examples to be added here */\n`.trim();\n\n\n","export const flyers = `\nExamples: Flyers (A4 slides; full-document output)\n\n{\n \"type\": \"doc\",\n \"content\": [\n {\n \"type\": \"slide\",\n \"attrs\": { \"id\": \"a4-flyer\", \"size\": \"a4-portrait\", \"className\": \"bg-white text-slate-900\" },\n \"content\": [\n {\n \"type\": \"row\",\n \"attrs\": { \"layout\": \"1\" },\n \"content\": [\n { \"type\": \"column\", \"content\": [\n { \"type\": \"heading\", \"attrs\": { \"level\": 2 }, \"content\": [{ \"type\": \"text\", \"text\": \"Event Title\" }] },\n { \"type\": \"paragraph\", \"content\": [{ \"type\": \"text\", \"text\": \"Date · Location\" }] },\n { \"type\": \"imageBlock\", \"attrs\": { \"src\": \"https://picsum.photos/seed/a4/1600/1000\", \"layout\": \"contain\", \"align\": \"center\", \"height\": 320 } }\n ]}\n ]\n }\n ]\n }\n ]\n}\n\n/* more-flyer-examples to be added here */\n`.trim();\n\n\n","export { minimalCreate } from \"./minimalCreate\";\nexport { imageEditing } from \"./imageEditing\";\nexport { all } from \"./all\";\nexport { allSchemas } from \"./allSchemas\";\nexport { allContexts } from \"./allContexts\";\n\n","import { core, fullDocument, slide, row, column, style } from \"../../contexts/v1\";\n\nexport const minimalCreate = [core, fullDocument, slide, row, column, style].join(\"\\n\\n\");\n\n\n","import { core, fullDocument, imageBlock, editingRules } from \"../../contexts/v1\";\n\nexport const imageEditing = [core, fullDocument, imageBlock, editingRules].join(\"\\n\\n\");\n\n\n","import * as ctx from \"../../contexts/v1\";\n\nexport const all = [\n ctx.core,\n ctx.fullDocument,\n ctx.slide,\n ctx.row,\n ctx.column,\n ctx.style,\n ctx.sizing,\n // Core content blocks and media\n ctx.imageBlock,\n ctx.blockquote,\n ctx.bulletList,\n ctx.heading,\n ctx.paragraph,\n ctx.image,\n ctx.codeBlock,\n ctx.hardBreak,\n ctx.horizontalRule,\n ctx.youtube,\n // Editing behavior\n ctx.editingRules,\n].join(\"\\n\\n\");\n\n\n","export { default as imageBlock } from \"./imageBlock.schema.json\";\nexport { default as row } from \"./row.schema.json\";\nexport { default as column } from \"./column.schema.json\";\nexport { default as slide } from \"./slide.schema.json\";\nexport { default as blockquote } from \"./blockquote.schema.json\";\nexport { default as bulletList } from \"./bulletList.schema.json\";\nexport { default as codeBlock } from \"./codeBlock.schema.json\";\nexport { default as hardBreak } from \"./hardBreak.schema.json\";\nexport { default as horizontalRule } from \"./horizontalRule.schema.json\";\nexport { default as image } from \"./image.schema.json\";\nexport { default as heading } from \"./heading.schema.json\";\nexport { default as paragraph } from \"./paragraph.schema.json\";\nexport { default as youtube } from \"./youtube.schema.json\";\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"imageBlock\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"imageBlock\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"src\": { \"type\": \"string\", \"minLength\": 1 },\n \"alt\": { \"type\": \"string\" },\n \"caption\": { \"type\": \"string\" },\n \"credit\": { \"type\": \"string\" },\n \"layout\": { \"enum\": [\"cover\", \"contain\", \"fill\", \"focus\", \"pattern\", null] },\n \"align\": { \"enum\": [\"left\", \"center\", \"right\", \"stretch\", null] },\n \"width\": { \"type\": [\"number\", \"string\", \"null\"] },\n \"height\": { \"type\": [\"number\", \"string\", \"null\"] },\n \"fullBleed\": { \"type\": \"boolean\" },\n \"assetId\": { \"type\": [\"string\", \"null\"] },\n \"focalX\": { \"type\": [\"number\", \"null\"], \"minimum\": 0, \"maximum\": 100 },\n \"focalY\": { \"type\": [\"number\", \"null\"], \"minimum\": 0, \"maximum\": 100 }\n },\n \"required\": [\"src\"],\n \"additionalProperties\": false\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"row\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"row\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"layout\": {\n \"enum\": [\"\", \"1\", \"1-1\", \"2-1\", \"1-2\", \"1-1-1\", \"2-1-1\", \"1-2-1\", \"1-1-2\", \"1-1-1-1\", null]\n },\n \"className\": { \"type\": [\"string\", \"null\"] },\n \"backgroundMode\": {\n \"enum\": [\"none\", \"color\", \"image\", \"imageOverlay\", null]\n },\n \"backgroundColor\": { \"type\": [\"string\", \"null\"] },\n \"backgroundImage\": { \"type\": [\"string\", \"null\"] },\n \"backgroundOverlayColor\": { \"type\": [\"string\", \"null\"] },\n \"backgroundOverlayOpacity\": { \"type\": [\"number\", \"null\"] }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"column\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"column\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"className\": { \"type\": [\"string\", \"null\"] },\n \"contentMode\": { \"enum\": [\"default\", null] },\n \"verticalAlign\": { \"enum\": [\"top\", \"center\", \"bottom\", null] },\n \"horizontalAlign\": { \"enum\": [\"left\", \"center\", \"right\", \"stretch\", null] },\n \"padding\": { \"enum\": [\"none\", null] },\n \"backgroundMode\": {\n \"enum\": [\"none\", \"color\", \"image\", \"imageOverlay\", null]\n },\n \"backgroundColor\": { \"type\": [\"string\", \"null\"] },\n \"backgroundImage\": { \"type\": [\"string\", \"null\"] },\n \"backgroundOverlayColor\": { \"type\": [\"string\", \"null\"] },\n \"backgroundOverlayOpacity\": { \"type\": [\"number\", \"null\"] }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"slide\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"slide\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": { \"type\": [\"string\", \"null\"] },\n \"className\": { \"type\": [\"string\", \"null\"] },\n \"size\": {\n \"enum\": [\n \"16x9\",\n \"4x3\",\n \"a4-portrait\",\n \"a4-landscape\",\n \"letter-portrait\",\n \"letter-landscape\",\n \"linkedin-banner\",\n null\n ]\n },\n \"backgroundMode\": {\n \"enum\": [\"none\", \"color\", \"image\", \"imageOverlay\", null]\n },\n \"backgroundColor\": { \"type\": [\"string\", \"null\"] },\n \"backgroundImage\": { \"type\": [\"string\", \"null\"] },\n \"backgroundOverlayColor\": { \"type\": [\"string\", \"null\"] },\n \"backgroundOverlayOpacity\": { \"type\": [\"number\", \"null\"] }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"blockquote\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"blockquote\" },\n \"attrs\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"bulletList\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"bulletList\" },\n \"attrs\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"codeBlock\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"codeBlock\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"language\": { \"type\": [\"string\", \"null\"] }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"hardBreak\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"hardBreak\" },\n \"attrs\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"horizontalRule\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"horizontalRule\" },\n \"attrs\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"image\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"image\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"src\": { \"type\": [\"string\", \"null\"] },\n \"alt\": { \"type\": [\"string\", \"null\"] },\n \"title\": { \"type\": [\"string\", \"null\"] },\n \"width\": { \"type\": [\"number\", \"null\"] },\n \"height\": { \"type\": [\"number\", \"null\"] }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"heading\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"heading\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"level\": {\n \"type\": \"integer\",\n \"minimum\": 1,\n \"maximum\": 6\n }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"paragraph\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"paragraph\" },\n \"attrs\": {\n \"type\": \"object\",\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","{\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"title\": \"youtube\",\n \"type\": \"object\",\n \"properties\": {\n \"type\": { \"const\": \"youtube\" },\n \"attrs\": {\n \"type\": \"object\",\n \"properties\": {\n \"src\": { \"type\": [\"string\", \"null\"] },\n \"start\": { \"type\": \"number\" },\n \"width\": { \"type\": \"number\" },\n \"height\": { \"type\": \"number\" }\n },\n \"additionalProperties\": true\n }\n },\n \"required\": [\"type\"],\n \"additionalProperties\": false\n}\n\n\n","import * as schemas from \"../../schemas/v1\";\n\n/**\n * Human- and AI-readable bundle of all v1 JSON Schemas.\n *\n * Wrapped in a top-level <Schemas>…</Schemas> tag, with each schema\n * enclosed in its own <{name}Schema>…</{name}Schema> block.\n */\nexport const allSchemas = `\n<Schemas>\n${Object.entries(schemas)\n .map(\n ([name, schema]) =>\n `<${name}Schema>\\n` +\n JSON.stringify(schema as unknown, null, 2) +\n `\\n</${name}Schema>`\n )\n .join(\"\\n\\n\")}\n</Schemas>\n`.trim();\n\n\n\n","import * as ctx from \"../../contexts/v1\";\n\n/**\n * All v1 context atoms concatenated into a single string,\n * wrapped in a top-level <Context>…</Context> block.\n */\nexport const allContexts = `\n<Context>\n${[\n ctx.core,\n ctx.fullDocument,\n ctx.slide,\n ctx.row,\n ctx.column,\n ctx.style,\n ctx.sizing,\n ctx.imageBlock,\n ctx.blockquote,\n ctx.bulletList,\n ctx.heading,\n ctx.paragraph,\n ctx.image,\n ctx.codeBlock,\n ctx.hardBreak,\n ctx.horizontalRule,\n ctx.youtube,\n ctx.editingRules,\n].join(\"\\n\\n\")}\n</Context>\n`.trim();\n\n\n\n","export { createSlide } from \"./createSlide\";\nexport { addTwoColumns } from \"./addTwoColumns\";\nexport { editImageToCover } from \"./editImageToCover\";\n\n\n","import { core, fullDocument, slide, row, column } from \"../../contexts/v1\";\n\nexport const createSlide = [\n core,\n fullDocument,\n slide,\n row,\n column,\n `\nReturn a single JSON document that creates one 16x9 slide with a 1-1 row:\n{\n \"type\": \"doc\",\n \"content\": [\n {\n \"type\": \"slide\",\n \"attrs\": { \"size\": \"16x9\" },\n \"content\": [\n { \"type\": \"row\", \"attrs\": { \"layout\": \"1-1\" }, \"content\": [\n { \"type\": \"column\", \"content\": [{ \"type\": \"paragraph\", \"content\": [{ \"type\": \"text\", \"text\": \"Left\" }] }] },\n { \"type\": \"column\", \"content\": [{ \"type\": \"paragraph\", \"content\": [{ \"type\": \"text\", \"text\": \"Right\" }] }] }\n ] }\n ]\n }\n ]\n}\n`.trim(),\n].join(\"\\n\\n\");\n\n\n","import { core, fullDocument, row, column } from \"../../contexts/v1\";\n\nexport const addTwoColumns = [\n core,\n fullDocument,\n row,\n column,\n `\nReturn a full document where the first slide contains a row with layout \"1-1\" and two columns with simple text paragraphs.\n`.trim(),\n].join(\"\\n\\n\");\n\n\n","import { core, fullDocument, imageBlock, editingRules } from \"../../contexts/v1\";\n\nexport const editImageToCover = [\n core,\n fullDocument,\n imageBlock,\n editingRules,\n `\nUpdate an existing imageBlock on the first slide so it uses layout \"cover\" and align \"center\". Preserve all other attributes.\n`.trim(),\n].join(\"\\n\\n\");\n\n\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBlB,KAAK;;;AChBA,IAAM,eAAe;AAAA;AAAA;AAAA;AAAA;AAAA,EAK1B,KAAK;;;ACLA,I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AQC,WAAO,EACrB;AAAA,EACC,CAAC,CAAC,MAAM,MAAM,MACZ,IAAI,IAAI;AAAA,IACR,KAAK,UAAU,QAAmB,MAAM,CAAC,IACzC;AAAA,IAAO,IAAI;AACf,EACC,KAAK,MAAM,CAAC;AAAA;AAAA,EAEb,KAAK;;;ACbA,IAAM,cAAc;AAAA;AAAA,EAEzB;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACN,EAAE,KAAK,MAAM,CAAC;AAAA;AAAA,EAEZ,KAAK;;;AC7BP,IAAAC,cAAA;AAAA,SAAAA,aAAA;AAAA;AAAA;AAAA;AAAA;;;ACEO,IAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBA,KAAK;AACP,EAAE,KAAK,MAAM;;;ACxBN,IAAM,gBAAgB;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA,KAAK;AACP,EAAE,KAAK,MAAM;;;ACRN,IAAM,mBAAmB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA,KAAK;AACP,EAAE,KAAK,MAAM;","names":["v1_exports","v1_exports","v1_exports","v1_exports","v1_exports"]}
|
package/package.json
CHANGED
|
@@ -7,6 +7,11 @@ Attrs:
|
|
|
7
7
|
- verticalAlign (optional): "top" | "center" | "bottom" (default "top")
|
|
8
8
|
- horizontalAlign (optional): "left" | "center" | "right" | "stretch" (default "left")
|
|
9
9
|
- padding (optional): "none" (future-friendly)
|
|
10
|
+
- backgroundMode (optional): "none" | "color" | "image" | "imageOverlay"
|
|
11
|
+
- backgroundColor (optional): string (CSS color for the column background)
|
|
12
|
+
- backgroundImage (optional): string (URL for column-level background image)
|
|
13
|
+
- backgroundOverlayColor (optional): string (overlay color when using imageOverlay)
|
|
14
|
+
- backgroundOverlayOpacity (optional): number (0–1, overlay opacity)
|
|
10
15
|
|
|
11
16
|
Notes:
|
|
12
17
|
- Use className for spacing, colors, typography (e.g., Tailwind).
|
|
@@ -17,6 +17,17 @@ export const editingRules = `
|
|
|
17
17
|
- After: column.attrs = { verticalAlign: "center", horizontalAlign: "center", padding: "none" }
|
|
18
18
|
</Centering content in a column>
|
|
19
19
|
|
|
20
|
+
<Backgrounds (slides, rows, columns)>
|
|
21
|
+
- Prefer structured background attrs over raw Tailwind bg-[url(...)] when setting background images.
|
|
22
|
+
- For slide-level backgrounds (hero/flyer):
|
|
23
|
+
- Use slide.attrs.backgroundMode = "color" | "image" | "imageOverlay".
|
|
24
|
+
- For images, set slide.attrs.backgroundImage to the image URL.
|
|
25
|
+
- For overlays, set slide.attrs.backgroundOverlayColor (e.g., "rgba(0,0,0,0.8)") and slide.attrs.backgroundOverlayOpacity (0–1).
|
|
26
|
+
- For horizontal bands, use row-level backgrounds (row.attrs.background*).
|
|
27
|
+
- For panel-style sections, use column-level backgrounds (column.attrs.background*).
|
|
28
|
+
- Do not mix multiple background images on the same node; prefer one backgroundMode per slide/row/column and layer additional visuals as imageBlock nodes.
|
|
29
|
+
</Backgrounds (slides, rows, columns)>
|
|
30
|
+
|
|
20
31
|
<Text editing (headings and paragraphs)>
|
|
21
32
|
- Preserve semantic types: do not turn headings into paragraphs or vice versa unless explicitly asked.
|
|
22
33
|
- To change heading level, update heading.attrs.level (1–6) without changing its id.
|
package/src/contexts/v1/row.ts
CHANGED
|
@@ -4,6 +4,11 @@ Node: row
|
|
|
4
4
|
Attrs:
|
|
5
5
|
- layout (optional): "", "1", "1-1", "2-1", "1-2", "1-1-1", "2-1-1", "1-2-1", "1-1-2", "1-1-1-1"
|
|
6
6
|
- className (optional): string (CSS classes)
|
|
7
|
+
- backgroundMode (optional): "none" | "color" | "image" | "imageOverlay"
|
|
8
|
+
- backgroundColor (optional): string (CSS color for row background)
|
|
9
|
+
- backgroundImage (optional): string (URL for row-level background image)
|
|
10
|
+
- backgroundOverlayColor (optional): string (overlay color when using imageOverlay)
|
|
11
|
+
- backgroundOverlayOpacity (optional): number (0–1, overlay opacity)
|
|
7
12
|
|
|
8
13
|
Semantics:
|
|
9
14
|
- Fractions determine relative column flex:
|
|
@@ -13,6 +18,7 @@ Semantics:
|
|
|
13
18
|
- 1-1-1: three equal columns
|
|
14
19
|
- 1-1-1-1: four equal columns
|
|
15
20
|
- Empty layout ("", "1") acts as a single full-width column.
|
|
21
|
+
- Use row backgrounds for horizontal bands (e.g., header strip) instead of attaching everything to the slide.
|
|
16
22
|
</row>
|
|
17
23
|
`.trim();
|
|
18
24
|
|
package/src/contexts/v1/slide.ts
CHANGED
|
@@ -5,6 +5,11 @@ Attrs:
|
|
|
5
5
|
- id (optional): string (stable identifier; preserve if present)
|
|
6
6
|
- className (optional): string (styling)
|
|
7
7
|
- size (optional): "16x9" | "4x3" | "a4-portrait" | "a4-landscape" | "letter-portrait" | "letter-landscape" | "linkedin-banner"
|
|
8
|
+
- backgroundMode (optional): "none" | "color" | "image" | "imageOverlay"
|
|
9
|
+
- backgroundColor (optional): string (CSS color for solid backgrounds)
|
|
10
|
+
- backgroundImage (optional): string (URL for slide-level background image)
|
|
11
|
+
- backgroundOverlayColor (optional): string (color for the overlay when using imageOverlay)
|
|
12
|
+
- backgroundOverlayOpacity (optional): number (0–1, opacity for the overlay)
|
|
8
13
|
|
|
9
14
|
Content:
|
|
10
15
|
- slide contains one or more rows.
|
|
@@ -12,6 +17,7 @@ Content:
|
|
|
12
17
|
Notes:
|
|
13
18
|
- Flyers are slides sized for paper (e.g., size: "a4-portrait").
|
|
14
19
|
- Set size to control canvas dimensions; theme applies the exact width/height.
|
|
20
|
+
- For background images, prefer backgroundMode/backgroundImage over Tailwind bg-[url(...)]; the extension will inject the correct CSS.
|
|
15
21
|
</slide>
|
|
16
22
|
`.trim();
|
|
17
23
|
|
|
@@ -11,7 +11,14 @@
|
|
|
11
11
|
"contentMode": { "enum": ["default", null] },
|
|
12
12
|
"verticalAlign": { "enum": ["top", "center", "bottom", null] },
|
|
13
13
|
"horizontalAlign": { "enum": ["left", "center", "right", "stretch", null] },
|
|
14
|
-
"padding": { "enum": ["none", null] }
|
|
14
|
+
"padding": { "enum": ["none", null] },
|
|
15
|
+
"backgroundMode": {
|
|
16
|
+
"enum": ["none", "color", "image", "imageOverlay", null]
|
|
17
|
+
},
|
|
18
|
+
"backgroundColor": { "type": ["string", "null"] },
|
|
19
|
+
"backgroundImage": { "type": ["string", "null"] },
|
|
20
|
+
"backgroundOverlayColor": { "type": ["string", "null"] },
|
|
21
|
+
"backgroundOverlayOpacity": { "type": ["number", "null"] }
|
|
15
22
|
},
|
|
16
23
|
"additionalProperties": true
|
|
17
24
|
}
|
|
@@ -10,7 +10,14 @@
|
|
|
10
10
|
"layout": {
|
|
11
11
|
"enum": ["", "1", "1-1", "2-1", "1-2", "1-1-1", "2-1-1", "1-2-1", "1-1-2", "1-1-1-1", null]
|
|
12
12
|
},
|
|
13
|
-
"className": { "type": ["string", "null"] }
|
|
13
|
+
"className": { "type": ["string", "null"] },
|
|
14
|
+
"backgroundMode": {
|
|
15
|
+
"enum": ["none", "color", "image", "imageOverlay", null]
|
|
16
|
+
},
|
|
17
|
+
"backgroundColor": { "type": ["string", "null"] },
|
|
18
|
+
"backgroundImage": { "type": ["string", "null"] },
|
|
19
|
+
"backgroundOverlayColor": { "type": ["string", "null"] },
|
|
20
|
+
"backgroundOverlayOpacity": { "type": ["number", "null"] }
|
|
14
21
|
},
|
|
15
22
|
"additionalProperties": true
|
|
16
23
|
}
|
|
@@ -20,7 +20,14 @@
|
|
|
20
20
|
"linkedin-banner",
|
|
21
21
|
null
|
|
22
22
|
]
|
|
23
|
-
}
|
|
23
|
+
},
|
|
24
|
+
"backgroundMode": {
|
|
25
|
+
"enum": ["none", "color", "image", "imageOverlay", null]
|
|
26
|
+
},
|
|
27
|
+
"backgroundColor": { "type": ["string", "null"] },
|
|
28
|
+
"backgroundImage": { "type": ["string", "null"] },
|
|
29
|
+
"backgroundOverlayColor": { "type": ["string", "null"] },
|
|
30
|
+
"backgroundOverlayOpacity": { "type": ["number", "null"] }
|
|
24
31
|
},
|
|
25
32
|
"additionalProperties": true
|
|
26
33
|
}
|