pptx-custom 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -0
- package/dist/index.d.mts +265 -0
- package/dist/index.d.ts +265 -0
- package/dist/index.js +539 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +511 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +43 -0
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# pptx-custom
|
|
2
|
+
|
|
3
|
+
Utilities to customize PPTX JSON templates in two stages:
|
|
4
|
+
|
|
5
|
+
- `applyCustomContent`: replace default slide content from backend JSON text.
|
|
6
|
+
- `applyCustomTheme`: apply user theme settings (palette/font/background).
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm i pptx-custom
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import {
|
|
18
|
+
applyCustomContent,
|
|
19
|
+
applyCustomTheme
|
|
20
|
+
} from 'pptx-custom'
|
|
21
|
+
|
|
22
|
+
const deckWithContent = applyCustomContent(templateDeck, backendText)
|
|
23
|
+
|
|
24
|
+
const deckWithTheme = applyCustomTheme(deckWithContent, {
|
|
25
|
+
themeColors: ['#111111', '#333333', '#555555', '#777777', '#999999', '#BBBBBB'],
|
|
26
|
+
fontColor: '#222222',
|
|
27
|
+
backgroundColor: '#FFFFFF'
|
|
28
|
+
})
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Backend Content Format
|
|
32
|
+
|
|
33
|
+
`applyCustomContent` accepts NDJSON-style lines or JSON arrays/objects of slides:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{"type":"cover","data":{"title":"Title","text":"Subtitle"}}
|
|
37
|
+
{"type":"contents","data":{"items":["Part A","Part B"]}}
|
|
38
|
+
{"type":"transition","data":{"title":"Part A","text":"Section intro"}}
|
|
39
|
+
{"type":"content","data":{"title":"Topic","items":[{"title":"Point","text":"Detail"}]}}
|
|
40
|
+
{"type":"end"}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Exported APIs
|
|
44
|
+
|
|
45
|
+
- `applyCustomContent(template, input)`
|
|
46
|
+
- `applyCustomTheme(deck, themeUpdate)`
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
type TemplateJsonTheme = {
|
|
2
|
+
themeColors: string[];
|
|
3
|
+
fontColor: string;
|
|
4
|
+
fontName: string;
|
|
5
|
+
backgroundColor: string;
|
|
6
|
+
shadow?: {
|
|
7
|
+
h: number;
|
|
8
|
+
v: number;
|
|
9
|
+
blur: number;
|
|
10
|
+
color: string;
|
|
11
|
+
};
|
|
12
|
+
outline?: {
|
|
13
|
+
width: number;
|
|
14
|
+
color: string;
|
|
15
|
+
style: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type TemplateJsonShadow = {
|
|
19
|
+
h: number;
|
|
20
|
+
v: number;
|
|
21
|
+
blur: number;
|
|
22
|
+
color: string;
|
|
23
|
+
};
|
|
24
|
+
type TemplateJsonOutline = {
|
|
25
|
+
width: number;
|
|
26
|
+
color: string;
|
|
27
|
+
style: string;
|
|
28
|
+
};
|
|
29
|
+
type TemplateJsonElementBase = {
|
|
30
|
+
type: string;
|
|
31
|
+
id: string;
|
|
32
|
+
left: number;
|
|
33
|
+
top: number;
|
|
34
|
+
width?: number;
|
|
35
|
+
height?: number;
|
|
36
|
+
rotate?: number;
|
|
37
|
+
lock?: boolean;
|
|
38
|
+
opacity?: number;
|
|
39
|
+
flipH?: boolean;
|
|
40
|
+
flipV?: boolean;
|
|
41
|
+
};
|
|
42
|
+
type TemplateJsonShape = TemplateJsonElementBase & {
|
|
43
|
+
type: 'shape';
|
|
44
|
+
viewBox: [number, number];
|
|
45
|
+
path: string;
|
|
46
|
+
fill: string;
|
|
47
|
+
fixedRatio?: boolean;
|
|
48
|
+
shadow?: TemplateJsonShadow;
|
|
49
|
+
outline?: TemplateJsonOutline;
|
|
50
|
+
pathFormula?: string;
|
|
51
|
+
keypoints?: number[];
|
|
52
|
+
};
|
|
53
|
+
type TemplateJsonText = TemplateJsonElementBase & {
|
|
54
|
+
type: 'text';
|
|
55
|
+
content: string;
|
|
56
|
+
defaultFontName?: string;
|
|
57
|
+
defaultColor?: string;
|
|
58
|
+
vertical?: boolean;
|
|
59
|
+
textType?: string;
|
|
60
|
+
};
|
|
61
|
+
type TemplateJsonLine = TemplateJsonElementBase & {
|
|
62
|
+
type: 'line';
|
|
63
|
+
start: [number, number];
|
|
64
|
+
end: [number, number];
|
|
65
|
+
points: string[];
|
|
66
|
+
color: string;
|
|
67
|
+
style: string;
|
|
68
|
+
width: number;
|
|
69
|
+
};
|
|
70
|
+
type TemplateJsonImage = TemplateJsonElementBase & {
|
|
71
|
+
type: 'image';
|
|
72
|
+
src: string;
|
|
73
|
+
fixedRatio?: boolean;
|
|
74
|
+
clip?: {
|
|
75
|
+
shape: string;
|
|
76
|
+
range: [number, number][];
|
|
77
|
+
};
|
|
78
|
+
filters?: {
|
|
79
|
+
grayscale?: string;
|
|
80
|
+
opacity?: string;
|
|
81
|
+
};
|
|
82
|
+
imageType?: string;
|
|
83
|
+
};
|
|
84
|
+
type TemplateJsonElement = TemplateJsonShape | TemplateJsonText | TemplateJsonLine | TemplateJsonImage;
|
|
85
|
+
type TemplateJsonSlide = {
|
|
86
|
+
id: string;
|
|
87
|
+
elements: TemplateJsonElement[];
|
|
88
|
+
background?: {
|
|
89
|
+
type: string;
|
|
90
|
+
color: string;
|
|
91
|
+
};
|
|
92
|
+
type?: string;
|
|
93
|
+
};
|
|
94
|
+
type TemplateJson = {
|
|
95
|
+
title: string;
|
|
96
|
+
width: number;
|
|
97
|
+
height: number;
|
|
98
|
+
theme: TemplateJsonTheme;
|
|
99
|
+
slides: TemplateJsonSlide[];
|
|
100
|
+
};
|
|
101
|
+
type SlideElement = {
|
|
102
|
+
type: string;
|
|
103
|
+
id?: string;
|
|
104
|
+
groupId?: string;
|
|
105
|
+
left?: number;
|
|
106
|
+
top?: number;
|
|
107
|
+
width?: number;
|
|
108
|
+
height?: number;
|
|
109
|
+
rotate?: number;
|
|
110
|
+
fill?: string;
|
|
111
|
+
pattern?: string;
|
|
112
|
+
path?: string;
|
|
113
|
+
viewBox?: [number, number];
|
|
114
|
+
pathFormula?: string;
|
|
115
|
+
keypoints?: number[];
|
|
116
|
+
special?: boolean;
|
|
117
|
+
opacity?: number;
|
|
118
|
+
fixedRatio?: boolean;
|
|
119
|
+
outline?: {
|
|
120
|
+
width?: number;
|
|
121
|
+
color?: string;
|
|
122
|
+
style?: string;
|
|
123
|
+
};
|
|
124
|
+
shadow?: {
|
|
125
|
+
h?: number;
|
|
126
|
+
v?: number;
|
|
127
|
+
blur?: number;
|
|
128
|
+
color?: string;
|
|
129
|
+
};
|
|
130
|
+
content?: string;
|
|
131
|
+
defaultColor?: string;
|
|
132
|
+
defaultFontName?: string;
|
|
133
|
+
wordSpace?: number;
|
|
134
|
+
lineHeight?: number;
|
|
135
|
+
paragraphSpace?: number;
|
|
136
|
+
vertical?: boolean;
|
|
137
|
+
src?: string;
|
|
138
|
+
imageType?: string;
|
|
139
|
+
flipH?: boolean;
|
|
140
|
+
flipV?: boolean;
|
|
141
|
+
start?: [number, number];
|
|
142
|
+
end?: [number, number];
|
|
143
|
+
broken?: [number, number];
|
|
144
|
+
broken2?: [number, number];
|
|
145
|
+
curve?: [number, number];
|
|
146
|
+
cubic?: [[number, number], [number, number]];
|
|
147
|
+
color?: string;
|
|
148
|
+
points?: string[];
|
|
149
|
+
style?: string;
|
|
150
|
+
clip?: {
|
|
151
|
+
shape?: string;
|
|
152
|
+
range?: [[number, number], [number, number]];
|
|
153
|
+
};
|
|
154
|
+
filters?: {
|
|
155
|
+
grayscale?: string;
|
|
156
|
+
opacity?: string;
|
|
157
|
+
};
|
|
158
|
+
colWidths?: number[];
|
|
159
|
+
data?: Array<Array<{
|
|
160
|
+
id?: string;
|
|
161
|
+
colspan?: number;
|
|
162
|
+
rowspan?: number;
|
|
163
|
+
text?: string;
|
|
164
|
+
style?: {
|
|
165
|
+
fontname?: string;
|
|
166
|
+
color?: string;
|
|
167
|
+
align?: string;
|
|
168
|
+
fontsize?: string;
|
|
169
|
+
backcolor?: string;
|
|
170
|
+
};
|
|
171
|
+
}>>;
|
|
172
|
+
cellMinHeight?: number;
|
|
173
|
+
text?: {
|
|
174
|
+
content: string;
|
|
175
|
+
defaultColor?: string;
|
|
176
|
+
defaultFontName?: string;
|
|
177
|
+
align?: string;
|
|
178
|
+
lineHeight?: number;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
type Slide = {
|
|
182
|
+
id?: string;
|
|
183
|
+
elements?: SlideElement[];
|
|
184
|
+
remark?: string;
|
|
185
|
+
background?: {
|
|
186
|
+
type?: string;
|
|
187
|
+
color?: string;
|
|
188
|
+
src?: string;
|
|
189
|
+
};
|
|
190
|
+
type?: string;
|
|
191
|
+
};
|
|
192
|
+
type Deck = {
|
|
193
|
+
title?: string;
|
|
194
|
+
width?: number;
|
|
195
|
+
height?: number;
|
|
196
|
+
slides?: Slide[];
|
|
197
|
+
theme?: {
|
|
198
|
+
themeColors?: string[];
|
|
199
|
+
fontName?: string;
|
|
200
|
+
fontColor?: string;
|
|
201
|
+
backgroundColor?: string;
|
|
202
|
+
shadow?: {
|
|
203
|
+
h?: number;
|
|
204
|
+
v?: number;
|
|
205
|
+
blur?: number;
|
|
206
|
+
color?: string;
|
|
207
|
+
};
|
|
208
|
+
outline?: {
|
|
209
|
+
width?: number;
|
|
210
|
+
color?: string;
|
|
211
|
+
style?: string;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
type BackendCoverData = {
|
|
216
|
+
title: string;
|
|
217
|
+
text: string;
|
|
218
|
+
};
|
|
219
|
+
type BackendContentsData = {
|
|
220
|
+
items: string[];
|
|
221
|
+
};
|
|
222
|
+
type BackendTransitionData = {
|
|
223
|
+
title: string;
|
|
224
|
+
text: string;
|
|
225
|
+
};
|
|
226
|
+
type BackendContentItem = {
|
|
227
|
+
title: string;
|
|
228
|
+
text: string;
|
|
229
|
+
};
|
|
230
|
+
type BackendContentData = {
|
|
231
|
+
title: string;
|
|
232
|
+
items: BackendContentItem[];
|
|
233
|
+
};
|
|
234
|
+
type BackendSlide = {
|
|
235
|
+
type: 'cover';
|
|
236
|
+
data: BackendCoverData;
|
|
237
|
+
} | {
|
|
238
|
+
type: 'contents';
|
|
239
|
+
data: BackendContentsData;
|
|
240
|
+
} | {
|
|
241
|
+
type: 'transition';
|
|
242
|
+
data: BackendTransitionData;
|
|
243
|
+
} | {
|
|
244
|
+
type: 'content';
|
|
245
|
+
data: BackendContentData;
|
|
246
|
+
} | {
|
|
247
|
+
type: 'end';
|
|
248
|
+
data?: undefined;
|
|
249
|
+
};
|
|
250
|
+
type PptxCustomContentInput = string | BackendSlide[];
|
|
251
|
+
type PptxCustomThemeInput = {
|
|
252
|
+
themeColors: string[];
|
|
253
|
+
fontColor: string;
|
|
254
|
+
backgroundColor?: string;
|
|
255
|
+
};
|
|
256
|
+
type PptxCustomOptions = {
|
|
257
|
+
customContent?: PptxCustomContentInput;
|
|
258
|
+
customTheme?: PptxCustomThemeInput;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
declare function applyCustomContent(template: TemplateJson, input: PptxCustomContentInput): TemplateJson;
|
|
262
|
+
|
|
263
|
+
declare function applyCustomTheme(deck: Deck, input: PptxCustomThemeInput): Deck;
|
|
264
|
+
|
|
265
|
+
export { type BackendSlide, type Deck, type PptxCustomContentInput, type PptxCustomOptions, type PptxCustomThemeInput, type TemplateJson, type TemplateJsonElement, type TemplateJsonSlide, type TemplateJsonTheme, applyCustomContent, applyCustomTheme };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
type TemplateJsonTheme = {
|
|
2
|
+
themeColors: string[];
|
|
3
|
+
fontColor: string;
|
|
4
|
+
fontName: string;
|
|
5
|
+
backgroundColor: string;
|
|
6
|
+
shadow?: {
|
|
7
|
+
h: number;
|
|
8
|
+
v: number;
|
|
9
|
+
blur: number;
|
|
10
|
+
color: string;
|
|
11
|
+
};
|
|
12
|
+
outline?: {
|
|
13
|
+
width: number;
|
|
14
|
+
color: string;
|
|
15
|
+
style: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
type TemplateJsonShadow = {
|
|
19
|
+
h: number;
|
|
20
|
+
v: number;
|
|
21
|
+
blur: number;
|
|
22
|
+
color: string;
|
|
23
|
+
};
|
|
24
|
+
type TemplateJsonOutline = {
|
|
25
|
+
width: number;
|
|
26
|
+
color: string;
|
|
27
|
+
style: string;
|
|
28
|
+
};
|
|
29
|
+
type TemplateJsonElementBase = {
|
|
30
|
+
type: string;
|
|
31
|
+
id: string;
|
|
32
|
+
left: number;
|
|
33
|
+
top: number;
|
|
34
|
+
width?: number;
|
|
35
|
+
height?: number;
|
|
36
|
+
rotate?: number;
|
|
37
|
+
lock?: boolean;
|
|
38
|
+
opacity?: number;
|
|
39
|
+
flipH?: boolean;
|
|
40
|
+
flipV?: boolean;
|
|
41
|
+
};
|
|
42
|
+
type TemplateJsonShape = TemplateJsonElementBase & {
|
|
43
|
+
type: 'shape';
|
|
44
|
+
viewBox: [number, number];
|
|
45
|
+
path: string;
|
|
46
|
+
fill: string;
|
|
47
|
+
fixedRatio?: boolean;
|
|
48
|
+
shadow?: TemplateJsonShadow;
|
|
49
|
+
outline?: TemplateJsonOutline;
|
|
50
|
+
pathFormula?: string;
|
|
51
|
+
keypoints?: number[];
|
|
52
|
+
};
|
|
53
|
+
type TemplateJsonText = TemplateJsonElementBase & {
|
|
54
|
+
type: 'text';
|
|
55
|
+
content: string;
|
|
56
|
+
defaultFontName?: string;
|
|
57
|
+
defaultColor?: string;
|
|
58
|
+
vertical?: boolean;
|
|
59
|
+
textType?: string;
|
|
60
|
+
};
|
|
61
|
+
type TemplateJsonLine = TemplateJsonElementBase & {
|
|
62
|
+
type: 'line';
|
|
63
|
+
start: [number, number];
|
|
64
|
+
end: [number, number];
|
|
65
|
+
points: string[];
|
|
66
|
+
color: string;
|
|
67
|
+
style: string;
|
|
68
|
+
width: number;
|
|
69
|
+
};
|
|
70
|
+
type TemplateJsonImage = TemplateJsonElementBase & {
|
|
71
|
+
type: 'image';
|
|
72
|
+
src: string;
|
|
73
|
+
fixedRatio?: boolean;
|
|
74
|
+
clip?: {
|
|
75
|
+
shape: string;
|
|
76
|
+
range: [number, number][];
|
|
77
|
+
};
|
|
78
|
+
filters?: {
|
|
79
|
+
grayscale?: string;
|
|
80
|
+
opacity?: string;
|
|
81
|
+
};
|
|
82
|
+
imageType?: string;
|
|
83
|
+
};
|
|
84
|
+
type TemplateJsonElement = TemplateJsonShape | TemplateJsonText | TemplateJsonLine | TemplateJsonImage;
|
|
85
|
+
type TemplateJsonSlide = {
|
|
86
|
+
id: string;
|
|
87
|
+
elements: TemplateJsonElement[];
|
|
88
|
+
background?: {
|
|
89
|
+
type: string;
|
|
90
|
+
color: string;
|
|
91
|
+
};
|
|
92
|
+
type?: string;
|
|
93
|
+
};
|
|
94
|
+
type TemplateJson = {
|
|
95
|
+
title: string;
|
|
96
|
+
width: number;
|
|
97
|
+
height: number;
|
|
98
|
+
theme: TemplateJsonTheme;
|
|
99
|
+
slides: TemplateJsonSlide[];
|
|
100
|
+
};
|
|
101
|
+
type SlideElement = {
|
|
102
|
+
type: string;
|
|
103
|
+
id?: string;
|
|
104
|
+
groupId?: string;
|
|
105
|
+
left?: number;
|
|
106
|
+
top?: number;
|
|
107
|
+
width?: number;
|
|
108
|
+
height?: number;
|
|
109
|
+
rotate?: number;
|
|
110
|
+
fill?: string;
|
|
111
|
+
pattern?: string;
|
|
112
|
+
path?: string;
|
|
113
|
+
viewBox?: [number, number];
|
|
114
|
+
pathFormula?: string;
|
|
115
|
+
keypoints?: number[];
|
|
116
|
+
special?: boolean;
|
|
117
|
+
opacity?: number;
|
|
118
|
+
fixedRatio?: boolean;
|
|
119
|
+
outline?: {
|
|
120
|
+
width?: number;
|
|
121
|
+
color?: string;
|
|
122
|
+
style?: string;
|
|
123
|
+
};
|
|
124
|
+
shadow?: {
|
|
125
|
+
h?: number;
|
|
126
|
+
v?: number;
|
|
127
|
+
blur?: number;
|
|
128
|
+
color?: string;
|
|
129
|
+
};
|
|
130
|
+
content?: string;
|
|
131
|
+
defaultColor?: string;
|
|
132
|
+
defaultFontName?: string;
|
|
133
|
+
wordSpace?: number;
|
|
134
|
+
lineHeight?: number;
|
|
135
|
+
paragraphSpace?: number;
|
|
136
|
+
vertical?: boolean;
|
|
137
|
+
src?: string;
|
|
138
|
+
imageType?: string;
|
|
139
|
+
flipH?: boolean;
|
|
140
|
+
flipV?: boolean;
|
|
141
|
+
start?: [number, number];
|
|
142
|
+
end?: [number, number];
|
|
143
|
+
broken?: [number, number];
|
|
144
|
+
broken2?: [number, number];
|
|
145
|
+
curve?: [number, number];
|
|
146
|
+
cubic?: [[number, number], [number, number]];
|
|
147
|
+
color?: string;
|
|
148
|
+
points?: string[];
|
|
149
|
+
style?: string;
|
|
150
|
+
clip?: {
|
|
151
|
+
shape?: string;
|
|
152
|
+
range?: [[number, number], [number, number]];
|
|
153
|
+
};
|
|
154
|
+
filters?: {
|
|
155
|
+
grayscale?: string;
|
|
156
|
+
opacity?: string;
|
|
157
|
+
};
|
|
158
|
+
colWidths?: number[];
|
|
159
|
+
data?: Array<Array<{
|
|
160
|
+
id?: string;
|
|
161
|
+
colspan?: number;
|
|
162
|
+
rowspan?: number;
|
|
163
|
+
text?: string;
|
|
164
|
+
style?: {
|
|
165
|
+
fontname?: string;
|
|
166
|
+
color?: string;
|
|
167
|
+
align?: string;
|
|
168
|
+
fontsize?: string;
|
|
169
|
+
backcolor?: string;
|
|
170
|
+
};
|
|
171
|
+
}>>;
|
|
172
|
+
cellMinHeight?: number;
|
|
173
|
+
text?: {
|
|
174
|
+
content: string;
|
|
175
|
+
defaultColor?: string;
|
|
176
|
+
defaultFontName?: string;
|
|
177
|
+
align?: string;
|
|
178
|
+
lineHeight?: number;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
181
|
+
type Slide = {
|
|
182
|
+
id?: string;
|
|
183
|
+
elements?: SlideElement[];
|
|
184
|
+
remark?: string;
|
|
185
|
+
background?: {
|
|
186
|
+
type?: string;
|
|
187
|
+
color?: string;
|
|
188
|
+
src?: string;
|
|
189
|
+
};
|
|
190
|
+
type?: string;
|
|
191
|
+
};
|
|
192
|
+
type Deck = {
|
|
193
|
+
title?: string;
|
|
194
|
+
width?: number;
|
|
195
|
+
height?: number;
|
|
196
|
+
slides?: Slide[];
|
|
197
|
+
theme?: {
|
|
198
|
+
themeColors?: string[];
|
|
199
|
+
fontName?: string;
|
|
200
|
+
fontColor?: string;
|
|
201
|
+
backgroundColor?: string;
|
|
202
|
+
shadow?: {
|
|
203
|
+
h?: number;
|
|
204
|
+
v?: number;
|
|
205
|
+
blur?: number;
|
|
206
|
+
color?: string;
|
|
207
|
+
};
|
|
208
|
+
outline?: {
|
|
209
|
+
width?: number;
|
|
210
|
+
color?: string;
|
|
211
|
+
style?: string;
|
|
212
|
+
};
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
type BackendCoverData = {
|
|
216
|
+
title: string;
|
|
217
|
+
text: string;
|
|
218
|
+
};
|
|
219
|
+
type BackendContentsData = {
|
|
220
|
+
items: string[];
|
|
221
|
+
};
|
|
222
|
+
type BackendTransitionData = {
|
|
223
|
+
title: string;
|
|
224
|
+
text: string;
|
|
225
|
+
};
|
|
226
|
+
type BackendContentItem = {
|
|
227
|
+
title: string;
|
|
228
|
+
text: string;
|
|
229
|
+
};
|
|
230
|
+
type BackendContentData = {
|
|
231
|
+
title: string;
|
|
232
|
+
items: BackendContentItem[];
|
|
233
|
+
};
|
|
234
|
+
type BackendSlide = {
|
|
235
|
+
type: 'cover';
|
|
236
|
+
data: BackendCoverData;
|
|
237
|
+
} | {
|
|
238
|
+
type: 'contents';
|
|
239
|
+
data: BackendContentsData;
|
|
240
|
+
} | {
|
|
241
|
+
type: 'transition';
|
|
242
|
+
data: BackendTransitionData;
|
|
243
|
+
} | {
|
|
244
|
+
type: 'content';
|
|
245
|
+
data: BackendContentData;
|
|
246
|
+
} | {
|
|
247
|
+
type: 'end';
|
|
248
|
+
data?: undefined;
|
|
249
|
+
};
|
|
250
|
+
type PptxCustomContentInput = string | BackendSlide[];
|
|
251
|
+
type PptxCustomThemeInput = {
|
|
252
|
+
themeColors: string[];
|
|
253
|
+
fontColor: string;
|
|
254
|
+
backgroundColor?: string;
|
|
255
|
+
};
|
|
256
|
+
type PptxCustomOptions = {
|
|
257
|
+
customContent?: PptxCustomContentInput;
|
|
258
|
+
customTheme?: PptxCustomThemeInput;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
declare function applyCustomContent(template: TemplateJson, input: PptxCustomContentInput): TemplateJson;
|
|
262
|
+
|
|
263
|
+
declare function applyCustomTheme(deck: Deck, input: PptxCustomThemeInput): Deck;
|
|
264
|
+
|
|
265
|
+
export { type BackendSlide, type Deck, type PptxCustomContentInput, type PptxCustomOptions, type PptxCustomThemeInput, type TemplateJson, type TemplateJsonElement, type TemplateJsonSlide, type TemplateJsonTheme, applyCustomContent, applyCustomTheme };
|