@tangle-network/sandbox-ui 0.23.0 → 0.23.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.
@@ -0,0 +1,276 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ interface BrandTokens {
5
+ primaryColor: string;
6
+ accentColor: string;
7
+ textColor: string;
8
+ fontFamily: string;
9
+ logoUrl?: string;
10
+ businessName: string;
11
+ voice: string;
12
+ }
13
+ type AssetFormat = "email" | "image:feed" | "image:story" | "image:carousel" | "video:reel" | "video:feed" | "copy:caption" | "copy:headline" | "copy:sms";
14
+ type AssetStatus = "draft" | "pending_review" | "approved" | "rejected" | "scheduled" | "published";
15
+ interface EmailHeroSection {
16
+ type: "hero";
17
+ headline: string;
18
+ subheadline?: string;
19
+ imageUrl?: string;
20
+ ctaLabel?: string;
21
+ ctaUrl?: string;
22
+ }
23
+ interface EmailBodySection {
24
+ type: "body";
25
+ text: string;
26
+ }
27
+ interface EmailFeatureSection {
28
+ type: "feature";
29
+ headline: string;
30
+ description: string;
31
+ imageUrl?: string;
32
+ }
33
+ interface EmailTestimonialSection {
34
+ type: "testimonial";
35
+ quote: string;
36
+ author: string;
37
+ role?: string;
38
+ avatarUrl?: string;
39
+ }
40
+ interface EmailCtaSection {
41
+ type: "cta";
42
+ label: string;
43
+ url: string;
44
+ subtext?: string;
45
+ }
46
+ interface EmailDividerSection {
47
+ type: "divider";
48
+ }
49
+ type EmailSection = EmailHeroSection | EmailBodySection | EmailFeatureSection | EmailTestimonialSection | EmailCtaSection | EmailDividerSection;
50
+ interface EmailContent {
51
+ subject: string;
52
+ preheader?: string;
53
+ sections: EmailSection[];
54
+ }
55
+ interface ImageTextLayer {
56
+ type: "text";
57
+ text: string;
58
+ fontSize?: number;
59
+ fontWeight?: "normal" | "bold";
60
+ color?: string;
61
+ x: number;
62
+ y: number;
63
+ width?: number;
64
+ align?: "left" | "center" | "right";
65
+ }
66
+ interface ImageImageLayer {
67
+ type: "image";
68
+ url: string;
69
+ x: number;
70
+ y: number;
71
+ width: number;
72
+ height: number;
73
+ opacity?: number;
74
+ }
75
+ interface ImageShapeLayer {
76
+ type: "shape";
77
+ shape: "rect" | "circle" | "rounded-rect";
78
+ x: number;
79
+ y: number;
80
+ width: number;
81
+ height: number;
82
+ fill?: string;
83
+ opacity?: number;
84
+ }
85
+ interface ImageLogoLayer {
86
+ type: "logo";
87
+ x: number;
88
+ y: number;
89
+ width?: number;
90
+ }
91
+ type ImageLayer = ImageTextLayer | ImageImageLayer | ImageShapeLayer | ImageLogoLayer;
92
+ type ImageBackground = {
93
+ type: "color";
94
+ value: string;
95
+ } | {
96
+ type: "gradient";
97
+ from: string;
98
+ to: string;
99
+ direction?: string;
100
+ } | {
101
+ type: "image";
102
+ url: string;
103
+ overlay?: string;
104
+ overlayOpacity?: number;
105
+ };
106
+ interface ImageSlide {
107
+ background: ImageBackground;
108
+ layers: ImageLayer[];
109
+ }
110
+ interface ImageContent {
111
+ slides: ImageSlide[];
112
+ }
113
+ interface VideoTextAnimationScene {
114
+ type: "text-animation";
115
+ durationSeconds: number;
116
+ headline: string;
117
+ subtext?: string;
118
+ animation?: "fade" | "slide-up" | "typewriter";
119
+ background?: ImageBackground;
120
+ }
121
+ interface VideoImageRevealScene {
122
+ type: "image-reveal";
123
+ durationSeconds: number;
124
+ imageUrl: string;
125
+ caption?: string;
126
+ }
127
+ interface VideoSlideScene {
128
+ type: "slide";
129
+ durationSeconds: number;
130
+ slide: ImageSlide;
131
+ }
132
+ interface VideoCountdownScene {
133
+ type: "countdown";
134
+ durationSeconds: number;
135
+ from: number;
136
+ label?: string;
137
+ }
138
+ type VideoScene = VideoTextAnimationScene | VideoImageRevealScene | VideoSlideScene | VideoCountdownScene;
139
+ interface VideoCaption {
140
+ startSeconds: number;
141
+ endSeconds: number;
142
+ text: string;
143
+ }
144
+ interface VideoContent {
145
+ durationSeconds: number;
146
+ scenes: VideoScene[];
147
+ audioUrl?: string;
148
+ captions?: VideoCaption[];
149
+ renderedUrl?: string;
150
+ }
151
+ type CopyPlatform = "instagram" | "tiktok" | "x" | "linkedin" | "sms" | "email-subject";
152
+ interface CopyContent {
153
+ headline: string;
154
+ body: string;
155
+ hashtags?: string[];
156
+ platform: CopyPlatform;
157
+ characterCount?: number;
158
+ }
159
+ type AssetContentMap = {
160
+ email: EmailContent;
161
+ "image:feed": ImageContent;
162
+ "image:story": ImageContent;
163
+ "image:carousel": ImageContent;
164
+ "video:reel": VideoContent;
165
+ "video:feed": VideoContent;
166
+ "copy:caption": CopyContent;
167
+ "copy:headline": CopyContent;
168
+ "copy:sms": CopyContent;
169
+ };
170
+ interface AssetSpec<F extends AssetFormat = AssetFormat> {
171
+ id: string;
172
+ workspaceId: string;
173
+ campaignId?: string;
174
+ format: F;
175
+ brand: BrandTokens;
176
+ content: AssetContentMap[F];
177
+ status: AssetStatus;
178
+ scheduledAt?: string;
179
+ createdAt: string;
180
+ updatedAt: string;
181
+ }
182
+ interface ApprovalEvent {
183
+ assetId: string;
184
+ variantId?: string;
185
+ action: "approved" | "rejected" | "edited" | "scheduled";
186
+ editedFields?: string[];
187
+ userId: string;
188
+ timestamp: string;
189
+ }
190
+ interface AssetVariant {
191
+ id: string;
192
+ parentId: string;
193
+ label: string;
194
+ spec: AssetSpec;
195
+ approvedAt?: string;
196
+ rejectedAt?: string;
197
+ editLog: ApprovalEvent[];
198
+ }
199
+
200
+ interface ApprovalQueueProps {
201
+ assets: AssetSpec[];
202
+ variantCounts?: Record<string, number>;
203
+ onApprove?: (id: string, scheduledAt?: string) => void;
204
+ onReject?: (id: string) => void;
205
+ onEdit?: (id: string) => void;
206
+ onSave?: (spec: AssetSpec) => void;
207
+ onRevisionRequest?: (id: string, instruction: string) => void;
208
+ onRenderRequest?: (id: string) => void;
209
+ renderingIds?: Set<string>;
210
+ previewUrls?: Record<string, string>;
211
+ className?: string;
212
+ }
213
+ declare function ApprovalQueue({ assets, variantCounts, onApprove, onReject, onEdit, onSave, onRevisionRequest, onRenderRequest, renderingIds, previewUrls, className }: ApprovalQueueProps): react_jsx_runtime.JSX.Element;
214
+
215
+ interface AssetCardProps {
216
+ spec: AssetSpec;
217
+ variantCount?: number;
218
+ onApprove?: (id: string) => void;
219
+ onReject?: (id: string) => void;
220
+ onEdit?: (id: string) => void;
221
+ className?: string;
222
+ }
223
+ declare function AssetCard({ spec, variantCount, onApprove, onReject, onEdit, className }: AssetCardProps): react_jsx_runtime.JSX.Element;
224
+
225
+ interface AssetEditorProps {
226
+ spec: AssetSpec;
227
+ previewUrl?: string;
228
+ isRendering?: boolean;
229
+ onSave?: (spec: AssetSpec) => void;
230
+ onRenderRequest?: () => void;
231
+ onRevisionRequest?: (instruction: string) => void;
232
+ className?: string;
233
+ }
234
+ declare function AssetEditor({ spec, previewUrl, isRendering, onSave, onRenderRequest, onRevisionRequest, className }: AssetEditorProps): react_jsx_runtime.JSX.Element;
235
+
236
+ interface CopyPreviewProps {
237
+ content: CopyContent;
238
+ className?: string;
239
+ }
240
+ declare function CopyPreview({ content, className }: CopyPreviewProps): react_jsx_runtime.JSX.Element;
241
+
242
+ interface EmailPreviewProps {
243
+ content: EmailContent;
244
+ brand: BrandTokens;
245
+ previewUrl?: string;
246
+ className?: string;
247
+ }
248
+ declare function EmailPreview({ content, brand, previewUrl, className }: EmailPreviewProps): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
249
+
250
+ type ImageFormat = "feed" | "story" | "carousel";
251
+ interface ImagePreviewProps {
252
+ content: ImageContent;
253
+ brand: BrandTokens;
254
+ format?: ImageFormat;
255
+ className?: string;
256
+ }
257
+ declare function ImagePreview({ content, brand, format, className }: ImagePreviewProps): react_jsx_runtime.JSX.Element;
258
+
259
+ interface VariantCompareProps {
260
+ variants: AssetVariant[];
261
+ onPromote?: (variantId: string) => void;
262
+ onSave?: (variant: AssetVariant) => void;
263
+ className?: string;
264
+ }
265
+ declare function VariantCompare({ variants, onPromote, onSave, className }: VariantCompareProps): react_jsx_runtime.JSX.Element;
266
+
267
+ interface VideoPreviewProps {
268
+ content: VideoContent;
269
+ brand: BrandTokens;
270
+ onRenderRequest?: () => void;
271
+ isRendering?: boolean;
272
+ className?: string;
273
+ }
274
+ declare function VideoPreview({ content, brand, onRenderRequest, isRendering, className }: VideoPreviewProps): react_jsx_runtime.JSX.Element;
275
+
276
+ export { ApprovalQueue, type ApprovalQueueProps, AssetCard, type AssetCardProps, AssetEditor, type AssetEditorProps, CopyPreview, type CopyPreviewProps, EmailPreview, type EmailPreviewProps, type ImageFormat, ImagePreview, type ImagePreviewProps, VariantCompare, type VariantCompareProps, VideoPreview, type VideoPreviewProps };