@shbernal/ts-pptx 3.2.0 → 3.4.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 (77) hide show
  1. package/README.md +19 -20
  2. package/dist/{autopage-QQyfRtoK.js → autopage-BYlTzX-l.js} +21 -17
  3. package/dist/autopage-BYlTzX-l.js.map +1 -0
  4. package/dist/browser.d.ts +6 -6
  5. package/dist/browser.js +11 -12
  6. package/dist/browser.js.map +1 -1
  7. package/dist/{diagnostics-Chjz_4_Q.d.ts → diagnostics-B0OmTOoz.d.ts} +65 -16
  8. package/dist/diagnostics-B0OmTOoz.d.ts.map +1 -0
  9. package/dist/{diagnostics-DYQC7xLV.js → diagnostics-CPVADSL1.js} +0 -0
  10. package/dist/{diagnostics-DYQC7xLV.js.map → diagnostics-CPVADSL1.js.map} +1 -1
  11. package/dist/{enums-CoXnxiCI.d.ts → enums-CvRYniUA.d.ts} +13 -3
  12. package/dist/{enums-CoXnxiCI.d.ts.map → enums-CvRYniUA.d.ts.map} +1 -1
  13. package/dist/{errors-BVLCFr-t.d.ts → errors-fB1KDJKQ.d.ts} +5 -5
  14. package/dist/{errors-BVLCFr-t.d.ts.map → errors-fB1KDJKQ.d.ts.map} +1 -1
  15. package/dist/{fit-DhMbQG5O.js → fit-TjpNbMru.js} +0 -0
  16. package/dist/fit-TjpNbMru.js.map +1 -0
  17. package/dist/{html-dom-DajBuobe.js → html-dom-yUSdCExA.js} +5 -6
  18. package/dist/html-dom-yUSdCExA.js.map +1 -0
  19. package/dist/html.d.ts +3 -3
  20. package/dist/html.js +1 -1
  21. package/dist/index.d.ts +6 -6
  22. package/dist/index.js +16 -34
  23. package/dist/index.js.map +1 -1
  24. package/dist/inspect.d.ts +1 -1
  25. package/dist/inspect.js +5 -4
  26. package/dist/inspect.js.map +1 -1
  27. package/dist/math.d.ts +1 -1
  28. package/dist/measure.d.ts +96 -6
  29. package/dist/measure.d.ts.map +1 -1
  30. package/dist/measure.js +2 -2
  31. package/dist/{st-enums-evQG2A7Z.js → namespaces-Sy_m7Nhd.js} +318 -209
  32. package/dist/namespaces-Sy_m7Nhd.js.map +1 -0
  33. package/dist/node.d.ts +6 -6
  34. package/dist/node.js +7 -20
  35. package/dist/node.js.map +1 -1
  36. package/dist/notes-bWApshah.js +1727 -0
  37. package/dist/notes-bWApshah.js.map +1 -0
  38. package/dist/{pres-C-EU3SkN.d.ts → pres-Dybf7ZUl.d.ts} +4 -4
  39. package/dist/{pres-C-EU3SkN.d.ts.map → pres-Dybf7ZUl.d.ts.map} +1 -1
  40. package/dist/{presentation-CxnUVhK9.js → presentation-3rAKKRfm.js} +1247 -743
  41. package/dist/presentation-3rAKKRfm.js.map +1 -0
  42. package/dist/{presentation-Osx1cDdJ.d.ts → presentation-types-D7cgT-eG.d.ts} +867 -24
  43. package/dist/presentation-types-D7cgT-eG.d.ts.map +1 -0
  44. package/dist/read.d.ts +4 -5
  45. package/dist/read.d.ts.map +1 -1
  46. package/dist/read.js +3 -3
  47. package/dist/script.d.ts +2 -2
  48. package/dist/script.d.ts.map +1 -1
  49. package/dist/script.js +0 -0
  50. package/dist/script.js.map +1 -1
  51. package/dist/{shapes-DoJBPrwN.js → shapes-Dyw5bxwO.js} +371 -52
  52. package/dist/shapes-Dyw5bxwO.js.map +1 -0
  53. package/dist/{slide-BTfn1Pyp.d.ts → slide-B_aInw3N.d.ts} +246 -182
  54. package/dist/slide-B_aInw3N.d.ts.map +1 -0
  55. package/dist/{text-C4P9MNdf.js → text-DSN3anEh.js} +3609 -4932
  56. package/dist/text-DSN3anEh.js.map +1 -0
  57. package/dist/{units-internal-CR8s8YQa.js → units-internal-DNvK2I6o.js} +207 -35
  58. package/dist/units-internal-DNvK2I6o.js.map +1 -0
  59. package/dist/zip.d.ts +2 -2
  60. package/package.json +36 -27
  61. package/dist/autopage-QQyfRtoK.js.map +0 -1
  62. package/dist/diagnostics-Chjz_4_Q.d.ts.map +0 -1
  63. package/dist/embedded-fonts-MaynAHa9.js +0 -94
  64. package/dist/embedded-fonts-MaynAHa9.js.map +0 -1
  65. package/dist/fit-DhMbQG5O.js.map +0 -1
  66. package/dist/html-dom-DajBuobe.js.map +0 -1
  67. package/dist/presentation-CxnUVhK9.js.map +0 -1
  68. package/dist/presentation-Osx1cDdJ.d.ts.map +0 -1
  69. package/dist/presentation-types-Dj4riuDs.d.ts +0 -538
  70. package/dist/presentation-types-Dj4riuDs.d.ts.map +0 -1
  71. package/dist/shapes-DoJBPrwN.js.map +0 -1
  72. package/dist/slide-BTfn1Pyp.d.ts.map +0 -1
  73. package/dist/st-enums-evQG2A7Z.js.map +0 -1
  74. package/dist/text-C4P9MNdf.js.map +0 -1
  75. package/dist/units-C7QM1KgH.js +0 -144
  76. package/dist/units-C7QM1KgH.js.map +0 -1
  77. package/dist/units-internal-CR8s8YQa.js.map +0 -1
