@pptx-editor.dev/editor-api 0.1.0 → 0.3.0-canary.20261108032713.sha-58e17f1
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/LICENSE.md +9 -9
- package/README.md +9 -4
- package/dist/browser.d.ts +7 -2
- package/dist/browser.js +6 -194
- package/dist/chunk-4LV64HZP.js +6 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +6 -184
- package/dist/{server-JicDsBGe.d.ts → server-BVGx60kW.d.ts} +5 -0
- package/package.json +2 -2
- package/dist/browser.js.map +0 -1
- package/dist/chunk-BULCTJVY.js +0 -8894
- package/dist/chunk-BULCTJVY.js.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/*\nCopyright (c) 2026 EigenPal, Inc. All rights reserved.\nLicensed under the EigenPal Pro Evaluation License 1.0 — see packages/editor-api/LICENSE.md.\nProduction use requires a commercial agreement: licensing@eigenpal.com\n*/\n/**\n * Presentation automation for PPTX: a batching object model over the PPTX Editor engine.\n *\n * Work is described against proxy objects, and nothing reaches the presentation until\n * `context.sync()`, which sends the queued calls as one atomic batch: all of it applies, or none\n * of it. Reading a property that no `load` asked for is an error, not a silent `undefined`.\n *\n * This entry needs no browser. It opens PPTX bytes, drives them, and saves them back, so a\n * server, a worker, or a build script can use the whole API.\n *\n * @example Edit a presentation on a server\n * ```ts\n * import { PptxEditor } from '@pptx-editor.dev/editor-api';\n *\n * const runtime = await PptxEditor.createServer(bytes);\n * try {\n * await runtime.run(async (context) => {\n * const slide = context.presentation.slides.getItemAt(0);\n * const box = slide.shapes.addTextBox('Quarterly results', { left: 40, top: 40, width: 400 });\n * box.textFrame.textRange.font.bold = true;\n * await context.sync();\n * });\n * const edited = await runtime.save();\n * } finally {\n * runtime.dispose();\n * }\n * ```\n *\n * The API shape follows a documented subset of the Office.js presentation object model. It is\n * not Office.js, it does not run in an add-in host, and every type in it is authored here.\n *\n * @packageDocumentation\n */\n\nimport { createServer, type CreateServerOptions } from './runtime/server.ts';\nimport type { PptxEditorServerRuntime } from './runtime/runtime.ts';\n\nexport * from './runtime/public.ts';\n\n/**\n * The entry point, as much of it as works without an editor. Import from\n * `@pptx-editor.dev/editor-api/browser` for the same object plus `createBrowser`.\n *\n * @public\n */\nexport interface PptxEditorNamespace {\n /** A runtime over PPTX bytes. It also offers `save()`. */\n createServer(bytes: Uint8Array, options?: CreateServerOptions): Promise<PptxEditorServerRuntime>;\n}\n\n/**\n * The entry point: open a presentation and get a runtime to work against.\n *\n * @example\n * ```ts\n * const runtime = await PptxEditor.createServer(bytes);\n * const titles = await runtime.run(async (context) => {\n * const slides = context.presentation.slides;\n * slides.load('items');\n * await context.sync();\n * const shapes = slides.items.map((slide) => slide.shapes.getItemAt(0).load('name'));\n * await context.sync();\n * return shapes.map((shape) => shape.name);\n * });\n * ```\n *\n * @public\n */\nexport const PptxEditor: PptxEditorNamespace = Object.freeze({ createServer });\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEO,IAAM,aAAkC,OAAO,OAAO,EAAE,aAAa,CAAC;","names":[]}
|