@openpresentation/opf 0.32.1 → 0.34.0

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.
Files changed (105) hide show
  1. package/README.md +9 -0
  2. package/dist/browser.js +22 -21
  3. package/dist/catalog-refs-CoIrOdAw.d.ts +937 -0
  4. package/dist/{catalog-schemas-LdqOPebq.d.ts → catalog-schemas-FjLRPtjB.d.ts} +10 -4
  5. package/dist/{chart-data-oIZQlFGi.d.ts → chart-data-B_k-WTex.d.ts} +7 -4
  6. package/dist/{chunk-PB7ME64J.js → chunk-244OPLAV.js} +1 -1
  7. package/dist/{chunk-IT7FQKED.js → chunk-2HX4BGAS.js} +6 -6
  8. package/dist/{chunk-2E6CDYL2.js → chunk-36DLVJGW.js} +19 -16
  9. package/dist/{chunk-XQO2CT6Q.js → chunk-3THGTDL2.js} +2 -2
  10. package/dist/{chunk-CLRYHWQN.js → chunk-42JBXJKW.js} +187 -25
  11. package/dist/chunk-BLCDUM7B.js +7 -0
  12. package/dist/{chunk-NVAJASOD.js → chunk-CJVKOJ6B.js} +10195 -2036
  13. package/dist/{chunk-XFHXQCXL.js → chunk-DQ7QYOUV.js} +99 -13
  14. package/dist/{chunk-NEJ32O7X.js → chunk-F6BXO4AI.js} +1 -1
  15. package/dist/{chunk-OXLA4HXQ.js → chunk-FAXO3SUE.js} +1196 -313
  16. package/dist/{chunk-J63CIRIV.js → chunk-FIQMAIZV.js} +4 -4
  17. package/dist/{chunk-PJSPHHRK.js → chunk-FK5XG742.js} +3 -16
  18. package/dist/{chunk-HKUV7NEN.js → chunk-HHVQ2SDT.js} +1 -1
  19. package/dist/{chunk-SZFO3MAJ.js → chunk-HUGVYHZ2.js} +4 -4
  20. package/dist/{chunk-LEF4X4KI.js → chunk-LCT5ZV3Q.js} +2400 -222
  21. package/dist/chunk-NLJFNCZ4.js +1560 -0
  22. package/dist/{chunk-GM7WFPGG.js → chunk-PRXZD2II.js} +6 -1
  23. package/dist/{chunk-YFJIIIOL.js → chunk-QGJVOPLG.js} +3 -3
  24. package/dist/{chunk-F7DN33UL.js → chunk-QGTJF7HV.js} +16 -14
  25. package/dist/{chunk-ONVFUVQ5.js → chunk-RUV7CCE6.js} +136 -31
  26. package/dist/{chunk-SW676APJ.js → chunk-U7TYSPYM.js} +2 -2
  27. package/dist/chunk-UJZN2ZH6.js +1 -0
  28. package/dist/chunk-VDZXNNZF.js +221 -0
  29. package/dist/{chunk-UJSAR6GF.js → chunk-W4DYDRV2.js} +21 -0
  30. package/dist/chunk-WCPDN7AY.js +642 -0
  31. package/dist/{chunk-BBVW5ZC2.js → chunk-WMFT5R7I.js} +2 -2
  32. package/dist/{chunk-AQEAZDL2.js → chunk-XJUMFH33.js} +2 -1
  33. package/dist/{composition-Ds6WHyO7.d.ts → composition-CvtvgBDE.d.ts} +2783 -873
  34. package/dist/composition.d.ts +4 -3
  35. package/dist/composition.js +3 -2
  36. package/dist/{conversion-CdzrTxib.d.ts → conversion-B_5AKTYQ.d.ts} +39 -10
  37. package/dist/conversion-CMBGOTAC.js +25 -0
  38. package/dist/convert.d.ts +5 -4
  39. package/dist/convert.js +17 -13
  40. package/dist/data.d.ts +2 -2
  41. package/dist/data.js +4 -3
  42. package/dist/{deck-report-CKDNQ2t4.d.ts → deck-report-BVlQZ42f.d.ts} +3 -3
  43. package/dist/deck.d.ts +7 -6
  44. package/dist/deck.js +13 -12
  45. package/dist/diagram-engine-eager.js +6 -2
  46. package/dist/diagram-engine-lazy.js +14 -1
  47. package/dist/diagram-plantuml-XRZ6VAOL.js +3 -0
  48. package/dist/diff.js +6 -5
  49. package/dist/docs.js +88 -52
  50. package/dist/examples.js +28745 -18393
  51. package/dist/font-policy.js +2 -2
  52. package/dist/format.js +3 -3
  53. package/dist/ids.js +6 -5
  54. package/dist/index.d.ts +19 -16
  55. package/dist/index.js +37 -26
  56. package/dist/markdown.d.ts +3 -2
  57. package/dist/markdown.js +10 -9
  58. package/dist/node-engine.d.ts +44 -11
  59. package/dist/node-engine.js +47 -28
  60. package/dist/{pagination-DRZ_JNFY.d.ts → pagination-CZQQYk7L.d.ts} +22 -4
  61. package/dist/pagination.d.ts +5 -4
  62. package/dist/pagination.js +6 -5
  63. package/dist/patch.js +5 -4
  64. package/dist/precompiled.js +3 -3
  65. package/dist/{presentation-DnD7mfmf.d.ts → presentation-s9262acV.d.ts} +1172 -208
  66. package/dist/repo-readme.js +2 -2
  67. package/dist/schema-engine-ajv.js +2 -2
  68. package/dist/schema-engine-precompiled.js +3 -3
  69. package/dist/schema.d.ts +3 -3
  70. package/dist/schema.js +5 -4
  71. package/dist/schemas.d.ts +56 -4
  72. package/dist/schemas.js +2 -2
  73. package/dist/shape-catalog.d.ts +98 -0
  74. package/dist/shape-catalog.js +302 -0
  75. package/dist/shape-engine-eager.js +9 -0
  76. package/dist/shape-engine-lazy.js +12 -0
  77. package/dist/shape-engine-module-N74FCHGY.js +3 -0
  78. package/dist/shape-geometry.d.ts +126 -0
  79. package/dist/shape-geometry.js +2 -0
  80. package/dist/source.d.ts +10 -5
  81. package/dist/source.js +12 -11
  82. package/dist/spec/README.md +1 -1
  83. package/dist/spec/reference/engine-vocabularies.json +135 -0
  84. package/dist/spec/reference/font-policy.json +3 -16
  85. package/dist/spec/reference/preset-geometry.json +10699 -0
  86. package/dist/spec/reference/preset-geometry.schema.json +126 -0
  87. package/dist/spec/schemas/catalog-index.schema.json +1 -0
  88. package/dist/spec/schemas/chart-type.schema.json +4 -4
  89. package/dist/spec/schemas/icon-set.schema.json +75 -0
  90. package/dist/spec/schemas/layout.schema.json +82 -23
  91. package/dist/spec/schemas/opf.schema.json +1616 -296
  92. package/dist/spec/schemas/theme.schema.json +11 -5
  93. package/dist/spec-files.d.ts +1 -1
  94. package/dist/spec-files.js +2 -2
  95. package/dist/symbol-font-encodings.js +1 -1
  96. package/dist/types.d.ts +83 -71
  97. package/dist/{validation-types-DxyYPebs.d.ts → validation-types-CYbsUuZ9.d.ts} +8 -5
  98. package/dist/validator.d.ts +35 -7
  99. package/dist/validator.js +5 -4
  100. package/dist/yaml.d.ts +3 -2
  101. package/dist/yaml.js +9 -8
  102. package/package.json +22 -6
  103. package/dist/catalog-refs-kAefsZWT.d.ts +0 -129
  104. package/dist/chunk-DGS47ONG.js +0 -1
  105. package/dist/conversion-5FUDQPED.js +0 -24
@@ -1,7 +1,7 @@
1
- import './chunk-GM7WFPGG.js';
1
+ import './chunk-PRXZD2II.js';
2
2
 
