json2pptx 0.1.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +24 -3
- package/dist/index.d.ts +24 -3
- package/dist/index.js +748 -386
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +748 -386
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -58,6 +58,7 @@ type ShapeElement = BaseElement<'shape'> & {
|
|
|
58
58
|
path?: string;
|
|
59
59
|
viewBox?: [number, number];
|
|
60
60
|
fill?: string;
|
|
61
|
+
pattern?: string;
|
|
61
62
|
text?: TextContent;
|
|
62
63
|
};
|
|
63
64
|
type LineElement = BaseElement<'line'> & {
|
|
@@ -72,7 +73,27 @@ type LineElement = BaseElement<'line'> & {
|
|
|
72
73
|
style?: 'solid' | 'dashed' | 'dotted';
|
|
73
74
|
points?: [unknown, unknown];
|
|
74
75
|
};
|
|
75
|
-
type
|
|
76
|
+
type TableCellStyle = {
|
|
77
|
+
fontname?: string;
|
|
78
|
+
color?: string;
|
|
79
|
+
align?: string;
|
|
80
|
+
fontsize?: string;
|
|
81
|
+
backcolor?: string;
|
|
82
|
+
};
|
|
83
|
+
type TableCellData = {
|
|
84
|
+
id?: string;
|
|
85
|
+
colspan?: number;
|
|
86
|
+
rowspan?: number;
|
|
87
|
+
text?: string;
|
|
88
|
+
style?: TableCellStyle;
|
|
89
|
+
};
|
|
90
|
+
type TableElement = BaseElement<'table'> & {
|
|
91
|
+
type: 'table';
|
|
92
|
+
colWidths?: number[];
|
|
93
|
+
data?: TableCellData[][];
|
|
94
|
+
cellMinHeight?: number;
|
|
95
|
+
};
|
|
96
|
+
type SlideElement = TextElement | ImageElement | ShapeElement | LineElement | TableElement;
|
|
76
97
|
type SlideBackground = {
|
|
77
98
|
color?: string;
|
|
78
99
|
};
|
|
@@ -91,8 +112,6 @@ type Deck = {
|
|
|
91
112
|
theme?: DeckTheme;
|
|
92
113
|
};
|
|
93
114
|
|
|
94
|
-
declare const resolveImageData: (src: string) => Promise<string>;
|
|
95
|
-
|
|
96
115
|
declare const getElementRange: (element: SlideElement) => {
|
|
97
116
|
minX: number;
|
|
98
117
|
maxX: number;
|
|
@@ -101,6 +120,8 @@ declare const getElementRange: (element: SlideElement) => {
|
|
|
101
120
|
};
|
|
102
121
|
declare const getLineElementPath: (element: SlideElement) => string;
|
|
103
122
|
|
|
123
|
+
declare const resolveImageData: (src: string) => Promise<string>;
|
|
124
|
+
|
|
104
125
|
declare const ENABLE_DECK_JSON = true;
|
|
105
126
|
declare const PPTX_JSON_PAYLOAD_PATH = "json2ppt-editor.json";
|
|
106
127
|
declare const PPTX_JSON_PAYLOAD_VERSION = 1;
|
package/dist/index.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ type ShapeElement = BaseElement<'shape'> & {
|
|
|
58
58
|
path?: string;
|
|
59
59
|
viewBox?: [number, number];
|
|
60
60
|
fill?: string;
|
|
61
|
+
pattern?: string;
|
|
61
62
|
text?: TextContent;
|
|
62
63
|
};
|
|
63
64
|
type LineElement = BaseElement<'line'> & {
|
|
@@ -72,7 +73,27 @@ type LineElement = BaseElement<'line'> & {
|
|
|
72
73
|
style?: 'solid' | 'dashed' | 'dotted';
|
|
73
74
|
points?: [unknown, unknown];
|
|
74
75
|
};
|
|
75
|
-
type
|
|
76
|
+
type TableCellStyle = {
|
|
77
|
+
fontname?: string;
|
|
78
|
+
color?: string;
|
|
79
|
+
align?: string;
|
|
80
|
+
fontsize?: string;
|
|
81
|
+
backcolor?: string;
|
|
82
|
+
};
|
|
83
|
+
type TableCellData = {
|
|
84
|
+
id?: string;
|
|
85
|
+
colspan?: number;
|
|
86
|
+
rowspan?: number;
|
|
87
|
+
text?: string;
|
|
88
|
+
style?: TableCellStyle;
|
|
89
|
+
};
|
|
90
|
+
type TableElement = BaseElement<'table'> & {
|
|
91
|
+
type: 'table';
|
|
92
|
+
colWidths?: number[];
|
|
93
|
+
data?: TableCellData[][];
|
|
94
|
+
cellMinHeight?: number;
|
|
95
|
+
};
|
|
96
|
+
type SlideElement = TextElement | ImageElement | ShapeElement | LineElement | TableElement;
|
|
76
97
|
type SlideBackground = {
|
|
77
98
|
color?: string;
|
|
78
99
|
};
|
|
@@ -91,8 +112,6 @@ type Deck = {
|
|
|
91
112
|
theme?: DeckTheme;
|
|
92
113
|
};
|
|
93
114
|
|
|
94
|
-
declare const resolveImageData: (src: string) => Promise<string>;
|
|
95
|
-
|
|
96
115
|
declare const getElementRange: (element: SlideElement) => {
|
|
97
116
|
minX: number;
|
|
98
117
|
maxX: number;
|
|
@@ -101,6 +120,8 @@ declare const getElementRange: (element: SlideElement) => {
|
|
|
101
120
|
};
|
|
102
121
|
declare const getLineElementPath: (element: SlideElement) => string;
|
|
103
122
|
|
|
123
|
+
declare const resolveImageData: (src: string) => Promise<string>;
|
|
124
|
+
|
|
104
125
|
declare const ENABLE_DECK_JSON = true;
|
|
105
126
|
declare const PPTX_JSON_PAYLOAD_PATH = "json2ppt-editor.json";
|
|
106
127
|
declare const PPTX_JSON_PAYLOAD_VERSION = 1;
|