@pptx-editor.dev/editor-api 0.0.1-placeholder → 0.1.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.
@@ -0,0 +1,72 @@
1
+ import { C as CreateServerOptions, a as PptxEditorServerRuntime } from './server-JicDsBGe.js';
2
+ export { A as AddSlideOptions, b as Adjustments, c as Application, B as Binding, d as BindingCollection, e as BindingType, f as Border, g as BorderProperties, h as Borders, i as BulletFormat, j as BulletStyle, k as BulletType, l as ClientObject, m as ClientRequestContext, n as ClientResult, o as ConnectorType, p as CustomProperty, q as CustomPropertyCollection, r as CustomXmlPart, s as CustomXmlPartCollection, t as CustomXmlPartScopedCollection, D as DocumentProperties, u as DocumentPropertyType, F as FillProperties, v as FontProperties, G as GeometricShapeType, H as Hyperlink, w as HyperlinkAddOptions, x as HyperlinkCollection, y as HyperlinkScopedCollection, z as HyperlinkType, I as InsertSlideFormatting, E as InsertSlideOptions, L as LoadOption, J as LoadPropertyOptions, K as LoadQueryOptions, M as Margins, N as PageSetup, O as ParagraphFormat, Q as ParagraphHorizontalAlignment, R as PlaceholderFormat, S as PlaceholderType, T as PptxEditorDebugInfo, U as PptxEditorError, V as PptxEditorErrorCode, W as PptxEditorErrorInit, X as PptxEditorInnerError, P as PptxEditorRuntime, Y as Presentation, Z as PresentationCapabilities, _ as RequestContext, $ as RequestContextDebugInfo, a0 as RunCallback, a1 as Shape, a2 as ShapeAddOptions, a3 as ShapeAutoSize, a4 as ShapeCollection, a5 as ShapeFill, a6 as ShapeFillType, a7 as ShapeFont, a8 as ShapeFontUnderlineStyle, a9 as ShapeGetImageFormatType, aa as ShapeGetImageOptions, ab as ShapeGroup, ac as ShapeLineDashStyle, ad as ShapeLineFormat, ae as ShapeLineStyle, af as ShapeScopedCollection, ag as ShapeType, ah as ShapeZOrder, ai as Slide, aj as SlideBackground, ak as SlideBackgroundFill, al as SlideBackgroundFillType, am as SlideBackgroundGradientFill, an as SlideBackgroundGradientFillOptions, ao as SlideBackgroundGradientFillType, ap as SlideBackgroundPatternFill, aq as SlideBackgroundPatternFillOptions, ar as SlideBackgroundPatternFillType, as as SlideBackgroundPictureOrTextureFill, at as SlideBackgroundPictureOrTextureFillOptions, au as SlideBackgroundSolidFill, av as SlideBackgroundSolidFillOptions, aw as SlideCollection, ax as SlideGetImageOptions, ay as SlideLayout, az as SlideLayoutBackground, aA as SlideLayoutCollection, aB as SlideLayoutType, aC as SlideMaster, aD as SlideMasterBackground, aE as SlideMasterCollection, aF as SlideScopedCollection, aG as Table, aH as TableAddOptions, aI as TableCell, aJ as TableCellBorders, aK as TableCellCollection, aL as TableCellMargins, aM as TableCellProperties, aN as TableClearOptions, aO as TableColumn, aP as TableColumnCollection, aQ as TableColumnProperties, aR as TableMergedAreaProperties, aS as TableRow, aT as TableRowCollection, aU as TableRowProperties, aV as TableStyle, aW as TableStyleSettings, aX as Tag, aY as TagCollection, aZ as TextFrame, a_ as TextRange, a$ as TextRun, b0 as TextVerticalAlignment, b1 as ThemeColor, b2 as ThemeColorScheme, b3 as TrackedObjects, b4 as isPptxEditorError } from './server-JicDsBGe.js';
3
+ import '@pptx-editor.dev/core/automation';
4
+ import '@pptx-editor.dev/core/editor';
5
+ import '@pptx-editor.dev/core/layout';
6
+
7
+ /**
8
+ * Presentation automation for PPTX: a batching object model over the PPTX Editor engine.
9
+ *
10
+ * Work is described against proxy objects, and nothing reaches the presentation until
11
+ * `context.sync()`, which sends the queued calls as one atomic batch: all of it applies, or none
12
+ * of it. Reading a property that no `load` asked for is an error, not a silent `undefined`.
13
+ *
14
+ * This entry needs no browser. It opens PPTX bytes, drives them, and saves them back, so a
15
+ * server, a worker, or a build script can use the whole API.
16
+ *
17
+ * @example Edit a presentation on a server
18
+ * ```ts
19
+ * import { PptxEditor } from '@pptx-editor.dev/editor-api';
20
+ *
21
+ * const runtime = await PptxEditor.createServer(bytes);
22
+ * try {
23
+ * await runtime.run(async (context) => {
24
+ * const slide = context.presentation.slides.getItemAt(0);
25
+ * const box = slide.shapes.addTextBox('Quarterly results', { left: 40, top: 40, width: 400 });
26
+ * box.textFrame.textRange.font.bold = true;
27
+ * await context.sync();
28
+ * });
29
+ * const edited = await runtime.save();
30
+ * } finally {
31
+ * runtime.dispose();
32
+ * }
33
+ * ```
34
+ *
35
+ * The API shape follows a documented subset of the Office.js presentation object model. It is
36
+ * not Office.js, it does not run in an add-in host, and every type in it is authored here.
37
+ *
38
+ * @packageDocumentation
39
+ */
40
+
41
+ /**
42
+ * The entry point, as much of it as works without an editor. Import from
43
+ * `@pptx-editor.dev/editor-api/browser` for the same object plus `createBrowser`.
44
+ *
45
+ * @public
46
+ */
47
+ interface PptxEditorNamespace {
48
+ /** A runtime over PPTX bytes. It also offers `save()`. */
49
+ createServer(bytes: Uint8Array, options?: CreateServerOptions): Promise<PptxEditorServerRuntime>;
50
+ }
51
+ /**
52
+ * The entry point: open a presentation and get a runtime to work against.
53
+ *
54
+ * @example
55
+ * ```ts
56
+ * const runtime = await PptxEditor.createServer(bytes);
57
+ * const titles = await runtime.run(async (context) => {
58
+ * const slides = context.presentation.slides;
59
+ * slides.load('items');
60
+ * await context.sync();
61
+ * const shapes = slides.items.map((slide) => slide.shapes.getItemAt(0).load('name'));
62
+ * await context.sync();
63
+ * return shapes.map((shape) => shape.name);
64
+ * });
65
+ * ```
66
+ *
67
+ * @public
68
+ */
69
+ declare const PptxEditor: PptxEditorNamespace;
70
+
71
+ export { CreateServerOptions, PptxEditor, PptxEditorServerRuntime };
72
+ export type { PptxEditorNamespace };
package/dist/index.js ADDED
@@ -0,0 +1,184 @@
1
+ import {
2
+ Adjustments,
3
+ Application,
4
+ Binding,
5
+ BindingCollection,
6
+ BindingType,
7
+ Border,
8
+ Borders,
9
+ BulletFormat,
10
+ BulletStyle,
11
+ BulletType,
12
+ ClientObject,
13
+ ClientResult,
14
+ ConnectorType,
15
+ CustomProperty,
16
+ CustomPropertyCollection,
17
+ CustomXmlPart,
18
+ CustomXmlPartCollection,
19
+ CustomXmlPartScopedCollection,
20
+ DocumentProperties,
21
+ DocumentPropertyType,
22
+ GeometricShapeType,
23
+ Hyperlink,
24
+ HyperlinkCollection,
25
+ HyperlinkScopedCollection,
26
+ HyperlinkType,
27
+ InsertSlideFormatting,
28
+ Margins,
29
+ PageSetup,
30
+ ParagraphFormat,
31
+ ParagraphHorizontalAlignment,
32
+ PlaceholderFormat,
33
+ PlaceholderType,
34
+ PptxEditorError,
35
+ Presentation,
36
+ RequestContext,
37
+ Shape,
38
+ ShapeAutoSize,
39
+ ShapeCollection,
40
+ ShapeFill,
41
+ ShapeFillType,
42
+ ShapeFont,
43
+ ShapeFontUnderlineStyle,
44
+ ShapeGetImageFormatType,
45
+ ShapeGroup,
46
+ ShapeLineDashStyle,
47
+ ShapeLineFormat,
48
+ ShapeLineStyle,
49
+ ShapeScopedCollection,
50
+ ShapeType,
51
+ ShapeZOrder,
52
+ Slide,
53
+ SlideBackground,
54
+ SlideBackgroundFill,
55
+ SlideBackgroundFillType,
56
+ SlideBackgroundGradientFill,
57
+ SlideBackgroundGradientFillType,
58
+ SlideBackgroundPatternFill,
59
+ SlideBackgroundPatternFillType,
60
+ SlideBackgroundPictureOrTextureFill,
61
+ SlideBackgroundSolidFill,
62
+ SlideCollection,
63
+ SlideLayout,
64
+ SlideLayoutBackground,
65
+ SlideLayoutCollection,
66
+ SlideLayoutType,
67
+ SlideMaster,
68
+ SlideMasterBackground,
69
+ SlideMasterCollection,
70
+ SlideScopedCollection,
71
+ Table,
72
+ TableCell,
73
+ TableCellCollection,
74
+ TableColumn,
75
+ TableColumnCollection,
76
+ TableRow,
77
+ TableRowCollection,
78
+ TableStyle,
79
+ TableStyleSettings,
80
+ Tag,
81
+ TagCollection,
82
+ TextFrame,
83
+ TextRange,
84
+ TextVerticalAlignment,
85
+ ThemeColor,
86
+ ThemeColorScheme,
87
+ TrackedObjects,
88
+ createServer,
89
+ isPptxEditorError
90
+ } from "./chunk-BULCTJVY.js";
91
+
92
+ // src/index.ts
93
+ var PptxEditor = Object.freeze({ createServer });
94
+ export {
95
+ Adjustments,
96
+ Application,
97
+ Binding,
98
+ BindingCollection,
99
+ BindingType,
100
+ Border,
101
+ Borders,
102
+ BulletFormat,
103
+ BulletStyle,
104
+ BulletType,
105
+ ClientObject,
106
+ ClientResult,
107
+ ConnectorType,
108
+ CustomProperty,
109
+ CustomPropertyCollection,
110
+ CustomXmlPart,
111
+ CustomXmlPartCollection,
112
+ CustomXmlPartScopedCollection,
113
+ DocumentProperties,
114
+ DocumentPropertyType,
115
+ GeometricShapeType,
116
+ Hyperlink,
117
+ HyperlinkCollection,
118
+ HyperlinkScopedCollection,
119
+ HyperlinkType,
120
+ InsertSlideFormatting,
121
+ Margins,
122
+ PageSetup,
123
+ ParagraphFormat,
124
+ ParagraphHorizontalAlignment,
125
+ PlaceholderFormat,
126
+ PlaceholderType,
127
+ PptxEditor,
128
+ PptxEditorError,
129
+ Presentation,
130
+ RequestContext,
131
+ Shape,
132
+ ShapeAutoSize,
133
+ ShapeCollection,
134
+ ShapeFill,
135
+ ShapeFillType,
136
+ ShapeFont,
137
+ ShapeFontUnderlineStyle,
138
+ ShapeGetImageFormatType,
139
+ ShapeGroup,
140
+ ShapeLineDashStyle,
141
+ ShapeLineFormat,
142
+ ShapeLineStyle,
143
+ ShapeScopedCollection,
144
+ ShapeType,
145
+ ShapeZOrder,
146
+ Slide,
147
+ SlideBackground,
148
+ SlideBackgroundFill,
149
+ SlideBackgroundFillType,
150
+ SlideBackgroundGradientFill,
151
+ SlideBackgroundGradientFillType,
152
+ SlideBackgroundPatternFill,
153
+ SlideBackgroundPatternFillType,
154
+ SlideBackgroundPictureOrTextureFill,
155
+ SlideBackgroundSolidFill,
156
+ SlideCollection,
157
+ SlideLayout,
158
+ SlideLayoutBackground,
159
+ SlideLayoutCollection,
160
+ SlideLayoutType,
161
+ SlideMaster,
162
+ SlideMasterBackground,
163
+ SlideMasterCollection,
164
+ SlideScopedCollection,
165
+ Table,
166
+ TableCell,
167
+ TableCellCollection,
168
+ TableColumn,
169
+ TableColumnCollection,
170
+ TableRow,
171
+ TableRowCollection,
172
+ TableStyle,
173
+ TableStyleSettings,
174
+ Tag,
175
+ TagCollection,
176
+ TextFrame,
177
+ TextRange,
178
+ TextVerticalAlignment,
179
+ ThemeColor,
180
+ ThemeColorScheme,
181
+ TrackedObjects,
182
+ isPptxEditorError
183
+ };
184
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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":[]}