3
3
  // src/generated/repo-readme.ts
4
- var repoReadmeRaw = '<p align="center">\n <picture>\n <source media="(prefers-color-scheme: dark)" srcset="docs/brand/opf-logo-dark.svg">\n <img src="docs/brand/opf-logo.svg" alt="Open Presentation Format" width="64" height="64">\n </picture>\n</p>\n\n# Open Presentation Format (OPF)\n\n[![npm version](https://img.shields.io/npm/v/@openpresentation/opf?label=npm)](https://www.npmjs.com/package/@openpresentation/opf)\n[![npm downloads](https://img.shields.io/npm/dw/@openpresentation/opf)](https://www.npmjs.com/package/@openpresentation/opf)\n[![license](https://img.shields.io/npm/l/@openpresentation/opf)](./LICENSE)\n[![CI](https://github.com/OpenPresentation/opf/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/OpenPresentation/opf/actions/workflows/ci.yml)\n[![nightly](https://github.com/OpenPresentation/opf/actions/workflows/nightly.yml/badge.svg?branch=main)](https://github.com/OpenPresentation/opf/actions/workflows/nightly.yml)\n\nPublic npm package: [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf) (`npm install @openpresentation/opf`).\n\nOpen Presentation Format is the portable, human-readable JSON document format for slide decks.\n\nThis repository is the canonical home for the OPF **spec**, **JSON Schemas**, **catalog presets**, examples, generated developer types, local validation tooling, and integration docs for the render/edit/convert toolkit. OpenPresentation publishes open-source code and documentation only; it does not provide hosted APIs, hosted rendering functions, queues, storage, authentication, jobs, previews, SLAs, telemetry, or managed infrastructure.\n\nFor AI agents, use the [OPF skill set](docs/agent-skills.md) for authoring, layout, presets, editing, export, and schema inspection.\n\nPublished CLI 0.18.0 installs all six skills into your project with `npx @openpresentation/cli@0.18.0 skills install`. It uses local copies, preserves existing instructions and refuses to overwrite customized skills. See the [installation and update guide](docs/agent-skills.md) for personal or agent-specific targets and source development.\n\nFor a fresh Node 24 project that installs **published** packages (not this\ncheckout), follow the [developer quickstart](docs/quickstart.md) and the\n[compatibility matrix](docs/compatibility-matrix.md).\n\nFor LLM authoring, start with [the authoring guide](docs/llm-authoring.md), [dynamic composition](docs/dynamic-composition.md), and [local ecosystem verification](docs/ecosystem-development.md).\n\n## File naming\n\nOpen Presentation Format documents are JSON files. Use `*.opf.json` for complete OPF presentation documents, for example `board-review.opf.json` or `deck.opf.json`.\n\nAvoid using bare `*.opf` for OPF JSON. The `.opf` extension is already used by other document and project formats, while `.opf.json` keeps the OPF identity and still makes the underlying JSON format clear to editors, validators, agents, and version-control tooling.\n\n## Naming and reuse\n\nThe format name is **Open Presentation Format**. The schemas, catalogs, packages, and local tooling in this repository are free and open source under the MIT license, so third-party tools may read, write, validate, render, convert, and describe support for Open Presentation Format without adopting any product-specific branding.\n\n## Why OPF\n\n`.pptx` is a zipped bundle of XML. Humans can\'t diff it, LLMs can\'t read or write it reliably, and git can\'t track it meaningfully. Every change looks like a binary blob.\n\nOPF is plain JSON. A human can open it in an editor. A model can read and write it without guessing at schema-by-example. Decks live in git like the rest of your work.\n\nThat\'s the shift that lets LLMs actually *author* decks. When the format stops fighting them, models can do the work that matters \u2014 narrative structure, persuasive framing, data analysis, chart recommendations, ruthless revision passes \u2014 instead of wrestling with `<p:sp>` tags.\n\nAnd they don\'t start from a blank canvas. [pptx.gallery](https://pptx.gallery) is the human-browsable reference for OPF catalog presets: layouts, themes, color schemes, font schemes, chart types, narratives, audiences, purposes, tones, languages, and social platforms.\n\n## Start in three steps\n\n1. **Install the coordinated published packages** on Node 24. See [the developer quickstart](docs/quickstart.md) for the currently recorded registry pin set: core, renderer, PPTX, editor, CLI and Gallery, all at the shared version 0.26.1. The default catalog is supplied by `@openpresentation/gallery@0.26.1`; see the [compatibility matrix](docs/compatibility-matrix.md) for feature and native limits.\n2. **Author, validate, paginate, preview and export.** New to OPF? Run the [first deck](docs/first-deck/README.md) end to end first. Copy [`docs/quickstart/developer-quickstart.opf.json`](./docs/quickstart/developer-quickstart.opf.json) and run the commands in that guide. From code, `convert("deck.opf.md", "deck.pdf")` of `@openpresentation/opf` is the simple path to a PDF, PNG, SVG or PPTX file. `validate` / `opf validate` is one local checker for format, references, accessibility, layout and content ([guide](docs/validate.md)), not visual verification.\n3. **Know the limits.** PPTX export writes one text box per wrapped line, so text edited in PowerPoint or Keynote does not reflow (see [rich text](docs/rich-text.md)) unless you opt in to `--body-text native` (opf-pptx and CLI 0.22.0 or later), and fonts are named, not embedded. The [compatibility matrix](docs/compatibility-matrix.md) lists shipped APIs versus renderer issue 24, native PowerPoint issue 87, and other deferred work. Browse presets at [pptx.gallery](https://pptx.gallery).\n\nYour deck can live in git from the first commit. After installing dependencies and supplying referenced assets, these commands run locally without a model provider, account or hosted OPF API.\n\n## JavaScript and TypeScript\n\nThe canonical JavaScript/TypeScript package is published at [`packages/javascript`](./packages/javascript) as [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf). The schema is pre-stable (0.x \u2014 expect breaking changes between minor versions until 1.0). Its responsibility is local and format-level only:\n\n- export the canonical schemas from [`spec/`](./spec)\n- register the pptx.gallery catalog of [`@openpresentation/gallery`](./packages/gallery) (a dependency, released with core at the same version) as the Node defaults, as the CLI does; a browser host registers it itself\n- export a typed raw spec file manifest for package-addressable `spec/` content\n- generate TypeScript types, with `Presentation` as the top-level type\n- validate OPF JSON and catalog records locally\n\nIn Node (and Bun and Deno) its root also reads and writes files (`convert`, `open`, `save`) and draws them through the optional engines below; in a browser or a worker the same import is a browser-safe build with the same names, where those three reject with `node-only`. Every other entry runs in a browser. It does not generate content with AI, fetch remote catalogs, call hosted APIs, or provide managed services. Render/edit/convert packages live in this repository as separate MIT packages that depend on `@openpresentation/opf`. The format package also exposes pure composition geometry so those packages share layout behavior.\n\n## Toolkit libraries\n\nOPF is seven packages. **Core** (`@openpresentation/opf`) is the format and its API: it reads and writes the text formats (JSON, YAML, Markdown) and validates, and in Node reads and writes files, through the same import. **The gallery** (`@openpresentation/gallery`) is the pptx.gallery catalog of layouts, themes, colour and font schemes and the other records, released with the other packages; core depends on it and registers it in Node. **The CLI** (`@openpresentation/cli`) is the `opf` command. **The MCP server** (`@openpresentation/mcp`, `npx -y @openpresentation/mcp`) lets an MCP-native agent learn OPF (docs, schemas, catalog, examples and skills as resources) and validate and convert decks. **Render** (`opf-render`), **PPTX** (`opf-pptx`) and **the editor** (`opf-editor`) are the engines: drawing, PowerPoint and editing, installed as needed. All seven live in this repository (`packages/`) and are released together at one version. See [ecosystem development](docs/ecosystem-development.md) for local builds and verification, and [dynamic composition](docs/dynamic-composition.md) for portable layout rules.\n\n| Package | Role | Boundary |\n|---|---|---|\n| [`packages/javascript`](./packages/javascript) (`@openpresentation/opf`) | Core: format, schemas, validation, composition | The format and its API; reads and writes files in Node and draws through the optional engines |\n| [`packages/gallery`](./packages/gallery) (`@openpresentation/gallery`) | The pptx.gallery catalog | Catalog records only, no runtime dependency; records are authored by pull request here, and a changed drawing or a removed record needs a minor release |\n| [`packages/cli`](./packages/cli) (`@openpresentation/cli`) | `opf` command | Runs core\'s Node engine: reads and writes files and calls the engines below as optional peers |\n| [`packages/render`](./packages/render) (`@openpresentation/opf-render`) | OPF to SVG/PNG/PDF | Local and embeddable rendering library |\n| [`packages/editor`](./packages/editor) (`@openpresentation/opf-editor`) | WYSIWYG bindings/components | Headless editor primitives plus optional UI components |\n| [`packages/pptx`](./packages/pptx) (`@openpresentation/opf-pptx`) | OPF to PPTX and PPTX to OPF | Pure local import/export library for browser and server use where supported |\n\nThese packages provide OSS primitives only. Downstream applications own hosting, auth, storage, collaboration, queues, previews, analytics, support, and workflow UX.\n\n## Usage\n\nInstall from npm:\n\n```sh\npnpm add @openpresentation/opf\n# or: npm install @openpresentation/opf\n```\n\nTo work on the packages, clone this repo and build the workspace (all seven packages are in `packages/`; see [CONTRIBUTING](./CONTRIBUTING.md)):\n\n```sh\npnpm install\npnpm build\n```\n\nUse the format package from JavaScript or TypeScript:\n\n```ts\nimport { presentation, validate } from "@openpresentation/opf";\nimport { gallery } from "@openpresentation/gallery";\n\nimport type { Presentation } from "@openpresentation/opf";\n\nconst deck: Presentation = {\n name: "Quarterly Review",\n slides: [{ title: "Quarterly Review", items: ["Revenue", "Product", "Hiring"] }],\n};\n\nconst report = validate(deck);\nconsole.log(report.valid); // no finding has severity "error"\nconsole.log(report.findings); // every finding: rule id, severity, category, JSON Pointer path, message, fixes\n// Core ships no catalog records; in Node, validate registers the gallery when a call names no catalogs, and a host may name its own.\nconsole.log(validate({ ...deck, design: { theme: "classic" } }, { catalogs: [gallery] }).valid);\nconsole.log(Object.keys(gallery.audiences).length);\n```\n\nConvert, open and save files in Node with `@openpresentation/opf`, the same import a browser uses (the engines `@openpresentation/opf-render` and `@openpresentation/opf-pptx` are optional peers, installed as needed; see [OPF files in Node](docs/node.md)):\n\n```ts\nimport * as opf from "@openpresentation/opf";\n\nawait opf.convert("deck.opf.md", "deck.pdf");\nconst deck = await opf.open("deck.opf.md");\ndeck.slides.push({ title: "Q4" });\nawait opf.save(deck, "deck.opf.md");\nconst { files } = await opf.convert(deck, { format: "pptx" }); // bytes, nothing written\n```\n\nUse focused imports when you only need one surface:\n\n```ts\nimport { presentation } from "@openpresentation/opf/schemas";\nimport { specFileEntries } from "@openpresentation/opf/spec-files";\nimport { validate } from "@openpresentation/opf/validator";\nimport type { Presentation } from "@openpresentation/opf/types";\n```\n\nUse raw JSON when an engine or resolver needs package-addressable files:\n\n```ts\nimport presentationSchema from "@openpresentation/opf/spec/schemas/opf.schema.json" with {\n type: "json",\n};\n```\n\nUse the [installable OPF CLI](./packages/cli/README.md) to create, validate, and edit files locally:\n\n```sh\npnpm --filter @openpresentation/cli build\nnode packages/cli/dist/index.js create deck.opf.json --title "Decision brief"\nnode packages/cli/dist/index.js validate deck.opf.json\nnode packages/cli/dist/index.js edit deck.opf.json --patch changes.json --in-place\n```\n\nSee [CSV and JSON data import](./docs/data-import.md) for editable tables and charts in the editor, CLI, and package API, and [content conversions](./docs/conversions.md) for the pure converters (`@openpresentation/opf/convert`) that change a block\'s kind, nest list items, restructure a slide and split or merge slides, and [Markdown and outlines](./docs/markdown.md) for the deterministic Markdown dialect (`@openpresentation/opf/markdown`, `opf convert deck.md deck.opf.json`) that reads and writes a whole deck as text.\n\n[OPF as YAML](./docs/yaml.md) describes the strict YAML form of a deck (`@openpresentation/opf/yaml`, `opf convert deck.opf.json deck.opf.yaml`, `.opf.yaml` files in every command, editor autocomplete); JSON stays the canonical form. A deck can equally be a Markdown file, `deck.opf.md`: every command reads and writes it (see [Markdown decks in every command](./docs/markdown.md#markdown-decks-in-every-command)), and `parse` / `stringify` read and write a deck in JSON, YAML or Markdown with one call.\n\nSee [Templates and variables](./docs/templates-and-variables.md) for fillable OPF templates: typed variables, `{{id}}` tokens, `opf fill` and `resolveVariables`.\n\n## Layout\n\n| Path | Contents |\n|---|---|\n| [`spec/schemas/opf.schema.json`](./spec/schemas/opf.schema.json) | Canonical JSON Schema for top-level OPF `Presentation` documents. |\n| [`docs/how-opf-works.md`](./docs/how-opf-works.md) | Conceptual introduction: the document model, content shapes, catalog resolution, and the validation philosophy. Start here. |\n| [`docs/slide-design-principles.md`](./docs/slide-design-principles.md) | Timeless principles for slide layout, typography, spacing, visual balance, and reviewing layout defaults. |\n| [`docs/design-resolution.md`](./docs/design-resolution.md) | The design precedence algorithm (slide design \u2192 deck design \u2192 resolved theme \u2192 engine defaults) with worked examples. |\n| [`docs/schema-reference.md`](./docs/schema-reference.md) | Author-facing reference for top-level OPF fields and every presentation schema `$defs` object/type. |\n| [`docs/slide-sizes.md`](./docs/slide-sizes.md) | OPF\'s slide-size presets in inches, points and EMU, how they compare with PowerPoint\'s presets, and what PPTX export and import do with them. |\n| [`docs/catalog-schema-reference.md`](./docs/catalog-schema-reference.md) | Author-facing reference for every companion catalog schema. |\n| [`docs/content-payloads.md`](./docs/content-payloads.md) | Author-facing notes for slide and region content payloads, including chart and table object shapes. |\n| [`docs/diagrams.md`](./docs/diagrams.md) | Mermaid diagrams as a content kind: when to use one, the supported families, how the deck styles and sizes them, accessibility, export and limits. |\n| [`docs/footnotes-citations-captions.md`](./docs/footnotes-citations-captions.md) | Citations (`cite`), inline footnotes, the deck `references` list, captions on images, charts, tables and videos, and how every engine draws them. |\n| [`docs/examples.md`](./docs/examples.md) | Guide to the expanded scenario-oriented examples under `examples/gallery/`. |\n| [`docs/live-editor.md`](./docs/live-editor.md) | Browser canvas, live OPF editing, font loading, published packages, and current fidelity limits. |\n| [`docs/release-process.md`](./docs/release-process.md) | Maintainer runbook for the one-click release: gate, tag, trusted npm publishing of all seven packages, verification, GitHub release notes, and the site bumps. |\n| [`spec/schemas/*.schema.json`](./spec/schemas) | Companion schemas for catalog records and sub-objects. |\n| [`packages/gallery`](./packages/gallery) (`@openpresentation/gallery`) | The default catalog and layout previews, released with the other packages. |\n| [`spec/openapi.yaml`](./spec/openapi.yaml) | Optional reference OpenAPI contract for downstream services that choose to expose OPF over HTTP. OpenPresentation does not host this API. |\n| [`examples/technical/`](./examples/technical) | Focused OPF fixtures for validator, renderer, catalog-resolution, design, content-payload, and region behavior. |\n| [`examples/gallery/`](./examples/gallery) | Broader OPF example decks organized by industry, function, education, government, presentation type, international, and design/media scenarios. |\n| [`packages/javascript/`](./packages/javascript) | Public pre-stable source for `@openpresentation/opf`. |\n| [`packages/cli/`](./packages/cli) | Installable local CLI for creating, validating, editing, and inspecting OPF. |\n| [`legacy/`](./legacy) | Tombstone for service-specific clients, CLIs, tool integrations, and workflows removed from the OpenPresentation OSS repo. |\n\n## OpenPresentation Boundary\n\nOpenPresentation defines the format, bundled presets, local validation, examples, docs, and planned local render/edit/convert libraries. It does not provide hosted functions or managed product surfaces.\n\nFuture non-JavaScript OPF packages should follow the same local-first boundary: Python and Go packages should expose schemas, types/models, catalogs, validation, and package-addressable assets. Future toolkit packages should expose embeddable library APIs with no required network calls, hosted callbacks, hidden telemetry, or managed infrastructure assumptions.\n\nThe published JavaScript package copies package-addressable OPF schemas, catalogs, reference assets, and the optional reference `spec/openapi.yaml` from `spec/`. It intentionally remains `@openpresentation/opf` instead of introducing a separate `@openpresentation/opf-spec` package so downstream imports can advance by semver-pinning one canonical package.\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n';
4
+ var repoReadmeRaw = '<p align="center">\n <picture>\n <source media="(prefers-color-scheme: dark)" srcset="docs/brand/opf-logo-dark.svg">\n <img src="docs/brand/opf-logo.svg" alt="Open Presentation Format" width="64" height="64">\n </picture>\n</p>\n\n# Open Presentation Format (OPF)\n\n[![npm version](https://img.shields.io/npm/v/@openpresentation/opf?label=npm)](https://www.npmjs.com/package/@openpresentation/opf)\n[![npm downloads](https://img.shields.io/npm/dw/@openpresentation/opf)](https://www.npmjs.com/package/@openpresentation/opf)\n[![license](https://img.shields.io/npm/l/@openpresentation/opf)](./LICENSE)\n[![CI](https://github.com/OpenPresentation/opf/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/OpenPresentation/opf/actions/workflows/ci.yml)\n[![nightly](https://github.com/OpenPresentation/opf/actions/workflows/nightly.yml/badge.svg?branch=main)](https://github.com/OpenPresentation/opf/actions/workflows/nightly.yml)\n\nPublic npm package: [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf) (`npm install @openpresentation/opf`).\n\nOpen Presentation Format is the portable, human-readable JSON document format for slide decks.\n\nThis repository is the canonical home for the OPF **spec**, **JSON Schemas**, **catalog presets**, examples, generated developer types, local validation tooling, and integration docs for the render/edit/convert toolkit. OpenPresentation publishes open-source code and documentation. The engine runs in the caller\u2019s environment; hosts choose their own rendering, storage and application infrastructure. The [MCP server](docs/mcp.md) has local stdio and hosted transport options, with viewer availability determined separately by the client and deployment.\n\nFor AI agents, use the [OPF skill set](docs/agent-skills.md) for authoring, layout, presets, editing, export, and schema inspection.\n\nThe published CLI installs all six skills into your project with `npx @openpresentation/cli skills install`. It uses local copies, preserves existing instructions and refuses to overwrite customized skills. See the [installation and update guide](docs/agent-skills.md) for personal or agent-specific targets and source development.\n\nFor a fresh Node 24 project that installs **published** packages (not this\ncheckout), follow the [developer quickstart](docs/quickstart.md) and the\n[compatibility matrix](docs/compatibility-matrix.md).\n\nFor LLM authoring, start with [the authoring guide](docs/llm-authoring.md), [dynamic composition](docs/dynamic-composition.md), and [local ecosystem verification](docs/ecosystem-development.md).\n\n## File naming\n\nOpen Presentation Format documents are JSON files. Use `*.opf.json` for complete OPF presentation documents, for example `board-review.opf.json` or `deck.opf.json`.\n\nAvoid using bare `*.opf` for OPF JSON. The `.opf` extension is already used by other document and project formats, while `.opf.json` keeps the OPF identity and still makes the underlying JSON format clear to editors, validators, agents, and version-control tooling.\n\n## Naming and reuse\n\nThe format name is **Open Presentation Format**. The schemas, catalogs, packages, and local tooling in this repository are free and open source under the MIT license, so third-party tools may read, write, validate, render, convert, and describe support for Open Presentation Format without adopting any product-specific branding.\n\n## Why OPF\n\n`.pptx` is a zipped bundle of XML. Humans can\'t diff it, LLMs can\'t read or write it reliably, and git can\'t track it meaningfully. Every change looks like a binary blob.\n\nOPF is plain JSON. A human can open it in an editor. A model can read and write it without guessing at schema-by-example. Decks live in git like the rest of your work.\n\nThat\'s the shift that lets LLMs actually *author* decks. When the format stops fighting them, models can do the work that matters \u2014 narrative structure, persuasive framing, data analysis, chart recommendations, ruthless revision passes \u2014 instead of wrestling with `<p:sp>` tags.\n\nAnd they don\'t start from a blank canvas. [pptx.gallery](https://pptx.gallery) is the human-browsable reference for OPF catalog presets: layouts, themes, color schemes, font schemes, chart types, narratives, audiences, purposes, tones, languages, and social platforms.\n\n## Start in three steps\n\n1. **Install the coordinated published packages** on Node 24. See [the developer quickstart](docs/quickstart.md) for the registry-derived pin set: core, renderer, PPTX, editor, CLI and Gallery use one completed shared release, retained with `--save-exact` and the lockfile. The optional seventh package, `@openpresentation/mcp`, supplies the [MCP server and viewer](docs/mcp.md). The default catalog is supplied by the matching `@openpresentation/gallery` release; see the [compatibility matrix](docs/compatibility-matrix.md) for feature and native limits.\n2. **Author, validate, paginate, preview and export.** New to OPF? Run the [first deck](docs/first-deck/README.md) end to end first. Copy [`docs/quickstart/developer-quickstart.opf.json`](./docs/quickstart/developer-quickstart.opf.json) and run the commands in that guide. From code, `convert("deck.opf.md", "deck.pdf")` of `@openpresentation/opf` is the simple path to a PDF, PNG, SVG or PPTX file. `validate` / `opf validate` is one local checker for format, references, accessibility, layout and content ([guide](docs/validate.md)), not visual verification.\n3. **Know the limits.** PPTX export writes one text box per wrapped line, so text edited in PowerPoint or Keynote does not reflow (see [rich text](docs/rich-text.md)) unless you opt in to `--body-text native` (opf-pptx and CLI 0.22.0 or later), and fonts are named, not embedded. The [compatibility matrix](docs/compatibility-matrix.md) lists shipped APIs versus renderer issue 24, native PowerPoint issue 87, and other deferred work. Browse presets at [pptx.gallery](https://pptx.gallery).\n\nYour deck can live in git from the first commit. After installing dependencies and supplying referenced assets, these commands run locally without a model provider, account or hosted OPF API.\n\n## JavaScript and TypeScript\n\nThe canonical JavaScript/TypeScript package is published at [`packages/javascript`](./packages/javascript) as [`@openpresentation/opf`](https://www.npmjs.com/package/@openpresentation/opf). The schema is pre-stable (0.x \u2014 expect breaking changes between minor versions until 1.0). Its responsibility is local and format-level only:\n\n- export the canonical schemas from [`spec/`](./spec)\n- register the pptx.gallery catalog of [`@openpresentation/gallery`](./packages/gallery) (a dependency, released with core at the same version) as the Node defaults, as the CLI does; a browser host registers it itself\n- export a typed raw spec file manifest for package-addressable `spec/` content\n- generate TypeScript types, with `Presentation` as the top-level type\n- validate OPF JSON and catalog records locally\n\nIn Node (and Bun and Deno) its root also reads and writes files (`convert`, `open`, `save`) and draws them through the optional engines below; in a browser or a worker the same import is a browser-safe build with the same names, where those three reject with `node-only`. Every other entry runs in a browser. It does not generate content with AI, fetch remote catalogs, call hosted APIs, or provide managed services. Render/edit/convert packages live in this repository as separate MIT packages that depend on `@openpresentation/opf`. The format package also exposes pure composition geometry so those packages share layout behavior.\n\n## Toolkit libraries\n\nOPF is seven packages. **Core** (`@openpresentation/opf`) is the format and its API: it reads and writes the text formats (JSON, YAML, Markdown) and validates, and in Node reads and writes files, through the same import. **The gallery** (`@openpresentation/gallery`) is the pptx.gallery catalog of layouts, themes, color and font schemes and the other records, released with the other packages; core depends on it and registers it in Node. **The CLI** (`@openpresentation/cli`) is the `opf` command. **The MCP server** (`@openpresentation/mcp`, `npx -y @openpresentation/mcp`) lets an MCP-native agent learn OPF (docs, schemas, catalog, examples and skills as resources) and validate and convert decks. **Render** (`opf-render`), **PPTX** (`opf-pptx`) and **the editor** (`opf-editor`) are the engines: drawing, PowerPoint and editing, installed as needed. All seven live in this repository (`packages/`) and are released together at one version. See [ecosystem development](docs/ecosystem-development.md) for local builds and verification, and [dynamic composition](docs/dynamic-composition.md) for portable layout rules.\n\n| Package | Role | Boundary |\n|---|---|---|\n| [`packages/javascript`](./packages/javascript) (`@openpresentation/opf`) | Core: format, schemas, validation, composition | The format and its API; reads and writes files in Node and draws through the optional engines |\n| [`packages/gallery`](./packages/gallery) (`@openpresentation/gallery`) | The pptx.gallery catalog | Catalog records only, no runtime dependency; records are authored by pull request here, and a changed drawing or a removed record needs a minor release |\n| [`packages/cli`](./packages/cli) (`@openpresentation/cli`) | `opf` command | Runs core\'s Node engine: reads and writes files and calls the engines below as optional peers |\n| [`packages/mcp`](./packages/mcp) (`@openpresentation/mcp`) | MCP server and viewer | Docs, schemas, catalog lookup, validation, conversion and `show_deck` for MCP clients |\n| [`packages/render`](./packages/render) (`@openpresentation/opf-render`) | OPF to SVG/PNG/PDF | Local and embeddable rendering library |\n| [`packages/editor`](./packages/editor) (`@openpresentation/opf-editor`) | WYSIWYG bindings/components | Headless editor primitives plus optional UI components |\n| [`packages/pptx`](./packages/pptx) (`@openpresentation/opf-pptx`) | OPF to PPTX and PPTX to OPF | Pure local import/export library for browser and server use where supported |\n\nThese packages provide OSS primitives only. Downstream applications own hosting, auth, storage, collaboration, queues, previews, analytics, support, and workflow UX.\n\n## Usage\n\nInstall from npm:\n\n```sh\npnpm add @openpresentation/opf\n# or: npm install @openpresentation/opf\n```\n\nTo work on the packages, clone this repo and build the workspace (all seven packages are in `packages/`; see [CONTRIBUTING](./CONTRIBUTING.md)):\n\n```sh\npnpm install\npnpm build\n```\n\nUse the format package from JavaScript or TypeScript:\n\n```ts\nimport { presentation, validate } from "@openpresentation/opf";\nimport { gallery } from "@openpresentation/gallery";\n\nimport type { Presentation } from "@openpresentation/opf";\n\nconst deck: Presentation = {\n name: "Quarterly Review",\n slides: [{ title: "Quarterly Review", items: ["Revenue", "Product", "Hiring"] }],\n};\n\nconst report = validate(deck);\nconsole.log(report.valid); // no finding has severity "error"\nconsole.log(report.findings); // every finding: rule id, severity, category, JSON Pointer path, message, fixes\n// Core ships no catalog records; in Node, validate registers the gallery when a call names no catalogs, and a host may name its own.\nconsole.log(validate({ ...deck, design: { theme: "classic" } }, { catalogs: [gallery] }).valid);\nconsole.log(Object.keys(gallery.audiences).length);\n```\n\nConvert, open and save files in Node with `@openpresentation/opf`, the same import a browser uses (the engines `@openpresentation/opf-render` and `@openpresentation/opf-pptx` are optional peers, installed as needed; see [OPF files in Node](docs/node.md)):\n\n```ts\nimport * as opf from "@openpresentation/opf";\n\nawait opf.convert("deck.opf.md", "deck.pdf");\nconst deck = await opf.open("deck.opf.md");\ndeck.slides.push({ title: "Q4" });\nawait opf.save(deck, "deck.opf.md");\nconst { files } = await opf.convert(deck, { format: "pptx" }); // bytes, nothing written\n```\n\nUse focused imports when you only need one surface:\n\n```ts\nimport { presentation } from "@openpresentation/opf/schemas";\nimport { specFileEntries } from "@openpresentation/opf/spec-files";\nimport { validate } from "@openpresentation/opf/validator";\nimport type { Presentation } from "@openpresentation/opf/types";\n```\n\nUse raw JSON when an engine or resolver needs package-addressable files:\n\n```ts\nimport presentationSchema from "@openpresentation/opf/spec/schemas/opf.schema.json" with {\n type: "json",\n};\n```\n\nUse the [installable OPF CLI](./packages/cli/README.md) to create, validate, and edit files locally:\n\n```sh\npnpm --filter @openpresentation/cli build\nnode packages/cli/dist/index.js create deck.opf.json --title "Decision brief"\nnode packages/cli/dist/index.js validate deck.opf.json\nnode packages/cli/dist/index.js edit deck.opf.json --patch changes.json --in-place\n```\n\nSee [CSV and JSON data import](./docs/data-import.md) for editable tables and charts in the editor, CLI, and package API, and [content conversions](./docs/conversions.md) for the pure converters (`@openpresentation/opf/convert`) that change a block\'s kind, nest list items, restructure a slide and split or merge slides, and [Markdown and outlines](./docs/markdown.md) for the deterministic Markdown dialect (`@openpresentation/opf/markdown`, `opf convert deck.md deck.opf.json`) that reads and writes a whole deck as text.\n\n[OPF as YAML](./docs/yaml.md) describes the strict YAML form of a deck (`@openpresentation/opf/yaml`, `opf convert deck.opf.json deck.opf.yaml`, `.opf.yaml` files in every command, editor autocomplete); JSON stays the canonical form. A deck can equally be a Markdown file, `deck.opf.md`: every command reads and writes it (see [Markdown decks in every command](./docs/markdown.md#markdown-decks-in-every-command)), and `parse` / `stringify` read and write a deck in JSON, YAML or Markdown with one call.\n\nSee [Templates and variables](./docs/templates-and-variables.md) for fillable OPF templates: typed variables, `{{id}}` tokens, `opf fill` and `resolveVariables`.\n\n## Layout\n\n| Path | Contents |\n|---|---|\n| [`spec/schemas/opf.schema.json`](./spec/schemas/opf.schema.json) | Canonical JSON Schema for top-level OPF `Presentation` documents. |\n| [`docs/how-opf-works.md`](./docs/how-opf-works.md) | Conceptual introduction: the document model, content shapes, catalog resolution, and the validation philosophy. Start here. |\n| [`docs/slide-design-principles.md`](./docs/slide-design-principles.md) | Timeless principles for slide layout, typography, spacing, visual balance, and reviewing layout defaults. |\n| [`docs/design-resolution.md`](./docs/design-resolution.md) | The design precedence algorithm (slide design \u2192 deck design \u2192 resolved theme \u2192 engine defaults) with worked examples. |\n| [`docs/schema-reference.md`](./docs/schema-reference.md) | Author-facing reference for top-level OPF fields and every presentation schema `$defs` object/type. |\n| [`docs/slide-sizes.md`](./docs/slide-sizes.md) | OPF\'s slide-size presets in inches, points and EMU, how they compare with PowerPoint\'s presets, and what PPTX export and import do with them. |\n| [`docs/catalog-schema-reference.md`](./docs/catalog-schema-reference.md) | Author-facing reference for every companion catalog schema. |\n| [`docs/content-payloads.md`](./docs/content-payloads.md) | Author-facing notes for slide and region content payloads, including chart and table object shapes. |\n| [`docs/diagrams.md`](./docs/diagrams.md) | Mermaid, Graphviz DOT and PlantUML diagrams as a content kind: when to use one, the supported families, how the deck styles and sizes them, accessibility, export (native PowerPoint shapes by default) and limits. |\n| [`docs/shapes.md`](./docs/shapes.md) | Shapes: the 187 DrawingML presets as blocks, custom outlines, slide overlays and connectors, and how PowerPoint export and import carry them. |\n| [`docs/shape-effects.md`](./docs/shape-effects.md) | The six shape effects (shadow, glow, reflection, soft edge, blur, 3-D) and how each engine draws them. |\n| [`docs/smartart.md`](./docs/smartart.md) | The pyramid, matrix, cycle, chevrons, flow and vertical-flow layouts: live SmartArt in PowerPoint where it holds the text, native shapes elsewhere. |\n| [`docs/icons.md`](./docs/icons.md) | Icons on list entries, metrics and groups, icon cards, and the Lucide and Tabler icon sets in `@openpresentation/gallery/icon-sets`. |\n| [`docs/mcp.md`](./docs/mcp.md) | The MCP server (`npx -y @openpresentation/mcp`): tools, resources, and `show_deck`, which opens the OPF viewer in clients such as Claude. |\n| [`docs/footnotes-citations-captions.md`](./docs/footnotes-citations-captions.md) | Citations (`cite`), inline footnotes, the deck `references` list, captions on images, charts, tables and videos, and how every engine draws them. |\n| [`docs/examples.md`](./docs/examples.md) | Guide to the expanded scenario-oriented examples under `examples/gallery/`. |\n| [`docs/live-editor.md`](./docs/live-editor.md) | Browser canvas, live OPF editing, font loading, published packages, and current fidelity limits. |\n| [`docs/release-process.md`](./docs/release-process.md) | Maintainer runbook for the one-click release: gate, tag, trusted npm publishing of all seven packages, verification, GitHub release notes, and the site bumps. |\n| [`spec/schemas/*.schema.json`](./spec/schemas) | Companion schemas for catalog records and sub-objects. |\n| [`packages/gallery`](./packages/gallery) (`@openpresentation/gallery`) | The default catalog and layout previews, released with the other packages. |\n| [`spec/openapi.yaml`](./spec/openapi.yaml) | Optional reference OpenAPI contract for downstream services that choose to expose OPF over HTTP. OpenPresentation does not host this API. |\n| [`examples/technical/`](./examples/technical) | Focused OPF fixtures for validator, renderer, catalog-resolution, design, content-payload, and region behavior. |\n| [`examples/gallery/`](./examples/gallery) | Broader OPF example decks organized by industry, function, education, government, presentation type, international, and design/media scenarios. |\n| [`packages/javascript/`](./packages/javascript) | Public pre-stable source for `@openpresentation/opf`. |\n| [`packages/cli/`](./packages/cli) | Installable local CLI for creating, validating, editing, and inspecting OPF. |\n| [`legacy/`](./legacy) | Tombstone for service-specific clients, CLIs, tool integrations, and workflows removed from the OpenPresentation OSS repo. |\n\n## OpenPresentation Boundary\n\nOpenPresentation defines the format, bundled presets, local validation, examples, docs, and planned local render/edit/convert libraries. It does not provide hosted functions or managed product surfaces.\n\nFuture non-JavaScript OPF packages should follow the same local-first boundary: Python and Go packages should expose schemas, types/models, catalogs, validation, and package-addressable assets. Future toolkit packages should expose embeddable library APIs with no required network calls, hosted callbacks, hidden telemetry, or managed infrastructure assumptions.\n\nThe published JavaScript package copies package-addressable OPF schemas, catalogs, reference assets, and the optional reference `spec/openapi.yaml` from `spec/`. It intentionally remains `@openpresentation/opf` instead of introducing a separate `@openpresentation/opf-spec` package so downstream imports can advance by semver-pinning one canonical package.\n\n## License\n\nMIT. See [LICENSE](./LICENSE).\n';
5
5
 
