pptx-ts 4.0.1 → 4.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.
- package/README.md +147 -114
- package/dist/{autopage-odPz7zZO.js → autopage-D4kyVp11.js} +5 -5
- package/dist/{autopage-odPz7zZO.js.map → autopage-D4kyVp11.js.map} +1 -1
- package/dist/{body-insets-Dw_BeWD_.js → body-insets-kVHmjGc6.js} +2 -2
- package/dist/{body-insets-Dw_BeWD_.js.map → body-insets-kVHmjGc6.js.map} +1 -1
- package/dist/browser.d.ts +7 -7
- package/dist/browser.js +5 -5
- package/dist/{clip-Bl01BPcN.d.ts → clip-DHDlnHUq.d.ts} +2 -2
- package/dist/{clip-Bl01BPcN.d.ts.map → clip-DHDlnHUq.d.ts.map} +1 -1
- package/dist/{diagnostics-D8ot4Ei7.d.ts → diagnostics-DiMmBU8P.d.ts} +6 -6
- package/dist/{diagnostics-D8ot4Ei7.d.ts.map → diagnostics-DiMmBU8P.d.ts.map} +1 -1
- package/dist/{embedded-fonts-DarT9aoa.d.ts → embedded-fonts-CI_YGW2d.d.ts} +2 -2
- package/dist/{embedded-fonts-DarT9aoa.d.ts.map → embedded-fonts-CI_YGW2d.d.ts.map} +1 -1
- package/dist/{entry-compose-DCnvBZz2.d.ts → entry-compose-6hF9aTmT.d.ts} +19 -17
- package/dist/{entry-compose-DCnvBZz2.d.ts.map → entry-compose-6hF9aTmT.d.ts.map} +1 -1
- package/dist/{enums-BUKTUB6V.d.ts → enums-DQRpVOLh.d.ts} +3 -3
- package/dist/{enums-BUKTUB6V.d.ts.map → enums-DQRpVOLh.d.ts.map} +1 -1
- package/dist/{errors-C4oENPcu.js → errors-Da2nXCJm.js} +6 -6
- package/dist/{errors-C4oENPcu.js.map → errors-Da2nXCJm.js.map} +1 -1
- package/dist/families.d.ts +6 -6
- package/dist/families.js +2 -2
- package/dist/{fit-Cb7naFj6.js → fit-CcXbg__l.js} +10 -10
- package/dist/{fit-Cb7naFj6.js.map → fit-CcXbg__l.js.map} +1 -1
- package/dist/{font-metrics-v5fn7s7e.d.ts → font-metrics-CBGmhLo0.d.ts} +6 -6
- package/dist/{font-metrics-v5fn7s7e.d.ts.map → font-metrics-CBGmhLo0.d.ts.map} +1 -1
- package/dist/{grid-DikTjFey.js → grid-9B2w5EaY.js} +2 -2
- package/dist/{grid-DikTjFey.js.map → grid-9B2w5EaY.js.map} +1 -1
- package/dist/{html-dom-Iuog2wdK.js → html-dom-DvJmuHt2.js} +10 -10
- package/dist/html-dom-DvJmuHt2.js.map +1 -0
- package/dist/html.d.ts +3 -3
- package/dist/html.js +2 -2
- package/dist/{image-size-CvN2iCA4.js → image-size-DwDbakcl.js} +64 -5
- package/dist/image-size-DwDbakcl.js.map +1 -0
- package/dist/index.d.ts +7 -7
- package/dist/index.js +3 -3
- package/dist/inspect.d.ts +4 -4
- package/dist/inspect.js +4 -4
- package/dist/inspect.js.map +1 -1
- package/dist/math.d.ts +1 -1
- package/dist/math.js +1 -1
- package/dist/measure.d.ts +3 -3
- package/dist/measure.js +2 -2
- package/dist/node.d.ts +7 -7
- package/dist/node.js +3 -3
- package/dist/{notes-Dh12JAbn.js → notes-BcT571R4.js} +19 -18
- package/dist/notes-BcT571R4.js.map +1 -0
- package/dist/options-internal-WqgMf720.js.map +1 -1
- package/dist/{package-J49Ck6S2.d.ts → package-KoEgVwII.d.ts} +6 -2
- package/dist/{package-J49Ck6S2.d.ts.map → package-KoEgVwII.d.ts.map} +1 -1
- package/dist/{pres-C6qgOFAa.d.ts → pres-BA9_lJbY.d.ts} +32 -12
- package/dist/pres-BA9_lJbY.d.ts.map +1 -0
- package/dist/{presentation-DGYlAWhl.js → presentation-Cyl74rq2.js} +70 -35
- package/dist/presentation-Cyl74rq2.js.map +1 -0
- package/dist/{presentation-types-8jLQHI4M.d.ts → presentation-types-B3VQH4Bz.d.ts} +19 -15
- package/dist/presentation-types-B3VQH4Bz.d.ts.map +1 -0
- package/dist/read.d.ts +6 -6
- package/dist/read.js +3 -3
- package/dist/script.d.ts +2 -2
- package/dist/script.d.ts.map +1 -1
- package/dist/script.js +11 -11
- package/dist/script.js.map +1 -1
- package/dist/{shapes-re0KyQk_.js → shapes-BcyFdZpp.js} +14 -10
- package/dist/shapes-BcyFdZpp.js.map +1 -0
- package/dist/{slide-Dx2ZeVZ6.d.ts → slide-BqPtyKmb.d.ts} +12 -7
- package/dist/slide-BqPtyKmb.d.ts.map +1 -0
- package/dist/{table-cell-margins-EVg0EwxT.js → table-cell-margins-PDshga8T.js} +4 -4
- package/dist/{table-cell-margins-EVg0EwxT.js.map → table-cell-margins-PDshga8T.js.map} +1 -1
- package/dist/{table-dom-BTDP3lEP.js → table-dom-CVbvUfgh.js} +3 -3
- package/dist/{table-dom-BTDP3lEP.js.map → table-dom-CVbvUfgh.js.map} +1 -1
- package/dist/{text-sN64Otf_.js → text-BvFFMMFQ.js} +38 -36
- package/dist/{text-sN64Otf_.js.map → text-BvFFMMFQ.js.map} +1 -1
- package/dist/{text-anchor-CrYXAfUu.js → text-anchor-BgLPbwbL.js} +2 -2
- package/dist/{text-anchor-CrYXAfUu.js.map → text-anchor-BgLPbwbL.js.map} +1 -1
- package/dist/{units-internal-XJlf-hOl.js → units-internal-DFcUYjh3.js} +11 -6
- package/dist/units-internal-DFcUYjh3.js.map +1 -0
- package/dist/{zip-C0leZZMj.d.ts → zip-CTll_dr0.d.ts} +2 -2
- package/dist/{zip-C0leZZMj.d.ts.map → zip-CTll_dr0.d.ts.map} +1 -1
- package/dist/{zip-CKd8ihcf.js → zip-CYZ0F6BV.js} +2 -2
- package/dist/{zip-CKd8ihcf.js.map → zip-CYZ0F6BV.js.map} +1 -1
- package/dist/zip.d.ts +2 -2
- package/dist/zip.js +2 -2
- package/dist/{zoom-DPUHh85d.js → zoom-BoNyOlPm.js} +65 -51
- package/dist/zoom-BoNyOlPm.js.map +1 -0
- package/package.json +39 -31
- package/skills/ts-pptx-upstream/SKILL.md +18 -18
- package/dist/html-dom-Iuog2wdK.js.map +0 -1
- package/dist/image-size-CvN2iCA4.js.map +0 -1
- package/dist/notes-Dh12JAbn.js.map +0 -1
- package/dist/pres-C6qgOFAa.d.ts.map +0 -1
- package/dist/presentation-DGYlAWhl.js.map +0 -1
- package/dist/presentation-types-8jLQHI4M.d.ts.map +0 -1
- package/dist/shapes-re0KyQk_.js.map +0 -1
- package/dist/slide-Dx2ZeVZ6.d.ts.map +0 -1
- package/dist/units-internal-XJlf-hOl.js.map +0 -1
- package/dist/zoom-DPUHh85d.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as EMU_PER_POINT } from "./table-cell-margins-
|
|
1
|
+
import { I as EMU_PER_POINT } from "./table-cell-margins-PDshga8T.js";
|
|
2
2
|
//#region src/ooxml/body-insets.ts
|
|
3
3
|
/**
|
|
4
4
|
* PowerPoint's default `a:bodyPr` text insets.
|
|
@@ -51,4 +51,4 @@ const BODY_INSET_DEFAULTS_EMU = {
|
|
|
51
51
|
//#endregion
|
|
52
52
|
export { BODY_INSET_DEFAULTS_IN as n, BODY_INSET_DEFAULTS_PT as r, BODY_INSET_DEFAULTS_EMU as t };
|
|
53
53
|
|
|
54
|
-
//# sourceMappingURL=body-insets-
|
|
54
|
+
//# sourceMappingURL=body-insets-kVHmjGc6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"body-insets-
|
|
1
|
+
{"version":3,"file":"body-insets-kVHmjGc6.js","names":[],"sources":["../src/ooxml/body-insets.ts"],"sourcesContent":["/**\n * PowerPoint's default `a:bodyPr` text insets.\n *\n * ECMA-376 §21.1.2.1.1 states them in prose; the XSD leaves `lIns`/`tIns`/`rIns`/`bIns`\n * optional with no schema default, so a reader that wants to know what an omitted side is\n * inset by has to carry the numbers itself. Four places did, in three units and two orders:\n * the script mapper as a points record, the round-trip canonicaliser as an inches tuple in\n * `[top, right, bottom, left]`, `inspect.ts` as two inch scalars, and the measured-fit\n * solver as two EMU scalars — that last one deciding the inner box every `autoFit` is\n * computed against, so a correction here would have left every fit decision on the old\n * numbers.\n *\n * The canonicaliser's tuple in particular has to be exactly `pointsToInches` of the mapper's\n * record, or `isDefaultMargin` stops matching and every text frame that spells its insets\n * reports four spurious differences. Nothing linked them; this module is the link.\n *\n * It is a fact about the schema, so — like `st-enums.ts` — it belongs to neither `gen/` nor\n * `read/` nor `script/`.\n */\n\nimport { EMU_PER_POINT, POINTS_PER_INCH } from './emu.js'\n\n/** The four default insets in points: 7.2pt (0.1in) left and right, 3.6pt (0.05in) top and bottom. */\nexport const BODY_INSET_DEFAULTS_PT = { left: 7.2, right: 7.2, top: 3.6, bottom: 3.6 } as const\n\n/**\n * The same four in inches, in the write API's `margin` order — `[top, right, bottom, left]`.\n *\n * Derived rather than transcribed, so it cannot drift from {@link BODY_INSET_DEFAULTS_PT}.\n */\nexport const BODY_INSET_DEFAULTS_IN: readonly number[] = [\n\tBODY_INSET_DEFAULTS_PT.top / POINTS_PER_INCH,\n\tBODY_INSET_DEFAULTS_PT.right / POINTS_PER_INCH,\n\tBODY_INSET_DEFAULTS_PT.bottom / POINTS_PER_INCH,\n\tBODY_INSET_DEFAULTS_PT.left / POINTS_PER_INCH,\n]\n\n/**\n * The same four in EMU, which is the unit the measured-fit solver works in.\n *\n * Derived rather than transcribed, for the same reason {@link BODY_INSET_DEFAULTS_IN} is.\n */\nexport const BODY_INSET_DEFAULTS_EMU = {\n\tleft: BODY_INSET_DEFAULTS_PT.left * EMU_PER_POINT,\n\tright: BODY_INSET_DEFAULTS_PT.right * EMU_PER_POINT,\n\ttop: BODY_INSET_DEFAULTS_PT.top * EMU_PER_POINT,\n\tbottom: BODY_INSET_DEFAULTS_PT.bottom * EMU_PER_POINT,\n} as const\n\n/**\n * A table cell's default text insets in EMU. They happen to equal {@link BODY_INSET_DEFAULTS_EMU}.\n * Declared in `table-cell-margins.ts`, which imports nothing, so the write path's inch defaults can\n * derive from it without bringing this module along.\n */\nexport { TABLE_CELL_MARGIN_DEFAULTS_EMU } from './table-cell-margins.js'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuBA,MAAa,yBAAyB;CAAE,MAAM;CAAK,OAAO;CAAK,KAAK;CAAK,QAAQ;AAAI;;;;;;AAOrF,MAAa,yBAA4C;CACxD,uBAAuB,MAAA;CACvB,uBAAuB,QAAA;CACvB,uBAAuB,SAAA;CACvB,uBAAuB,OAAA;AACxB;;;;;;AAOA,MAAa,0BAA0B;CACtC,MAAM,uBAAuB,OAAO;CACpC,OAAO,uBAAuB,QAAQ;CACtC,KAAK,uBAAuB,MAAM;CAClC,QAAQ,uBAAuB,SAAS;AACzC"}
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { C as isChartType, S as isChartExType, _ as VALID_SHAPE_PRESETS, a as CONNECTOR_PRESET_NAME, b as asChartType, c as PLACEHOLDER_TYPE, d as SHAPE_NAME, f as SchemeColor, g as TextAnchor, h as TableStyle, i as CHART_NAME, l as PlaceholderType, m as SlideObjectType, n as AlignV, o as ChartType, p as ShapeType, r as BulletType, s as OutputType, t as AlignH, u as SCHEME_COLORS, v as WRITE_OUTPUT_TYPE, x as connectorPresetFor, y as ZIP_OUTPUT_TYPE } from "./enums-
|
|
2
|
-
import { $ as
|
|
3
|
-
import { A as TableCellDiagonals, C as AnimationTrigger, D as TransitionType, E as TransitionSoundProps, F as TableToSlidesDocument, I as TableToSlidesElement, L as TableToSlidesProps, M as TableProps, N as TableRow, O as TableCell, P as TableRowSlide, S as AnimationProps, T as TransitionProps, _ as MasterTextStyleProps, a as Slide, b as SlideMasterProps, c as SectionZoomProps, d as ZoomBaseProps, f as Model3dCameraProps, g as MasterTextStyleLevel, h as MasterBulletProps, i as ObjectOptions, j as TableCellProps, k as TableCell3DProps, l as SlideZoomProps, m as Model3dProps, n as GroupChildProps, o as SlideLayout, p as Model3dPoint, r as GroupProps, s as SlideObjectInfo, t as AddSlideProps, u as SummaryZoomProps, v as SlideMasterChartProps, w as PresetEffect, x as SlideNumberProps, y as SlideMasterObject } from "./slide-
|
|
4
|
-
import { _ as PackageReadErrorCode, a as InternalError, c as PackageReadError, d as UnsupportedFeatureError, f as DiagnosticCode, g as MediaErrorCode, h as InvalidOptionErrorCode, i as setDiagnosticHandler, l as TsPptxError, m as InternalErrorCode, n as DiagnosticHandler, o as InvalidOptionError, p as ErrorCode, r as resetDiagnosticState, s as MediaError, t as Diagnostic, u as TsPptxErrorOptions, v as TsPptxCode, y as UnsupportedFeatureErrorCode } from "./diagnostics-
|
|
5
|
-
import { A as pixelsToEmu, C as StandardLayoutName, D as emuToPoints, E as emuToPixels, M as ptToHundredths, O as inchesToEmu, S as StandardLayout, T as emuToInches, _ as HUNDREDTHS_PER_POINT, b as PERCENT_SCALE, c as ConstructFamily, g as FIXED_PCT_PER_PERCENT, h as Emu, i as ComposedSlide, j as pointsToEmu, k as percentToEmu, m as DEFAULT_PX_PER_INCH, n as Composed, p as ANGLE_UNITS_PER_DEGREE, r as ComposedPresentation, s as PresentationCore, t as ComposeOptions, v as MAX_COORDINATE_EMU, w as coordToEmu, x as STANDARD_LAYOUTS, y as MIN_COORDINATE_EMU } from "./entry-compose-
|
|
6
|
-
import { a as EMU_PER_INCH, i as clipPath, n as FlatSide, o as EMU_PER_POINT, r as HalfDiscPreset, s as POINTS_PER_INCH, t as ClipShape } from "./clip-
|
|
1
|
+
import { C as isChartType, S as isChartExType, _ as VALID_SHAPE_PRESETS, a as CONNECTOR_PRESET_NAME, b as asChartType, c as PLACEHOLDER_TYPE, d as SHAPE_NAME, f as SchemeColor, g as TextAnchor, h as TableStyle, i as CHART_NAME, l as PlaceholderType, m as SlideObjectType, n as AlignV, o as ChartType, p as ShapeType, r as BulletType, s as OutputType, t as AlignH, u as SCHEME_COLORS, v as WRITE_OUTPUT_TYPE, x as connectorPresetFor, y as ZIP_OUTPUT_TYPE } from "./enums-DQRpVOLh.js";
|
|
2
|
+
import { $ as ChartOpts, $t as ShapeAdjustHandleXY, A as RadialGradientFillProps, At as NotesProps, B as ShadowProps, Bt as TextGlowProps, C as HexColor, Ct as OptsChartGridLine, D as PatternFillProps, Dt as PlaceholderProps, E as Margin, Et as ObjectNameProps, F as ConnectorProps, Ft as TableCellLayout, G as ChartAxisTickMark, Gt as textRuns, H as ShapeLineProps, Ht as TextProps, I as ConnectorType, It as TableLayoutResult, J as ChartExBinning, Jt as MediaProps, K as ChartDataPointStyle, Kt as ImageBaseProps, L as FillOption, Lt as TextBaseProps, M as ThemeColor, Mt as OverflowBoxOptions, N as VAlign, Nt as ResolvedCommentAuthor, O as PatternPreset, Ot as CommentProps, P as BorderProps, Pt as SlideComment, Q as ChartMulti, Qt as ShapeAdjustHandlePolar, R as HyperlinkActionJump, Rt as TextBulletProps, S as HAlign, St as OptsChartData, T as LinearGradientFillProps, Tt as ObjectLockProps, U as StrokeProps, Ut as TextPropsOptions, V as ShapeFillProps, Vt as TextMeasurement, W as ChartAreaProps, Wt as textRun, X as ChartExStatistics, Xt as OleObjectProps, Y as ChartExGeography, Yt as MediaType, Z as ChartLineDash, Zt as ShapeAdjustHandle, _ as DataOrPathProps, _n as RadarStyle, _t as ChartPropsFillLine, a as PresentationProps, an as BarDirection, at as ChartPropsChartBoxWhisker, b as GradientFillProps, bt as ChartSeriesOpts, c as WriteFileProps, ct as ChartPropsChartLine, d as ThemeColorScheme, dt as ChartPropsChartRegionMap, en as ShapeAdjustValue, et as ChartPropsAxisCat, f as ThemeProps, fn as LegendPosition, ft as ChartPropsChartStock, g as Coord, gn as PresetMaterialType, gt as ChartPropsDataTable, h as Color, hn as LineDataSymbol, ht as ChartPropsDataLabel, i as PresLayout, in as Bar3DShape, it as ChartPropsChartBar, j as TextVertType, jt as NotesTextOptions, k as PositionProps, kt as MeasureTextOptions, l as WriteOutputMap, ln as DataLabelPosition, lt as ChartPropsChartPie, m as BackgroundProps, mn as LightRigType, mt as ChartPropsChartWaterfall, n as PackagePart, nn as ShapeGuide, nt as ChartPropsAxisVal, o as SectionProps, on as BarGrouping, ot as ChartPropsChartDoughnut, p as BackgroundOption, pn as LightRigDirection, pt as ChartPropsChartSurface, q as ChartErrorBarOptions, qt as ImageProps, r as PartsProps, rn as ShapeProps, rt as ChartPropsBase, s as WriteBaseProps, sn as BevelPresetType, st as ChartPropsChartHistogram, t as CustomPropertyValue, tn as ShapeConnectionSite, tt as ChartPropsAxisSer, u as WriteProps, un as DisplayBlanksAs, ut as ChartPropsChartRadar, v as DataOrPathRequiredProps, vn as RadarStyleAlias, vt as ChartPropsLegend, w as ImageFillProps, wn as TimeUnit, wt as CommonObjectDescriptor, x as GradientStopProps, xt as LineCap, y as GeometryPoint, yt as ChartPropsTitle, z as HyperlinkProps, zt as TextFitShrinkProps } from "./pres-BA9_lJbY.js";
|
|
3
|
+
import { A as TableCellDiagonals, C as AnimationTrigger, D as TransitionType, E as TransitionSoundProps, F as TableToSlidesDocument, I as TableToSlidesElement, L as TableToSlidesProps, M as TableProps, N as TableRow, O as TableCell, P as TableRowSlide, S as AnimationProps, T as TransitionProps, _ as MasterTextStyleProps, a as Slide, b as SlideMasterProps, c as SectionZoomProps, d as ZoomBaseProps, f as Model3dCameraProps, g as MasterTextStyleLevel, h as MasterBulletProps, i as ObjectOptions, j as TableCellProps, k as TableCell3DProps, l as SlideZoomProps, m as Model3dProps, n as GroupChildProps, o as SlideLayout, p as Model3dPoint, r as GroupProps, s as SlideObjectInfo, t as AddSlideProps, u as SummaryZoomProps, v as SlideMasterChartProps, w as PresetEffect, x as SlideNumberProps, y as SlideMasterObject } from "./slide-BqPtyKmb.js";
|
|
4
|
+
import { _ as PackageReadErrorCode, a as InternalError, c as PackageReadError, d as UnsupportedFeatureError, f as DiagnosticCode, g as MediaErrorCode, h as InvalidOptionErrorCode, i as setDiagnosticHandler, l as TsPptxError, m as InternalErrorCode, n as DiagnosticHandler, o as InvalidOptionError, p as ErrorCode, r as resetDiagnosticState, s as MediaError, t as Diagnostic, u as TsPptxErrorOptions, v as TsPptxCode, y as UnsupportedFeatureErrorCode } from "./diagnostics-DiMmBU8P.js";
|
|
5
|
+
import { A as pixelsToEmu, C as StandardLayoutName, D as emuToPoints, E as emuToPixels, M as ptToHundredths, O as inchesToEmu, S as StandardLayout, T as emuToInches, _ as HUNDREDTHS_PER_POINT, b as PERCENT_SCALE, c as ConstructFamily, g as FIXED_PCT_PER_PERCENT, h as Emu, i as ComposedSlide, j as pointsToEmu, k as percentToEmu, m as DEFAULT_PX_PER_INCH, n as Composed, p as ANGLE_UNITS_PER_DEGREE, r as ComposedPresentation, s as PresentationCore, t as ComposeOptions, v as MAX_COORDINATE_EMU, w as coordToEmu, x as STANDARD_LAYOUTS, y as MIN_COORDINATE_EMU } from "./entry-compose-6hF9aTmT.js";
|
|
6
|
+
import { a as EMU_PER_INCH, i as clipPath, n as FlatSide, o as EMU_PER_POINT, r as HalfDiscPreset, s as POINTS_PER_INCH, t as ClipShape } from "./clip-DHDlnHUq.js";
|
|
7
7
|
//#region src/browser.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* The browser entry, reached through the `browser` export condition — a bundler resolving the
|
|
@@ -47,5 +47,5 @@ export declare class TsPptx extends PresentationCore {
|
|
|
47
47
|
*/
|
|
48
48
|
export declare function createPresentation<const Fs extends readonly ConstructFamily[] = []>(opts?: ComposeOptions<Fs>): Composed<Fs>;
|
|
49
49
|
//#endregion
|
|
50
|
-
export { ANGLE_UNITS_PER_DEGREE, AddSlideProps, AlignH, AlignV, AnimationProps, AnimationTrigger, BackgroundOption, BackgroundProps, type Bar3DShape, type BarDirection, type BarGrouping, type BevelPresetType, BorderProps, BulletType, CHART_NAME, 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, CommonObjectDescriptor, type ComposeOptions, type Composed, type ComposedPresentation, type ComposedSlide, ConnectorProps, ConnectorType, type ConstructFamily, Coord, CustomPropertyValue, DEFAULT_PX_PER_INCH, type DataLabelPosition, DataOrPathProps, DataOrPathRequiredProps, type Diagnostic, type DiagnosticCode, type DiagnosticHandler, type DisplayBlanksAs, EMU_PER_INCH, EMU_PER_POINT, Emu, type ErrorCode, FIXED_PCT_PER_PERCENT, FillOption, FlatSide, GeometryPoint, GradientFillProps, GradientStopProps, GroupChildProps, GroupProps, HAlign, HUNDREDTHS_PER_POINT, HalfDiscPreset, HexColor, HyperlinkActionJump, HyperlinkProps, ImageBaseProps, ImageFillProps, ImageProps, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, type LegendPosition, type LightRigDirection, type LightRigType, LineCap, type LineDataSymbol, LinearGradientFillProps, MAX_COORDINATE_EMU, MIN_COORDINATE_EMU, 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, type RadarStyle, type RadarStyleAlias, 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, SlideObjectInfo, SlideObjectType, SlideZoomProps, StandardLayout, StandardLayoutName, StrokeProps, SummaryZoomProps, TableCell, TableCell3DProps, TableCellDiagonals, TableCellLayout, TableCellProps, TableLayoutResult, TableProps, TableRow, TableRowSlide, TableStyle, TableToSlidesDocument, TableToSlidesElement, TableToSlidesProps, TextAnchor, TextBaseProps, TextBulletProps, TextFitShrinkProps, TextGlowProps, TextMeasurement, TextProps, TextPropsOptions, TextVertType, ThemeColor, ThemeColorScheme, ThemeProps, type TimeUnit, TransitionProps, TransitionSoundProps, TransitionType, 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 };
|
|
50
|
+
export { ANGLE_UNITS_PER_DEGREE, AddSlideProps, AlignH, AlignV, AnimationProps, AnimationTrigger, BackgroundOption, BackgroundProps, type Bar3DShape, type BarDirection, type BarGrouping, type BevelPresetType, BorderProps, BulletType, CHART_NAME, 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, CommonObjectDescriptor, type ComposeOptions, type Composed, type ComposedPresentation, type ComposedSlide, ConnectorProps, ConnectorType, type ConstructFamily, Coord, CustomPropertyValue, DEFAULT_PX_PER_INCH, type DataLabelPosition, DataOrPathProps, DataOrPathRequiredProps, type Diagnostic, type DiagnosticCode, type DiagnosticHandler, type DisplayBlanksAs, EMU_PER_INCH, EMU_PER_POINT, Emu, type ErrorCode, FIXED_PCT_PER_PERCENT, FillOption, FlatSide, GeometryPoint, GradientFillProps, GradientStopProps, GroupChildProps, GroupProps, HAlign, HUNDREDTHS_PER_POINT, HalfDiscPreset, HexColor, HyperlinkActionJump, HyperlinkProps, ImageBaseProps, ImageFillProps, ImageProps, InternalError, type InternalErrorCode, InvalidOptionError, type InvalidOptionErrorCode, type LegendPosition, type LightRigDirection, type LightRigType, LineCap, type LineDataSymbol, LinearGradientFillProps, MAX_COORDINATE_EMU, MIN_COORDINATE_EMU, 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, type RadarStyle, type RadarStyleAlias, 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, SlideObjectInfo, SlideObjectType, SlideZoomProps, StandardLayout, StandardLayoutName, StrokeProps, SummaryZoomProps, TableCell, TableCell3DProps, TableCellDiagonals, TableCellLayout, TableCellProps, TableLayoutResult, TableProps, TableRow, TableRowSlide, TableStyle, TableToSlidesDocument, TableToSlidesElement, TableToSlidesProps, TextAnchor, TextBaseProps, TextBulletProps, TextFitShrinkProps, TextGlowProps, TextMeasurement, TextProps, TextPropsOptions, TextVertType, ThemeColor, ThemeColorScheme, ThemeProps, type TimeUnit, TransitionProps, TransitionSoundProps, TransitionType, TsPptx as default, type TsPptxCode, TsPptxError, type TsPptxErrorOptions, UnsupportedFeatureError, type UnsupportedFeatureErrorCode, VALID_SHAPE_PRESETS, VAlign, WRITE_OUTPUT_TYPE, WriteBaseProps, WriteFileProps, WriteOutputMap, WriteProps, ZIP_OUTPUT_TYPE, ZoomBaseProps, asChartType, clipPath, connectorPresetFor, coordToEmu, emuToInches, emuToPixels, emuToPoints, inchesToEmu, isChartExType, isChartType, percentToEmu, pixelsToEmu, pointsToEmu, ptToHundredths, resetDiagnosticState, setDiagnosticHandler, textRun, textRuns };
|
|
51
51
|
//# sourceMappingURL=browser.d.ts.map
|
package/dist/browser.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as TsPptxError, c as setDiagnosticHandler, i as PackageReadError, n as InvalidOptionError, o as UnsupportedFeatureError, r as MediaError, s as resetDiagnosticState, t as InternalError } from "./errors-
|
|
2
|
-
import { A as inchesToEmu, C as MIN_COORDINATE_EMU, D as emuToInches, E as coordToEmu, F as EMU_PER_INCH, I as EMU_PER_POINT, L as POINTS_PER_INCH, M as pixelsToEmu, N as pointsToEmu, O as emuToPixels, P as ptToHundredths, S as MAX_COORDINATE_EMU, T as STANDARD_LAYOUTS, _ as isChartType, a as ChartType, b as FIXED_PCT_PER_PERCENT, c as SchemeColor, d as TableStyle, f as TextAnchor, g as isChartExType, h as connectorPresetFor, i as BulletType, j as percentToEmu, k as emuToPoints, l as ShapeType, m as asChartType, n as AlignH, o as OutputType, p as VALID_SHAPE_PRESETS, r as AlignV, s as PlaceholderType, u as SlideObjectType, v as ANGLE_UNITS_PER_DEGREE, w as PERCENT_SCALE, x as HUNDREDTHS_PER_POINT, y as DEFAULT_PX_PER_INCH } from "./table-cell-margins-
|
|
3
|
-
import { c as ALL_CONSTRUCT_FAMILIES, d as IMG_SVG_PLACEHOLDER, i as fetchFontBytes, l as composePresentation, n as textRuns, r as clipPath, t as textRun, u as PresentationCore } from "./text-
|
|
4
|
-
import { r as PPTX_CONTENT_TYPE } from "./zip-
|
|
5
|
-
import { t as tableDomFamily } from "./table-dom-
|
|
1
|
+
import { a as TsPptxError, c as setDiagnosticHandler, i as PackageReadError, n as InvalidOptionError, o as UnsupportedFeatureError, r as MediaError, s as resetDiagnosticState, t as InternalError } from "./errors-Da2nXCJm.js";
|
|
2
|
+
import { A as inchesToEmu, C as MIN_COORDINATE_EMU, D as emuToInches, E as coordToEmu, F as EMU_PER_INCH, I as EMU_PER_POINT, L as POINTS_PER_INCH, M as pixelsToEmu, N as pointsToEmu, O as emuToPixels, P as ptToHundredths, S as MAX_COORDINATE_EMU, T as STANDARD_LAYOUTS, _ as isChartType, a as ChartType, b as FIXED_PCT_PER_PERCENT, c as SchemeColor, d as TableStyle, f as TextAnchor, g as isChartExType, h as connectorPresetFor, i as BulletType, j as percentToEmu, k as emuToPoints, l as ShapeType, m as asChartType, n as AlignH, o as OutputType, p as VALID_SHAPE_PRESETS, r as AlignV, s as PlaceholderType, u as SlideObjectType, v as ANGLE_UNITS_PER_DEGREE, w as PERCENT_SCALE, x as HUNDREDTHS_PER_POINT, y as DEFAULT_PX_PER_INCH } from "./table-cell-margins-PDshga8T.js";
|
|
3
|
+
import { c as ALL_CONSTRUCT_FAMILIES, d as IMG_SVG_PLACEHOLDER, i as fetchFontBytes, l as composePresentation, n as textRuns, r as clipPath, t as textRun, u as PresentationCore } from "./text-BvFFMMFQ.js";
|
|
4
|
+
import { r as PPTX_CONTENT_TYPE } from "./zip-CYZ0F6BV.js";
|
|
5
|
+
import { t as tableDomFamily } from "./table-dom-CVbvUfgh.js";
|
|
6
6
|
//#region src/runtime/browser.ts
|
|
7
7
|
function createBrowserRuntime() {
|
|
8
8
|
return {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { y as GeometryPoint } from "./pres-BA9_lJbY.js";
|
|
2
2
|
//#region src/ooxml/emu.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* The fixed ratios between English Metric Units, points and inches.
|
|
@@ -64,4 +64,4 @@ type ClipShape =
|
|
|
64
64
|
declare function clipPath(shape: ClipShape, w: number, h: number): GeometryPoint[];
|
|
65
65
|
//#endregion
|
|
66
66
|
export { EMU_PER_INCH as a, clipPath as i, FlatSide as n, EMU_PER_POINT as o, HalfDiscPreset as r, POINTS_PER_INCH as s, ClipShape as t };
|
|
67
|
-
//# sourceMappingURL=clip-
|
|
67
|
+
//# sourceMappingURL=clip-DHDlnHUq.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clip-
|
|
1
|
+
{"version":3,"file":"clip-DHDlnHUq.d.ts","names":[],"sources":["../src/ooxml/emu.ts","../src/clip.ts"],"mappings":";;;;;;;;;;;cAUa;;cAEA;;cAEA;;;;;;;KCgBD;;;;;;;KAQA;;KAGA;;;;;;EAKT;EAAmB,MAAM;EAAU,SAAS;;;;;;;;;;;;;;;;;;;;;;;;iBAyH/B,SAAS,OAAO,WAAW,WAAW,YAAY"}
|
|
@@ -37,7 +37,7 @@ type DiagnosticCode = 'object-name/empty' | 'object-name/control-characters' | '
|
|
|
37
37
|
* This is the largest group by design — the project's stated policy is to throw rather than coerce
|
|
38
38
|
* (`AGENTS.md` → "Silent coercion of invalid input is a footgun"), so most throws are here.
|
|
39
39
|
*/
|
|
40
|
-
type InvalidOptionErrorCode = 'coord/non-finite' | 'percent/non-finite' | 'coord/not-positive' | 'coord/invalid-format' | 'coord/out-of-range' | 'bullet/start-at-not-a-number' | 'presentation/first-slide-num-not-an-integer' | 'geometry/arc-angle-non-finite' | 'shadow/angle-non-finite' | 'chart/missing-type' | 'chart/option-non-finite' | 'chart/unknown-type' | 'chart/secondary-axis-unused' | 'chart/axis-count-mismatch' | 'chart/too-many-columns' | 'chart/bubble-in-combo' | 'shape/missing-type' | 'shape/unknown-preset' | 'connector/missing-endpoints' | 'connector/invalid-type' | 'connector/invalid-bends' | 'connector/adj-count-mismatch' | 'connector/adj-non-finite' | 'connector/invalid-binding-name' | 'connector/invalid-connection-site' | 'line/invalid-cap' | 'group/missing-object-names' | 'group/invalid-object-name' | 'group/duplicate-object-name' | 'group/unresolved-object-name' | 'group/ambiguous-object-name' | 'gradient/angle-non-finite' | 'gradient/too-few-stops' | 'gradient/stop-position-non-finite' | 'gradient/stop-position-out-of-range' | 'gradient/rotate-with-shape-not-boolean' | 'gradient/scaled-not-boolean' | 'pattern-fill/missing-pattern' | 'image/missing-source' | 'image/path-not-a-string' | 'image/data-not-a-string' | 'image/missing-base64-header' | 'image/crop-window-overflows' | 'image/crop-inset-out-of-range' | 'image/crop-insets-exceed-extent' | 'media/missing-source' | 'media/missing-base64-header' | 'media/cover-missing-base64-header' | 'media/online-missing-link' | 'ole/missing-source' | 'ole/invalid-image-size' | 'zoom/invalid-transition-duration' | 'transition/invalid-time' | 'transition/sound-unsupported' | 'model3d/missing-source' | 'model3d/invalid-camera' | 'model3d/invalid-fov' | 'model3d/invalid-scale' | 'layout/invalid-definition' | 'table/rows-not-an-array' | 'table/rows-not-nested' | 'table/invalid-cell-anchor' | 'table/invalid-cell-vert' | 'table/invalid-cell-overflow' | 'table/invalid-cell-margin' | 'table/invalid-cell-border' | 'table/row-index-out-of-range' | 'table/column-index-out-of-range' | 'table/merge-range-invalid' | 'hyperlink/not-an-object' | 'hyperlink/missing-target' | 'hyperlink/conflicting-targets' | 'hyperlink/invalid-slide' | 'slide/link-past-last-slide' | 'text/invalid-text' | 'clip/invalid-shape' | 'html/no-document' | 'html/table-not-found' | 'html/table-has-no-cells' | 'color/invalid-hex' | 'color/invalid-scheme-token' | 'text/invalid-underline' | 'slide/index-out-of-range' | 'slide/foreign-target' | 'slide/id-space-exhausted' | 'shape/index-out-of-range' | 'layout/ambiguous-name' | 'layout/not-found' | 'layout/foreign-handle' | 'import/slide-size-mismatch' | 'import/slide-size-unknown' | 'import/unresolved-slide-link' | 'import/destination-missing-master' | 'import/destination-missing-layout' | 'import/output-index-conflict' | 'import/output-index-out-of-range' | 'import/rescale-conflict' | 'image/undeterminable-extension' | 'image/undeterminable-type' | 'image/missing-content-type' | 'image/fit-needs-extent' | 'font/size-not-positive' | 'script/unresolved-asset-reference' | 'script/non-finite-literal' | 'package/duplicate-part-name' | 'part/not-xml' | 'relationship/duplicate-id' | 'relationship/not-found' | 'relationship/external-has-no-partname' | 'oxml/unknown-namespace-prefix' | 'oxml/invalid-qname' | 'font/missing-typeface' | 'font/invalid-style-slot' | 'font/invalid-base64' | 'font/missing-source' | 'font/collection-index-out-of-range' | 'font/collection-face-not-found' | 'layout/unknown' | 'master/missing-title' | 'math/invalid-latex' | 'math/invalid-mathml' | 'zip/unsupported-input' | 'zip/unsupported-output';
|
|
40
|
+
type InvalidOptionErrorCode = 'coord/non-finite' | 'percent/non-finite' | 'coord/not-positive' | 'coord/invalid-format' | 'coord/out-of-range' | 'bullet/start-at-not-a-number' | 'presentation/first-slide-num-not-an-integer' | 'geometry/arc-angle-non-finite' | 'shadow/angle-non-finite' | 'chart/missing-type' | 'chart/option-non-finite' | 'chart/unknown-type' | 'chart/secondary-axis-unused' | 'chart/axis-count-mismatch' | 'chart/too-many-columns' | 'chart/bubble-in-combo' | 'shape/missing-type' | 'shape/unknown-preset' | 'connector/missing-endpoints' | 'connector/invalid-type' | 'connector/invalid-bends' | 'connector/adj-count-mismatch' | 'connector/adj-non-finite' | 'connector/invalid-binding-name' | 'connector/invalid-connection-site' | 'line/invalid-cap' | 'group/missing-object-names' | 'group/invalid-object-name' | 'group/duplicate-object-name' | 'group/unresolved-object-name' | 'group/ambiguous-object-name' | 'gradient/angle-non-finite' | 'gradient/too-few-stops' | 'gradient/stop-position-non-finite' | 'gradient/stop-position-out-of-range' | 'gradient/rotate-with-shape-not-boolean' | 'gradient/scaled-not-boolean' | 'pattern-fill/missing-pattern' | 'pattern-fill/invalid-preset' | 'image/missing-source' | 'image/path-not-a-string' | 'image/data-not-a-string' | 'image/missing-base64-header' | 'image/crop-window-overflows' | 'image/crop-inset-out-of-range' | 'image/crop-insets-exceed-extent' | 'media/missing-source' | 'media/missing-base64-header' | 'media/cover-missing-base64-header' | 'media/online-missing-link' | 'ole/missing-source' | 'ole/invalid-image-size' | 'zoom/invalid-transition-duration' | 'transition/invalid-time' | 'transition/sound-unsupported' | 'model3d/missing-source' | 'model3d/invalid-camera' | 'model3d/invalid-fov' | 'model3d/invalid-scale' | 'layout/invalid-definition' | 'table/rows-not-an-array' | 'table/rows-not-nested' | 'table/invalid-style-id' | 'table/invalid-cell-anchor' | 'table/invalid-cell-vert' | 'table/invalid-cell-overflow' | 'table/invalid-cell-margin' | 'table/invalid-cell-border' | 'table/row-index-out-of-range' | 'table/column-index-out-of-range' | 'table/merge-range-invalid' | 'hyperlink/not-an-object' | 'hyperlink/missing-target' | 'hyperlink/conflicting-targets' | 'hyperlink/invalid-slide' | 'slide/link-past-last-slide' | 'text/invalid-text' | 'clip/invalid-shape' | 'html/no-document' | 'html/table-not-found' | 'html/table-has-no-cells' | 'color/invalid-hex' | 'color/invalid-scheme-token' | 'text/invalid-underline' | 'slide/index-out-of-range' | 'slide/foreign-target' | 'slide/id-space-exhausted' | 'shape/index-out-of-range' | 'layout/ambiguous-name' | 'layout/not-found' | 'layout/foreign-handle' | 'import/slide-size-mismatch' | 'import/slide-size-unknown' | 'import/unresolved-slide-link' | 'import/destination-missing-master' | 'import/destination-missing-layout' | 'import/output-index-conflict' | 'import/output-index-out-of-range' | 'import/rescale-conflict' | 'image/undeterminable-extension' | 'image/undeterminable-type' | 'image/missing-content-type' | 'image/fit-needs-extent' | 'font/size-not-positive' | 'script/unresolved-asset-reference' | 'script/non-finite-literal' | 'package/duplicate-part-name' | 'part/not-xml' | 'relationship/duplicate-id' | 'relationship/not-found' | 'relationship/external-has-no-partname' | 'oxml/unknown-namespace-prefix' | 'oxml/invalid-qname' | 'font/missing-typeface' | 'font/invalid-style-slot' | 'font/invalid-base64' | 'font/missing-source' | 'font/collection-index-out-of-range' | 'font/collection-face-not-found' | 'layout/unknown' | 'master/missing-title' | 'math/invalid-latex' | 'math/invalid-mathml' | 'zip/unsupported-input' | 'zip/unsupported-output';
|
|
41
41
|
/**
|
|
42
42
|
* Conditions carried by `UnsupportedFeatureError`: the request is well-formed, but this build,
|
|
43
43
|
* runtime, or shape cannot express it. Distinct from `InvalidOptionError` because the caller did
|
|
@@ -59,7 +59,7 @@ type PackageReadErrorCode = 'zip/not-a-zip-archive' | 'zip/file-read-failed' | '
|
|
|
59
59
|
type MediaErrorCode = 'media/load-failed' | 'font/fetch-failed' | 'font/read-failed' | 'font/parse-failed' | 'media/fetch-failed' | 'media/read-failed' | 'media/decode-failed' | 'media/svg-preview-failed';
|
|
60
60
|
/**
|
|
61
61
|
* Conditions carried by `InternalError`: an invariant the library maintains itself did not hold.
|
|
62
|
-
* Reaching one is a bug in ts
|
|
62
|
+
* Reaching one is a bug in pptx-ts, not something a consumer can fix by changing their input —
|
|
63
63
|
* which is exactly why it is worth being able to tell apart from the four classes above.
|
|
64
64
|
*/
|
|
65
65
|
type InternalErrorCode = 'layout/default-not-registered' | 'slide/rel-index-out-of-range' | 'slide/part-already-in-deck' | 'import/part-went-missing' | 'import/slide-link-not-placed' | 'import/rescale-mode-changed' | 'chart/type-not-routed' | 'slide/object-type-not-routed' | 'ooxml/member-not-in-sequence' | 'slide/link-target-not-a-number' | 'hyperlink/not-validated' | 'animation/timing-scaffold-failed' | 'media/rel-ids-not-consecutive' | 'oxml/node-has-no-document' | 'oxml/node-has-no-parent';
|
|
@@ -74,7 +74,7 @@ type InternalErrorCode = 'layout/default-not-registered' | 'slide/rel-index-out-
|
|
|
74
74
|
* Microsoft PowerPoint", and it reads in both directions. An `InvalidOptionErrorCode` is worth
|
|
75
75
|
* reporting only if the deck it refused is one PowerPoint can express.
|
|
76
76
|
*
|
|
77
|
-
* `npx skills add shbernal/ts
|
|
77
|
+
* `npx skills add shbernal/pptx-ts` installs the skill that walks through filing one.
|
|
78
78
|
*/
|
|
79
79
|
type ErrorCode = InvalidOptionErrorCode | UnsupportedFeatureErrorCode | PackageReadErrorCode | MediaErrorCode | InternalErrorCode;
|
|
80
80
|
/** Every condition the library can report, warned or thrown. */
|
|
@@ -90,7 +90,7 @@ interface TsPptxErrorOptions extends ErrorOptions {
|
|
|
90
90
|
readonly detail?: Readonly<Record<string, unknown>>;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
|
-
* Base class for every error ts
|
|
93
|
+
* Base class for every error pptx-ts throws.
|
|
94
94
|
*
|
|
95
95
|
* Catch this to catch anything from the library; narrow with `instanceof` on a subclass, or branch
|
|
96
96
|
* on {@link TsPptxError.code}, to react to something specific. It is never thrown directly — every
|
|
@@ -160,7 +160,7 @@ declare class MediaError extends TsPptxError {
|
|
|
160
160
|
* An invariant the library maintains itself did not hold.
|
|
161
161
|
*
|
|
162
162
|
* No consumer input should be able to produce one, which is the whole reason it is a separate
|
|
163
|
-
* class: seeing it means the bug is in ts
|
|
163
|
+
* class: seeing it means the bug is in pptx-ts, and the useful response is to file it rather than
|
|
164
164
|
* to keep adjusting the input.
|
|
165
165
|
*
|
|
166
166
|
* It is the one class in the taxonomy that extends its own message, appending `REPORT_NOTICE`
|
|
@@ -241,4 +241,4 @@ declare function setDiagnosticHandler(next: DiagnosticHandler | null): void;
|
|
|
241
241
|
declare function resetDiagnosticState(): void;
|
|
242
242
|
//#endregion
|
|
243
243
|
export { PackageReadErrorCode as _, InternalError as a, PackageReadError as c, UnsupportedFeatureError as d, DiagnosticCode as f, MediaErrorCode as g, InvalidOptionErrorCode as h, setDiagnosticHandler as i, TsPptxError as l, InternalErrorCode as m, DiagnosticHandler as n, InvalidOptionError as o, ErrorCode as p, resetDiagnosticState as r, MediaError as s, Diagnostic as t, TsPptxErrorOptions as u, TsPptxCode as v, UnsupportedFeatureErrorCode as y };
|
|
244
|
-
//# sourceMappingURL=diagnostics-
|
|
244
|
+
//# sourceMappingURL=diagnostics-DiMmBU8P.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics-
|
|
1
|
+
{"version":3,"file":"diagnostics-DiMmBU8P.d.ts","names":[],"sources":["../src/codes.ts","../src/errors.ts","../src/diagnostics.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgCY;;;;;;;KA8KA;;;;;;KA0KA;;;;;;KAwBA;;;;;;;KAkCA;;;;;;KAwBA;;;;;;;;;;;;;;KAiEA,YACT,yBACA,8BACA,uBACA,iBACA;;KAGS,aAAa,iBAAiB;;;;UCvezB,2BAA2B;;;;;WAKlC,SAAS,SAAS;;;;;;;;;cAUf,oBAAoB;;WAEvB,MAAM;;WAGN,SAAS,SAAS;;;;;;EAO3B,YAAY,MAAM,WAAW,iBAAiB,UAAU;;;;;;;;;;cAmB5C,2BAA2B;WACtB,MAAM;EACvB,YAAY,MAAM,wBAAwB,iBAAiB,UAAU;;;;;;;;;;;cAczD,gCAAgC;WAC3B,MAAM;EACvB,YAAY,MAAM,6BAA6B,iBAAiB,UAAU;;;;;;;;;;cAa9D,yBAAyB;WACpB,MAAM;EACvB,YAAY,MAAM,sBAAsB,iBAAiB,UAAU;;;;;;;;;cAYvD,mBAAmB;WACd,MAAM;EACvB,YAAY,MAAM,gBAAgB,iBAAiB,UAAU;;;;;;;;;;;;;;;;;;;cAkCjD,sBAAsB;WACjB,MAAM;EACvB,YAAY,MAAM,mBAAmB,iBAAiB,UAAU;;;;;UCzJhD;;WAEP,MAAM;;WAEN;;;;;;;;;;;WAWA,SAAS,SAAS;;;KAIhB,qBAAqB,YAAY;;;;;;;;;;;;;;;;;;;;;;;iBAkC7B,qBAAqB,MAAM;;;;;;;;;;;;;;;;;iBAwD3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dn as EMBEDDED_FONT_SLOTS } from "./pres-BA9_lJbY.js";
|
|
2
2
|
//#region src/embedded-fonts.d.ts
|
|
3
3
|
type EmbeddedFontSlot = (typeof EMBEDDED_FONT_SLOTS)[number];
|
|
4
4
|
/** One embeddable face: a slot plus the raw font bytes (absent in pure read-side merges). */
|
|
@@ -17,4 +17,4 @@ interface EmbeddedFont {
|
|
|
17
17
|
}
|
|
18
18
|
//#endregion
|
|
19
19
|
export { EmbeddedFontFace as n, EmbeddedFontSlot as r, EmbeddedFont as t };
|
|
20
|
-
//# sourceMappingURL=embedded-fonts-
|
|
20
|
+
//# sourceMappingURL=embedded-fonts-CI_YGW2d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedded-fonts-
|
|
1
|
+
{"version":3,"file":"embedded-fonts-CI_YGW2d.d.ts","names":[],"sources":["../src/embedded-fonts.ts"],"mappings":";;KAyCY,2BAA2B;;UAGtB;EAChB,MAAM;EACN,QAAQ;;;UAIQ;;EAEhB;EACA;EACA;EACA;EACA,OAAO"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { d as SHAPE_NAME, i as CHART_NAME, m as SlideObjectType, v as WRITE_OUTPUT_TYPE } from "./enums-
|
|
2
|
-
import {
|
|
3
|
-
import { L as TableToSlidesProps, M as TableProps, N as TableRow, S as AnimationProps, T as TransitionProps, a as Slide, b as SlideMasterProps, n as GroupChildProps, o as SlideLayout, r as GroupProps, s as SlideObjectInfo, t as AddSlideProps, x as SlideNumberProps, y as SlideMasterObject } from "./slide-
|
|
4
|
-
import { r as EmbeddedFontSlot } from "./embedded-fonts-
|
|
5
|
-
import { A as SlideObject, D as SectionInternalProps, E as PresentationPropsInternal, M as SlideRelChart, N as SlideRelMedia, O as SlideLayoutInternal, T as PresSlideInternal, j as SlideRel, k as SlideMasterInternal, n as FontMetricsRegistry, w as ObjectOptionsInternal } from "./font-metrics-
|
|
6
|
-
import { s as MediaError } from "./diagnostics-
|
|
7
|
-
import { c as ExtractedSlides, s as ExtractedSlide } from "./presentation-types-
|
|
8
|
-
import { r as ZipWriter } from "./zip-
|
|
1
|
+
import { d as SHAPE_NAME, i as CHART_NAME, m as SlideObjectType, v as WRITE_OUTPUT_TYPE } from "./enums-DQRpVOLh.js";
|
|
2
|
+
import { $ as ChartOpts, At as NotesProps, C as HexColor, Ht as TextProps, It as TableLayoutResult, Mt as OverflowBoxOptions, Pt as SlideComment, Q as ChartMulti, St as OptsChartData, Ut as TextPropsOptions, Vt as TextMeasurement, c as WriteFileProps, f as ThemeProps, i as PresLayout, kt as MeasureTextOptions, l as WriteOutputMap, n as PackagePart, o as SectionProps, p as BackgroundOption, qt as ImageProps, r as PartsProps, rn as ShapeProps, s as WriteBaseProps, t as CustomPropertyValue, u as WriteProps } from "./pres-BA9_lJbY.js";
|
|
3
|
+
import { L as TableToSlidesProps, M as TableProps, N as TableRow, S as AnimationProps, T as TransitionProps, a as Slide, b as SlideMasterProps, n as GroupChildProps, o as SlideLayout, r as GroupProps, s as SlideObjectInfo, t as AddSlideProps, x as SlideNumberProps, y as SlideMasterObject } from "./slide-BqPtyKmb.js";
|
|
4
|
+
import { r as EmbeddedFontSlot } from "./embedded-fonts-CI_YGW2d.js";
|
|
5
|
+
import { A as SlideObject, D as SectionInternalProps, E as PresentationPropsInternal, M as SlideRelChart, N as SlideRelMedia, O as SlideLayoutInternal, T as PresSlideInternal, j as SlideRel, k as SlideMasterInternal, n as FontMetricsRegistry, w as ObjectOptionsInternal } from "./font-metrics-CBGmhLo0.js";
|
|
6
|
+
import { s as MediaError } from "./diagnostics-DiMmBU8P.js";
|
|
7
|
+
import { c as ExtractedSlides, s as ExtractedSlide } from "./presentation-types-B3VQH4Bz.js";
|
|
8
|
+
import { r as ZipWriter } from "./zip-CTll_dr0.js";
|
|
9
9
|
//#region src/runtime/types.d.ts
|
|
10
10
|
type RuntimeAdapter = {
|
|
11
11
|
readonly writeFileOutputType: WRITE_OUTPUT_TYPE | null;
|
|
@@ -85,7 +85,7 @@ type Emu = number & {
|
|
|
85
85
|
readonly __unit: 'emu';
|
|
86
86
|
};
|
|
87
87
|
/** Default pixel density for the `"<n>px"` coordinate unit: CSS reference pixels, also the
|
|
88
|
-
* density ts
|
|
88
|
+
* density pptx-ts assumes when reading an image header's pixel dimensions. */
|
|
89
89
|
declare const DEFAULT_PX_PER_INCH = 96;
|
|
90
90
|
/**
|
|
91
91
|
* The largest DrawingML coordinate, in EMU: the `maxInclusive` of `ST_Coordinate`, the type of
|
|
@@ -96,11 +96,11 @@ declare const MAX_COORDINATE_EMU = 27273042316900;
|
|
|
96
96
|
declare const MIN_COORDINATE_EMU = -27273042329600;
|
|
97
97
|
type StandardLayoutName = 'LAYOUT_4x3' | 'LAYOUT_16x9' | 'LAYOUT_16x10' | 'LAYOUT_WIDE';
|
|
98
98
|
interface StandardLayout {
|
|
99
|
-
/** ts
|
|
99
|
+
/** pptx-ts layout key used with `pptx.layout`. */
|
|
100
100
|
readonly layout: StandardLayoutName;
|
|
101
101
|
/** PresentationML slide-size preset name, or `custom` for PowerPoint widescreen. */
|
|
102
102
|
readonly name: string;
|
|
103
|
-
/** Slide width in inches — inches is ts
|
|
103
|
+
/** Slide width in inches — inches is pptx-ts's default coordinate unit, so this is the value to use for `addText`/`addShape` math. */
|
|
104
104
|
readonly widthIn: number;
|
|
105
105
|
/** Slide height in inches. */
|
|
106
106
|
readonly heightIn: number;
|
|
@@ -591,7 +591,7 @@ declare class PresentationCore {
|
|
|
591
591
|
set layout(value: string | StandardLayout);
|
|
592
592
|
get layout(): string;
|
|
593
593
|
/**
|
|
594
|
-
* ts
|
|
594
|
+
* pptx-ts Library Version
|
|
595
595
|
*/
|
|
596
596
|
private readonly _version;
|
|
597
597
|
get version(): string;
|
|
@@ -693,7 +693,7 @@ declare class PresentationCore {
|
|
|
693
693
|
*/
|
|
694
694
|
private readonly getSections;
|
|
695
695
|
/**
|
|
696
|
-
* Enables the `Slide` class to set ts
|
|
696
|
+
* Enables the `Slide` class to set pptx-ts [Presentation] master/layout slidenumbers
|
|
697
697
|
* @param {SlideNumberProps} slideNum - slide number config
|
|
698
698
|
*/
|
|
699
699
|
private readonly setSlideNumber;
|
|
@@ -849,9 +849,11 @@ declare class PresentationCore {
|
|
|
849
849
|
/**
|
|
850
850
|
* Export the current Presentation as ZIP content with the selected type
|
|
851
851
|
* @param {WriteProps} props output properties
|
|
852
|
-
* @returns
|
|
852
|
+
* @returns file content in the selected type: a `Blob` when `outputType` is left out, else
|
|
853
|
+
* the {@link WriteOutputMap} entry for it
|
|
854
|
+
* @example const bytes = await pptx.write({ outputType: 'uint8array' }) // Uint8Array, no cast
|
|
853
855
|
*/
|
|
854
|
-
write(props?: WriteProps): Promise<
|
|
856
|
+
write<T extends WRITE_OUTPUT_TYPE = 'blob'>(props?: WriteProps<T>): Promise<WriteOutputMap[T]>;
|
|
855
857
|
/**
|
|
856
858
|
* Assemble the current Presentation into its OOXML package parts WITHOUT zipping — the raw
|
|
857
859
|
* `path → bytes` contents `write()` would compress into the `.pptx`. Use this to stream parts
|
|
@@ -922,7 +924,7 @@ declare function renderImageObject(ctx: RenderContext): string;
|
|
|
922
924
|
//#endregion
|
|
923
925
|
//#region src/families/core.d.ts
|
|
924
926
|
/**
|
|
925
|
-
* ts
|
|
927
|
+
* pptx-ts: the construct families every presentation carries
|
|
926
928
|
*
|
|
927
929
|
* The core tier. A composed presentation gets these whether it asks for them or not, so
|
|
928
930
|
* `createPresentation()` with no families still authors text, shapes, images, groups and speaker
|
|
@@ -1043,4 +1045,4 @@ interface ComposeOptions<Fs extends readonly ConstructFamily[]> {
|
|
|
1043
1045
|
type Composed<Fs extends readonly ConstructFamily[]> = ComposedPresentation<SlideMethodsOf<[...typeof CORE_CONSTRUCT_FAMILIES, ...Fs]>, PresentationMethodsOf<[...typeof CORE_CONSTRUCT_FAMILIES, ...Fs]>>;
|
|
1044
1046
|
//#endregion
|
|
1045
1047
|
export { pixelsToEmu as A, StandardLayoutName as C, emuToPoints as D, emuToPixels as E, ptToHundredths as M, inchesToEmu as O, StandardLayout as S, emuToInches as T, HUNDREDTHS_PER_POINT as _, renderImageObject as a, PERCENT_SCALE as b, ConstructFamily as c, PartContributor as d, RenderContext as f, FIXED_PCT_PER_PERCENT as g, Emu as h, ComposedSlide as i, pointsToEmu as j, percentToEmu as k, PresentationAuthorContext as l, DEFAULT_PX_PER_INCH as m, Composed as n, renderTextObject as o, ANGLE_UNITS_PER_DEGREE as p, ComposedPresentation as r, PresentationCore as s, ComposeOptions as t, SlideBuilder as u, MAX_COORDINATE_EMU as v, coordToEmu as w, STANDARD_LAYOUTS as x, MIN_COORDINATE_EMU as y };
|
|
1046
|
-
//# sourceMappingURL=entry-compose-
|
|
1048
|
+
//# sourceMappingURL=entry-compose-6hF9aTmT.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entry-compose-
|
|
1
|
+
{"version":3,"file":"entry-compose-6hF9aTmT.d.ts","names":[],"sources":["../src/runtime/types.ts","../src/units.ts","../src/gen/oxml/el.ts","../src/gen/slide/objects/shared.ts","../src/gen/opc/content-types.ts","../src/package/parts/shared.ts","../src/slide.ts","../src/families/shared.ts","../src/presentation.ts","../src/gen/slide/objects/text.ts","../src/gen/slide/objects/image.ts","../src/families/core.ts","../src/entry-compose.ts"],"mappings":";;;;;;;;;KAIY;WACF,qBAAqB;;;;;;;;;;;;EAY9B,YAAY,KAAK;IAAkB;QAAmB;;;;;;;;;EAStD,sBAAsB,KAAK,kBAAkB,QAAQ;EACrD,YAAY,kBAAkB,eAAe,cAAc,OAAO,eAAe;;;;;;;EAOjF,eAAe,mBAAmB,QAAQ;;;;;;;;;cClB9B;;;;;;cAOA;;;;;;;cAQA;;;;;;cAOA;;;;;iBAMG,eAAe;;;;;;;;;KAanB;WAA0B;;;;cASzB;;;;;cAMA;;cAGA;KAED;UAEK;;WAEP,QAAQ;;WAER;;WAEA;;WAEA;;WAEA;;WAEA;;iBAGM,YAAY,iBAAiB;iBAK7B,YAAY,iBAAiB;iBAK7B,YAAY,gBAAgB,cAAc;;;;;;;;;;;;;iBAkB1C,aAAa,iBAAiB,kBAAkB;;;;;;;;;;;;;;;iBAoBhD,WAAW,wBAAwB,kBAAkB;iBAoCrD,YAAY;;;;;;;;;;;;;;;;;;;;iBAwBZ,YAAY;;;;;;;;;iBAaZ,YAAY,aAAa;cAiB5B,kBAAkB,SAAS,OAAO,oBAAoB;;;;KC7LvD,WAAW;;;;;;;;;;;;;;;;;;;;;UCDN;;EAEhB,KAAK;;;;;;;;;EASL;;;;;;;;EAQA,UAAU,YAAY;;EAEtB,OAAO,oBAAoB,sBAAsB;;EAEjD;IAAS;IAAW;IAAW;IAAY;;;EAE3C,aAAa;;EAEb,eAAe;;;;;;EAMf,UAAU;;;;;;;;;;;KAYC,qBACT,gBAAgB,QAChB,gBAAgB,YAChB,gBAAgB,QAChB,gBAAgB,QAChB,gBAAgB,UAChB,gBAAgB,YAChB,gBAAgB,cAChB,gBAAgB,QAChB,gBAAgB,OAChB,gBAAgB;;KAGP,kBAAkB,KAAK;;;;;;;;;;;;;;;;;KAkBvB,gBAAgB,QAAQ,OAAO,oBAAoB;;;;UCtE9C;WACP;WACA;;;;;;;UAQO;WACP;WACA;WACA;;;;;KC/BE,aAAa,oBAAoB,sBAAsB;;;;;;;;UASlD;;;;;;;WAOP;;WAEA,QAAQ;;WAER,eAAe;;;UAIR;;WAEP,iBAAiB,OAAO,mBAAmB,qBAAqB,KAAK;;WAErE,eAAe,MAAM,2BAA2B,KAAK;;;;;;WAMrD,kBAAkB,QAAQ,YAAY,KAAK,cAAc;;;;;;UAOlD;WACP,YAAY,MAAM,8BAA8B;WAChD,gBAAgB,MAAM,8BAA8B;WACpD,YAAY,OAAO,mBAAmB,wBAAwB;WAC9D,aAAa,QAAQ,qBAAqB,yBAAyB;WACnE,YAAY,MAAM,8BAA8B;;;;cCRrC;;mBACH;EAEV,WAAW,QAAQ,+BAA+B;EAClD,WAAW,qBAAqB;EAChC,mBAAmB;EACnB;EACA,aAAa;EACb,OAAO;EACP,YAAY;EACZ,YAAY;EACZ;EACA;EACA,cAAc;EACd;EACA,mBAAmB;EACnB,eAAe;EACf,WAAW;EACX,qBAAqB;EACrB,aAAa;;;;;;WAOJ,eAAe;;;;;;;;EAShB,cAAc;EACd,UAAU;EACV,YAAY;EACZ,cAAc;EACd,UAAU;EACV,UAAU;EACV,UAAU;EACV,YAAY;EACZ,UAAU;EACV,cAAc;EACd,gBAAgB;EAChB,UAAU;EACV,cAAc;EACd,gBAAgB;EAChB,UAAU;EACV,SAAS;EACT,cAAc;EAE7B,YAAY;IACX,WAAW,QAAQ,+BAA+B;IAClD,WAAW,qBAAqB;IAChC,oBAAoB;IACpB,YAAY;IACZ,cAAc,OAAO;IACrB;IACA;IACA;IACA,cAAc;IACd,SAAS;IACT,cAAc;;;;;;;;;;UAwDP;MACG,WAAW,OAAO;MASlB,cAAc;;;;;UAQjB;MACG,MAAM,OAAO;MAIb,SAAS;;;;UAOZ;MACG,OAAO;MAIP;;;;;UAUH;MACG,WAAW,OAAO;MAIlB,cAAc;;;;MAOd,YAAY,OAAO;MAMnB,eAAe;;;;;;;;;;MAaf,sBAAsB;;;;;;;;;MAYtB,oBAAoB;;MAOpB;;MAKA;;;;;;;;KC5OA;;KAkBA;;;;;;KAwBP,OAAO,UAAU,sBAAsB,OAAO,iBAAiB,MAAM,WAAW,MAAM;;;;;;;;;;KAW/E,kBAAkB,KAAK,QAAQ,kCAAkC,OAAO;EACnF,YACC,OAAO,cACP,MAAM,kBAAkB,cACxB,OAAO;IAAc,OAAO;;;;;;;UA6Bb;WACP,MAAM;WACN,aAAa;;;;;;;;;UAUN;EAChB,eACC,KAAK,2BACL,eAAe,aACf,MAAM,uBACF;EACL,gBAAgB,KAAK,2BAA2B,eAAe,aAAa,MAAM;EAClF,eAAe,KAAK,2BAA2B,MAAM,YAAY,MAAM,eAAe;EACtF,iBAAiB,KAAK,2BAA2B,eAAe,SAAS;;;;;;;KAgB9D;;KAqBP,gBAAgB,UAAU,sBAAsB,QAAQ,mBAAmB,OAAO,aAAa;;;;;;;KAQxF,kBACV,KAAK,uBAAuB,QAAQ,mBAAmB,OAAO,gBAAgB;;;;;;;;;UAW/D;WACP,UAAU,OAAO,sBAAsB;;;UAIhC;;WAEP,MAAM;;WAEN,UAAU;;WAEV,WAAW;;WAEX,YAAY;;WAEZ,QAAQ;;WAER,sBAAsB;;WAEtB,UAAU;;;;;;KAgER,wBAAwB,KAAK,YAAW,KAAK,8BAA8B,YAAY,YAAY,SACxG,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;cCnKE;;;;;;;;;;;;;;UAeZ;MACG,OAAO,gBAAgB;MAgBvB;;;;mBAOM;MACN;;;;UAeH;MACG,OAAO;MAIP;;;;UAOH;MACG,QAAQ;MAIR;;;;;UAQH;MACG,SAAS;MAIT;;;;UAOH;MACG,QAAQ;MAIR;;;;UAOH;MACG,MAAM,OAAO;MAIb,SAAS;;;;UAOZ;MACG,MAAM;MAIN;;;;;UAQH;MACG,cAAc;MASd;;;;;UAQH;MACG,QAAQ;MAIR;;mBAKM;;mBAGA;MACN,UAAU;;mBAKJ;MACN,YAAY;;UAKf;;;;;;;qBAQW,eAAe;MACvB,gBAAgB;cAIf;UAoBJ;UAiBA;MACG,cAAc;mBAIR;;mBAaA;;mBAGA;EAEjB,YAAY,SAAS,gBAAgB,mBAAmB;;;;;;mBA6DvC;;;;;;mBAoBA;;;;;;mBAQA;;;;;mBAMA;;;;;UAaT;;;;;;;;;;;;;;;EAyBR,gBAAa;IAAkB;QAAgD,QAAQ;;;;;;;;;YAsB7E,aAAa,gBAAgB,qBACtC,QAAQ,IACN,wBAAwB,YAAY,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuCrD,oBACL,cACA,iBAAiB,aAAa,aAC9B;IAAS;IAAgB;IAAkB;MACzC;;;;;;;;;;;;;;;;;;;;;;;;EAmCG,UAAU;IACf;IACA,OAAO,cAAc;IACrB;IACA,QAAQ;MACL;;;;;;;;;;;;;;;;EAoDJ,YAAY,eAAe,aAAa,MAAM,qBAAqB;;;;;;;;;;;EAcnE,aAAa,eAAe,aAAa,MAAM;;;;;;;;;;;;;;;;;;;EAsB/C,YAAY,MAAM,YAAY,MAAM,aAAa;;;;;;;;;EAc3C,QAAQ,QAAQ,iBAAiB,QAAQ;;;;;;;;EAczC,MAAM,UAAU,4BAA4B,QAAQ,WAAW,KAAK,QAAQ,eAAe;;;;;;;;;;;;;;;;;EAyB3F,QAAQ,QAAQ,aAAa,QAAQ;;;;;;;EAYrC,UAAU,QAAQ,iBAAiB;;;;;;;EAqBzC,kBAAkB,cAAc,OAAO;;;;;;EAUvC,WAAW,SAAS;;;;;;EA6CpB,SAAS,UAAU,gBAAgB;;;;;;EAqFnC,aAAa,QAAQ;;;;;EAgDrB,kBAAkB,OAAO;;;;;;;iBC/7BV,iBAAiB,KAAK;;;;;;iBCEtB,kBAAkB,KAAK;;;;;;;;;;;;;;;;cCL1B;;;mBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCSR,oBAAoB,MAAM,qBAAqB,GAAG,8BAA6B,SAAS,cAAa;;KAGrG,QAAQ,GAAG,KAAK,eAAc,YAAY,qBAAoB,MAAM,MAAM;;;;;;;;UASrE,iBAAiB;EAC1B;KACE,MAAM,iBAAiB,SAAS;MAAc,MAAM;QAAe;KACnE,QAAQ,cAAc,UAAU,YAAY;;;;KAKnC,eAAe,oBAAoB,qBAAqB,cAC7D,oBAAoB,QAAQ;EAAc;gBAChD;;KAIW,sBAAsB,oBAAoB,qBAAqB,cACpE,oBAAoB,QAAQ;EAAc;kCAC1C;;;;;;;;;KAWK,cAAc,UAAU,qBAAqB,KAAK,OAAO,wBACnE,KAAK,IAAI,gBAAgB,4BACvB,iBAAiB,cAAc,IAAI,KACnC,QAAQ,MAAM,IAAI,cAAc;;KAI/B,+BACH,WAAW,wBAAwB,wBAAwB,YAAY,oBAAoB;;;;;KAOjF,qBAAqB,UAAU,mBAAmB,gBAAgB,uBAAuB,KACpG,qCACmB,uBAEnB,KAAK,2BAA2B;EAAO,WAAW,UAAU,kBAAkB,cAAc;;;UAG5E,eAAe,oBAAoB;;EAEnD,MAAM;;;KAIK,SAAS,oBAAoB,qBAAqB,qBAC7D,0BAA0B,4BAA4B,MACtD,iCAAiC,4BAA4B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/enums.d.ts
|
|
2
2
|
/**
|
|
3
|
-
* ts
|
|
3
|
+
* pptx-ts Enums
|
|
4
4
|
* NOTE: `enum` wont work for objects, so use `Object.freeze`
|
|
5
5
|
*/
|
|
6
6
|
/**
|
|
@@ -295,7 +295,7 @@ declare const EXTRA_SHAPE_PRESETS: readonly ['straightConnector1', 'bentConnecto
|
|
|
295
295
|
*/
|
|
296
296
|
type CONNECTOR_PRESET_NAME = (typeof EXTRA_SHAPE_PRESETS)[number];
|
|
297
297
|
/**
|
|
298
|
-
* Every shape geometry name ts
|
|
298
|
+
* Every shape geometry name pptx-ts can serialize without corrupting the
|
|
299
299
|
* package: the OOXML preset geometries (`ST_ShapeType` — `ShapeType` values
|
|
300
300
|
* plus the unexposed connectors above) and `custGeom` (freeform paths, emitted
|
|
301
301
|
* as `<a:custGeom>` rather than `<a:prstGeom>`). Used to reject bogus presets
|
|
@@ -468,4 +468,4 @@ declare enum TableStyle {
|
|
|
468
468
|
}
|
|
469
469
|
//#endregion
|
|
470
470
|
export { isChartType as C, isChartExType as S, VALID_SHAPE_PRESETS as _, CONNECTOR_PRESET_NAME as a, asChartType as b, PLACEHOLDER_TYPE as c, SHAPE_NAME as d, SchemeColor as f, TextAnchor as g, TableStyle as h, CHART_NAME as i, PlaceholderType as l, SlideObjectType as m, AlignV as n, ChartType as o, ShapeType as p, BulletType as r, OutputType as s, AlignH as t, SCHEME_COLORS as u, WRITE_OUTPUT_TYPE as v, connectorPresetFor as x, ZIP_OUTPUT_TYPE as y };
|
|
471
|
-
//# sourceMappingURL=enums-
|
|
471
|
+
//# sourceMappingURL=enums-DQRpVOLh.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums-
|
|
1
|
+
{"version":3,"file":"enums-DQRpVOLh.d.ts","names":[],"sources":["../src/enums.ts"],"mappings":";;;;;;;;;;KAUY,qBAAqB;KACrB,oBAAoB;;;;;;KAMpB,gBAAgB;;;;;KAKhB,mBAAmB;aAEnB;EACX;EACA;EACA;;aAIW;EACX;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;aAEW;EACX;EACA;EACA;EACA;;;;;;;;;aASW;EACX;EACA;EACA;;;;;;;;;;;;;KAcW,gBAAgB,cAAc;;;;;;cAOpC;;;;;;;;;KAoBM,gCAAgC;;;;;;;;;cAU/B,qBAAqB;;;;;;;;iBAYlB,YAAY,MAAM,aAAa;;;;;;;;;;iBAgB/B,YAAY,gBAAgB,QAAQ;;;;;;iBA4BpC,cAAc;aAIlB;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;;;;;iBA4Be,mBAAmB,uCAAuC,gBAAgB;aAI9E;EACX;EACA;EACA;EACA;EACA;EACA;;;;;;KAMW,sBAAsB;;;;;aAMtB;EACX;EACA;EACA;EACA;;;;;;;;;;;;aAaW;EAEX;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;;EAEA;;EAEA;;EAEA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/diagnostics.ts
|
|
2
2
|
/** Prefix stamped on every warning so consumers can attribute console noise to this library. */
|
|
3
|
-
const WARN_PREFIX = "ts
|
|
3
|
+
const WARN_PREFIX = "pptx-ts";
|
|
4
4
|
/** The default handler: one `console.warn` line per diagnostic, prefixed. */
|
|
5
5
|
const consoleHandler = (diagnostic) => {
|
|
6
6
|
console.warn(`${WARN_PREFIX}: ${diagnostic.message}`);
|
|
@@ -34,7 +34,7 @@ function setDiagnosticHandler(next) {
|
|
|
34
34
|
/**
|
|
35
35
|
* Emit a library diagnostic.
|
|
36
36
|
* @param code - the stable condition identifier ({@link DiagnosticCode})
|
|
37
|
-
* @param message - explanation, without a `ts
|
|
37
|
+
* @param message - explanation, without a `pptx-ts:` prefix (the default handler adds one)
|
|
38
38
|
* @param detail - optional structured context
|
|
39
39
|
*/
|
|
40
40
|
function warn(code, message, detail) {
|
|
@@ -90,7 +90,7 @@ function resetDiagnosticState() {
|
|
|
90
90
|
//#endregion
|
|
91
91
|
//#region src/errors.ts
|
|
92
92
|
/**
|
|
93
|
-
* Base class for every error ts
|
|
93
|
+
* Base class for every error pptx-ts throws.
|
|
94
94
|
*
|
|
95
95
|
* Catch this to catch anything from the library; narrow with `instanceof` on a subclass, or branch
|
|
96
96
|
* on {@link TsPptxError.code}, to react to something specific. It is never thrown directly — every
|
|
@@ -173,12 +173,12 @@ var MediaError = class extends TsPptxError {
|
|
|
173
173
|
* one, and an agent that hits a library defect routes around it silently unless something in front
|
|
174
174
|
* of it says the report is worth making.
|
|
175
175
|
*/
|
|
176
|
-
const REPORT_NOTICE = "This is a bug in ts
|
|
176
|
+
const REPORT_NOTICE = "This is a bug in pptx-ts, not in your deck or your code. Please report it:\nhttps://github.com/shbernal/pptx-ts/issues/new?template=agent-report.yml";
|
|
177
177
|
/**
|
|
178
178
|
* An invariant the library maintains itself did not hold.
|
|
179
179
|
*
|
|
180
180
|
* No consumer input should be able to produce one, which is the whole reason it is a separate
|
|
181
|
-
* class: seeing it means the bug is in ts
|
|
181
|
+
* class: seeing it means the bug is in pptx-ts, and the useful response is to file it rather than
|
|
182
182
|
* to keep adjusting the input.
|
|
183
183
|
*
|
|
184
184
|
* It is the one class in the taxonomy that extends its own message, appending `REPORT_NOTICE`
|
|
@@ -199,4 +199,4 @@ var InternalError = class extends TsPptxError {
|
|
|
199
199
|
//#endregion
|
|
200
200
|
export { TsPptxError as a, setDiagnosticHandler as c, PackageReadError as i, warn as l, InvalidOptionError as n, UnsupportedFeatureError as o, MediaError as r, resetDiagnosticState as s, InternalError as t, warnOnce as u };
|
|
201
201
|
|
|
202
|
-
//# sourceMappingURL=errors-
|
|
202
|
+
//# sourceMappingURL=errors-Da2nXCJm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors-C4oENPcu.js","names":[],"sources":["../src/diagnostics.ts","../src/errors.ts"],"sourcesContent":["/**\n * Central sink for library diagnostics.\n *\n * Every user-facing warning is routed through {@link warn} / {@link warnOnce} rather than calling\n * `console.warn` directly, so there is one place to apply a consistent prefix and one place a\n * consumer can take over — see {@link setDiagnosticHandler}. This module has no *runtime* imports\n * so it can be used from anywhere without risking an import cycle; `codes.ts` is types only and is\n * erased at compile time, so it does not cost that property.\n *\n * **A diagnostic's `code` is API; its `message` is not.** The code is a stable identifier a\n * consumer may branch on (`if (d.code === 'chart/non-finite-value')`); the wording behind it is\n * free to improve in any release. The vocabulary lives in `codes.ts` and is shared with the thrown\n * surface (`errors.ts`), so a condition that can both warn and throw reads the same either way.\n */\n\nimport type { DiagnosticCode } from './codes.js'\n\nexport type { DiagnosticCode }\n\n/** One diagnostic emitted by the library. */\nexport interface Diagnostic {\n\t/** Stable condition identifier — see {@link DiagnosticCode}. Branch on this, not on the text. */\n\treadonly code: DiagnosticCode\n\t/** Human-readable explanation. Free to change in any release; do not parse it. */\n\treadonly message: string\n\t/**\n\t * Structured context for the condition, when a site has any to give.\n\t *\n\t * Every rejection of an `ST_` enum value populates it: `checkEnumOrWarn` (`ooxml/check-enum.ts`)\n\t * carries `received` — the value the caller passed — and `valid`, the whole legal list, plus\n\t * whatever the call site adds. That reaches a handler for a line dash type, a table cell's 3-D\n\t * preset and a table's horizontal overflow, among others. Nothing else populates it yet, so a\n\t * handler must still treat the field as optional and must not assume a particular key is there\n\t * for a given code.\n\t */\n\treadonly detail?: Readonly<Record<string, unknown>>\n}\n\n/** Receives every {@link Diagnostic} the library emits. See {@link setDiagnosticHandler}. */\nexport type DiagnosticHandler = (diagnostic: Diagnostic) => void\n\n/** Prefix stamped on every warning so consumers can attribute console noise to this library. */\nconst WARN_PREFIX = 'ts-pptx'\n\n/** The default handler: one `console.warn` line per diagnostic, prefixed. */\nconst consoleHandler: DiagnosticHandler = (diagnostic) => {\n\tconsole.warn(`${WARN_PREFIX}: ${diagnostic.message}`)\n}\n\nlet handler: DiagnosticHandler = consoleHandler\n\n/**\n * Route every library diagnostic to `handler`, or pass `null` to restore the default\n * (one prefixed `console.warn` per diagnostic).\n *\n * This is process-global rather than per-presentation, deliberately: the emitting code is a tree\n * of free functions in `gen/**` with no presentation in scope, and threading a handler through\n * every signature would be a far larger and worse change than the problem warrants. The practical\n * consequence is that a process building several decks concurrently cannot attribute a diagnostic\n * to one of them. If that matters, correlate on `code`, or build the decks one at a time with the\n * handler set around each build: a handler set around concurrent builds sees all of their\n * diagnostics.\n *\n * A throwing handler propagates out of whatever library call emitted the diagnostic, which is the\n * supported way to make a specific condition fatal:\n *\n * ```ts\n * setDiagnosticHandler((d) => {\n * if (d.code === 'coord/bare-number-is-inches') throw new Error(d.message)\n * })\n * ```\n * @param next - the receiver, or `null` to restore the console default\n */\nexport function setDiagnosticHandler(next: DiagnosticHandler | null): void {\n\thandler = next ?? consoleHandler\n}\n\n/**\n * Emit a library diagnostic.\n * @param code - the stable condition identifier ({@link DiagnosticCode})\n * @param message - explanation, without a `ts-pptx:` prefix (the default handler adds one)\n * @param detail - optional structured context\n */\nexport function warn(code: DiagnosticCode, message: string, detail?: Readonly<Record<string, unknown>>): void {\n\thandler(detail === undefined ? { code, message } : { code, message, detail })\n}\n\n// Track diagnostics already emitted so a recurring condition (e.g. the same out-of-range fontSize\n// on every cell of a table) is reported once instead of flooding the handler. Keyed on code AND\n// message, so a *different* offending value under the same code still reports.\nconst seen = new Set<string>()\n\n/**\n * Emit a library diagnostic at most once per distinct code+message.\n *\n * \"Once\" is **process-global**, the same scope {@link setDiagnosticHandler} has and for the\n * same reason: the emitting code is a tree of free functions in `gen/**` with no presentation\n * in scope. The consequence is different, though, and worth stating on its own — a process that\n * builds several decks does not get a second report of a condition an earlier deck already\n * tripped, so the second deck's diagnostics are incomplete rather than merely unattributed.\n * {@link resetDiagnosticState} is how a host that cares gets each build a clean slate.\n *\n * @param code - the stable condition identifier ({@link DiagnosticCode})\n * @param message - explanation (see {@link warn})\n * @param detail - optional structured context\n */\nexport function warnOnce(code: DiagnosticCode, message: string, detail?: Readonly<Record<string, unknown>>): void {\n\tconst key = `${code}\\0${message}`\n\tif (seen.has(key)) return\n\tseen.add(key)\n\twarn(code, message, detail)\n}\n\n/**\n * Clear the `warnOnce` dedupe set, so a condition already reported reports again. (`warnOnce` is\n * internal and carries no page of its own, so it is named rather than linked.)\n *\n * Call it between builds in a host that builds more than one deck per process and wants each\n * build's diagnostics complete. Without it, deck two is silent about anything deck one already\n * warned for, which reads as \"no problems found\" rather than as \"already mentioned\".\n *\n * It also bounds the set. Most `warnOnce` messages interpolate the offending value, so a server\n * building decks from user input accumulates one entry per distinct bad value with no way to\n * release them.\n *\n * This does not touch the handler — {@link setDiagnosticHandler} owns that, and the two are\n * reset independently on purpose: a host usually installs its handler once and wants it to\n * survive.\n */\nexport function resetDiagnosticState(): void {\n\tseen.clear()\n}\n","/**\n * The library's error taxonomy.\n *\n * Every failure ts-pptx raises is a {@link TsPptxError} carrying a stable {@link ErrorCode}, so a\n * consumer can tell *\"you passed a bad coordinate\"* from *\"this font file is corrupt\"* from\n * *\"these bytes are not a package\"* without matching on message substrings. The classes are a\n * deliberately flat, coarse bucket — five of them — and the code carries the specificity. Do not\n * add a class per throw site; add a code.\n *\n * **The class and the code are API. The message is not.** Branch on `instanceof` and on `code`;\n * the wording behind them is free to improve in any release. Every error remains an\n * `instanceof Error`, so existing `catch` blocks keep working.\n *\n * Which class to reach for:\n *\n * | class | the failure is | who fixes it |\n * |---|---|---|\n * | {@link InvalidOptionError} | the caller passed something unusable | the caller's code |\n * | {@link UnsupportedFeatureError} | a well-formed request this build/runtime/shape cannot express | the caller's expectations, or the environment |\n * | {@link PackageReadError} | the input bytes are not a readable package | the input file |\n * | {@link MediaError} | a referenced image/font/AV resource would not load or decode | the resource |\n * | {@link InternalError} | an invariant of the library itself did not hold | ts-pptx (file a bug) |\n *\n * **Which of these is worth reporting upstream.** `InternalError` always is, and says so at\n * runtime. The middle three are worth reporting when the environment disagrees with us:\n * a `PackageReadError` on a file that opens cleanly in PowerPoint, a `MediaError` on an asset every\n * other tool loads, an `UnsupportedFeatureError` for something PowerPoint can plainly express.\n * `InvalidOptionError` is worth reporting only if the deck it refused is one PowerPoint can\n * express. See `skills/ts-pptx-upstream` for how to file one.\n *\n * @see `docs/errors-and-warnings.md` for the consumer-facing contract.\n * @see `codes.ts` for the code vocabulary, which is shared with the diagnostic (warning) surface.\n */\n\nimport type {\n\tErrorCode,\n\tInternalErrorCode,\n\tInvalidOptionErrorCode,\n\tMediaErrorCode,\n\tPackageReadErrorCode,\n\tUnsupportedFeatureErrorCode,\n} from './codes.js'\n\n/** Extra context accepted by every {@link TsPptxError} constructor. */\nexport interface TsPptxErrorOptions extends ErrorOptions {\n\t/**\n\t * Structured context for the condition, when a site has any to give. Mirrors `Diagnostic.detail`\n\t * so the same condition looks the same whether it was warned or thrown.\n\t */\n\treadonly detail?: Readonly<Record<string, unknown>>\n}\n\n/**\n * Base class for every error ts-pptx throws.\n *\n * Catch this to catch anything from the library; narrow with `instanceof` on a subclass, or branch\n * on {@link TsPptxError.code}, to react to something specific. It is never thrown directly — every\n * site picks one of the five subclasses.\n */\nexport class TsPptxError extends Error {\n\t/** Stable condition identifier — see {@link ErrorCode}. Branch on this, not on the text. */\n\treadonly code: ErrorCode\n\n\t/** Structured context for the condition, when the throwing site had any to give. */\n\treadonly detail?: Readonly<Record<string, unknown>>\n\n\t/**\n\t * @param code - the stable condition identifier\n\t * @param message - explanation for a human reading a stack trace; not part of the contract\n\t * @param options - standard `cause`, plus optional structured `detail`\n\t */\n\tconstructor(code: ErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(message, options)\n\t\t// `name` drives how a stack trace and `console.log` label the error, and the default from\n\t\t// `Error` would say \"Error\" for every subclass. Derive it from the constructor so a subclass\n\t\t// never has to remember to set it.\n\t\tthis.name = new.target.name\n\t\tthis.code = code\n\t\tif (options?.detail !== undefined) this.detail = options.detail\n\t}\n}\n\n/**\n * The caller passed something the library cannot use — a non-finite coordinate, an unknown enum\n * value, a required option left out, a value outside its legal range.\n *\n * This is the error behind the project's throw-rather-than-coerce policy: emitting a degenerate\n * result (a zero-size shape, a silently dropped option) hides the mistake, so the library refuses\n * instead. Reaching one means the calling code needs to change.\n */\nexport class InvalidOptionError extends TsPptxError {\n\tdeclare readonly code: InvalidOptionErrorCode\n\tconstructor(code: InvalidOptionErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * The request is well-formed but cannot be expressed here: an optional peer dependency is not\n * installed, the runtime lacks a capability, or the shape/feature has no OOXML representation the\n * library emits.\n *\n * Distinct from {@link InvalidOptionError} because the caller did nothing wrong — the answer is\n * \"not here\", not \"not like that\" — and the fix is usually to install something or pick a different\n * approach rather than to correct a value.\n */\nexport class UnsupportedFeatureError extends TsPptxError {\n\tdeclare readonly code: UnsupportedFeatureErrorCode\n\tconstructor(code: UnsupportedFeatureErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * The bytes handed to the library are not a package it can read, or a part inside one is\n * structurally malformed — a missing `[Content_Types].xml`, a relationship pointing at nothing, a\n * slide part with no root element.\n *\n * Always about *input*. A problem with something the library is being asked to produce is an\n * {@link InvalidOptionError}.\n */\nexport class PackageReadError extends TsPptxError {\n\tdeclare readonly code: PackageReadErrorCode\n\tconstructor(code: PackageReadErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * A referenced image, font, or audio/video resource could not be fetched, read, or decoded.\n *\n * Kept apart from {@link PackageReadError} because the failure is in a resource the deck *points\n * at*, not in the package structure — a broken URL, an unreadable path, a corrupt font file — and\n * a consumer typically retries or substitutes rather than rejecting the deck.\n */\nexport class MediaError extends TsPptxError {\n\tdeclare readonly code: MediaErrorCode\n\tconstructor(code: MediaErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * Where a report of an `InternalError` should go. Appended to the message rather than left to the\n * docs, because a stack trace is the only artefact of the failure that reaches whoever (or\n * whatever) is debugging it — a pointer anywhere else is a pointer they have to already be looking\n * for. Most code that calls this library is written by an agent in a repository that is not this\n * one, and an agent that hits a library defect routes around it silently unless something in front\n * of it says the report is worth making.\n */\nconst REPORT_NOTICE =\n\t'This is a bug in ts-pptx, not in your deck or your code. Please report it:\\n' +\n\t'https://github.com/shbernal/ts-pptx/issues/new?template=agent-report.yml'\n\n/**\n * An invariant the library maintains itself did not hold.\n *\n * No consumer input should be able to produce one, which is the whole reason it is a separate\n * class: seeing it means the bug is in ts-pptx, and the useful response is to file it rather than\n * to keep adjusting the input.\n *\n * It is the one class in the taxonomy that extends its own message, appending `REPORT_NOTICE`\n * below the invariant that broke. The constructor is where that lives so a throw site added later\n * inherits it — the alternative, a notice pasted at each of the sites, is one every future site can\n * forget. Every other class leaves `message` exactly as given: a malformed package is the routine\n * outcome for a library that reads untrusted files, and a \"report this\" banner on each corrupt\n * input would train callers to ignore the one banner that always means something.\n *\n * This does not make the message API — see the class doc on {@link TsPptxError}. Branch on\n * `instanceof` or on {@link InternalError.code}, never on the text.\n */\nexport class InternalError extends TsPptxError {\n\tdeclare readonly code: InternalErrorCode\n\tconstructor(code: InternalErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(code, `${message}\\n\\n${REPORT_NOTICE}`, options)\n\t}\n}\n"],"mappings":";;AA0CA,MAAM,cAAc;;AAGpB,MAAM,kBAAqC,eAAe;CACzD,QAAQ,KAAK,GAAG,YAAY,IAAI,WAAW,SAAS;AACrD;AAEA,IAAI,UAA6B;;;;;;;;;;;;;;;;;;;;;;;AAwBjC,SAAgB,qBAAqB,MAAsC;CAC1E,UAAU,QAAQ;AACnB;;;;;;;AAQA,SAAgB,KAAK,MAAsB,SAAiB,QAAkD;CAC7G,QAAQ,WAAW,KAAA,IAAY;EAAE;EAAM;CAAQ,IAAI;EAAE;EAAM;EAAS;CAAO,CAAC;AAC7E;AAKA,MAAM,uBAAO,IAAI,IAAY;;;;;;;;;;;;;;;AAgB7B,SAAgB,SAAS,MAAsB,SAAiB,QAAkD;CACjH,MAAM,MAAM,GAAG,KAAK,IAAI;CACxB,IAAI,KAAK,IAAI,GAAG,GAAG;CACnB,KAAK,IAAI,GAAG;CACZ,KAAK,MAAM,SAAS,MAAM;AAC3B;;;;;;;;;;;;;;;;;AAkBA,SAAgB,uBAA6B;CAC5C,KAAK,MAAM;AACZ;;;;;;;;;;ACxEA,IAAa,cAAb,cAAiC,MAAM;;CAEtC;;CAGA;;;;;;CAOA,YAAY,MAAiB,SAAiB,SAA8B;EAC3E,MAAM,SAAS,OAAO;EAItB,KAAK,OAAO,WAAW;EACvB,KAAK,OAAO;EACZ,IAAI,SAAS,WAAW,KAAA,GAAW,KAAK,SAAS,QAAQ;CAC1D;AACD;;;;;;;;;AAUA,IAAa,qBAAb,cAAwC,YAAY;CAEnD,YAAY,MAA8B,SAAiB,SAA8B;EACxF,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;;;AAWA,IAAa,0BAAb,cAA6C,YAAY;CAExD,YAAY,MAAmC,SAAiB,SAA8B;EAC7F,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;;AAUA,IAAa,mBAAb,cAAsC,YAAY;CAEjD,YAAY,MAA4B,SAAiB,SAA8B;EACtF,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;AASA,IAAa,aAAb,cAAgC,YAAY;CAE3C,YAAY,MAAsB,SAAiB,SAA8B;EAChF,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;;AAUA,MAAM,gBACL;;;;;;;;;;;;;;;;;;AAoBD,IAAa,gBAAb,cAAmC,YAAY;CAE9C,YAAY,MAAyB,SAAiB,SAA8B;EACnF,MAAM,MAAM,GAAG,QAAQ,MAAM,iBAAiB,OAAO;CACtD;AACD"}
|
|
1
|
+
{"version":3,"file":"errors-Da2nXCJm.js","names":[],"sources":["../src/diagnostics.ts","../src/errors.ts"],"sourcesContent":["/**\n * Central sink for library diagnostics.\n *\n * Every user-facing warning is routed through {@link warn} / {@link warnOnce} rather than calling\n * `console.warn` directly, so there is one place to apply a consistent prefix and one place a\n * consumer can take over — see {@link setDiagnosticHandler}. This module has no *runtime* imports\n * so it can be used from anywhere without risking an import cycle; `codes.ts` is types only and is\n * erased at compile time, so it does not cost that property.\n *\n * **A diagnostic's `code` is API; its `message` is not.** The code is a stable identifier a\n * consumer may branch on (`if (d.code === 'chart/non-finite-value')`); the wording behind it is\n * free to improve in any release. The vocabulary lives in `codes.ts` and is shared with the thrown\n * surface (`errors.ts`), so a condition that can both warn and throw reads the same either way.\n */\n\nimport type { DiagnosticCode } from './codes.js'\n\nexport type { DiagnosticCode }\n\n/** One diagnostic emitted by the library. */\nexport interface Diagnostic {\n\t/** Stable condition identifier — see {@link DiagnosticCode}. Branch on this, not on the text. */\n\treadonly code: DiagnosticCode\n\t/** Human-readable explanation. Free to change in any release; do not parse it. */\n\treadonly message: string\n\t/**\n\t * Structured context for the condition, when a site has any to give.\n\t *\n\t * Every rejection of an `ST_` enum value populates it: `checkEnumOrWarn` (`ooxml/check-enum.ts`)\n\t * carries `received` — the value the caller passed — and `valid`, the whole legal list, plus\n\t * whatever the call site adds. That reaches a handler for a line dash type, a table cell's 3-D\n\t * preset and a table's horizontal overflow, among others. Nothing else populates it yet, so a\n\t * handler must still treat the field as optional and must not assume a particular key is there\n\t * for a given code.\n\t */\n\treadonly detail?: Readonly<Record<string, unknown>>\n}\n\n/** Receives every {@link Diagnostic} the library emits. See {@link setDiagnosticHandler}. */\nexport type DiagnosticHandler = (diagnostic: Diagnostic) => void\n\n/** Prefix stamped on every warning so consumers can attribute console noise to this library. */\nconst WARN_PREFIX = 'pptx-ts'\n\n/** The default handler: one `console.warn` line per diagnostic, prefixed. */\nconst consoleHandler: DiagnosticHandler = (diagnostic) => {\n\tconsole.warn(`${WARN_PREFIX}: ${diagnostic.message}`)\n}\n\nlet handler: DiagnosticHandler = consoleHandler\n\n/**\n * Route every library diagnostic to `handler`, or pass `null` to restore the default\n * (one prefixed `console.warn` per diagnostic).\n *\n * This is process-global rather than per-presentation, deliberately: the emitting code is a tree\n * of free functions in `gen/**` with no presentation in scope, and threading a handler through\n * every signature would be a far larger and worse change than the problem warrants. The practical\n * consequence is that a process building several decks concurrently cannot attribute a diagnostic\n * to one of them. If that matters, correlate on `code`, or build the decks one at a time with the\n * handler set around each build: a handler set around concurrent builds sees all of their\n * diagnostics.\n *\n * A throwing handler propagates out of whatever library call emitted the diagnostic, which is the\n * supported way to make a specific condition fatal:\n *\n * ```ts\n * setDiagnosticHandler((d) => {\n * if (d.code === 'coord/bare-number-is-inches') throw new Error(d.message)\n * })\n * ```\n * @param next - the receiver, or `null` to restore the console default\n */\nexport function setDiagnosticHandler(next: DiagnosticHandler | null): void {\n\thandler = next ?? consoleHandler\n}\n\n/**\n * Emit a library diagnostic.\n * @param code - the stable condition identifier ({@link DiagnosticCode})\n * @param message - explanation, without a `pptx-ts:` prefix (the default handler adds one)\n * @param detail - optional structured context\n */\nexport function warn(code: DiagnosticCode, message: string, detail?: Readonly<Record<string, unknown>>): void {\n\thandler(detail === undefined ? { code, message } : { code, message, detail })\n}\n\n// Track diagnostics already emitted so a recurring condition (e.g. the same out-of-range fontSize\n// on every cell of a table) is reported once instead of flooding the handler. Keyed on code AND\n// message, so a *different* offending value under the same code still reports.\nconst seen = new Set<string>()\n\n/**\n * Emit a library diagnostic at most once per distinct code+message.\n *\n * \"Once\" is **process-global**, the same scope {@link setDiagnosticHandler} has and for the\n * same reason: the emitting code is a tree of free functions in `gen/**` with no presentation\n * in scope. The consequence is different, though, and worth stating on its own — a process that\n * builds several decks does not get a second report of a condition an earlier deck already\n * tripped, so the second deck's diagnostics are incomplete rather than merely unattributed.\n * {@link resetDiagnosticState} is how a host that cares gets each build a clean slate.\n *\n * @param code - the stable condition identifier ({@link DiagnosticCode})\n * @param message - explanation (see {@link warn})\n * @param detail - optional structured context\n */\nexport function warnOnce(code: DiagnosticCode, message: string, detail?: Readonly<Record<string, unknown>>): void {\n\tconst key = `${code}\\0${message}`\n\tif (seen.has(key)) return\n\tseen.add(key)\n\twarn(code, message, detail)\n}\n\n/**\n * Clear the `warnOnce` dedupe set, so a condition already reported reports again. (`warnOnce` is\n * internal and carries no page of its own, so it is named rather than linked.)\n *\n * Call it between builds in a host that builds more than one deck per process and wants each\n * build's diagnostics complete. Without it, deck two is silent about anything deck one already\n * warned for, which reads as \"no problems found\" rather than as \"already mentioned\".\n *\n * It also bounds the set. Most `warnOnce` messages interpolate the offending value, so a server\n * building decks from user input accumulates one entry per distinct bad value with no way to\n * release them.\n *\n * This does not touch the handler — {@link setDiagnosticHandler} owns that, and the two are\n * reset independently on purpose: a host usually installs its handler once and wants it to\n * survive.\n */\nexport function resetDiagnosticState(): void {\n\tseen.clear()\n}\n","/**\n * The library's error taxonomy.\n *\n * Every failure pptx-ts raises is a {@link TsPptxError} carrying a stable {@link ErrorCode}, so a\n * consumer can tell *\"you passed a bad coordinate\"* from *\"this font file is corrupt\"* from\n * *\"these bytes are not a package\"* without matching on message substrings. The classes are a\n * deliberately flat, coarse bucket — five of them — and the code carries the specificity. Do not\n * add a class per throw site; add a code.\n *\n * **The class and the code are API. The message is not.** Branch on `instanceof` and on `code`;\n * the wording behind them is free to improve in any release. Every error remains an\n * `instanceof Error`, so existing `catch` blocks keep working.\n *\n * Which class to reach for:\n *\n * | class | the failure is | who fixes it |\n * |---|---|---|\n * | {@link InvalidOptionError} | the caller passed something unusable | the caller's code |\n * | {@link UnsupportedFeatureError} | a well-formed request this build/runtime/shape cannot express | the caller's expectations, or the environment |\n * | {@link PackageReadError} | the input bytes are not a readable package | the input file |\n * | {@link MediaError} | a referenced image/font/AV resource would not load or decode | the resource |\n * | {@link InternalError} | an invariant of the library itself did not hold | pptx-ts (file a bug) |\n *\n * **Which of these is worth reporting upstream.** `InternalError` always is, and says so at\n * runtime. The middle three are worth reporting when the environment disagrees with us:\n * a `PackageReadError` on a file that opens cleanly in PowerPoint, a `MediaError` on an asset every\n * other tool loads, an `UnsupportedFeatureError` for something PowerPoint can plainly express.\n * `InvalidOptionError` is worth reporting only if the deck it refused is one PowerPoint can\n * express. See `skills/ts-pptx-upstream` for how to file one.\n *\n * @see `docs/errors-and-warnings.md` for the consumer-facing contract.\n * @see `codes.ts` for the code vocabulary, which is shared with the diagnostic (warning) surface.\n */\n\nimport type {\n\tErrorCode,\n\tInternalErrorCode,\n\tInvalidOptionErrorCode,\n\tMediaErrorCode,\n\tPackageReadErrorCode,\n\tUnsupportedFeatureErrorCode,\n} from './codes.js'\n\n/** Extra context accepted by every {@link TsPptxError} constructor. */\nexport interface TsPptxErrorOptions extends ErrorOptions {\n\t/**\n\t * Structured context for the condition, when a site has any to give. Mirrors `Diagnostic.detail`\n\t * so the same condition looks the same whether it was warned or thrown.\n\t */\n\treadonly detail?: Readonly<Record<string, unknown>>\n}\n\n/**\n * Base class for every error pptx-ts throws.\n *\n * Catch this to catch anything from the library; narrow with `instanceof` on a subclass, or branch\n * on {@link TsPptxError.code}, to react to something specific. It is never thrown directly — every\n * site picks one of the five subclasses.\n */\nexport class TsPptxError extends Error {\n\t/** Stable condition identifier — see {@link ErrorCode}. Branch on this, not on the text. */\n\treadonly code: ErrorCode\n\n\t/** Structured context for the condition, when the throwing site had any to give. */\n\treadonly detail?: Readonly<Record<string, unknown>>\n\n\t/**\n\t * @param code - the stable condition identifier\n\t * @param message - explanation for a human reading a stack trace; not part of the contract\n\t * @param options - standard `cause`, plus optional structured `detail`\n\t */\n\tconstructor(code: ErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(message, options)\n\t\t// `name` drives how a stack trace and `console.log` label the error, and the default from\n\t\t// `Error` would say \"Error\" for every subclass. Derive it from the constructor so a subclass\n\t\t// never has to remember to set it.\n\t\tthis.name = new.target.name\n\t\tthis.code = code\n\t\tif (options?.detail !== undefined) this.detail = options.detail\n\t}\n}\n\n/**\n * The caller passed something the library cannot use — a non-finite coordinate, an unknown enum\n * value, a required option left out, a value outside its legal range.\n *\n * This is the error behind the project's throw-rather-than-coerce policy: emitting a degenerate\n * result (a zero-size shape, a silently dropped option) hides the mistake, so the library refuses\n * instead. Reaching one means the calling code needs to change.\n */\nexport class InvalidOptionError extends TsPptxError {\n\tdeclare readonly code: InvalidOptionErrorCode\n\tconstructor(code: InvalidOptionErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * The request is well-formed but cannot be expressed here: an optional peer dependency is not\n * installed, the runtime lacks a capability, or the shape/feature has no OOXML representation the\n * library emits.\n *\n * Distinct from {@link InvalidOptionError} because the caller did nothing wrong — the answer is\n * \"not here\", not \"not like that\" — and the fix is usually to install something or pick a different\n * approach rather than to correct a value.\n */\nexport class UnsupportedFeatureError extends TsPptxError {\n\tdeclare readonly code: UnsupportedFeatureErrorCode\n\tconstructor(code: UnsupportedFeatureErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * The bytes handed to the library are not a package it can read, or a part inside one is\n * structurally malformed — a missing `[Content_Types].xml`, a relationship pointing at nothing, a\n * slide part with no root element.\n *\n * Always about *input*. A problem with something the library is being asked to produce is an\n * {@link InvalidOptionError}.\n */\nexport class PackageReadError extends TsPptxError {\n\tdeclare readonly code: PackageReadErrorCode\n\tconstructor(code: PackageReadErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * A referenced image, font, or audio/video resource could not be fetched, read, or decoded.\n *\n * Kept apart from {@link PackageReadError} because the failure is in a resource the deck *points\n * at*, not in the package structure — a broken URL, an unreadable path, a corrupt font file — and\n * a consumer typically retries or substitutes rather than rejecting the deck.\n */\nexport class MediaError extends TsPptxError {\n\tdeclare readonly code: MediaErrorCode\n\tconstructor(code: MediaErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(code, message, options)\n\t}\n}\n\n/**\n * Where a report of an `InternalError` should go. Appended to the message rather than left to the\n * docs, because a stack trace is the only artefact of the failure that reaches whoever (or\n * whatever) is debugging it — a pointer anywhere else is a pointer they have to already be looking\n * for. Most code that calls this library is written by an agent in a repository that is not this\n * one, and an agent that hits a library defect routes around it silently unless something in front\n * of it says the report is worth making.\n */\nconst REPORT_NOTICE =\n\t'This is a bug in pptx-ts, not in your deck or your code. Please report it:\\n' +\n\t'https://github.com/shbernal/pptx-ts/issues/new?template=agent-report.yml'\n\n/**\n * An invariant the library maintains itself did not hold.\n *\n * No consumer input should be able to produce one, which is the whole reason it is a separate\n * class: seeing it means the bug is in pptx-ts, and the useful response is to file it rather than\n * to keep adjusting the input.\n *\n * It is the one class in the taxonomy that extends its own message, appending `REPORT_NOTICE`\n * below the invariant that broke. The constructor is where that lives so a throw site added later\n * inherits it — the alternative, a notice pasted at each of the sites, is one every future site can\n * forget. Every other class leaves `message` exactly as given: a malformed package is the routine\n * outcome for a library that reads untrusted files, and a \"report this\" banner on each corrupt\n * input would train callers to ignore the one banner that always means something.\n *\n * This does not make the message API — see the class doc on {@link TsPptxError}. Branch on\n * `instanceof` or on {@link InternalError.code}, never on the text.\n */\nexport class InternalError extends TsPptxError {\n\tdeclare readonly code: InternalErrorCode\n\tconstructor(code: InternalErrorCode, message: string, options?: TsPptxErrorOptions) {\n\t\tsuper(code, `${message}\\n\\n${REPORT_NOTICE}`, options)\n\t}\n}\n"],"mappings":";;AA0CA,MAAM,cAAc;;AAGpB,MAAM,kBAAqC,eAAe;CACzD,QAAQ,KAAK,GAAG,YAAY,IAAI,WAAW,SAAS;AACrD;AAEA,IAAI,UAA6B;;;;;;;;;;;;;;;;;;;;;;;AAwBjC,SAAgB,qBAAqB,MAAsC;CAC1E,UAAU,QAAQ;AACnB;;;;;;;AAQA,SAAgB,KAAK,MAAsB,SAAiB,QAAkD;CAC7G,QAAQ,WAAW,KAAA,IAAY;EAAE;EAAM;CAAQ,IAAI;EAAE;EAAM;EAAS;CAAO,CAAC;AAC7E;AAKA,MAAM,uBAAO,IAAI,IAAY;;;;;;;;;;;;;;;AAgB7B,SAAgB,SAAS,MAAsB,SAAiB,QAAkD;CACjH,MAAM,MAAM,GAAG,KAAK,IAAI;CACxB,IAAI,KAAK,IAAI,GAAG,GAAG;CACnB,KAAK,IAAI,GAAG;CACZ,KAAK,MAAM,SAAS,MAAM;AAC3B;;;;;;;;;;;;;;;;;AAkBA,SAAgB,uBAA6B;CAC5C,KAAK,MAAM;AACZ;;;;;;;;;;ACxEA,IAAa,cAAb,cAAiC,MAAM;;CAEtC;;CAGA;;;;;;CAOA,YAAY,MAAiB,SAAiB,SAA8B;EAC3E,MAAM,SAAS,OAAO;EAItB,KAAK,OAAO,WAAW;EACvB,KAAK,OAAO;EACZ,IAAI,SAAS,WAAW,KAAA,GAAW,KAAK,SAAS,QAAQ;CAC1D;AACD;;;;;;;;;AAUA,IAAa,qBAAb,cAAwC,YAAY;CAEnD,YAAY,MAA8B,SAAiB,SAA8B;EACxF,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;;;AAWA,IAAa,0BAAb,cAA6C,YAAY;CAExD,YAAY,MAAmC,SAAiB,SAA8B;EAC7F,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;;AAUA,IAAa,mBAAb,cAAsC,YAAY;CAEjD,YAAY,MAA4B,SAAiB,SAA8B;EACtF,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;AASA,IAAa,aAAb,cAAgC,YAAY;CAE3C,YAAY,MAAsB,SAAiB,SAA8B;EAChF,MAAM,MAAM,SAAS,OAAO;CAC7B;AACD;;;;;;;;;AAUA,MAAM,gBACL;;;;;;;;;;;;;;;;;;AAoBD,IAAa,gBAAb,cAAmC,YAAY;CAE9C,YAAY,MAAyB,SAAiB,SAA8B;EACnF,MAAM,MAAM,GAAG,QAAQ,MAAM,iBAAiB,OAAO;CACtD;AACD"}
|
package/dist/families.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as SHAPE_NAME, i as CHART_NAME } from "./enums-
|
|
2
|
-
import {
|
|
3
|
-
import { L as TableToSlidesProps, M as TableProps, N as TableRow, S as AnimationProps, c as SectionZoomProps, d as ZoomBaseProps, l as SlideZoomProps, m as Model3dProps, n as GroupChildProps, r as GroupProps, v as SlideMasterChartProps } from "./slide-
|
|
4
|
-
import { T as PresSlideInternal } from "./font-metrics-
|
|
5
|
-
import { a as renderImageObject, c as ConstructFamily, d as PartContributor, f as RenderContext, l as PresentationAuthorContext, o as renderTextObject, u as SlideBuilder } from "./entry-compose-
|
|
6
|
-
import { s as ExtractedSlide } from "./presentation-types-
|
|
1
|
+
import { d as SHAPE_NAME, i as CHART_NAME } from "./enums-DQRpVOLh.js";
|
|
2
|
+
import { $ as ChartOpts, At as NotesProps, F as ConnectorProps, Ht as TextProps, It as TableLayoutResult, Jt as MediaProps, Mt as OverflowBoxOptions, Ot as CommentProps, Q as ChartMulti, St as OptsChartData, Ut as TextPropsOptions, Vt as TextMeasurement, Xt as OleObjectProps, kt as MeasureTextOptions, qt as ImageProps, rn as ShapeProps } from "./pres-BA9_lJbY.js";
|
|
3
|
+
import { L as TableToSlidesProps, M as TableProps, N as TableRow, S as AnimationProps, c as SectionZoomProps, d as ZoomBaseProps, l as SlideZoomProps, m as Model3dProps, n as GroupChildProps, r as GroupProps, v as SlideMasterChartProps } from "./slide-BqPtyKmb.js";
|
|
4
|
+
import { T as PresSlideInternal } from "./font-metrics-CBGmhLo0.js";
|
|
5
|
+
import { a as renderImageObject, c as ConstructFamily, d as PartContributor, f as RenderContext, l as PresentationAuthorContext, o as renderTextObject, u as SlideBuilder } from "./entry-compose-6hF9aTmT.js";
|
|
6
|
+
import { s as ExtractedSlide } from "./presentation-types-B3VQH4Bz.js";
|
|
7
7
|
//#region src/gen/slide/objects/chart.d.ts
|
|
8
8
|
/**
|
|
9
9
|
* Render a `chart` slide object to its `<p:graphicFrame>` XML referencing the chart part.
|
package/dist/families.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as mediaFamily, c as commentsFamily, d as textFamily, f as shapeFamily, h as groupFamily, i as model3dFamily, l as chartFamily, m as imageFamily, n as tableFamily, o as measureFamily, p as notesFamily, r as oleFamily, s as connectorFamily, t as zoomFamily, u as animationsFamily } from "./zoom-
|
|
2
|
-
import { t as tableDomFamily } from "./table-dom-
|
|
1
|
+
import { a as mediaFamily, c as commentsFamily, d as textFamily, f as shapeFamily, h as groupFamily, i as model3dFamily, l as chartFamily, m as imageFamily, n as tableFamily, o as measureFamily, p as notesFamily, r as oleFamily, s as connectorFamily, t as zoomFamily, u as animationsFamily } from "./zoom-BoNyOlPm.js";
|
|
2
|
+
import { t as tableDomFamily } from "./table-dom-CVbvUfgh.js";
|
|
3
3
|
//#region src/families.ts
|
|
4
4
|
/**
|
|
5
5
|
* The construct families, as the `pptx-ts/families` subpath publishes them.
|