From 0a6640c8c3e128ac654bd7807843c2a40f2f2adc Mon Sep 17 00:00:00 2001 From: Brent Ely Date: Sun, 10 Apr 2022 20:20:56 -0500 Subject: [PATCH] updated `PlaceholderProps` (Issue #987) --- src/core-interfaces.ts | 24 ++++++++++++------------ types/index.d.ts | 20 ++++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/core-interfaces.ts b/src/core-interfaces.ts index b07112cce..eef31a18f 100644 --- a/src/core-interfaces.ts +++ b/src/core-interfaces.ts @@ -120,14 +120,6 @@ export interface HyperlinkProps { */ tooltip?: string } -export interface PlaceholderProps { - name: string - type: PLACEHOLDER_TYPE - x: Coord - y: Coord - w: Coord - h: Coord -} // used by: chart, text export interface ShadowProps { /** @@ -170,8 +162,8 @@ export interface ShapeFillProps { /** * Fill color * - `HexColor` or `ThemeColor` - * @example 'FF0000' // red - * @example pptx.SchemeColor.text1 // Text1 Theme Color + * @example 'FF0000' // hex color (red) + * @example pptx.SchemeColor.text1 // Theme color (Text1) */ color?: Color /** @@ -425,6 +417,14 @@ export interface TextBaseProps { */ valign?: VAlign } +export interface PlaceholderProps extends PositionProps, TextBaseProps { + name: string + type: PLACEHOLDER_TYPE + /** + * margin (points) + */ + margin?: Margin +} export type ObjectNameProps = { /** * Object name @@ -1569,8 +1569,9 @@ export interface SlideMasterProps { * Unique name for this master */ title: string - margin?: Margin background?: BackgroundProps + margin?: Margin + slideNumber?: SlideNumberProps objects?: ( | { chart: {} } | { image: {} } @@ -1588,7 +1589,6 @@ export interface SlideMasterProps { } } )[] - slideNumber?: SlideNumberProps /** * @deprecated v3.3.0 - use `background` diff --git a/types/index.d.ts b/types/index.d.ts index a4d39009e..7d66d4530 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -942,14 +942,6 @@ declare namespace PptxGenJS { */ tooltip?: string } - export interface PlaceholderProps { - name: string - type: PLACEHOLDER_TYPE - x: Coord - y: Coord - w: Coord - h: Coord - } // used by: chart, text export interface ShadowProps { /** @@ -1237,6 +1229,14 @@ declare namespace PptxGenJS { */ valign?: VAlign } + export interface PlaceholderProps extends PositionProps, TextBaseProps { + name: string + type: PLACEHOLDER_TYPE + /** + * margin (points) + */ + margin?: Margin + } /** * Common for Props */ @@ -2290,8 +2290,9 @@ declare namespace PptxGenJS { * Unique name for this master */ title: string - margin?: Margin background?: BackgroundProps + margin?: Margin + slideNumber?: SlideNumberProps objects?: ( | { chart: {} } | { image: {} } @@ -2309,7 +2310,6 @@ declare namespace PptxGenJS { } } )[] - slideNumber?: SlideNumberProps /** * @deprecated v3.3.0 - use `background`