@darshio/vivid 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/CHANGELOG.md +62 -0
- package/LICENSE +21 -0
- package/README.md +0 -0
- package/dist/__vite-browser-external-BcPniuRQ.cjs +2 -0
- package/dist/__vite-browser-external-BcPniuRQ.cjs.map +1 -0
- package/dist/__vite-browser-external-DYxpcVy9.js +5 -0
- package/dist/__vite-browser-external-DYxpcVy9.js.map +1 -0
- package/dist/components/ExportButton.d.ts +40 -0
- package/dist/components/ExportButton.d.ts.map +1 -0
- package/dist/components/SlideRail.d.ts +20 -0
- package/dist/components/SlideRail.d.ts.map +1 -0
- package/dist/components/SlideRenderer.d.ts +23 -0
- package/dist/components/SlideRenderer.d.ts.map +1 -0
- package/dist/components/SlideViewer.d.ts +28 -0
- package/dist/components/SlideViewer.d.ts.map +1 -0
- package/dist/components/StreamingIndicator.d.ts +21 -0
- package/dist/components/StreamingIndicator.d.ts.map +1 -0
- package/dist/components/elements/CalloutElement.d.ts +8 -0
- package/dist/components/elements/CalloutElement.d.ts.map +1 -0
- package/dist/components/elements/ChartElement.d.ts +8 -0
- package/dist/components/elements/ChartElement.d.ts.map +1 -0
- package/dist/components/elements/CodeElement.d.ts +8 -0
- package/dist/components/elements/CodeElement.d.ts.map +1 -0
- package/dist/components/elements/DividerElement.d.ts +8 -0
- package/dist/components/elements/DividerElement.d.ts.map +1 -0
- package/dist/components/elements/IconElement.d.ts +8 -0
- package/dist/components/elements/IconElement.d.ts.map +1 -0
- package/dist/components/elements/ImageElement.d.ts +8 -0
- package/dist/components/elements/ImageElement.d.ts.map +1 -0
- package/dist/components/elements/ListElement.d.ts +8 -0
- package/dist/components/elements/ListElement.d.ts.map +1 -0
- package/dist/components/elements/MetricElement.d.ts +8 -0
- package/dist/components/elements/MetricElement.d.ts.map +1 -0
- package/dist/components/elements/ProgressElement.d.ts +8 -0
- package/dist/components/elements/ProgressElement.d.ts.map +1 -0
- package/dist/components/elements/ShapeElement.d.ts +8 -0
- package/dist/components/elements/ShapeElement.d.ts.map +1 -0
- package/dist/components/elements/TableElement.d.ts +8 -0
- package/dist/components/elements/TableElement.d.ts.map +1 -0
- package/dist/components/elements/TextElement.d.ts +8 -0
- package/dist/components/elements/TextElement.d.ts.map +1 -0
- package/dist/components/elements/index.d.ts +25 -0
- package/dist/components/elements/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/context/VividContext.d.ts +68 -0
- package/dist/context/VividContext.d.ts.map +1 -0
- package/dist/context/index.d.ts +3 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/exports/PdfExporter.d.ts +23 -0
- package/dist/exports/PdfExporter.d.ts.map +1 -0
- package/dist/exports/PngExporter.d.ts +22 -0
- package/dist/exports/PngExporter.d.ts.map +1 -0
- package/dist/exports/PptxExporter.d.ts +20 -0
- package/dist/exports/PptxExporter.d.ts.map +1 -0
- package/dist/exports/index.d.ts +10 -0
- package/dist/exports/index.d.ts.map +1 -0
- package/dist/exports/utils.d.ts +25 -0
- package/dist/exports/utils.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useKeyboardNavigation.d.ts +27 -0
- package/dist/hooks/useKeyboardNavigation.d.ts.map +1 -0
- package/dist/hooks/useSlideNavigation.d.ts +32 -0
- package/dist/hooks/useSlideNavigation.d.ts.map +1 -0
- package/dist/hooks/useSlideStream.d.ts +55 -0
- package/dist/hooks/useSlideStream.d.ts.map +1 -0
- package/dist/hooks/useTheme.d.ts +23 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/hooks/useVivid.d.ts +13 -0
- package/dist/hooks/useVivid.d.ts.map +1 -0
- package/dist/html2canvas.esm-BA_v9SIU.cjs +23 -0
- package/dist/html2canvas.esm-BA_v9SIU.cjs.map +1 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js +4871 -0
- package/dist/html2canvas.esm-d2sM-0Wm.js.map +1 -0
- package/dist/index-DGgHHr5m.cjs +8161 -0
- package/dist/index-DGgHHr5m.cjs.map +1 -0
- package/dist/index-DblpZba0.js +55050 -0
- package/dist/index-DblpZba0.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.es-BVDnfkUz.js +5632 -0
- package/dist/index.es-BVDnfkUz.js.map +1 -0
- package/dist/index.es-FGgUIeVd.cjs +19 -0
- package/dist/index.es-FGgUIeVd.cjs.map +1 -0
- package/dist/index.js +56 -0
- package/dist/index.js.map +1 -0
- package/dist/purify.es-BpFm6ZGf.js +554 -0
- package/dist/purify.es-BpFm6ZGf.js.map +1 -0
- package/dist/purify.es-Cv8QDpGd.cjs +3 -0
- package/dist/purify.es-Cv8QDpGd.cjs.map +1 -0
- package/dist/types/elements.d.ts +284 -0
- package/dist/types/elements.d.ts.map +1 -0
- package/dist/types/errors.d.ts +26 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/index.d.ts +25 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/presentation.d.ts +131 -0
- package/dist/types/presentation.d.ts.map +1 -0
- package/dist/types/primitives.d.ts +173 -0
- package/dist/types/primitives.d.ts.map +1 -0
- package/dist/types/streaming.d.ts +51 -0
- package/dist/types/streaming.d.ts.map +1 -0
- package/dist/types/theme.d.ts +49 -0
- package/dist/types/theme.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +7 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/styles.d.ts +36 -0
- package/dist/utils/styles.d.ts.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { BaseElement, TextStyle, ParagraphStyle, RichTextContent, Fill, Color, Unit, Percentage, Animation, Position, Gradient, VerticalAlign, TextAlign } from './primitives';
|
|
2
|
+
|
|
3
|
+
export type { BaseElement };
|
|
4
|
+
export type TextSemanticStyle = "h1" | "h2" | "h3" | "h4" | "body" | "body-small" | "caption" | "quote" | "code";
|
|
5
|
+
export interface TextElement extends BaseElement {
|
|
6
|
+
type: "text";
|
|
7
|
+
content: string;
|
|
8
|
+
richContent?: RichTextContent;
|
|
9
|
+
semanticStyle?: TextSemanticStyle;
|
|
10
|
+
textStyle?: TextStyle;
|
|
11
|
+
paragraphStyle?: ParagraphStyle;
|
|
12
|
+
fill?: Fill;
|
|
13
|
+
padding?: {
|
|
14
|
+
top: Unit;
|
|
15
|
+
right: Unit;
|
|
16
|
+
bottom: Unit;
|
|
17
|
+
left: Unit;
|
|
18
|
+
};
|
|
19
|
+
verticalAlign?: VerticalAlign;
|
|
20
|
+
autoFit?: boolean;
|
|
21
|
+
columns?: number;
|
|
22
|
+
columnGap?: Unit;
|
|
23
|
+
}
|
|
24
|
+
export type ImageFit = "cover" | "contain" | "fill" | "none" | "scale-down";
|
|
25
|
+
export interface ImageElement extends BaseElement {
|
|
26
|
+
type: "image";
|
|
27
|
+
src: string;
|
|
28
|
+
alt: string;
|
|
29
|
+
fit?: ImageFit;
|
|
30
|
+
position?: {
|
|
31
|
+
x: Percentage;
|
|
32
|
+
y: Percentage;
|
|
33
|
+
};
|
|
34
|
+
mask?: {
|
|
35
|
+
type: "rect" | "circle" | "ellipse" | "polygon" | "custom";
|
|
36
|
+
path?: string;
|
|
37
|
+
};
|
|
38
|
+
filters?: {
|
|
39
|
+
brightness?: number;
|
|
40
|
+
contrast?: number;
|
|
41
|
+
saturation?: number;
|
|
42
|
+
grayscale?: number;
|
|
43
|
+
blur?: Unit;
|
|
44
|
+
sepia?: number;
|
|
45
|
+
};
|
|
46
|
+
placeholder?: string;
|
|
47
|
+
}
|
|
48
|
+
export type ShapeVariant = "rectangle" | "rounded-rect" | "square" | "circle" | "ellipse" | "oval" | "triangle" | "right-triangle" | "pentagon" | "hexagon" | "octagon" | "star" | "star-4" | "star-6" | "arrow-right" | "arrow-left" | "arrow-up" | "arrow-down" | "arrow-double" | "chevron-right" | "chevron-left" | "diamond" | "parallelogram" | "trapezoid" | "cross" | "plus" | "heart" | "cloud" | "lightning" | "callout" | "callout-rounded" | "line" | "curve" | "connector" | "custom";
|
|
49
|
+
export interface ShapeElement extends BaseElement {
|
|
50
|
+
type: "shape";
|
|
51
|
+
variant: ShapeVariant;
|
|
52
|
+
fill?: Fill;
|
|
53
|
+
stroke?: {
|
|
54
|
+
color: Color;
|
|
55
|
+
width: Unit;
|
|
56
|
+
style?: "solid" | "dashed" | "dotted";
|
|
57
|
+
dashArray?: number[];
|
|
58
|
+
lineCap?: "butt" | "round" | "square";
|
|
59
|
+
lineJoin?: "miter" | "round" | "bevel";
|
|
60
|
+
};
|
|
61
|
+
cornerRadius?: Unit | {
|
|
62
|
+
topLeft: Unit;
|
|
63
|
+
topRight: Unit;
|
|
64
|
+
bottomRight: Unit;
|
|
65
|
+
bottomLeft: Unit;
|
|
66
|
+
};
|
|
67
|
+
path?: string;
|
|
68
|
+
points?: number;
|
|
69
|
+
innerRadius?: number;
|
|
70
|
+
}
|
|
71
|
+
export interface IconElement extends BaseElement {
|
|
72
|
+
type: "icon";
|
|
73
|
+
icon: string;
|
|
74
|
+
library?: "lucide" | "heroicons" | "custom";
|
|
75
|
+
color?: Color;
|
|
76
|
+
strokeWidth?: number;
|
|
77
|
+
fill?: Color;
|
|
78
|
+
}
|
|
79
|
+
export interface LineElement extends BaseElement {
|
|
80
|
+
type: "line";
|
|
81
|
+
startPoint: Position;
|
|
82
|
+
endPoint: Position;
|
|
83
|
+
stroke: {
|
|
84
|
+
color: Color;
|
|
85
|
+
width: Unit;
|
|
86
|
+
style?: "solid" | "dashed" | "dotted";
|
|
87
|
+
dashArray?: number[];
|
|
88
|
+
};
|
|
89
|
+
startArrow?: "none" | "arrow" | "circle" | "diamond" | "square";
|
|
90
|
+
endArrow?: "none" | "arrow" | "circle" | "diamond" | "square";
|
|
91
|
+
curved?: boolean;
|
|
92
|
+
controlPoints?: Position[];
|
|
93
|
+
}
|
|
94
|
+
export type ChartType = "bar" | "bar-horizontal" | "bar-stacked" | "line" | "area" | "area-stacked" | "pie" | "doughnut" | "semi-doughnut" | "scatter" | "bubble" | "radar" | "polar" | "funnel" | "pyramid" | "gauge" | "progress";
|
|
95
|
+
export interface ChartDataset {
|
|
96
|
+
label: string;
|
|
97
|
+
data: number[];
|
|
98
|
+
color?: Color;
|
|
99
|
+
backgroundColor?: Color;
|
|
100
|
+
borderColor?: Color;
|
|
101
|
+
borderWidth?: number;
|
|
102
|
+
}
|
|
103
|
+
export interface ChartConfig {
|
|
104
|
+
labels: string[];
|
|
105
|
+
datasets: ChartDataset[];
|
|
106
|
+
}
|
|
107
|
+
export interface ChartElement extends BaseElement {
|
|
108
|
+
type: "chart";
|
|
109
|
+
chartType: ChartType;
|
|
110
|
+
data: ChartConfig;
|
|
111
|
+
options?: {
|
|
112
|
+
showLegend?: boolean;
|
|
113
|
+
legendPosition?: "top" | "bottom" | "left" | "right";
|
|
114
|
+
showGrid?: boolean;
|
|
115
|
+
showAxis?: boolean;
|
|
116
|
+
showLabels?: boolean;
|
|
117
|
+
showValues?: boolean;
|
|
118
|
+
animate?: boolean;
|
|
119
|
+
colors?: Color[];
|
|
120
|
+
title?: string;
|
|
121
|
+
subtitle?: string;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
export interface TableCell {
|
|
125
|
+
content: string;
|
|
126
|
+
colSpan?: number;
|
|
127
|
+
rowSpan?: number;
|
|
128
|
+
align?: TextAlign;
|
|
129
|
+
verticalAlign?: VerticalAlign;
|
|
130
|
+
fill?: Fill;
|
|
131
|
+
textStyle?: TextStyle;
|
|
132
|
+
}
|
|
133
|
+
export interface TableRow {
|
|
134
|
+
cells: TableCell[];
|
|
135
|
+
height?: Unit;
|
|
136
|
+
fill?: Fill;
|
|
137
|
+
}
|
|
138
|
+
export interface TableElement extends BaseElement {
|
|
139
|
+
type: "table";
|
|
140
|
+
headers?: TableRow;
|
|
141
|
+
rows: TableRow[];
|
|
142
|
+
columnWidths?: (Unit | "auto")[];
|
|
143
|
+
style?: {
|
|
144
|
+
headerFill?: Fill;
|
|
145
|
+
headerTextStyle?: TextStyle;
|
|
146
|
+
rowFill?: Fill;
|
|
147
|
+
alternateRowFill?: Fill;
|
|
148
|
+
cellPadding?: {
|
|
149
|
+
top: Unit;
|
|
150
|
+
right: Unit;
|
|
151
|
+
bottom: Unit;
|
|
152
|
+
left: Unit;
|
|
153
|
+
};
|
|
154
|
+
borderColor?: Color;
|
|
155
|
+
borderWidth?: Unit;
|
|
156
|
+
showHeaderBorder?: boolean;
|
|
157
|
+
showRowBorders?: boolean;
|
|
158
|
+
showColumnBorders?: boolean;
|
|
159
|
+
roundedCorners?: Unit;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
export interface CodeElement extends BaseElement {
|
|
163
|
+
type: "code";
|
|
164
|
+
code: string;
|
|
165
|
+
language: string;
|
|
166
|
+
theme?: "dark" | "light" | "github" | "monokai" | "dracula";
|
|
167
|
+
showLineNumbers?: boolean;
|
|
168
|
+
highlightLines?: number[];
|
|
169
|
+
fontSize?: Unit;
|
|
170
|
+
}
|
|
171
|
+
export interface ListItem {
|
|
172
|
+
content: string;
|
|
173
|
+
subItems?: ListItem[];
|
|
174
|
+
icon?: string;
|
|
175
|
+
checked?: boolean;
|
|
176
|
+
}
|
|
177
|
+
export interface ListElement extends BaseElement {
|
|
178
|
+
type: "list";
|
|
179
|
+
items: ListItem[];
|
|
180
|
+
listType: "bullet" | "numbered" | "checklist" | "icon";
|
|
181
|
+
textStyle?: TextStyle;
|
|
182
|
+
bulletStyle?: {
|
|
183
|
+
type: "disc" | "circle" | "square" | "dash" | "arrow" | "check" | "custom";
|
|
184
|
+
color?: Color;
|
|
185
|
+
size?: Unit;
|
|
186
|
+
customIcon?: string;
|
|
187
|
+
};
|
|
188
|
+
spacing?: Unit;
|
|
189
|
+
indent?: Unit;
|
|
190
|
+
animation?: Animation & {
|
|
191
|
+
staggerChildren?: boolean;
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
export interface DividerElement extends BaseElement {
|
|
195
|
+
type: "divider";
|
|
196
|
+
orientation: "horizontal" | "vertical";
|
|
197
|
+
style: "solid" | "dashed" | "dotted" | "gradient" | "decorative";
|
|
198
|
+
color?: Color;
|
|
199
|
+
thickness?: Unit;
|
|
200
|
+
gradient?: Gradient;
|
|
201
|
+
decoratorStart?: "none" | "dot" | "diamond" | "arrow";
|
|
202
|
+
decoratorEnd?: "none" | "dot" | "diamond" | "arrow";
|
|
203
|
+
}
|
|
204
|
+
export interface CalloutElement extends BaseElement {
|
|
205
|
+
type: "callout";
|
|
206
|
+
content: string;
|
|
207
|
+
variant: "quote" | "info" | "warning" | "success" | "error" | "tip" | "note";
|
|
208
|
+
icon?: string;
|
|
209
|
+
author?: string;
|
|
210
|
+
authorTitle?: string;
|
|
211
|
+
fill?: Fill;
|
|
212
|
+
accentColor?: Color;
|
|
213
|
+
textStyle?: TextStyle;
|
|
214
|
+
}
|
|
215
|
+
export interface ProgressElement extends BaseElement {
|
|
216
|
+
type: "progress";
|
|
217
|
+
value: number;
|
|
218
|
+
max?: number;
|
|
219
|
+
variant: "bar" | "circle" | "semicircle" | "gauge";
|
|
220
|
+
label?: string;
|
|
221
|
+
showValue?: boolean;
|
|
222
|
+
valueFormat?: string;
|
|
223
|
+
colors?: {
|
|
224
|
+
track?: Color;
|
|
225
|
+
fill?: Color;
|
|
226
|
+
text?: Color;
|
|
227
|
+
};
|
|
228
|
+
thickness?: Unit;
|
|
229
|
+
animated?: boolean;
|
|
230
|
+
}
|
|
231
|
+
export interface MetricElement extends BaseElement {
|
|
232
|
+
type: "metric";
|
|
233
|
+
value: string;
|
|
234
|
+
label: string;
|
|
235
|
+
prefix?: string;
|
|
236
|
+
suffix?: string;
|
|
237
|
+
change?: {
|
|
238
|
+
value: string;
|
|
239
|
+
direction: "up" | "down" | "neutral";
|
|
240
|
+
label?: string;
|
|
241
|
+
};
|
|
242
|
+
icon?: string;
|
|
243
|
+
fill?: Fill;
|
|
244
|
+
valueStyle?: TextStyle;
|
|
245
|
+
labelStyle?: TextStyle;
|
|
246
|
+
}
|
|
247
|
+
export interface TimelineItem {
|
|
248
|
+
date?: string;
|
|
249
|
+
title: string;
|
|
250
|
+
description?: string;
|
|
251
|
+
icon?: string;
|
|
252
|
+
color?: Color;
|
|
253
|
+
}
|
|
254
|
+
export interface TimelineElement extends BaseElement {
|
|
255
|
+
type: "timeline";
|
|
256
|
+
items: TimelineItem[];
|
|
257
|
+
orientation: "horizontal" | "vertical";
|
|
258
|
+
variant: "line" | "cards" | "alternating";
|
|
259
|
+
lineColor?: Color;
|
|
260
|
+
connectorStyle?: "solid" | "dashed" | "dotted";
|
|
261
|
+
}
|
|
262
|
+
export interface VideoElement extends BaseElement {
|
|
263
|
+
type: "video";
|
|
264
|
+
src: string;
|
|
265
|
+
poster?: string;
|
|
266
|
+
autoplay?: boolean;
|
|
267
|
+
loop?: boolean;
|
|
268
|
+
muted?: boolean;
|
|
269
|
+
controls?: boolean;
|
|
270
|
+
fit?: ImageFit;
|
|
271
|
+
}
|
|
272
|
+
export interface EmbedElement extends BaseElement {
|
|
273
|
+
type: "embed";
|
|
274
|
+
embedType: "youtube" | "vimeo" | "twitter" | "instagram" | "codepen" | "figma" | "iframe";
|
|
275
|
+
url: string;
|
|
276
|
+
aspectRatio?: "16:9" | "4:3" | "1:1" | "auto";
|
|
277
|
+
}
|
|
278
|
+
export interface GroupElement extends BaseElement {
|
|
279
|
+
type: "group";
|
|
280
|
+
children: SlideElement[];
|
|
281
|
+
clipContent?: boolean;
|
|
282
|
+
}
|
|
283
|
+
export type SlideElement = TextElement | ImageElement | ShapeElement | IconElement | LineElement | ChartElement | TableElement | VideoElement | EmbedElement | CodeElement | ListElement | DividerElement | CalloutElement | ProgressElement | MetricElement | TimelineElement | GroupElement;
|
|
284
|
+
//# sourceMappingURL=elements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../src/types/elements.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,cAAc,EACd,eAAe,EACf,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,UAAU,EACV,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,SAAS,EACV,MAAM,cAAc,CAAC;AAGtB,YAAY,EAAE,WAAW,EAAE,CAAC;AAG5B,MAAM,MAAM,iBAAiB,GACzB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,MAAM,GACN,YAAY,GACZ,SAAS,GACT,OAAO,GACP,MAAM,CAAC;AAEX,MAAM,WAAW,WAAY,SAAQ,WAAW;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,eAAe,CAAC;IAC9B,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,CAAC,EAAE;QAAE,GAAG,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,IAAI,CAAC;QAAC,MAAM,EAAE,IAAI,CAAC;QAAC,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC;IAC/D,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAGD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;AAE5E,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC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AAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB;AAGD,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,IAAI,EAAE,OAAO,CAAC;IACd,SAAS,EACL,SAAS,GACT,OAAO,GACP,SAAS,GACT,WAAW,GACX,SAAS,GACT,OAAO,GACP,QAAQ,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;CAC/C;AAGD,MAAM,WAAW,YAAa,SAAQ,WAAW;IAC/C,IAAI,EAAE,OAAO,CAAC;IACd,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAGD,MAAM,MAAM,YAAY,GACpB,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,WAAW,GACX,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,WAAW,GACX,cAAc,GACd,cAAc,GACd,eAAe,GACf,aAAa,GACb,eAAe,GACf,YAAY,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export type VividErrorCode = "INVALID_PRESENTATION" | "INVALID_SLIDE" | "INVALID_ELEMENT" | "STREAM_ERROR" | "STREAM_CANCELLED" | "EXPORT_ERROR" | "RENDER_ERROR" | "THEME_ERROR" | "PARSE_ERROR" | "UNKNOWN_ERROR";
|
|
2
|
+
export declare class VividError extends Error {
|
|
3
|
+
code: VividErrorCode;
|
|
4
|
+
details?: unknown;
|
|
5
|
+
recoverable: boolean;
|
|
6
|
+
cause?: Error;
|
|
7
|
+
constructor(code: VividErrorCode, message: string, options?: {
|
|
8
|
+
details?: unknown;
|
|
9
|
+
recoverable?: boolean;
|
|
10
|
+
cause?: Error;
|
|
11
|
+
});
|
|
12
|
+
static invalidPresentation(message: string, details?: unknown): VividError;
|
|
13
|
+
static invalidSlide(message: string, details?: unknown): VividError;
|
|
14
|
+
static streamError(message: string, cause?: Error): VividError;
|
|
15
|
+
static exportError(message: string, cause?: Error): VividError;
|
|
16
|
+
}
|
|
17
|
+
export declare class ParseError extends VividError {
|
|
18
|
+
constructor(message: string, details?: unknown);
|
|
19
|
+
}
|
|
20
|
+
export declare class RenderError extends VividError {
|
|
21
|
+
constructor(message: string, details?: unknown);
|
|
22
|
+
}
|
|
23
|
+
export declare class ExportError extends VividError {
|
|
24
|
+
constructor(message: string, cause?: Error);
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,cAAc,GACtB,sBAAsB,GACtB,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,kBAAkB,GAClB,cAAc,GACd,cAAc,GACd,aAAa,GACb,aAAa,GACb,eAAe,CAAC;AAEpB,qBAAa,UAAW,SAAQ,KAAK;IACnC,IAAI,EAAE,cAAc,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;gBAGZ,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,KAAK,CAAC,EAAE,KAAK,CAAC;KACf;IAUH,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU;IAI1E,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU;IAInE,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,UAAU;IAO9D,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK,GAAG,UAAU;CAG/D;AAGD,qBAAa,UAAW,SAAQ,UAAU;gBAC5B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAI/C;AAED,qBAAa,WAAY,SAAQ,UAAU;gBAC7B,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAI/C;AAED,qBAAa,WAAY,SAAQ,UAAU;gBAC7B,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,KAAK;CAI3C"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SlideElement } from './elements';
|
|
2
|
+
export * from './primitives';
|
|
3
|
+
export * from './elements';
|
|
4
|
+
export * from './presentation';
|
|
5
|
+
export * from './theme';
|
|
6
|
+
export * from './streaming';
|
|
7
|
+
export * from './errors';
|
|
8
|
+
export declare const isTextElement: (el: SlideElement) => el is import('./elements').TextElement;
|
|
9
|
+
export declare const isImageElement: (el: SlideElement) => el is import('./elements').ImageElement;
|
|
10
|
+
export declare const isShapeElement: (el: SlideElement) => el is import('./elements').ShapeElement;
|
|
11
|
+
export declare const isChartElement: (el: SlideElement) => el is import('./elements').ChartElement;
|
|
12
|
+
export declare const isTableElement: (el: SlideElement) => el is import('./elements').TableElement;
|
|
13
|
+
export declare const isListElement: (el: SlideElement) => el is import('./elements').ListElement;
|
|
14
|
+
export declare const isCodeElement: (el: SlideElement) => el is import('./elements').CodeElement;
|
|
15
|
+
export declare const isIconElement: (el: SlideElement) => el is import('./elements').IconElement;
|
|
16
|
+
export declare const isDividerElement: (el: SlideElement) => el is import('./elements').DividerElement;
|
|
17
|
+
export declare const isCalloutElement: (el: SlideElement) => el is import('./elements').CalloutElement;
|
|
18
|
+
export declare const isProgressElement: (el: SlideElement) => el is import('./elements').ProgressElement;
|
|
19
|
+
export declare const isMetricElement: (el: SlideElement) => el is import('./elements').MetricElement;
|
|
20
|
+
export declare const isGroupElement: (el: SlideElement) => el is import('./elements').GroupElement;
|
|
21
|
+
export declare const isTimelineElement: (el: SlideElement) => el is import('./elements').TimelineElement;
|
|
22
|
+
export declare const isVideoElement: (el: SlideElement) => el is import('./elements').VideoElement;
|
|
23
|
+
export declare const isEmbedElement: (el: SlideElement) => el is import('./elements').EmbedElement;
|
|
24
|
+
export declare const isLineElement: (el: SlideElement) => el is import('./elements').LineElement;
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAKA,cAAc,cAAc,CAAC;AAG7B,cAAc,YAAY,CAAC;AAG3B,cAAc,gBAAgB,CAAC;AAG/B,cAAc,SAAS,CAAC;AAGxB,cAAc,aAAa,CAAC;AAG5B,cAAc,UAAU,CAAC;AAGzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,aAAa,GACxB,IAAI,YAAY,KACf,EAAE,IAAI,OAAO,YAAY,EAAE,WAAiC,CAAC;AAEhE,eAAO,MAAM,cAAc,GACzB,IAAI,YAAY,KACf,EAAE,IAAI,OAAO,YAAY,EAAE,YAAmC,CAAC;AAElE,eAAO,MAAM,cAAc,GACzB,IAAI,YAAY,KACf,EAAE,IAAI,OAAO,YAAY,EAAE,YAAmC,CAAC;AAElE,eAAO,MAAM,cAAc,GACzB,IAAI,YAAY,KACf,EAAE,IAAI,OAAO,YAAY,EAAE,YAAmC,CAAC;AAElE,eAAO,MAAM,cAAc,GACzB,IAAI,YAAY,KACf,EAAE,IAAI,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+
import { SlideElement, ImageFit } from './elements';
|
|
3
|
+
|
|
4
|
+
export type SlideLayoutType = "blank" | "title" | "title-subtitle" | "title-only" | "section-header" | "content" | "content-two-column" | "comparison" | "image-full" | "image-left" | "image-right" | "quote" | "metrics" | "metrics-grid" | "chart" | "chart-with-text" | "timeline" | "team" | "team-grid" | "agenda" | "table-of-contents" | "thank-you" | "contact" | "q-and-a";
|
|
5
|
+
export interface SlideBackground {
|
|
6
|
+
type: "solid" | "gradient" | "image" | "video";
|
|
7
|
+
color?: Color;
|
|
8
|
+
gradient?: Gradient;
|
|
9
|
+
image?: {
|
|
10
|
+
src: string;
|
|
11
|
+
fit: ImageFit;
|
|
12
|
+
position?: {
|
|
13
|
+
x: Percentage;
|
|
14
|
+
y: Percentage;
|
|
15
|
+
};
|
|
16
|
+
overlay?: {
|
|
17
|
+
color: Color;
|
|
18
|
+
opacity: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
video?: {
|
|
22
|
+
src: string;
|
|
23
|
+
poster?: string;
|
|
24
|
+
overlay?: {
|
|
25
|
+
color: Color;
|
|
26
|
+
opacity: number;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface SlideTransition {
|
|
31
|
+
type: "none" | "fade" | "slide" | "push" | "zoom" | "flip" | "cube" | "reveal";
|
|
32
|
+
direction?: "left" | "right" | "up" | "down";
|
|
33
|
+
duration?: number;
|
|
34
|
+
easing?: EasingFunction;
|
|
35
|
+
}
|
|
36
|
+
export interface Slide {
|
|
37
|
+
id: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
layoutType?: SlideLayoutType;
|
|
40
|
+
background?: SlideBackground;
|
|
41
|
+
elements: SlideElement[];
|
|
42
|
+
transition?: SlideTransition;
|
|
43
|
+
notes?: string;
|
|
44
|
+
duration?: number;
|
|
45
|
+
hidden?: boolean;
|
|
46
|
+
thumbnailOverride?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface PresentationMetadata {
|
|
49
|
+
title: string;
|
|
50
|
+
description?: string;
|
|
51
|
+
author?: string;
|
|
52
|
+
company?: string;
|
|
53
|
+
createdAt?: string;
|
|
54
|
+
updatedAt?: string;
|
|
55
|
+
version?: string;
|
|
56
|
+
tags?: string[];
|
|
57
|
+
}
|
|
58
|
+
export interface PresentationSettings {
|
|
59
|
+
aspectRatio: "16:9" | "4:3" | "16:10" | "1:1";
|
|
60
|
+
width: Unit;
|
|
61
|
+
height: Unit;
|
|
62
|
+
defaultTransition?: SlideTransition;
|
|
63
|
+
defaultAnimation?: Animation;
|
|
64
|
+
autoAdvance?: boolean;
|
|
65
|
+
autoAdvanceDelay?: number;
|
|
66
|
+
loop?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface PresentationTheme {
|
|
69
|
+
id: string;
|
|
70
|
+
name: string;
|
|
71
|
+
colors: {
|
|
72
|
+
primary: Color;
|
|
73
|
+
secondary: Color;
|
|
74
|
+
accent: Color;
|
|
75
|
+
background: Color;
|
|
76
|
+
surface: Color;
|
|
77
|
+
text: {
|
|
78
|
+
primary: Color;
|
|
79
|
+
secondary: Color;
|
|
80
|
+
muted: Color;
|
|
81
|
+
inverse: Color;
|
|
82
|
+
};
|
|
83
|
+
success: Color;
|
|
84
|
+
warning: Color;
|
|
85
|
+
error: Color;
|
|
86
|
+
info: Color;
|
|
87
|
+
};
|
|
88
|
+
typography: {
|
|
89
|
+
headingFont: string;
|
|
90
|
+
bodyFont: string;
|
|
91
|
+
codeFont: string;
|
|
92
|
+
};
|
|
93
|
+
spacing: {
|
|
94
|
+
unit: Unit;
|
|
95
|
+
margins: {
|
|
96
|
+
top: Unit;
|
|
97
|
+
right: Unit;
|
|
98
|
+
bottom: Unit;
|
|
99
|
+
left: Unit;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export interface Presentation {
|
|
104
|
+
id: string;
|
|
105
|
+
metadata: PresentationMetadata;
|
|
106
|
+
settings: PresentationSettings;
|
|
107
|
+
theme: PresentationTheme;
|
|
108
|
+
slides: Slide[];
|
|
109
|
+
masterSlides?: Slide[];
|
|
110
|
+
}
|
|
111
|
+
export interface SlideGenerationHint {
|
|
112
|
+
purpose: string;
|
|
113
|
+
suggestedLayout: SlideLayoutType;
|
|
114
|
+
keyPoints: string[];
|
|
115
|
+
visualStyle?: "minimal" | "corporate" | "creative" | "bold" | "elegant";
|
|
116
|
+
dataToVisualize?: {
|
|
117
|
+
type: "chart" | "table" | "metrics" | "timeline";
|
|
118
|
+
data: unknown;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export interface PresentationGenerationConfig {
|
|
122
|
+
topic: string;
|
|
123
|
+
audience?: string;
|
|
124
|
+
tone?: "formal" | "casual" | "inspiring" | "educational";
|
|
125
|
+
slideCount?: number;
|
|
126
|
+
hints?: SlideGenerationHint[];
|
|
127
|
+
includeElements?: SlideElement["type"][];
|
|
128
|
+
excludeElements?: SlideElement["type"][];
|
|
129
|
+
}
|
|
130
|
+
export type Theme = PresentationTheme;
|
|
131
|
+
//# sourceMappingURL=presentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../src/types/presentation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,KAAK,EACL,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,cAAc,EACd,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGzD,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,OAAO,GACP,gBAAgB,GAChB,YAAY,GACZ,gBAAgB,GAChB,SAAS,GACT,oBAAoB,GACpB,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,OAAO,GACP,SAAS,GACT,cAAc,GACd,OAAO,GACP,iBAAiB,GACjB,UAAU,GACV,MAAM,GACN,WAAW,GACX,QAAQ,GACR,mBAAmB,GACnB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AAmB,EAAE,CAAC;IAC9B,eAAe,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;IACzC,eAAe,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC;CAC1C;AAGD,MAAM,MAAM,KAAK,GAAG,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
export type Unit = number;
|
|
2
|
+
export type Percentage = `${number}%`;
|
|
3
|
+
export type HexColor = `#${string}`;
|
|
4
|
+
export type ThemeColor = `theme.${string}`;
|
|
5
|
+
export type Color = HexColor | ThemeColor | "transparent" | string;
|
|
6
|
+
export interface Position {
|
|
7
|
+
x: Unit;
|
|
8
|
+
y: Unit;
|
|
9
|
+
}
|
|
10
|
+
export interface Dimensions {
|
|
11
|
+
width: Unit;
|
|
12
|
+
height: Unit;
|
|
13
|
+
}
|
|
14
|
+
export interface Bounds extends Position, Dimensions {
|
|
15
|
+
}
|
|
16
|
+
export interface Transform {
|
|
17
|
+
rotation?: number;
|
|
18
|
+
scaleX?: number;
|
|
19
|
+
scaleY?: number;
|
|
20
|
+
skewX?: number;
|
|
21
|
+
skewY?: number;
|
|
22
|
+
originX?: Percentage | Unit;
|
|
23
|
+
originY?: Percentage | Unit;
|
|
24
|
+
}
|
|
25
|
+
export interface Shadow {
|
|
26
|
+
color: Color;
|
|
27
|
+
offsetX: Unit;
|
|
28
|
+
offsetY: Unit;
|
|
29
|
+
blur: Unit;
|
|
30
|
+
spread?: Unit;
|
|
31
|
+
}
|
|
32
|
+
export interface Border {
|
|
33
|
+
width: Unit;
|
|
34
|
+
style: "solid" | "dashed" | "dotted" | "double" | "none";
|
|
35
|
+
color: Color;
|
|
36
|
+
radius?: Unit | {
|
|
37
|
+
topLeft: Unit;
|
|
38
|
+
topRight: Unit;
|
|
39
|
+
bottomRight: Unit;
|
|
40
|
+
bottomLeft: Unit;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface Effects {
|
|
44
|
+
opacity?: number;
|
|
45
|
+
shadow?: Shadow;
|
|
46
|
+
blur?: Unit;
|
|
47
|
+
brightness?: number;
|
|
48
|
+
contrast?: number;
|
|
49
|
+
saturation?: number;
|
|
50
|
+
grayscale?: number;
|
|
51
|
+
}
|
|
52
|
+
export type AnimationType = "none" | "fade-in" | "fade-out" | "slide-up" | "slide-down" | "slide-left" | "slide-right" | "zoom-in" | "zoom-out" | "bounce" | "pulse" | "shake" | "typewriter" | "flip" | "rotate-in" | "blur-in" | "blur-out";
|
|
53
|
+
export type EasingFunction = "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out" | "spring" | [number, number, number, number];
|
|
54
|
+
export interface Animation {
|
|
55
|
+
type: AnimationType;
|
|
56
|
+
duration: number;
|
|
57
|
+
delay?: number;
|
|
58
|
+
easing?: EasingFunction;
|
|
59
|
+
iterations?: number | "infinite";
|
|
60
|
+
direction?: "normal" | "reverse" | "alternate";
|
|
61
|
+
stagger?: number;
|
|
62
|
+
}
|
|
63
|
+
export type FontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "normal" | "bold";
|
|
64
|
+
export type TextAlign = "left" | "center" | "right" | "justify";
|
|
65
|
+
export type VerticalAlign = "top" | "middle" | "bottom";
|
|
66
|
+
export type TextDecoration = "none" | "underline" | "line-through" | "overline";
|
|
67
|
+
export type TextTransform = "none" | "uppercase" | "lowercase" | "capitalize";
|
|
68
|
+
export interface TextStyle {
|
|
69
|
+
fontFamily?: string;
|
|
70
|
+
fontSize?: Unit;
|
|
71
|
+
fontWeight?: FontWeight;
|
|
72
|
+
fontStyle?: "normal" | "italic";
|
|
73
|
+
color?: Color;
|
|
74
|
+
lineHeight?: number | Percentage;
|
|
75
|
+
letterSpacing?: Unit;
|
|
76
|
+
wordSpacing?: Unit;
|
|
77
|
+
textAlign?: TextAlign;
|
|
78
|
+
verticalAlign?: VerticalAlign;
|
|
79
|
+
textDecoration?: TextDecoration;
|
|
80
|
+
textTransform?: TextTransform;
|
|
81
|
+
textShadow?: Shadow;
|
|
82
|
+
}
|
|
83
|
+
export interface ParagraphStyle {
|
|
84
|
+
marginTop?: Unit;
|
|
85
|
+
marginBottom?: Unit;
|
|
86
|
+
indent?: Unit;
|
|
87
|
+
listStyle?: "none" | "disc" | "circle" | "square" | "decimal" | "alpha" | "roman";
|
|
88
|
+
listIndent?: Unit;
|
|
89
|
+
}
|
|
90
|
+
export interface TextRun {
|
|
91
|
+
text: string;
|
|
92
|
+
style?: Partial<TextStyle>;
|
|
93
|
+
link?: string;
|
|
94
|
+
}
|
|
95
|
+
export interface Paragraph {
|
|
96
|
+
runs: TextRun[];
|
|
97
|
+
style?: ParagraphStyle;
|
|
98
|
+
align?: TextAlign;
|
|
99
|
+
}
|
|
100
|
+
export interface RichTextContent {
|
|
101
|
+
paragraphs: Paragraph[];
|
|
102
|
+
}
|
|
103
|
+
export interface GradientStop {
|
|
104
|
+
color: Color;
|
|
105
|
+
position: number;
|
|
106
|
+
}
|
|
107
|
+
export interface LinearGradient {
|
|
108
|
+
type: "linear";
|
|
109
|
+
angle: number;
|
|
110
|
+
stops: GradientStop[];
|
|
111
|
+
}
|
|
112
|
+
export interface RadialGradient {
|
|
113
|
+
type: "radial";
|
|
114
|
+
centerX: Percentage;
|
|
115
|
+
centerY: Percentage;
|
|
116
|
+
radius: Percentage;
|
|
117
|
+
stops: GradientStop[];
|
|
118
|
+
}
|
|
119
|
+
export type Gradient = LinearGradient | RadialGradient;
|
|
120
|
+
export interface SolidFill {
|
|
121
|
+
type: "solid";
|
|
122
|
+
color: Color;
|
|
123
|
+
}
|
|
124
|
+
export interface GradientFill {
|
|
125
|
+
type: "gradient";
|
|
126
|
+
gradient: Gradient;
|
|
127
|
+
}
|
|
128
|
+
export interface ImageFill {
|
|
129
|
+
type: "image";
|
|
130
|
+
src: string;
|
|
131
|
+
fit: "cover" | "contain" | "fill" | "none";
|
|
132
|
+
position?: {
|
|
133
|
+
x: Percentage;
|
|
134
|
+
y: Percentage;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
export interface PatternFill {
|
|
138
|
+
type: "pattern";
|
|
139
|
+
pattern: "dots" | "lines" | "grid" | "diagonal" | "crosshatch";
|
|
140
|
+
color: Color;
|
|
141
|
+
backgroundColor: Color;
|
|
142
|
+
scale?: number;
|
|
143
|
+
}
|
|
144
|
+
export type Fill = SolidFill | GradientFill | ImageFill | PatternFill;
|
|
145
|
+
export interface BaseElement {
|
|
146
|
+
id: string;
|
|
147
|
+
type: string;
|
|
148
|
+
name?: string;
|
|
149
|
+
bounds: Bounds;
|
|
150
|
+
zIndex?: number;
|
|
151
|
+
hidden?: boolean;
|
|
152
|
+
locked?: boolean;
|
|
153
|
+
opacity?: number;
|
|
154
|
+
rotation?: number;
|
|
155
|
+
transform?: Transform;
|
|
156
|
+
border?: Border;
|
|
157
|
+
effects?: Effects;
|
|
158
|
+
animation?: Animation;
|
|
159
|
+
}
|
|
160
|
+
export interface Size {
|
|
161
|
+
width: Unit;
|
|
162
|
+
height: Unit;
|
|
163
|
+
}
|
|
164
|
+
export interface Padding {
|
|
165
|
+
top: Unit;
|
|
166
|
+
right: Unit;
|
|
167
|
+
bottom: Unit;
|
|
168
|
+
left: Unit;
|
|
169
|
+
}
|
|
170
|
+
export type Alignment = "start" | "center" | "end" | "stretch" | "space-between" | "space-around";
|
|
171
|
+
export type VerticalAlignment = "top" | "middle" | "bottom";
|
|
172
|
+
export type AnimationEasing = EasingFunction;
|
|
173
|
+
//# sourceMappingURL=primitives.d.ts.map
|