package/dist/node.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { C as isChartExType, S as connectorPresetFor, _ as TextAnchor, a as CONNECTOR_PRESETS, b as ZIP_OUTPUT_TYPE, c as OutputType, d as SCHEME_COLORS, f as SHAPE_NAME, g as TableStyle, h as SlideObjectType, i as CHART_NAME, l as PLACEHOLDER_TYPE, m as ShapeType, n as AlignV, o as CONNECTOR_PRESET_NAME, p as SchemeColor, r as BulletType, s as ChartType, t as AlignH, u as PlaceholderType, v as VALID_SHAPE_PRESETS, x as asChartType, y as WRITE_OUTPUT_TYPE } from "./enums-CoXnxiCI.js";
2
- import { $ as HAlign, $t as ChartSeriesOpts, A as TableToSlidesDocument, At as ChartLineDash, B as ShapeAdjustHandleXY, Bt as ChartPropsChartHistogram, C as TableCell, Ct as ChartAreaProps, D as TableProps, Dt as ChartExBinning, E as TableCellProps, Et as ChartErrorBarOptions, F as MediaProps, Ft as ChartPropsAxisVal, G as BackgroundProps, Gt as ChartPropsChartStock, H as ShapeConnectionSite, Ht as ChartPropsChartPie, I as MediaType, It as ChartPropsBase, J as DataOrPathProps, Jt as ChartPropsDataLabel, K as Color, Kt as ChartPropsChartSurface, L as OleObjectProps, Lt as ChartPropsChartBar, M as TableToSlidesProps, Mt as ChartOpts, N as ImageBaseProps, Nt as ChartPropsAxisCat, O as TableRow, Ot as ChartExGeography, P as ImageProps, Pt as ChartPropsAxisSer, Q as GradientStopProps, Qt as ChartPropsTitle, R as ShapeAdjustHandle, Rt as ChartPropsChartBoxWhisker, S as TransitionType, Sn as textRuns, St as PresetMaterialType, T as TableCellDiagonals, Tt as ChartDataPointStyle, U as ShapeGuide, Ut as ChartPropsChartRadar, V as ShapeAdjustValue, Vt as ChartPropsChartLine, W as ShapeProps, Wt as ChartPropsChartRegionMap, X as GeometryPoint, Xt as ChartPropsFillLine, Y as DataOrPathRequiredProps, Yt as ChartPropsDataTable, Z as GradientFillProps, Zt as ChartPropsLegend, _ as AnimationProps, _n as TextGlowProps, _t as ShapeFillProps, a as Slide, an as PlaceholderProps, at as PatternPreset, b as TransitionProps, bn as TextPropsOptions, bt as LightRigDirection, c as Model3dPoint, cn as NotesProps, ct as TextVertType, d as MasterTextStyleLevel, dn as ResolvedCommentAuthor, dt as BorderProps, en as LineCap, et as HexColor, f as MasterTextStyleProps, fn as SlideComment, ft as ConnectorProps, g as SlideNumberProps, gn as TextFitShrinkProps, gt as ShadowProps, h as SlideMasterProps, hn as TextBaseProps, ht as HyperlinkProps, i as ObjectOptions, in as ObjectNameProps, it as PatternFillProps, j as TableToSlidesElement, jt as ChartMulti, k as TableRowSlide, kt as ChartExStatistics, l as Model3dProps, ln as NotesTextOptions, lt as ThemeColor, m as SlideMasterObject, mn as TableLayoutResult, mt as HyperlinkActionJump, n as GroupChildProps, nn as OptsChartGridLine, nt as LinearGradientFillProps, o as SlideLayout, on as CommentProps, ot as PositionProps, p as SlideMasterChartProps, pn as TableCellLayout, pt as ConnectorType, q as Coord, qt as ChartPropsChartWaterfall, r as GroupProps, rn as ObjectLockProps, rt as Margin, s as Model3dCameraProps, sn as MeasureTextOptions, st as RadialGradientFillProps, t as AddSlideProps, tn as OptsChartData, tt as ImageFillProps, u as MasterBulletProps, un as OverflowBoxOptions, ut as VAlign, v as AnimationTrigger, vn as TextMeasurement, vt as ShapeLineProps, w as TableCell3DProps, wt as ChartAxisTickMark, x as TransitionSoundProps, xn as textRun, xt as LightRigType, y as PresetEffect, yn as TextProps, yt as BevelPresetType, z as ShapeAdjustHandlePolar, zt as ChartPropsChartDoughnut } from "./slide-BTfn1Pyp.js";
3
- import { a as PresentationProps, c as WriteFileProps, d as ThemeProps, i as PresLayout, l as WriteProps, n as PackagePart, o as SectionProps, r as PartsProps, s as WriteBaseProps, t as CustomPropertyValue, u as ThemeColorScheme } from "./pres-C-EU3SkN.js";
4
- import { A as SectionZoomProps, C as emuToPixels, D as pixelsToEmu, E as percentToEmu, M as SummaryZoomProps, N as ZoomBaseProps, O as pointsToEmu, S as emuToInches, T as inchesToEmu, _ as POINTS_PER_INCH, a as FlatSide, b as StandardLayoutName, c as PresentationCore, d as EMU_PER_INCH, f as EMU_PER_POINT, g as PERCENT_SCALE, h as HUNDREDTHS_PER_POINT, i as ClipShape, j as SlideZoomProps, k as ptToHundredths, l as ANGLE_UNITS_PER_DEGREE, m as FIXED_PCT_PER_PERCENT, n as DiagnosticHandler, o as HalfDiscPreset, p as Emu, r as setDiagnosticHandler, s as clipPath, t as Diagnostic, u as DEFAULT_PX_PER_INCH, v as STANDARD_LAYOUTS, w as emuToPoints, x as coordToEmu, y as StandardLayout } from "./diagnostics-Chjz_4_Q.js";
5
- import { a as TsPptxError, c as DiagnosticCode, d as InvalidOptionErrorCode, f as MediaErrorCode, h as UnsupportedFeatureErrorCode, i as PackageReadError, l as ErrorCode, m as TsPptxCode, n as InvalidOptionError, o as TsPptxErrorOptions, p as PackageReadErrorCode, r as MediaError, s as UnsupportedFeatureError, t as InternalError, u as InternalErrorCode } from "./errors-BVLCFr-t.js";
1
+ import { C as isChartExType, S as connectorPresetFor, _ as TextAnchor, a as CONNECTOR_PRESETS, b as ZIP_OUTPUT_TYPE, c as OutputType, d as SCHEME_COLORS, f as SHAPE_NAME, g as TableStyle, h as SlideObjectType, i as CHART_NAME, l as PLACEHOLDER_TYPE, m as ShapeType, n as AlignV, o as CONNECTOR_PRESET_NAME, p as SchemeColor, r as BulletType, s as ChartType, t as AlignH, u as PlaceholderType, v as VALID_SHAPE_PRESETS, w as isChartType, x as asChartType, y as WRITE_OUTPUT_TYPE } from "./enums-CvRYniUA.js";
2
+ import { $ as PositionProps, $t as CommentProps, A as TableToSlidesDocument, At as ChartPropsChartBar, B as Coord, Bt as ChartPropsChartWaterfall, C as TableCell, Ct as ChartLineDash, D as TableProps, Dt as ChartPropsAxisSer, E as TableCellProps, Et as ChartPropsAxisCat, F as MediaProps, Ft as ChartPropsChartPie, G as GradientStopProps, Gt as ChartPropsTitle, H as DataOrPathRequiredProps, Ht as ChartPropsDataTable, I as MediaType, It as ChartPropsChartRadar, J as ImageFillProps, Jt as OptsChartData, K as HAlign, Kt as ChartSeriesOpts, L as OleObjectProps, Lt as ChartPropsChartRegionMap, M as TableToSlidesProps, Mt as ChartPropsChartDoughnut, N as ImageBaseProps, Nt as ChartPropsChartHistogram, O as TableRow, Ot as ChartPropsAxisVal, P as ImageProps, Pt as ChartPropsChartLine, Q as PatternPreset, Qt as PlaceholderProps, R as BackgroundProps, Rt as ChartPropsChartStock, S as TransitionType, Sn as ShapeProps, St as ChartExStatistics, T as TableCellDiagonals, Tt as ChartOpts, U as GeometryPoint, Ut as ChartPropsFillLine, V as DataOrPathProps, Vt as ChartPropsDataLabel, W as GradientFillProps, Wt as ChartPropsLegend, X as Margin, Xt as ObjectLockProps, Y as LinearGradientFillProps, Yt as OptsChartGridLine, Z as PatternFillProps, Zt as ObjectNameProps, _ as AnimationProps, _n as ShapeAdjustHandlePolar, _t as ChartAxisTickMark, a as Slide, an as SlideComment, at as ConnectorProps, b as TransitionProps, bn as ShapeConnectionSite, bt as ChartExBinning, c as Model3dPoint, cn as TextBaseProps, ct as HyperlinkProps, d as MasterTextStyleLevel, dn as TextMeasurement, dt as ShapeLineProps, en as MeasureTextOptions, et as RadialGradientFillProps, f as MasterTextStyleProps, fn as TextProps, ft as BevelPresetType, g as SlideNumberProps, gn as ShapeAdjustHandle, gt as ChartAreaProps, h as SlideMasterProps, hn as textRuns, ht as PresetMaterialType, i as ObjectOptions, in as ResolvedCommentAuthor, it as BorderProps, j as TableToSlidesElement, jt as ChartPropsChartBoxWhisker, k as TableRowSlide, kt as ChartPropsBase, l as Model3dProps, ln as TextFitShrinkProps, lt as ShadowProps, m as SlideMasterObject, mn as textRun, mt as LightRigType, n as GroupChildProps, nn as NotesTextOptions, nt as ThemeColor, o as SlideLayout, on as TableCellLayout, ot as ConnectorType, p as SlideMasterChartProps, pn as TextPropsOptions, pt as LightRigDirection, q as HexColor, qt as LineCap, r as GroupProps, rn as OverflowBoxOptions, rt as VAlign, s as Model3dCameraProps, sn as TableLayoutResult, st as HyperlinkActionJump, t as AddSlideProps, tn as NotesProps, tt as TextVertType, u as MasterBulletProps, un as TextGlowProps, ut as ShapeFillProps, v as AnimationTrigger, vn as ShapeAdjustHandleXY, vt as ChartDataPointStyle, w as TableCell3DProps, wt as ChartMulti, x as TransitionSoundProps, xn as ShapeGuide, xt as ChartExGeography, y as PresetEffect, yn as ShapeAdjustValue, yt as ChartErrorBarOptions, z as Color, zt as ChartPropsChartSurface } from "./slide-B_aInw3N.js";
3
+ import { a as PresentationProps, c as WriteFileProps, d as ThemeProps, i as PresLayout, l as WriteProps, n as PackagePart, o as SectionProps, r as PartsProps, s as WriteBaseProps, t as CustomPropertyValue, u as ThemeColorScheme } from "./pres-Dybf7ZUl.js";
4
+ import { A as ptToHundredths, C as emuToInches, D as percentToEmu, E as inchesToEmu, M as SlideZoomProps, N as SummaryZoomProps, O as pixelsToEmu, P as ZoomBaseProps, S as coordToEmu, T as emuToPoints, _ as PERCENT_SCALE, a as ClipShape, b as StandardLayout, c as clipPath, d as DEFAULT_PX_PER_INCH, f as EMU_PER_INCH, g as HUNDREDTHS_PER_POINT, h as FIXED_PCT_PER_PERCENT, i as setDiagnosticHandler, j as SectionZoomProps, k as pointsToEmu, l as PresentationCore, m as Emu, n as DiagnosticHandler, o as FlatSide, p as EMU_PER_POINT, r as resetDiagnosticState, s as HalfDiscPreset, t as Diagnostic, u as ANGLE_UNITS_PER_DEGREE, v as POINTS_PER_INCH, w as emuToPixels, x as StandardLayoutName, y as STANDARD_LAYOUTS } from "./diagnostics-B0OmTOoz.js";
5
+ import { a as TsPptxError, c as DiagnosticCode, d as InvalidOptionErrorCode, f as MediaErrorCode, h as UnsupportedFeatureErrorCode, i as PackageReadError, l as ErrorCode, m as TsPptxCode, n as InvalidOptionError, o as TsPptxErrorOptions, p as PackageReadErrorCode, r as MediaError, s as UnsupportedFeatureError, t as InternalError, u as InternalErrorCode } from "./errors-fB1KDJKQ.js";
6
6
  //#region src/node.d.ts