6
6
  // src/repo-readme.ts
7
7
  var repoReadme = repoReadmeRaw;
@@ -1,7 +1,7 @@
1
1
  import { installedSchemaEngine } from './chunk-43JWUIGF.js';
2
2
  import { qualifyBranch } from './chunk-JBARNYFR.js';
3
- import { schemas } from './chunk-LEF4X4KI.js';
4
- import './chunk-GM7WFPGG.js';
3
+ import { schemas } from './chunk-LCT5ZV3Q.js';
4
+ import './chunk-PRXZD2II.js';
5
5
  import Ajv2020 from 'ajv/dist/2020.js';
6
6
  import addFormats from 'ajv-formats';
7
7
 
@@ -1,3 +1,3 @@
1
- export { precompiledMarker, schemaEngine } from './chunk-DGS47ONG.js';
2
- import './chunk-LEF4X4KI.js';
3
- import './chunk-GM7WFPGG.js';
1
+ export { precompiledMarker, schemaEngine } from './chunk-UJZN2ZH6.js';
2
+ import './chunk-LCT5ZV3Q.js';
3
+ import './chunk-PRXZD2II.js';
package/dist/schema.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { C as CatalogRecordKind } from './catalog-schemas-LdqOPebq.js';
1
+ import { C as CatalogRecordKind } from './catalog-schemas-FjLRPtjB.js';
2
2
  import { SchemaName } from './schemas.js';
