@opengeni/artifact-tool 0.2.2

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 (203) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +104 -0
  3. package/dist/bounded-zip.d.ts +28 -0
  4. package/dist/chunk-4BSENMAE.js +39 -0
  5. package/dist/chunk-4BSENMAE.js.map +1 -0
  6. package/dist/chunk-4FRFNNBM.js +276 -0
  7. package/dist/chunk-4FRFNNBM.js.map +1 -0
  8. package/dist/chunk-5XIA6KHZ.js +49 -0
  9. package/dist/chunk-5XIA6KHZ.js.map +1 -0
  10. package/dist/chunk-66CT2ZRP.js +2229 -0
  11. package/dist/chunk-66CT2ZRP.js.map +1 -0
  12. package/dist/chunk-72SYDU4O.js +319 -0
  13. package/dist/chunk-72SYDU4O.js.map +1 -0
  14. package/dist/chunk-B2ZJRZDA.js +279 -0
  15. package/dist/chunk-B2ZJRZDA.js.map +1 -0
  16. package/dist/chunk-DCTLTNPW.js +2458 -0
  17. package/dist/chunk-DCTLTNPW.js.map +1 -0
  18. package/dist/chunk-FGZM4FQ6.js +473 -0
  19. package/dist/chunk-FGZM4FQ6.js.map +1 -0
  20. package/dist/chunk-HTJBLBDE.js +591 -0
  21. package/dist/chunk-HTJBLBDE.js.map +1 -0
  22. package/dist/chunk-IYFXZQ34.js +5306 -0
  23. package/dist/chunk-IYFXZQ34.js.map +1 -0
  24. package/dist/chunk-J6N7IR44.js +172 -0
  25. package/dist/chunk-J6N7IR44.js.map +1 -0
  26. package/dist/chunk-N2IHNWBS.js +1002 -0
  27. package/dist/chunk-N2IHNWBS.js.map +1 -0
  28. package/dist/chunk-NAG44K67.js +549 -0
  29. package/dist/chunk-NAG44K67.js.map +1 -0
  30. package/dist/chunk-O24KTEGP.js +33 -0
  31. package/dist/chunk-O24KTEGP.js.map +1 -0
  32. package/dist/chunk-PI2AZVGK.js +2074 -0
  33. package/dist/chunk-PI2AZVGK.js.map +1 -0
  34. package/dist/chunk-Q2FFHEY7.js +40 -0
  35. package/dist/chunk-Q2FFHEY7.js.map +1 -0
  36. package/dist/chunk-RBGQADXA.js +57 -0
  37. package/dist/chunk-RBGQADXA.js.map +1 -0
  38. package/dist/chunk-U5G2BKM2.js +613 -0
  39. package/dist/chunk-U5G2BKM2.js.map +1 -0
  40. package/dist/chunk-VOJHMSM3.js +39 -0
  41. package/dist/chunk-VOJHMSM3.js.map +1 -0
  42. package/dist/chunk-VUNV25KB.js +16 -0
  43. package/dist/chunk-VUNV25KB.js.map +1 -0
  44. package/dist/chunk-XIFUNVBO.js +101 -0
  45. package/dist/chunk-XIFUNVBO.js.map +1 -0
  46. package/dist/chunk-ZCJYRJGB.js +489 -0
  47. package/dist/chunk-ZCJYRJGB.js.map +1 -0
  48. package/dist/chunk-ZZXPEE4S.js +2260 -0
  49. package/dist/chunk-ZZXPEE4S.js.map +1 -0
  50. package/dist/document-docx-api.d.ts +49 -0
  51. package/dist/document-docx-codec.d.ts +9 -0
  52. package/dist/document-docx-codec.js +4765 -0
  53. package/dist/document-docx-codec.js.map +1 -0
  54. package/dist/document-docx-import.d.ts +261 -0
  55. package/dist/document-docx-packer.d.ts +18 -0
  56. package/dist/document-docx-state.d.ts +12 -0
  57. package/dist/document-render.d.ts +3 -0
  58. package/dist/document-render.js +492 -0
  59. package/dist/document-render.js.map +1 -0
  60. package/dist/document.d.ts +432 -0
  61. package/dist/document.js +37 -0
  62. package/dist/document.js.map +1 -0
  63. package/dist/errors.d.ts +23 -0
  64. package/dist/file-blob.d.ts +11 -0
  65. package/dist/index.d.ts +4 -0
  66. package/dist/index.js +186 -0
  67. package/dist/index.js.map +1 -0
  68. package/dist/inspection.d.ts +12 -0
  69. package/dist/kernel.d.ts +101 -0
  70. package/dist/lib-GQLPACFK.js +9746 -0
  71. package/dist/lib-GQLPACFK.js.map +1 -0
  72. package/dist/materializer-cli-entry.d.ts +2 -0
  73. package/dist/materializer-cli-entry.js +29 -0
  74. package/dist/materializer-cli-entry.js.map +1 -0
  75. package/dist/materializer-cli.d.ts +24 -0
  76. package/dist/materializer-cli.js +24 -0
  77. package/dist/materializer-cli.js.map +1 -0
  78. package/dist/native-raster.d.ts +10 -0
  79. package/dist/native.d.ts +129 -0
  80. package/dist/native.js +31 -0
  81. package/dist/native.js.map +1 -0
  82. package/dist/office-import.d.ts +48 -0
  83. package/dist/office-import.js +154 -0
  84. package/dist/office-import.js.map +1 -0
  85. package/dist/presentation-pptx-api.d.ts +60 -0
  86. package/dist/presentation-pptx-import.d.ts +5 -0
  87. package/dist/presentation-pptx-state-digest-765CZZED.js +10 -0
  88. package/dist/presentation-pptx-state-digest-765CZZED.js.map +1 -0
  89. package/dist/presentation-pptx-state-digest.d.ts +3 -0
  90. package/dist/presentation-pptx-state.d.ts +4 -0
  91. package/dist/presentation-pptx-xml.d.ts +29 -0
  92. package/dist/presentation-pptx.d.ts +5 -0
  93. package/dist/presentation-pptx.js +2365 -0
  94. package/dist/presentation-pptx.js.map +1 -0
  95. package/dist/presentation-render.d.ts +29 -0
  96. package/dist/presentation-render.js +375 -0
  97. package/dist/presentation-render.js.map +1 -0
  98. package/dist/presentation.d.ts +565 -0
  99. package/dist/presentation.js +71 -0
  100. package/dist/presentation.js.map +1 -0
  101. package/dist/production-composite.d.ts +68 -0
  102. package/dist/production-document.d.ts +2 -0
  103. package/dist/production-document.js +176 -0
  104. package/dist/production-document.js.map +1 -0
  105. package/dist/production-native-codecs.d.ts +94 -0
  106. package/dist/production-presentation.d.ts +2 -0
  107. package/dist/production-presentation.js +176 -0
  108. package/dist/production-presentation.js.map +1 -0
  109. package/dist/production-sha256.d.ts +2 -0
  110. package/dist/production-spreadsheet-native.d.ts +12 -0
  111. package/dist/production-spreadsheet.d.ts +2 -0
  112. package/dist/production-spreadsheet.js +176 -0
  113. package/dist/production-spreadsheet.js.map +1 -0
  114. package/dist/production.d.ts +96 -0
  115. package/dist/raster-image.d.ts +34 -0
  116. package/dist/reference.d.ts +17 -0
  117. package/dist/reference.js +574 -0
  118. package/dist/reference.js.map +1 -0
  119. package/dist/runtime-cli-entry.d.ts +2 -0
  120. package/dist/runtime-cli-entry.js +21 -0
  121. package/dist/runtime-cli-entry.js.map +1 -0
  122. package/dist/runtime-cli.d.ts +76 -0
  123. package/dist/runtime-cli.js +26 -0
  124. package/dist/runtime-cli.js.map +1 -0
  125. package/dist/runtime-development.d.ts +73 -0
  126. package/dist/runtime-development.js +30 -0
  127. package/dist/runtime-development.js.map +1 -0
  128. package/dist/runtime-receipt.d.ts +19 -0
  129. package/dist/runtime.d.ts +355 -0
  130. package/dist/runtime.js +42 -0
  131. package/dist/runtime.js.map +1 -0
  132. package/dist/snapshot.d.ts +26 -0
  133. package/dist/snapshot.js +61 -0
  134. package/dist/snapshot.js.map +1 -0
  135. package/dist/spreadsheet-address.d.ts +18 -0
  136. package/dist/spreadsheet-file.d.ts +17 -0
  137. package/dist/spreadsheet-formula.d.ts +67 -0
  138. package/dist/spreadsheet-image.d.ts +17 -0
  139. package/dist/spreadsheet-render.d.ts +5 -0
  140. package/dist/spreadsheet-render.js +752 -0
  141. package/dist/spreadsheet-render.js.map +1 -0
  142. package/dist/spreadsheet-types.d.ts +155 -0
  143. package/dist/spreadsheet-xlsx-api.d.ts +88 -0
  144. package/dist/spreadsheet-xlsx-codec.d.ts +16 -0
  145. package/dist/spreadsheet-xlsx-codec.js +16 -0
  146. package/dist/spreadsheet-xlsx-codec.js.map +1 -0
  147. package/dist/spreadsheet-xlsx-state.d.ts +16 -0
  148. package/dist/spreadsheet.d.ts +724 -0
  149. package/dist/spreadsheet.js +67 -0
  150. package/dist/spreadsheet.js.map +1 -0
  151. package/package.json +129 -0
  152. package/src/bounded-zip.ts +450 -0
  153. package/src/document-docx-api.ts +64 -0
  154. package/src/document-docx-codec.ts +2253 -0
  155. package/src/document-docx-import.ts +3814 -0
  156. package/src/document-docx-packer.ts +72 -0
  157. package/src/document-docx-state.ts +59 -0
  158. package/src/document-render.ts +615 -0
  159. package/src/document.ts +2800 -0
  160. package/src/errors.ts +45 -0
  161. package/src/file-blob.ts +43 -0
  162. package/src/index.ts +4 -0
  163. package/src/inspection.ts +50 -0
  164. package/src/kernel.ts +525 -0
  165. package/src/materializer-cli-entry.ts +11 -0
  166. package/src/materializer-cli.ts +743 -0
  167. package/src/native-raster.ts +141 -0
  168. package/src/native.ts +390 -0
  169. package/src/office-import.ts +243 -0
  170. package/src/presentation-pptx-api.ts +107 -0
  171. package/src/presentation-pptx-import.ts +2065 -0
  172. package/src/presentation-pptx-state-digest.ts +46 -0
  173. package/src/presentation-pptx-state.ts +18 -0
  174. package/src/presentation-pptx-xml.ts +473 -0
  175. package/src/presentation-pptx.ts +447 -0
  176. package/src/presentation-render.ts +532 -0
  177. package/src/presentation.ts +2599 -0
  178. package/src/production-composite.ts +805 -0
  179. package/src/production-document.ts +2 -0
  180. package/src/production-native-codecs.ts +1141 -0
  181. package/src/production-presentation.ts +2 -0
  182. package/src/production-sha256.ts +150 -0
  183. package/src/production-spreadsheet-native.ts +686 -0
  184. package/src/production-spreadsheet.ts +2 -0
  185. package/src/production.ts +1022 -0
  186. package/src/raster-image.ts +586 -0
  187. package/src/reference.ts +17 -0
  188. package/src/runtime-cli-entry.ts +13 -0
  189. package/src/runtime-cli.ts +670 -0
  190. package/src/runtime-development.ts +689 -0
  191. package/src/runtime-receipt.ts +169 -0
  192. package/src/runtime.ts +1463 -0
  193. package/src/snapshot.ts +88 -0
  194. package/src/spreadsheet-address.ts +90 -0
  195. package/src/spreadsheet-file.ts +71 -0
  196. package/src/spreadsheet-formula.ts +1212 -0
  197. package/src/spreadsheet-image.ts +242 -0
  198. package/src/spreadsheet-render.ts +985 -0
  199. package/src/spreadsheet-types.ts +171 -0
  200. package/src/spreadsheet-xlsx-api.ts +123 -0
  201. package/src/spreadsheet-xlsx-codec.ts +3063 -0
  202. package/src/spreadsheet-xlsx-state.ts +191 -0
  203. package/src/spreadsheet.ts +5195 -0