7
7
  /**
8
8
  * The Node entry, reached through the `node` export condition — a consumer importing the bare
@@ -16,5 +16,5 @@ declare class TsPptx extends PresentationCore {
16
16
  constructor();
17
17
  }
18
18
  //#endregion
19
- export { ANGLE_UNITS_PER_DEGREE, AddSlideProps, AlignH, AlignV, AnimationProps, AnimationTrigger, BackgroundProps, type BevelPresetType, BorderProps, BulletType, CHART_NAME, CONNECTOR_PRESETS, CONNECTOR_PRESET_NAME, ChartAreaProps, ChartAxisTickMark, ChartDataPointStyle, ChartErrorBarOptions, ChartExBinning, ChartExGeography, ChartExStatistics, ChartLineDash, ChartMulti, ChartOpts, ChartPropsAxisCat, ChartPropsAxisSer, ChartPropsAxisVal, ChartPropsBase, ChartPropsChartBar, ChartPropsChartBoxWhisker, ChartPropsChartDoughnut, ChartPropsChartHistogram, ChartPropsChartLine, ChartPropsChartPie, ChartPropsChartRadar, ChartPropsChartRegionMap, ChartPropsChartStock, ChartPropsChartSurface, ChartPropsChartWaterfall, ChartPropsDataLabel, ChartPropsDataTable, ChartPropsFillLine, ChartPropsLegend, ChartPropsTitle, ChartSeriesOpts, ChartType, ClipShape, Color, CommentProps, ConnectorProps, ConnectorType, Coord, CustomPropertyValue, DEFAULT_PX_PER_INCH, DataOrPathProps, DataOrPathRequiredProps, type Diagnostic, type DiagnosticCode, type DiagnosticHandler, EMU_PER_INCH, EMU_PER_POINT, Emu, type ErrorCode, FIXED_PCT_PER_PERCENT, FlatSide, GeometryPoint, GradientFillProps, GradientStopProps, GroupChildProps, GroupProps, HAlign, HUNDREDTHS_PER_POINT, HalfDiscPreset, HexColor, HyperlinkActionJump, HyperlinkProps, ImageBaseProps, ImageFillProps, ImageProps, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, type LightRigDirection, type LightRigType, LineCap, LinearGradientFillProps, Margin, MasterBulletProps, MasterTextStyleLevel, MasterTextStyleProps, MeasureTextOptions, MediaError, type MediaErrorCode, MediaProps, MediaType, Model3dCameraProps, Model3dPoint, Model3dProps, NotesProps, NotesTextOptions, ObjectLockProps, ObjectNameProps, ObjectOptions, OleObjectProps, OptsChartData, OptsChartGridLine, OutputType, OverflowBoxOptions, PERCENT_SCALE, PLACEHOLDER_TYPE, POINTS_PER_INCH, PackagePart, PackageReadError, type PackageReadErrorCode, PartsProps, PatternFillProps, PatternPreset, PlaceholderProps, PlaceholderType, PositionProps, PresLayout, PresentationProps, PresetEffect, type PresetMaterialType, RadialGradientFillProps, ResolvedCommentAuthor, SCHEME_COLORS, SHAPE_NAME, STANDARD_LAYOUTS, SchemeColor, SectionProps, SectionZoomProps, ShadowProps, ShapeAdjustHandle, ShapeAdjustHandlePolar, ShapeAdjustHandleXY, ShapeAdjustValue, ShapeConnectionSite, ShapeFillProps, ShapeGuide, ShapeLineProps, ShapeProps, ShapeType, Slide, SlideComment, SlideLayout, SlideMasterChartProps, SlideMasterObject, SlideMasterProps, SlideNumberProps, SlideObjectType, SlideZoomProps, StandardLayout, StandardLayoutName, SummaryZoomProps, TableCell, TableCell3DProps, TableCellDiagonals, TableCellLayout, TableCellProps, TableLayoutResult, TableProps, TableRow, TableRowSlide, TableStyle, TableToSlidesDocument, TableToSlidesElement, TableToSlidesProps, TextAnchor, TextBaseProps, TextFitShrinkProps, TextGlowProps, TextMeasurement, TextProps, TextPropsOptions, TextVertType, ThemeColor, ThemeColorScheme, ThemeProps, TransitionProps, TransitionSoundProps, TransitionType, TsPptx, TsPptx as default, type TsPptxCode, TsPptxError, type TsPptxErrorOptions, UnsupportedFeatureError, type UnsupportedFeatureErrorCode, VALID_SHAPE_PRESETS, VAlign, WRITE_OUTPUT_TYPE, WriteBaseProps, WriteFileProps, WriteProps, ZIP_OUTPUT_TYPE, ZoomBaseProps, asChartType, clipPath, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, setDiagnosticHandler, textRun, textRuns };
19
+ export { ANGLE_UNITS_PER_DEGREE, AddSlideProps, AlignH, AlignV, AnimationProps, AnimationTrigger, BackgroundProps, type BevelPresetType, BorderProps, BulletType, CHART_NAME, CONNECTOR_PRESETS, CONNECTOR_PRESET_NAME, ChartAreaProps, ChartAxisTickMark, ChartDataPointStyle, ChartErrorBarOptions, ChartExBinning, ChartExGeography, ChartExStatistics, ChartLineDash, ChartMulti, ChartOpts, ChartPropsAxisCat, ChartPropsAxisSer, ChartPropsAxisVal, ChartPropsBase, ChartPropsChartBar, ChartPropsChartBoxWhisker, ChartPropsChartDoughnut, ChartPropsChartHistogram, ChartPropsChartLine, ChartPropsChartPie, ChartPropsChartRadar, ChartPropsChartRegionMap, ChartPropsChartStock, ChartPropsChartSurface, ChartPropsChartWaterfall, ChartPropsDataLabel, ChartPropsDataTable, ChartPropsFillLine, ChartPropsLegend, ChartPropsTitle, ChartSeriesOpts, ChartType, ClipShape, Color, CommentProps, ConnectorProps, ConnectorType, Coord, CustomPropertyValue, DEFAULT_PX_PER_INCH, DataOrPathProps, DataOrPathRequiredProps, type Diagnostic, type DiagnosticCode, type DiagnosticHandler, EMU_PER_INCH, EMU_PER_POINT, Emu, type ErrorCode, FIXED_PCT_PER_PERCENT, FlatSide, GeometryPoint, GradientFillProps, GradientStopProps, GroupChildProps, GroupProps, HAlign, HUNDREDTHS_PER_POINT, HalfDiscPreset, HexColor, HyperlinkActionJump, HyperlinkProps, ImageBaseProps, ImageFillProps, ImageProps, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, type LightRigDirection, type LightRigType, LineCap, LinearGradientFillProps, Margin, MasterBulletProps, MasterTextStyleLevel, MasterTextStyleProps, MeasureTextOptions, MediaError, type MediaErrorCode, MediaProps, MediaType, Model3dCameraProps, Model3dPoint, Model3dProps, NotesProps, NotesTextOptions, ObjectLockProps, ObjectNameProps, ObjectOptions, OleObjectProps, OptsChartData, OptsChartGridLine, OutputType, OverflowBoxOptions, PERCENT_SCALE, PLACEHOLDER_TYPE, POINTS_PER_INCH, PackagePart, PackageReadError, type PackageReadErrorCode, PartsProps, PatternFillProps, PatternPreset, PlaceholderProps, PlaceholderType, PositionProps, PresLayout, PresentationProps, PresetEffect, type PresetMaterialType, RadialGradientFillProps, ResolvedCommentAuthor, SCHEME_COLORS, SHAPE_NAME, STANDARD_LAYOUTS, SchemeColor, SectionProps, SectionZoomProps, ShadowProps, ShapeAdjustHandle, ShapeAdjustHandlePolar, ShapeAdjustHandleXY, ShapeAdjustValue, ShapeConnectionSite, ShapeFillProps, ShapeGuide, ShapeLineProps, ShapeProps, ShapeType, Slide, SlideComment, SlideLayout, SlideMasterChartProps, SlideMasterObject, SlideMasterProps, SlideNumberProps, SlideObjectType, SlideZoomProps, StandardLayout, StandardLayoutName, SummaryZoomProps, TableCell, TableCell3DProps, TableCellDiagonals, TableCellLayout, TableCellProps, TableLayoutResult, TableProps, TableRow, TableRowSlide, TableStyle, TableToSlidesDocument, TableToSlidesElement, TableToSlidesProps, TextAnchor, TextBaseProps, TextFitShrinkProps, TextGlowProps, TextMeasurement, TextProps, TextPropsOptions, TextVertType, ThemeColor, ThemeColorScheme, ThemeProps, TransitionProps, TransitionSoundProps, TransitionType, TsPptx, TsPptx as default, type TsPptxCode, TsPptxError, type TsPptxErrorOptions, UnsupportedFeatureError, type UnsupportedFeatureErrorCode, VALID_SHAPE_PRESETS, VAlign, WRITE_OUTPUT_TYPE, WriteBaseProps, WriteFileProps, WriteProps, ZIP_OUTPUT_TYPE, ZoomBaseProps, asChartType, clipPath, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, isChartType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, resetDiagnosticState, setDiagnosticHandler, textRun, textRuns };
20
20
  //# sourceMappingURL=node.d.ts.map
package/dist/node.js CHANGED
@@ -1,8 +1,7 @@
1
- import { t as setDiagnosticHandler } from "./diagnostics-DYQC7xLV.js";
1
+ import { n as setDiagnosticHandler, t as resetDiagnosticState } from "./diagnostics-CPVADSL1.js";
2
2
  import { a as TsPptxError, i as PackageReadError, n as InvalidOptionError, o as UnsupportedFeatureError, r as MediaError, t as InternalError } from "./errors-Bvln0H-7.js";
3
- import { _ as pointsToEmu, a as FIXED_PCT_PER_PERCENT, c as POINTS_PER_INCH, d as emuToInches, f as emuToPixels, g as pixelsToEmu, h as percentToEmu, i as EMU_PER_POINT, l as STANDARD_LAYOUTS, m as inchesToEmu, n as DEFAULT_PX_PER_INCH, o as HUNDREDTHS_PER_POINT, p as emuToPoints, r as EMU_PER_INCH, s as PERCENT_SCALE, t as ANGLE_UNITS_PER_DEGREE, u as coordToEmu, v as ptToHundredths } from "./units-C7QM1KgH.js";
4
- import { i as PresentationCore, n as textRuns, r as clipPath, t as textRun } from "./text-C4P9MNdf.js";
5
- import { $ as connectorPresetFor, B as AlignV, G as PlaceholderType, H as CONNECTOR_PRESETS, J as SlideObjectType, K as SchemeColor, Q as asChartType, U as ChartType, V as BulletType, W as OutputType, X as TextAnchor, Y as TableStyle, Z as VALID_SHAPE_PRESETS, et as isChartExType, j as IMG_SVG_PLACEHOLDER, q as ShapeType, z as AlignH } from "./units-internal-CR8s8YQa.js";
3
+ import { $ as VALID_SHAPE_PRESETS, G as ChartType, H as AlignV, J as SchemeColor, K as OutputType, Q as TextAnchor, U as BulletType, V as AlignH, W as CONNECTOR_PRESETS, X as SlideObjectType, Y as ShapeType, Z as TableStyle, _t as inchesToEmu, at as DEFAULT_PX_PER_INCH, bt as pointsToEmu, ct as FIXED_PCT_PER_PERCENT, dt as POINTS_PER_INCH, et as asChartType, ft as STANDARD_LAYOUTS, gt as emuToPoints, ht as emuToPixels, it as ANGLE_UNITS_PER_DEGREE, lt as HUNDREDTHS_PER_POINT, mt as emuToInches, nt as isChartExType, ot as EMU_PER_INCH, pt as coordToEmu, q as PlaceholderType, rt as isChartType, st as EMU_PER_POINT, tt as connectorPresetFor, ut as PERCENT_SCALE, vt as percentToEmu, xt as ptToHundredths, yt as pixelsToEmu } from "./units-internal-DNvK2I6o.js";
4
+ import { a as fetchMediaBase64, c as PresentationCore, i as fetchFontBytes, n as textRuns, o as isRemote, r as clipPath, s as placeholderSvgPreview, t as textRun } from "./text-DSN3anEh.js";
6
5
  import { Buffer } from "node:buffer";
7
6
  import fs from "node:fs/promises";
8
7
  //#region src/runtime/node.ts
@@ -10,17 +9,13 @@ function createNodeRuntime() {
10
9
  return {
11
10
  writeFileOutputType: "nodebuffer",
12
11
  loadMedia,
13
- createSvgPngPreview,
12
+ createSvgPngPreview: placeholderSvgPreview,
14
13
  writeFile,
15
14
  loadFontData
16
15
  };
17
16
  }
18
17
  async function loadFontData(source) {
19
- if (source.startsWith("http")) {
20
- const response = await fetch(source);
21
- if (!response.ok) throw new MediaError("font/fetch-failed", `Unable to load font (fetch): ${source}`);
22
- return new Uint8Array(await response.arrayBuffer());
23
- }
18
+ if (isRemote(source)) return await fetchFontBytes(source);
24
19
  try {
25
20
  return new Uint8Array(await fs.readFile(source));
26
21
  } catch (ex) {
@@ -28,21 +23,13 @@ async function loadFontData(source) {
28
23
  }
29
24
  }
30
25
  async function loadMedia(rel) {
31
- if (rel.path.startsWith("http")) {
32
- const response = await fetch(rel.path);
33
- if (!response.ok) throw new MediaError("media/fetch-failed", `Unable to load image (fetch): ${rel.path}`);
34
- return Buffer.from(await response.arrayBuffer()).toString("base64");
35
- }
26
+ if (isRemote(rel.path)) return await fetchMediaBase64(rel.path);
36
27
  try {
37
28
  return Buffer.from(await fs.readFile(rel.path)).toString("base64");
38
29
  } catch (ex) {
39
30
  throw new MediaError("media/read-failed", `Unable to read media: "${rel.path}"\n${String(ex)}`, { cause: ex });
40
31
  }
41
32
  }
42
- async function createSvgPngPreview(rel) {
43
- rel.data = IMG_SVG_PLACEHOLDER;
44
- return "done";
45
- }
46
33
  async function writeFile(fileName, data) {
47
34
  await fs.writeFile(fileName, data);
48
35
  return fileName;
@@ -63,6 +50,6 @@ var TsPptx = class extends PresentationCore {
63
50
  }
64
51
  };
65
52
  //#endregion
66
- export { ANGLE_UNITS_PER_DEGREE, AlignH, AlignV, BulletType, CONNECTOR_PRESETS, ChartType, DEFAULT_PX_PER_INCH, EMU_PER_INCH, EMU_PER_POINT, FIXED_PCT_PER_PERCENT, HUNDREDTHS_PER_POINT, InternalError, InvalidOptionError, MediaError, OutputType, PERCENT_SCALE, POINTS_PER_INCH, PackageReadError, PlaceholderType, STANDARD_LAYOUTS, SchemeColor, ShapeType, SlideObjectType, TableStyle, TextAnchor, TsPptx, TsPptx as default, TsPptxError, UnsupportedFeatureError, VALID_SHAPE_PRESETS, asChartType, clipPath, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, setDiagnosticHandler, textRun, textRuns };
53
+ export { ANGLE_UNITS_PER_DEGREE, AlignH, AlignV, BulletType, CONNECTOR_PRESETS, ChartType, DEFAULT_PX_PER_INCH, EMU_PER_INCH, EMU_PER_POINT, FIXED_PCT_PER_PERCENT, HUNDREDTHS_PER_POINT, InternalError, InvalidOptionError, MediaError, OutputType, PERCENT_SCALE, POINTS_PER_INCH, PackageReadError, PlaceholderType, STANDARD_LAYOUTS, SchemeColor, ShapeType, SlideObjectType, TableStyle, TextAnchor, TsPptx, TsPptx as default, TsPptxError, UnsupportedFeatureError, VALID_SHAPE_PRESETS, asChartType, clipPath, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, isChartType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, resetDiagnosticState, setDiagnosticHandler, textRun, textRuns };
67
54
 
68
55
  //# sourceMappingURL=node.js.map
package/dist/node.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"node.js","names":[],"sources":["../src/runtime/node.ts","../src/node.ts"],"sourcesContent":["import { Buffer } from 'node:buffer'\nimport fs from 'node:fs/promises'\nimport { IMG_SVG_PLACEHOLDER } from '../constants-internal.js'\nimport { MediaError } from '../errors.js'\nimport type { SlideRelMedia } from '../types/internal.js'\nimport type { RuntimeAdapter } from './types.js'\n\nexport function createNodeRuntime(): RuntimeAdapter {\n\treturn {\n\t\twriteFileOutputType: 'nodebuffer',\n\t\tloadMedia,\n\t\tcreateSvgPngPreview,\n\t\twriteFile,\n\t\tloadFontData,\n\t}\n}\n\nasync function loadFontData(source: string): Promise<Uint8Array> {\n\tif (source.startsWith('http')) {\n\t\tconst response = await fetch(source)\n\t\tif (!response.ok) throw new MediaError('font/fetch-failed', `Unable to load font (fetch): ${source}`)\n\t\treturn new Uint8Array(await response.arrayBuffer())\n\t}\n\ttry {\n\t\treturn new Uint8Array(await fs.readFile(source))\n\t} catch (ex) {\n\t\tthrow new MediaError('font/read-failed', `Unable to read font file: \"${source}\"\\n${String(ex)}`, {\n\t\t\tcause: ex,\n\t\t})\n\t}\n}\n\nasync function loadMedia(rel: SlideRelMedia & { path: string }): Promise<string> {\n\tif (rel.path.startsWith('http')) {\n\t\tconst response = await fetch(rel.path)\n\t\tif (!response.ok) throw new MediaError('media/fetch-failed', `Unable to load image (fetch): ${rel.path}`)\n\t\treturn Buffer.from(await response.arrayBuffer()).toString('base64')\n\t}\n\n\ttry {\n\t\treturn Buffer.from(await fs.readFile(rel.path)).toString('base64')\n\t} catch (ex) {\n\t\tthrow new MediaError('media/read-failed', `Unable to read media: \"${rel.path}\"\\n${String(ex)}`, {\n\t\t\tcause: ex,\n\t\t})\n\t}\n}\n\nasync function createSvgPngPreview(rel: SlideRelMedia): Promise<string> {\n\trel.data = IMG_SVG_PLACEHOLDER\n\treturn 'done'\n}\n\nasync function writeFile(fileName: string, data: string | ArrayBuffer | Blob | Uint8Array): Promise<string> {\n\tawait fs.writeFile(fileName, data as string | Uint8Array)\n\treturn fileName\n}\n","import PresentationCore from './presentation.js'\nimport { createNodeRuntime } from './runtime/node.js'\n\n/**\n * The Node entry, reached through the `node` export condition — a consumer importing the bare\n * `@shbernal/ts-pptx` specifier under Node lands here without naming this subpath.\n *\n * Same authoring API as every other entry (see `entry-surface.ts`); the runtime adapter is what\n * differs. This one can reach the filesystem, so `writeFile` writes a real file and media may be\n * loaded from a path — both of which throw on the runtime-agnostic entry.\n */\nexport class TsPptx extends PresentationCore {\n\tconstructor() {\n\t\tsuper(createNodeRuntime())\n\t}\n}\n\nexport { TsPptx as default }\nexport * from './entry-surface.js'\n"],"mappings":";;;;;;;;AAOA,SAAgB,oBAAoC;CACnD,OAAO;EACN,qBAAqB;EACrB;EACA;EACA;EACA;CACD;AACD;AAEA,eAAe,aAAa,QAAqC;CAChE,IAAI,OAAO,WAAW,MAAM,GAAG;EAC9B,MAAM,WAAW,MAAM,MAAM,MAAM;EACnC,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,WAAW,qBAAqB,gCAAgC,QAAQ;EACpG,OAAO,IAAI,WAAW,MAAM,SAAS,YAAY,CAAC;CACnD;CACA,IAAI;EACH,OAAO,IAAI,WAAW,MAAM,GAAG,SAAS,MAAM,CAAC;CAChD,SAAS,IAAI;EACZ,MAAM,IAAI,WAAW,oBAAoB,8BAA8B,OAAO,KAAK,OAAO,EAAE,KAAK,EAChG,OAAO,GACR,CAAC;CACF;AACD;AAEA,eAAe,UAAU,KAAwD;CAChF,IAAI,IAAI,KAAK,WAAW,MAAM,GAAG;EAChC,MAAM,WAAW,MAAM,MAAM,IAAI,IAAI;EACrC,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,WAAW,sBAAsB,iCAAiC,IAAI,MAAM;EACxG,OAAO,OAAO,KAAK,MAAM,SAAS,YAAY,CAAC,CAAC,CAAC,SAAS,QAAQ;CACnE;CAEA,IAAI;EACH,OAAO,OAAO,KAAK,MAAM,GAAG,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,QAAQ;CAClE,SAAS,IAAI;EACZ,MAAM,IAAI,WAAW,qBAAqB,0BAA0B,IAAI,KAAK,KAAK,OAAO,EAAE,KAAK,EAC/F,OAAO,GACR,CAAC;CACF;AACD;AAEA,eAAe,oBAAoB,KAAqC;CACvE,IAAI,OAAO;CACX,OAAO;AACR;AAEA,eAAe,UAAU,UAAkB,MAAiE;CAC3G,MAAM,GAAG,UAAU,UAAU,IAA2B;CACxD,OAAO;AACR;;;;;;;;;;;AC7CA,IAAa,SAAb,cAA4B,iBAAiB;CAC5C,cAAc;EACb,MAAM,kBAAkB,CAAC;CAC1B;AACD"}
1
+ {"version":3,"file":"node.js","names":[],"sources":["../src/runtime/node.ts","../src/node.ts"],"sourcesContent":["import { Buffer } from 'node:buffer'\nimport fs from 'node:fs/promises'\nimport { MediaError } from '../errors.js'\nimport type { SlideRelMedia } from '../types/internal.js'\nimport type { RuntimeAdapter } from './types.js'\nimport { fetchFontBytes, fetchMediaBase64, isRemote, placeholderSvgPreview } from './fetch-media.js'\n\nexport function createNodeRuntime(): RuntimeAdapter {\n\treturn {\n\t\twriteFileOutputType: 'nodebuffer',\n\t\tloadMedia,\n\t\tcreateSvgPngPreview: placeholderSvgPreview,\n\t\twriteFile,\n\t\tloadFontData,\n\t}\n}\n\nasync function loadFontData(source: string): Promise<Uint8Array> {\n\tif (isRemote(source)) return await fetchFontBytes(source)\n\ttry {\n\t\treturn new Uint8Array(await fs.readFile(source))\n\t} catch (ex) {\n\t\tthrow new MediaError('font/read-failed', `Unable to read font file: \"${source}\"\\n${String(ex)}`, {\n\t\t\tcause: ex,\n\t\t})\n\t}\n}\n\nasync function loadMedia(rel: SlideRelMedia & { path: string }): Promise<string> {\n\tif (isRemote(rel.path)) return await fetchMediaBase64(rel.path)\n\n\ttry {\n\t\treturn Buffer.from(await fs.readFile(rel.path)).toString('base64')\n\t} catch (ex) {\n\t\tthrow new MediaError('media/read-failed', `Unable to read media: \"${rel.path}\"\\n${String(ex)}`, {\n\t\t\tcause: ex,\n\t\t})\n\t}\n}\n\nasync function writeFile(fileName: string, data: string | ArrayBuffer | Blob | Uint8Array): Promise<string> {\n\tawait fs.writeFile(fileName, data as string | Uint8Array)\n\treturn fileName\n}\n","import PresentationCore from './presentation.js'\nimport { createNodeRuntime } from './runtime/node.js'\n\n/**\n * The Node entry, reached through the `node` export condition — a consumer importing the bare\n * `@shbernal/ts-pptx` specifier under Node lands here without naming this subpath.\n *\n * Same authoring API as every other entry (see `entry-surface.ts`); the runtime adapter is what\n * differs. This one can reach the filesystem, so `writeFile` writes a real file and media may be\n * loaded from a path — both of which throw on the runtime-agnostic entry.\n */\nexport class TsPptx extends PresentationCore {\n\tconstructor() {\n\t\tsuper(createNodeRuntime())\n\t}\n}\n\nexport { TsPptx as default }\nexport * from './entry-surface.js'\n"],"mappings":";;;;;;;AAOA,SAAgB,oBAAoC;CACnD,OAAO;EACN,qBAAqB;EACrB;EACA,qBAAqB;EACrB;EACA;CACD;AACD;AAEA,eAAe,aAAa,QAAqC;CAChE,IAAI,SAAS,MAAM,GAAG,OAAO,MAAM,eAAe,MAAM;CACxD,IAAI;EACH,OAAO,IAAI,WAAW,MAAM,GAAG,SAAS,MAAM,CAAC;CAChD,SAAS,IAAI;EACZ,MAAM,IAAI,WAAW,oBAAoB,8BAA8B,OAAO,KAAK,OAAO,EAAE,KAAK,EAChG,OAAO,GACR,CAAC;CACF;AACD;AAEA,eAAe,UAAU,KAAwD;CAChF,IAAI,SAAS,IAAI,IAAI,GAAG,OAAO,MAAM,iBAAiB,IAAI,IAAI;CAE9D,IAAI;EACH,OAAO,OAAO,KAAK,MAAM,GAAG,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,QAAQ;CAClE,SAAS,IAAI;EACZ,MAAM,IAAI,WAAW,qBAAqB,0BAA0B,IAAI,KAAK,KAAK,OAAO,EAAE,KAAK,EAC/F,OAAO,GACR,CAAC;CACF;AACD;AAEA,eAAe,UAAU,UAAkB,MAAiE;CAC3G,MAAM,GAAG,UAAU,UAAU,IAA2B;CACxD,OAAO;AACR;;;;;;;;;;;AChCA,IAAa,SAAb,cAA4B,iBAAiB;CAC5C,cAAc;EACb,MAAM,kBAAkB,CAAC;CAC1B;AACD"}