3
- import './catalog-refs-kAefsZWT.js';
3
+ import './catalog-refs-CoIrOdAw.js';
4
4
  import './json-BFSdESOE.js';
5
5
 
6
6
  /**
@@ -79,7 +79,7 @@ declare const COMMON_KEYS: Readonly<{
79
79
  }>;
80
80
  /** The sort position of a key that is in no `COMMON_KEYS` list. */
81
81
  declare const UNRANKED_PRIORITY = 1000000;
82
- /** Whether a slide key is a promoted region (`left`, `top+middle`, `top+middle:left+center`, ...): 48 keys of the slide schema, all `advanced`. */
82
+ /** Whether a slide key is a promoted region (`start`, `top+middle`, `top+middle:start+center`, ...): 48 keys of the slide schema, all `advanced`. */
83
83
  declare function isPromotedRegionKey(key: string): boolean;
84
84
 
85
85
  interface EnumValue {
package/dist/schema.js CHANGED
@@ -1,5 +1,6 @@
1
- export { COMMON_KEYS, UNRANKED_PRIORITY, activeSchema, catalogKindAt, createSchemaValue, describeField, isPromotedRegionKey, listSchemaFields, resolveSchema, schemaAtPath, schemaCatalogKinds, schemaLabel, schemaType, schemaVariants, splitOpfPath } from './chunk-OXLA4HXQ.js';
1
+ export { COMMON_KEYS, UNRANKED_PRIORITY, activeSchema, catalogKindAt, createSchemaValue, describeField, isPromotedRegionKey, listSchemaFields, resolveSchema, schemaAtPath, schemaCatalogKinds, schemaLabel, schemaType, schemaVariants, splitOpfPath } from './chunk-FAXO3SUE.js';
2
2
  import './chunk-JBARNYFR.js';
3
- import './chunk-LEF4X4KI.js';
4
- import './chunk-NVAJASOD.js';
5
- import './chunk-GM7WFPGG.js';
3
+ import './chunk-LCT5ZV3Q.js';
4
+ import './chunk-CJVKOJ6B.js';
5
+ import './chunk-BLCDUM7B.js';
6
+ import './chunk-PRXZD2II.js';
package/dist/schemas.d.ts CHANGED
@@ -4,6 +4,8 @@ declare const presentation: JsonSchemaDocument & {
4
4
  readonly $defs: {
5
5
  readonly "Assets": JsonObject;
6
6
  readonly "Asset": JsonObject;
7
+ readonly "ImagePayload": JsonObject;
8
+ readonly "ImageCallout": JsonObject;
7
9
  readonly "Audience": JsonObject;
8
10
  readonly "Purpose": JsonObject;
9
11
  readonly "Language": JsonObject;
@@ -21,6 +23,7 @@ declare const presentation: JsonSchemaDocument & {
21
23
  readonly "ThemeBackgroundSlot": JsonObject;
22
24
  readonly "HexColor": JsonObject;
23
25
  readonly "ColorRef": JsonObject;
26
+ readonly "ColorTransform": JsonObject;
24
27
  readonly "Variables": JsonObject;
25
28
  readonly "Variable": JsonObject;
26
29
  readonly "ColorVariable": JsonObject;
@@ -42,7 +45,18 @@ declare const presentation: JsonSchemaDocument & {
42
45
  readonly "ImageFocus": JsonObject;
43
46
  readonly "Overlay": JsonObject;
44
47
  readonly "ImagePlacement": JsonObject;
45
- readonly "ImageBorder": JsonObject;
48
+ readonly "Stroke": JsonObject;
49
+ readonly "Arrowhead": JsonObject;
50
+ readonly "Gradient": JsonObject;
51
+ readonly "Pattern": JsonObject;
52
+ readonly "ShapeFill": JsonObject;
53
+ readonly "ShapePreset": JsonObject;
54
+ readonly "ShapePath": JsonObject;
55
+ readonly "ShapePadding": JsonObject;
56
+ readonly "Shadow": JsonObject;
57
+ readonly "InnerShadow": JsonObject;
58
+ readonly "Glow": JsonObject;
59
+ readonly "Reflection": JsonObject;
46
60
  readonly "ImageRecolor": JsonObject;
47
61
  readonly "PatternBackground": JsonObject;
48
62
  readonly "OrganizationLogo": JsonObject;
@@ -50,7 +64,13 @@ declare const presentation: JsonSchemaDocument & {
50
64
  readonly "Watermark": JsonObject;
51
65
  readonly "HeaderFooter": JsonObject;
52
66
  readonly "HeaderFooterItem": JsonObject;
67
+ readonly "OverlayShape": JsonObject;
68
+ readonly "OverlayAnchor": JsonObject;
69
+ readonly "Connector": JsonObject;
53
70
  readonly "Slide": JsonObject;
71
+ readonly "ImageBlockOption": JsonObject;
72
+ readonly "ImageOrShapeBlockOption": JsonObject;
73
+ readonly "ShapeBlockOption": JsonObject;
54
74
  readonly "ContentPayload": JsonObject;
55
75
  readonly "Quote": JsonObject;
56
76
  readonly "Code": JsonObject;
@@ -66,6 +86,9 @@ declare const presentation: JsonSchemaDocument & {
66
86
  readonly "TextRun": JsonObject;
67
87
  readonly "Caption": JsonObject;
68
88
  readonly "Reference": JsonObject;
89
+ readonly "FiniteNumber": JsonObject;
90
+ readonly "Line": JsonObject;
91
+ readonly "ChartReferenceLine": JsonObject;
69
92
  readonly "Chart": JsonObject;
70
93
  readonly "ChartAxisTitles": JsonObject;
71
94
  readonly "ChartHighlight": JsonObject;
@@ -89,6 +112,8 @@ declare const presentation: JsonSchemaDocument & {
89
112
  readonly "TableCellBorder": JsonObject;
90
113
  readonly "Catalogs": JsonObject;
91
114
  readonly "CatalogGroup": JsonObject;
115
+ readonly "IconReference": JsonObject;
116
+ readonly "Icons": JsonObject;
92
117
  readonly "CatalogSource": JsonObject;
93
118
  readonly "CatalogRecords": JsonObject;
94
119
  readonly "CatalogReference": JsonObject;
@@ -137,11 +162,14 @@ declare const colorScheme: JsonSchemaDocument & {
137
162
  };
138
163
  };
139
164
  declare const fontScheme: JsonSchemaDocument;
165
+ declare const iconSet: JsonSchemaDocument;
140
166
  declare const schemas: {
141
167
  readonly presentation: JsonSchemaDocument & {
142
168
  readonly $defs: {
143
169
  readonly "Assets": JsonObject;
144
170
  readonly "Asset": JsonObject;
171
+ readonly "ImagePayload": JsonObject;
172
+ readonly "ImageCallout": JsonObject;
145
173
  readonly "Audience": JsonObject;
146
174
  readonly "Purpose": JsonObject;
147
175
  readonly "Language": JsonObject;
@@ -159,6 +187,7 @@ declare const schemas: {
159
187
  readonly "ThemeBackgroundSlot": JsonObject;
160
188
  readonly "HexColor": JsonObject;
161
189
  readonly "ColorRef": JsonObject;
190
+ readonly "ColorTransform": JsonObject;
162
191
  readonly "Variables": JsonObject;
163
192
  readonly "Variable": JsonObject;
164
193
  readonly "ColorVariable": JsonObject;
@@ -180,7 +209,18 @@ declare const schemas: {
180
209
  readonly "ImageFocus": JsonObject;
181
210
  readonly "Overlay": JsonObject;
182
211
  readonly "ImagePlacement": JsonObject;
183
- readonly "ImageBorder": JsonObject;
212
+ readonly "Stroke": JsonObject;
213
+ readonly "Arrowhead": JsonObject;
214
+ readonly "Gradient": JsonObject;
215
+ readonly "Pattern": JsonObject;
216
+ readonly "ShapeFill": JsonObject;
217
+ readonly "ShapePreset": JsonObject;
218
+ readonly "ShapePath": JsonObject;
219
+ readonly "ShapePadding": JsonObject;
220
+ readonly "Shadow": JsonObject;
221
+ readonly "InnerShadow": JsonObject;
222
+ readonly "Glow": JsonObject;
223
+ readonly "Reflection": JsonObject;
184
224
  readonly "ImageRecolor": JsonObject;
185
225
  readonly "PatternBackground": JsonObject;
186
226
  readonly "OrganizationLogo": JsonObject;
@@ -188,7 +228,13 @@ declare const schemas: {
188
228
  readonly "Watermark": JsonObject;
189
229
  readonly "HeaderFooter": JsonObject;
190
230
  readonly "HeaderFooterItem": JsonObject;
231
+ readonly "OverlayShape": JsonObject;
232
+ readonly "OverlayAnchor": JsonObject;
233
+ readonly "Connector": JsonObject;
191
234
  readonly "Slide": JsonObject;
235
+ readonly "ImageBlockOption": JsonObject;
236
+ readonly "ImageOrShapeBlockOption": JsonObject;
237
+ readonly "ShapeBlockOption": JsonObject;
192
238
  readonly "ContentPayload": JsonObject;
193
239
  readonly "Quote": JsonObject;
194
240
  readonly "Code": JsonObject;
@@ -204,6 +250,9 @@ declare const schemas: {
204
250
  readonly "TextRun": JsonObject;
205
251
  readonly "Caption": JsonObject;
206
252
  readonly "Reference": JsonObject;
253
+ readonly "FiniteNumber": JsonObject;
254
+ readonly "Line": JsonObject;
255
+ readonly "ChartReferenceLine": JsonObject;
207
256
  readonly "Chart": JsonObject;
208
257
  readonly "ChartAxisTitles": JsonObject;
209
258
  readonly "ChartHighlight": JsonObject;
@@ -227,6 +276,8 @@ declare const schemas: {
227
276
  readonly "TableCellBorder": JsonObject;
228
277
  readonly "Catalogs": JsonObject;
229
278
  readonly "CatalogGroup": JsonObject;
279
+ readonly "IconReference": JsonObject;
280
+ readonly "Icons": JsonObject;
230
281
  readonly "CatalogSource": JsonObject;
231
282
  readonly "CatalogRecords": JsonObject;
232
283
  readonly "CatalogReference": JsonObject;
@@ -275,6 +326,7 @@ declare const schemas: {
275
326
  };
276
327
  };
277
328
  readonly fontScheme: JsonSchemaDocument;
329
+ readonly iconSet: JsonSchemaDocument;
278
330
  readonly finding: JsonSchemaDocument & {
279
331
  readonly $defs: {
280
332
  readonly "FindingSeverity": JsonObject;
@@ -289,7 +341,7 @@ declare const schemas: {
289
341
  };
290
342
  };
291
343
  };
292
- declare const schemaNames: readonly ["presentation", "audience", "purpose", "tone", "theme", "layout", "chartType", "narrative", "socialPlatform", "language", "colorScheme", "fontScheme", "finding"];
344
+ declare const schemaNames: readonly ["presentation", "audience", "purpose", "tone", "theme", "layout", "chartType", "narrative", "socialPlatform", "language", "colorScheme", "fontScheme", "iconSet", "finding"];
293
345
  type SchemaName = keyof typeof schemas;
294
346
  /** One entry per bundled schema: its name, spec-relative file path, and parsed document. */
295
347
  interface SchemaEntry {
@@ -299,5 +351,5 @@ interface SchemaEntry {
299
351
  }
300
352
  declare const schemaEntries: readonly SchemaEntry[];
301
353
 
302
- export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone };
354
+ export { audience, chartType, colorScheme, fontScheme, iconSet, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone };
303
355
  export type { SchemaEntry, SchemaName };
package/dist/schemas.js CHANGED
@@ -1,2 +1,2 @@
1
- export { audience, chartType, colorScheme, fontScheme, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-LEF4X4KI.js';
2
- import './chunk-GM7WFPGG.js';
1
+ export { audience, chartType, colorScheme, fontScheme, iconSet, language, layout, narrative, presentation, purpose, schemaEntries, schemaNames, schemas, socialPlatform, theme, tone } from './chunk-LCT5ZV3Q.js';
2
+ import './chunk-PRXZD2II.js';
@@ -0,0 +1,98 @@
1
+ import { ShapeGeometry } from './shape-geometry.js';
2
+
3
+ /**
4
+ * The shape catalog (shapes SH-06): the 187 DrawingML presets as PowerPoint's Insert > Shapes gallery groups them, with the common words people search by. Pure data and functions, no geometry: the editor's shape picker and the MCP's
5
+ * `search_shapes` draw their thumbnails from `presetGeometry` (`@openpresentation/opf/shape-geometry`) and `shapeThumbnail` here.
6
+ * Edge-safe (no Node import). The names are DrawingML's own (ECMA-376 `ST_ShapeType`).
7
+ */
8
+
9
+ /** The groups of PowerPoint's Insert > Shapes gallery, in its order (Recently Used is a host's own list). */
10
+ declare const SHAPE_CATEGORIES: readonly [{
11
+ readonly id: "lines";
12
+ readonly title: "Lines";
13
+ }, {
14
+ readonly id: "rectangles";
15
+ readonly title: "Rectangles";
16
+ }, {
17
+ readonly id: "basic";
18
+ readonly title: "Basic Shapes";
19
+ }, {
20
+ readonly id: "blockArrows";
21
+ readonly title: "Block Arrows";
22
+ }, {
23
+ readonly id: "equations";
24
+ readonly title: "Equation Shapes";
25
+ }, {
26
+ readonly id: "flowchart";
27
+ readonly title: "Flowchart";
28
+ }, {
29
+ readonly id: "starsBanners";
30
+ readonly title: "Stars and Banners";
31
+ }, {
32
+ readonly id: "callouts";
33
+ readonly title: "Callouts";
34
+ }, {
35
+ readonly id: "actionButtons";
36
+ readonly title: "Action Buttons";
37
+ }];
38
+ type ShapeCategoryId = (typeof SHAPE_CATEGORIES)[number]["id"];
39
+ interface ShapeCatalogEntry {
40
+ /** The DrawingML preset name, the value of a shape block's `shape`. */
41
+ name: string;
42
+ category: ShapeCategoryId;
43
+ /** Common words people search by ('speech bubble', 'cylinder', 'cog'), besides the words of the two names. */
44
+ keywords: readonly string[];
45
+ }
46
+ /** The catalog, in the order of PowerPoint's gallery (each group in turn). */
47
+ declare const SHAPE_CATALOG: readonly ShapeCatalogEntry[];
48
+ /** The catalog entry of a preset name, or undefined. */
49
+ declare function shapeCatalogEntry(name: string): ShapeCatalogEntry | undefined;
50
+ /** The presets of one gallery group, in the gallery's order. */
51
+ declare function shapesInCategory(category: ShapeCategoryId): ShapeCatalogEntry[];
52
+ interface ShapeSearchOptions {
53
+ /** Only this gallery group. */
54
+ category?: ShapeCategoryId;
55
+ /** At most this many results (default all). */
56
+ limit?: number;
57
+ }
58
+ interface ShapeSearchResult {
59
+ entry: ShapeCatalogEntry;
60
+ /** Higher ranks first; ties keep the gallery's order. */
61
+ score: number;
62
+ }
63
+ /**
64
+ * Search the presets by DrawingML name (`rightArrow`) and common words (`speech bubble`, `arrow`, `star`,
65
+ * `flowchart`, `database`). Every word of the query must match: a whole name word ranks above a prefix, a name above a
66
+ * keyword above the group's title, and a query that is a preset's own name comes first. A plural matches its singular. An empty query
67
+ * lists the catalog (or the group) in the gallery's order.
68
+ */
69
+ declare function searchShapeCatalog(query?: string, options?: ShapeSearchOptions): ShapeSearchResult[];
70
+ interface ShapeThumbnailPath {
71
+ d: string;
72
+ /** `solid` is the shape's fill, `light` and `dark` its shaded parts, `none` a stroke-only path. */
73
+ fill: "solid" | "light" | "dark" | "none";
74
+ stroke: boolean;
75
+ }
76
+ interface ShapeThumbnail {
77
+ /** The SVG `viewBox`: the frame, grown to hold an outline that reaches past it (a callout's tail, a brace). */
78
+ viewBox: string;
79
+ paths: ShapeThumbnailPath[];
80
+ }
81
+ /**
82
+ * A small drawing of a preset from its geometry (`presetGeometry(name, width, height)`): the paths with their fill role and the `viewBox` that
83
+ * holds the frame and every outline. The geometry is in the frame's own units, so the thumbnail is as sharp at any size.
84
+ */
85
+ declare function shapeThumbnail(geometry: ShapeGeometry, width: number, height: number): ShapeThumbnail;
86
+ interface ShapeThumbnailSvgOptions {
87
+ /** Outline color (default `currentColor`). */
88
+ stroke?: string;
89
+ /** Fill color (default `currentColor` at 18% opacity). */
90
+ fill?: string;
91
+ /** Outline width in the frame's units (default a fiftieth of the longer side). */
92
+ strokeWidth?: number;
93
+ }
94
+ /** A standalone `<svg>` string of a thumbnail (the MCP's `search_shapes` returns it). No script, no external reference. */
95
+ declare function shapeThumbnailSvg(geometry: ShapeGeometry, width: number, height: number, options?: ShapeThumbnailSvgOptions): string;
96
+
97
+ export { SHAPE_CATALOG, SHAPE_CATEGORIES, searchShapeCatalog, shapeCatalogEntry, shapeThumbnail, shapeThumbnailSvg, shapesInCategory };
98
+ export type { ShapeCatalogEntry, ShapeCategoryId, ShapeSearchOptions, ShapeSearchResult, ShapeThumbnail, ShapeThumbnailPath, ShapeThumbnailSvgOptions };