@@ -0,0 +1,565 @@
1
+ import { FileBlob } from "./file-blob.js";
2
+ import type { HelpOptions } from "./spreadsheet-types.js";
3
+ export { PPTX_MEDIA_TYPE, PresentationFidelityError, PresentationSecurityError, type PresentationFidelityIssue, type PresentationLossPreservationEnvelope, type PresentationPptxExportOptions, type PresentationPptxFeature, type PresentationPptxImportLimits, type PresentationPptxImportOptions, } from "./presentation-pptx-api.js";
4
+ import type { PresentationFidelityIssue, PresentationLossPreservationEnvelope, PresentationPptxExportOptions, PresentationPptxImportOptions } from "./presentation-pptx-api.js";
5
+ export type PresentationPosition = {
6
+ left: number;
7
+ top: number;
8
+ width: number;
9
+ height: number;
10
+ };
11
+ export type PresentationFill = string | {
12
+ type?: "solid";
13
+ color: string;
14
+ };
15
+ export type PresentationLine = {
16
+ style?: "solid" | "dash" | "dot" | "none";
17
+ fill?: PresentationFill;
18
+ width?: number;
19
+ };
20
+ export type PresentationTextStyle = {
21
+ fontFamily?: string;
22
+ fontSize?: number;
23
+ bold?: boolean;
24
+ italic?: boolean;
25
+ underline?: boolean;
26
+ color?: string;
27
+ alignment?: "left" | "center" | "right" | "justify";
28
+ verticalAlignment?: "top" | "middle" | "bottom";
29
+ };
30
+ export type PresentationShapeGeometry = "textbox" | "rect" | "roundRect" | "ellipse" | "triangle" | "rightArrow" | "line";
31
+ export type PresentationShapeConfig = {
32
+ geometry: PresentationShapeGeometry;
33
+ name?: string;
34
+ position?: Partial<PresentationPosition>;
35
+ fill?: PresentationFill;
36
+ line?: PresentationLine;
37
+ text?: string;
38
+ textStyle?: PresentationTextStyle;
39
+ rotation?: number;
40
+ borderRadius?: number | string;
41
+ placeholder?: {
42
+ type: string;
43
+ index?: number;
44
+ };
45
+ };
46
+ export type PresentationChartType = "bar" | "line" | "area" | "pie" | "doughnut" | "scatter" | "bubble" | "radar";
47
+ export type PresentationChartSeriesConfig = {
48
+ name: string;
49
+ categories?: string[];
50
+ values?: number[];
51
+ xValues?: number[];
52
+ bubbleSizes?: number[];
53
+ fill?: PresentationFill;
54
+ line?: PresentationLine;
55
+ };
56
+ export type PresentationChartConfig = {
57
+ name?: string;
58
+ position?: Partial<PresentationPosition>;
59
+ title?: string;
60
+ categories?: string[];
61
+ series?: PresentationChartSeriesConfig[];
62
+ hasLegend?: boolean;
63
+ legend?: {
64
+ position?: "left" | "top" | "topRight" | "right" | "bottom";
65
+ overlay?: boolean;
66
+ };
67
+ xAxis?: {
68
+ visible?: boolean;
69
+ title?: string;
70
+ min?: number;
71
+ max?: number;
72
+ };
73
+ yAxis?: {
74
+ visible?: boolean;
75
+ title?: string;
76
+ min?: number;
77
+ max?: number;
78
+ };
79
+ dataLabels?: {
80
+ showValue?: boolean;
81
+ showSeriesName?: boolean;
82
+ showCategoryName?: boolean;
83
+ showPercent?: boolean;
84
+ position?: "center" | "inEnd" | "outEnd";
85
+ };
86
+ };
87
+ export type PresentationTableCellConfig = {
88
+ text: string;
89
+ fill?: PresentationFill;
90
+ textStyle?: PresentationTextStyle;
91
+ rowSpan?: number;
92
+ colSpan?: number;
93
+ };
94
+ export type PresentationTableCellInput = string | PresentationTableCellConfig | null;
95
+ export type PresentationTableConfig = {
96
+ name?: string;
97
+ position?: Partial<PresentationPosition>;
98
+ /** null marks a grid position covered by an earlier rowSpan/colSpan anchor. */
99
+ rows: ReadonlyArray<ReadonlyArray<PresentationTableCellInput>>;
100
+ columnWidths?: readonly number[];
101
+ rowHeights?: readonly number[];
102
+ fill?: PresentationFill;
103
+ line?: PresentationLine;
104
+ textStyle?: PresentationTextStyle;
105
+ };
106
+ export type PresentationGroupChildConfig = {
107
+ kind: "shape";
108
+ config: PresentationShapeConfig;
109
+ } | {
110
+ kind: "chart";
111
+ type: PresentationChartType;
112
+ config?: PresentationChartConfig;
113
+ } | {
114
+ kind: "image";
115
+ config: PresentationImageConfig;
116
+ } | {
117
+ kind: "table";
118
+ config: PresentationTableConfig;
119
+ } | {
120
+ kind: "group";
121
+ config: PresentationGroupConfig;
122
+ };
123
+ export type PresentationGroupConfig = {
124
+ name?: string;
125
+ position?: Partial<PresentationPosition>;
126
+ childOffset?: {
127
+ left: number;
128
+ top: number;
129
+ };
130
+ childExtent?: {
131
+ width: number;
132
+ height: number;
133
+ };
134
+ rotation?: number;
135
+ flipHorizontal?: boolean;
136
+ flipVertical?: boolean;
137
+ children?: readonly PresentationGroupChildConfig[];
138
+ };
139
+ export type PresentationTemplateElement = Exclude<PresentationGroupChildConfig, {
140
+ kind: "group";
141
+ }>;
142
+ export type PresentationMasterConfig = {
143
+ name?: string;
144
+ background?: PresentationFill;
145
+ elements?: readonly PresentationTemplateElement[];
146
+ };
147
+ export type PresentationLayoutConfig = PresentationMasterConfig & {
148
+ masterId?: string;
149
+ /** Skill-compatible alias for masterId. */
150
+ parentLayoutId?: string;
151
+ };
152
+ type ConcreteImageSource = {
153
+ blob: ArrayBuffer | Uint8Array;
154
+ dataUrl?: never;
155
+ uri?: never;
156
+ } | {
157
+ dataUrl: string;
158
+ blob?: never;
159
+ uri?: never;
160
+ } | {
161
+ uri: string;
162
+ blob?: never;
163
+ dataUrl?: never;
164
+ };
165
+ export type PresentationRasterImageContentType = "image/png" | "image/jpeg" | "image/gif" | "image/webp";
166
+ export type PresentationImageResolution = {
167
+ blob: ArrayBuffer | Uint8Array;
168
+ contentType?: PresentationRasterImageContentType;
169
+ };
170
+ export type PresentationImageResolver = (reference: {
171
+ uri: string;
172
+ imageId: string;
173
+ name: string;
174
+ }) => Promise<PresentationImageResolution> | PresentationImageResolution;
175
+ export type PresentationCreateOptions = {
176
+ slideSize?: {
177
+ width: number;
178
+ height: number;
179
+ };
180
+ /** Host-owned resolver; it is invoked only by an explicit image.resolveUri() call. */
181
+ imageResolver?: PresentationImageResolver;
182
+ /** URI schemes the host resolver owns, for example `["asset"]`. Empty by default. */
183
+ allowedImageUriSchemes?: readonly string[];
184
+ };
185
+ export type PresentationImageConfig = (ConcreteImageSource & PresentationImageMetadata) | ({
186
+ prompt: string;
187
+ blob?: never;
188
+ dataUrl?: never;
189
+ uri?: never;
190
+ } & PresentationImageMetadata);
191
+ type PresentationImageMetadata = {
192
+ name?: string;
193
+ prompt?: string;
194
+ contentType?: string;
195
+ alt?: string;
196
+ fit?: "contain" | "cover";
197
+ position?: Partial<PresentationPosition>;
198
+ frame?: Partial<PresentationPosition>;
199
+ crop?: {
200
+ left: number;
201
+ top: number;
202
+ right: number;
203
+ bottom: number;
204
+ };
205
+ geometry?: "rect" | "roundRect" | "ellipse";
206
+ borderRadius?: number | string;
207
+ rotation?: number;
208
+ flipHorizontal?: boolean;
209
+ flipVertical?: boolean;
210
+ lockAspectRatio?: boolean;
211
+ };
212
+ export type PresentationInspectOptions = {
213
+ target?: {
214
+ id: string;
215
+ beforeLines?: number;
216
+ afterLines?: number;
217
+ };
218
+ kind?: string;
219
+ include?: string;
220
+ exclude?: string;
221
+ search?: string;
222
+ maxChars?: number;
223
+ };
224
+ export type PresentationInspectResult = {
225
+ ndjson: string;
226
+ records: Array<Record<string, unknown>>;
227
+ truncated: boolean;
228
+ };
229
+ export type PresentationResolvedObject = Presentation | Slide | PresentationShape | PresentationChart | PresentationImage | PresentationTable | PresentationGroup | PresentationMaster | PresentationLayout;
230
+ export type PresentationElement = PresentationShape | PresentationChart | PresentationImage | PresentationTable | PresentationGroup;
231
+ export type PresentationExportOptions = {
232
+ slide?: Slide;
233
+ format: "svg" | "png" | "layout" | "webp";
234
+ scale?: number;
235
+ montage?: boolean;
236
+ columns?: number;
237
+ gap?: number;
238
+ };
239
+ export declare class UnsupportedPresentationFeatureError extends Error {
240
+ readonly code = "UNSUPPORTED_PRESENTATION_FEATURE";
241
+ constructor(feature: string, detail?: string);
242
+ }
243
+ /** Untrusted presentation input was rejected before reaching a renderer or file codec. */
244
+ export declare class InvalidPresentationInputError extends Error {
245
+ readonly field: string;
246
+ readonly code = "INVALID_PRESENTATION_INPUT";
247
+ constructor(field: string, detail: string);
248
+ }
249
+ /**
250
+ * Skill-compatible TypeScript reference presentation. Native production
251
+ * presentation editing remains unsupported and must fail closed until the
252
+ * Rust modality is feature-complete.
253
+ */
254
+ export declare class Presentation {
255
+ readonly slides: SlideCollection;
256
+ readonly masters: PresentationMasterCollection;
257
+ readonly layouts: PresentationLayoutCollection;
258
+ readonly slideSize: {
259
+ width: number;
260
+ height: number;
261
+ };
262
+ private readonly objects;
263
+ private readonly imageResolver;
264
+ private readonly allowedImageUriSchemes;
265
+ private nextId;
266
+ private constructor();
267
+ static create(options?: PresentationCreateOptions): Presentation;
268
+ assertImageUriAccepted(uri: string): void;
269
+ resolveImageUri(reference: {
270
+ uri: string;
271
+ imageId: string;
272
+ name: string;
273
+ }): Promise<PresentationImageResolution>;
274
+ allocateId(prefix: "sl" | "sh" | "ch" | "im" | "tb" | "gp" | "mt" | "ly", value: unknown): string;
275
+ resolve<T extends PresentationResolvedObject = PresentationResolvedObject>(id: string): T;
276
+ inspect(options?: PresentationInspectOptions): Promise<PresentationInspectResult>;
277
+ help(query: string, options?: HelpOptions): PresentationInspectResult;
278
+ export(options: PresentationExportOptions): Promise<FileBlob>;
279
+ layoutSnapshot(): Record<string, unknown>;
280
+ private register;
281
+ private assertOwns;
282
+ }
283
+ declare class PresentationPlaceholderCollection {
284
+ private readonly elements;
285
+ constructor(elements: readonly PresentationTemplateElement[]);
286
+ summary(): {
287
+ count: number;
288
+ names: string[];
289
+ };
290
+ }
291
+ export declare class PresentationMaster {
292
+ readonly presentation: Presentation;
293
+ readonly id: string;
294
+ name: string;
295
+ background: PresentationFill;
296
+ readonly elements: PresentationTemplateElement[];
297
+ readonly placeholders: PresentationPlaceholderCollection;
298
+ constructor(presentation: Presentation, config?: PresentationMasterConfig);
299
+ inspectRecord(): Record<string, unknown>;
300
+ toProto(): Record<string, unknown>;
301
+ }
302
+ export declare class PresentationLayout {
303
+ readonly presentation: Presentation;
304
+ readonly id: string;
305
+ name: string;
306
+ masterId: string | undefined;
307
+ background: PresentationFill;
308
+ readonly elements: PresentationTemplateElement[];
309
+ readonly placeholders: PresentationPlaceholderCollection;
310
+ get parentLayoutId(): string | undefined;
311
+ constructor(presentation: Presentation, config?: PresentationLayoutConfig);
312
+ inspectRecord(): Record<string, unknown>;
313
+ toProto(): Record<string, unknown>;
314
+ }
315
+ export declare class PresentationMasterCollection {
316
+ private readonly presentation;
317
+ readonly items: PresentationMaster[];
318
+ constructor(presentation: Presentation);
319
+ add(config?: PresentationMasterConfig): PresentationMaster;
320
+ getItem(index: number): PresentationMaster;
321
+ }
322
+ export declare class PresentationLayoutCollection {
323
+ private readonly presentation;
324
+ readonly items: PresentationLayout[];
325
+ constructor(presentation: Presentation);
326
+ add(config?: PresentationLayoutConfig): PresentationLayout;
327
+ getItem(index: number): PresentationLayout;
328
+ }
329
+ export declare class SlideCollection {
330
+ private readonly presentation;
331
+ readonly items: Slide[];
332
+ constructor(presentation: Presentation);
333
+ add(): Slide;
334
+ getItem(index: number): Slide;
335
+ }
336
+ export declare class Slide {
337
+ readonly presentation: Presentation;
338
+ readonly id: string;
339
+ readonly shapes: PresentationShapeCollection;
340
+ readonly charts: PresentationChartCollection;
341
+ readonly images: PresentationImageCollection;
342
+ readonly tables: PresentationTableCollection;
343
+ readonly groups: PresentationGroupCollection;
344
+ readonly notes: PresentationText;
345
+ readonly placeholders: SlidePlaceholderCollection;
346
+ /** Canonical cross-type z-order. Typed collections are filtered indexes over this list. */
347
+ readonly elements: PresentationElement[];
348
+ readonly background: {
349
+ fill: PresentationFill;
350
+ };
351
+ title: string;
352
+ layout: PresentationLayout | undefined;
353
+ constructor(presentation: Presentation);
354
+ get speakerNotes(): PresentationText;
355
+ setLayout(layout: PresentationLayout | undefined): void;
356
+ appendElement(element: PresentationElement): void;
357
+ export(options: Omit<PresentationExportOptions, "slide" | "montage">): Promise<FileBlob>;
358
+ inspectRecord(index: number): Record<string, unknown>;
359
+ layoutSnapshot(index: number): Record<string, unknown>;
360
+ }
361
+ export declare class SlidePlaceholderCollection {
362
+ private readonly slide;
363
+ constructor(slide: Slide);
364
+ get items(): PresentationShape[];
365
+ summary(): {
366
+ count: number;
367
+ types: Record<string, number>;
368
+ };
369
+ }
370
+ export declare class PresentationText {
371
+ private value;
372
+ private styleValue;
373
+ constructor(initialValue?: string, style?: PresentationTextStyle);
374
+ get style(): PresentationTextStyle;
375
+ set style(value: PresentationTextStyle);
376
+ set(value: string): void;
377
+ replace(searchValue: string | RegExp, replaceValue: string): number;
378
+ toString(): string;
379
+ toJSON(): string;
380
+ }
381
+ export declare class PresentationShape {
382
+ readonly slide: Slide;
383
+ readonly id: string;
384
+ readonly geometry: PresentationShapeGeometry;
385
+ name: string;
386
+ position: PresentationPosition;
387
+ fill: PresentationFill;
388
+ line: PresentationLine;
389
+ rotation: number;
390
+ borderRadius: number | string | undefined;
391
+ placeholder: {
392
+ type: string;
393
+ index?: number;
394
+ } | undefined;
395
+ private readonly textValue;
396
+ constructor(slide: Slide, config: PresentationShapeConfig);
397
+ get text(): PresentationText;
398
+ set text(value: string | PresentationText);
399
+ inspectRecord(slideIndex: number): Record<string, unknown>;
400
+ layoutSnapshot(): Record<string, unknown>;
401
+ }
402
+ export declare class PresentationShapeCollection {
403
+ private readonly slide;
404
+ readonly items: PresentationShape[];
405
+ constructor(slide: Slide);
406
+ add(config: PresentationShapeConfig): PresentationShape;
407
+ }
408
+ export declare class PresentationChartSeries {
409
+ name: string;
410
+ categories: string[];
411
+ values: number[];
412
+ xValues: number[];
413
+ bubbleSizes: number[];
414
+ fill: PresentationFill | undefined;
415
+ line: PresentationLine | undefined;
416
+ constructor(config: PresentationChartSeriesConfig);
417
+ }
418
+ export declare class PresentationChartSeriesCollection {
419
+ readonly items: PresentationChartSeries[];
420
+ constructor(series: PresentationChartSeriesConfig[]);
421
+ getItemAt(index: number): PresentationChartSeries;
422
+ }
423
+ export declare class PresentationChart {
424
+ readonly slide: Slide;
425
+ readonly id: string;
426
+ readonly type: PresentationChartType;
427
+ name: string;
428
+ position: PresentationPosition;
429
+ title: string;
430
+ categories: string[];
431
+ readonly series: PresentationChartSeriesCollection;
432
+ hasLegend: boolean;
433
+ legend: PresentationChartConfig["legend"];
434
+ xAxis: PresentationChartConfig["xAxis"];
435
+ yAxis: PresentationChartConfig["yAxis"];
436
+ dataLabels: PresentationChartConfig["dataLabels"];
437
+ constructor(slide: Slide, type: PresentationChartType, config: PresentationChartConfig);
438
+ inspectRecord(slideIndex: number): Record<string, unknown>;
439
+ layoutSnapshot(): Record<string, unknown>;
440
+ }
441
+ export declare class PresentationChartCollection {
442
+ private readonly slide;
443
+ readonly items: PresentationChart[];
444
+ constructor(slide: Slide);
445
+ add(type: PresentationChartType, config?: PresentationChartConfig): PresentationChart;
446
+ }
447
+ export declare class PresentationTableCell {
448
+ readonly text: PresentationText;
449
+ fill: PresentationFill;
450
+ rowSpan: number;
451
+ colSpan: number;
452
+ constructor(config: string | PresentationTableCellConfig, defaults: Pick<PresentationTableConfig, "fill" | "textStyle">);
453
+ toConfig(): PresentationTableCellConfig;
454
+ }
455
+ export declare class PresentationTable {
456
+ readonly slide: Slide;
457
+ readonly id: string;
458
+ name: string;
459
+ position: PresentationPosition;
460
+ rows: Array<Array<PresentationTableCell | null>>;
461
+ columnWidths: number[];
462
+ rowHeights: number[];
463
+ fill: PresentationFill;
464
+ line: PresentationLine;
465
+ textStyle: PresentationTextStyle;
466
+ constructor(slide: Slide, config: PresentationTableConfig);
467
+ inspectRecord(slideIndex: number): Record<string, unknown>;
468
+ layoutSnapshot(): Record<string, unknown>;
469
+ }
470
+ export declare class PresentationTableCollection {
471
+ private readonly slide;
472
+ readonly items: PresentationTable[];
473
+ constructor(slide: Slide);
474
+ add(config: PresentationTableConfig): PresentationTable;
475
+ }
476
+ export type PresentationGroupChild = PresentationShape | PresentationChart | PresentationImage | PresentationTable | PresentationGroup;
477
+ export declare class PresentationGroup {
478
+ readonly slide: Slide;
479
+ readonly id: string;
480
+ name: string;
481
+ position: PresentationPosition;
482
+ childOffset: {
483
+ left: number;
484
+ top: number;
485
+ };
486
+ childExtent: {
487
+ width: number;
488
+ height: number;
489
+ };
490
+ rotation: number;
491
+ flipHorizontal: boolean;
492
+ flipVertical: boolean;
493
+ readonly children: PresentationGroupChild[];
494
+ constructor(slide: Slide, config?: PresentationGroupConfig, depth?: number);
495
+ inspectRecord(slideIndex: number): Record<string, unknown>;
496
+ layoutSnapshot(): Record<string, unknown>;
497
+ }
498
+ export declare class PresentationGroupCollection {
499
+ private readonly slide;
500
+ readonly items: PresentationGroup[];
501
+ constructor(slide: Slide);
502
+ add(config?: PresentationGroupConfig): PresentationGroup;
503
+ }
504
+ export declare class PresentationImage {
505
+ readonly slide: Slide;
506
+ readonly id: string;
507
+ name: string;
508
+ position: PresentationPosition;
509
+ fit: "contain" | "cover";
510
+ contentType: string | undefined;
511
+ alt: string;
512
+ prompt: string | undefined;
513
+ crop: {
514
+ left: number;
515
+ top: number;
516
+ right: number;
517
+ bottom: number;
518
+ } | undefined;
519
+ geometry: "rect" | "roundRect" | "ellipse";
520
+ borderRadius: number | string | undefined;
521
+ rotation: number;
522
+ flipHorizontal: boolean;
523
+ flipVertical: boolean;
524
+ lockAspectRatio: boolean;
525
+ private blob;
526
+ private dataUrl;
527
+ private uri;
528
+ private validatedContentType;
529
+ private cachedCanonicalDataUrl;
530
+ constructor(slide: Slide, config: PresentationImageConfig);
531
+ get frame(): PresentationPosition;
532
+ set frame(value: PresentationPosition);
533
+ replace(config: PresentationImageConfig): void;
534
+ /**
535
+ * Explicitly materializes a host-owned URI into trusted raster bytes.
536
+ *
537
+ * Render and file export never invoke resolvers, fetch, or read files. A host
538
+ * must call this method deliberately, and returned bytes still pass the same
539
+ * MIME/signature validation as direct `blob` input.
540
+ */
541
+ resolveUri(): Promise<void>;
542
+ sourceForSvg(): string | undefined;
543
+ sourceForPptx(): {
544
+ data: string;
545
+ };
546
+ inspectRecord(slideIndex: number): Record<string, unknown>;
547
+ layoutSnapshot(): Record<string, unknown>;
548
+ private assignSource;
549
+ }
550
+ export declare class PresentationImageCollection {
551
+ private readonly slide;
552
+ readonly items: PresentationImage[];
553
+ constructor(slide: Slide);
554
+ add(config: PresentationImageConfig): PresentationImage;
555
+ }
556
+ export declare class PresentationFile {
557
+ static exportPptx(presentation: Presentation, options?: PresentationPptxExportOptions): Promise<FileBlob>;
558
+ static importPptx(input: FileBlob | Blob | ArrayBuffer | Uint8Array, options?: PresentationPptxImportOptions): Promise<Presentation>;
559
+ static fidelityReport(presentation: Presentation): readonly PresentationFidelityIssue[];
560
+ static lossPreservationEnvelope(presentation: Presentation): PresentationLossPreservationEnvelope | null;
561
+ }
562
+ declare function assertRenderPixelBudget(width: number, height: number, scale: number): void;
563
+ declare function colorValue(fill: PresentationFill): string;
564
+ declare function truncate(value: string, max: number): string;
565
+ export { assertRenderPixelBudget as assertPresentationRenderPixelBudget, colorValue as presentationColorValue, truncate as truncatePresentationText, };
@@ -0,0 +1,71 @@
1
+ import {
2
+ InvalidPresentationInputError,
3
+ PPTX_MEDIA_TYPE,
4
+ Presentation,
5
+ PresentationChart,
6
+ PresentationChartCollection,
7
+ PresentationChartSeries,
8
+ PresentationChartSeriesCollection,
9
+ PresentationFidelityError,
10
+ PresentationFile,
11
+ PresentationGroup,
12
+ PresentationGroupCollection,
13
+ PresentationImage,
14
+ PresentationImageCollection,
15
+ PresentationLayout,
16
+ PresentationLayoutCollection,
17
+ PresentationMaster,
18
+ PresentationMasterCollection,
19
+ PresentationSecurityError,
20
+ PresentationShape,
21
+ PresentationShapeCollection,
22
+ PresentationTable,
23
+ PresentationTableCell,
24
+ PresentationTableCollection,
25
+ PresentationText,
26
+ Slide,
27
+ SlideCollection,
28
+ SlidePlaceholderCollection,
29
+ UnsupportedPresentationFeatureError,
30
+ assertRenderPixelBudget,
31
+ colorValue,
32
+ truncate
33
+ } from "./chunk-PI2AZVGK.js";
34
+ import "./chunk-FGZM4FQ6.js";
35
+ import "./chunk-4BSENMAE.js";
36
+ import "./chunk-Q2FFHEY7.js";
37
+ import "./chunk-VUNV25KB.js";
38
+ export {
39
+ InvalidPresentationInputError,
40
+ PPTX_MEDIA_TYPE,
41
+ Presentation,
42
+ PresentationChart,
43
+ PresentationChartCollection,
44
+ PresentationChartSeries,
45
+ PresentationChartSeriesCollection,
46
+ PresentationFidelityError,
47
+ PresentationFile,
48
+ PresentationGroup,
49
+ PresentationGroupCollection,
50
+ PresentationImage,
51
+ PresentationImageCollection,
52
+ PresentationLayout,
53
+ PresentationLayoutCollection,
54
+ PresentationMaster,
55
+ PresentationMasterCollection,
56
+ PresentationSecurityError,
57
+ PresentationShape,
58
+ PresentationShapeCollection,
59
+ PresentationTable,
60
+ PresentationTableCell,
61
+ PresentationTableCollection,
62
+ PresentationText,
63
+ Slide,
64
+ SlideCollection,
65
+ SlidePlaceholderCollection,
66
+ UnsupportedPresentationFeatureError,
67
+ assertRenderPixelBudget as assertPresentationRenderPixelBudget,
68
+ colorValue as presentationColorValue,
69
+ truncate as truncatePresentationText
70
+ };
71
+ //# sourceMappingURL=presentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,68 @@
1
+ import type { WorkbookChange } from "./spreadsheet.js";
2
+ import type { NativeArtifactSession, NativeDocumentSession, NativePresentationSession, NativeSpreadsheetSession } from "./native.js";
3
+ export type CompositeModality = "spreadsheet" | "document" | "presentation";
4
+ export type CompositeReconciliation = Readonly<{
5
+ session: NativeArtifactSession;
6
+ data?: unknown;
7
+ }>;
8
+ export type CompositeReconciler<Root extends object> = (root: Root) => CompositeReconciliation;
9
+ export type CompositePropertyRead = Readonly<{
10
+ handled: boolean;
11
+ value?: unknown;
12
+ }>;
13
+ type Locator<Root extends object> = Readonly<{
14
+ key: string;
15
+ resolve(root: Root): unknown;
16
+ }>;
17
+ export type CompositeMutation = Readonly<{
18
+ member: PropertyKey;
19
+ owner: unknown;
20
+ arguments?: readonly unknown[];
21
+ }>;
22
+ export type PreparedCompositeMutation = Readonly<{
23
+ /** Applies one already-prevalidated mutation to the retained native session. */
24
+ commit(result: unknown): boolean;
25
+ }>;
26
+ export type CompositeMutationPreparer<Root extends object> = (mutation: CompositeMutation, state: CompositeArtifactState<Root>) => PreparedCompositeMutation | null;
27
+ /**
28
+ * Owns one host projection and one exact native session. Public objects are
29
+ * location proxies, not aliases to a particular projection instance. Rare
30
+ * reconciliation mutations can therefore replace the host graph atomically;
31
+ * hot mutations retain both the host graph and native session.
32
+ */
33
+ export declare class CompositeArtifactState<Root extends object> {
34
+ #private;
35
+ readonly modality: CompositeModality;
36
+ readonly namespace: bigint;
37
+ constructor(input: Readonly<{
38
+ modality: CompositeModality;
39
+ namespace: bigint;
40
+ root: Root;
41
+ reconciliation: CompositeReconciliation;
42
+ reconcile: CompositeReconciler<Root>;
43
+ prepareMutation?: CompositeMutationPreparer<Root>;
44
+ installProjection?: (root: Root, state: CompositeArtifactState<Root>) => void;
45
+ readProperty?: (owner: unknown, member: PropertyKey, state: CompositeArtifactState<Root>) => CompositePropertyRead;
46
+ captureAuxiliary?: (root: Root) => unknown;
47
+ restoreAuxiliary?: (root: Root, value: unknown) => void;
48
+ }>);
49
+ get root(): Root;
50
+ get native(): NativeArtifactSession;
51
+ get nativeData(): unknown;
52
+ /** Monotonic facade revision across retained and rare replacement sessions. */
53
+ get revision(): number;
54
+ /** True only inside one explicit/public mutation transaction. */
55
+ get inMutation(): boolean;
56
+ proxy(): Root;
57
+ rawRoot(): Root;
58
+ assertUsable(): void;
59
+ onWorkbookChange(listener: (change: WorkbookChange) => void): () => void;
60
+ dispose(): void;
61
+ mutate<Result>(operation: () => Result, hint: CompositeMutation): Result;
62
+ wrap(locator: Locator<Root>): unknown;
63
+ }
64
+ export declare function stateOf(value: unknown): CompositeArtifactState<object> | null;
65
+ export declare function requireCompositeState(value: unknown, modality?: CompositeModality): CompositeArtifactState<object>;
66
+ export declare function unwrapArtifactValue(value: unknown): unknown;
67
+ export declare function nativeSessionOf(state: CompositeArtifactState<object>): NativeSpreadsheetSession | NativeDocumentSession | NativePresentationSession;
68
+ export {};