unified-video-framework 1.4.438 → 1.4.440

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.
@@ -20,8 +20,17 @@ export type {
20
20
  FlashNewsTickerAPI,
21
21
  TickerDisplayConfig,
22
22
  TickerStyleVariant,
23
+ TickerLayoutStyle,
23
24
  BroadcastTheme,
24
- BroadcastStyleConfig
25
+ BroadcastStyleConfig,
26
+ IntroAnimationType,
27
+ ItemTransitionType,
28
+ TwoLineDisplayConfig,
29
+ TopLineConfig,
30
+ BottomLineConfig,
31
+ DecorativeShapesConfig,
32
+ SeparatorType,
33
+ ItemCyclingConfig
25
34
  } from './react/types/FlashNewsTickerTypes';
26
35
 
27
36
  // Version
@@ -13,6 +13,34 @@
13
13
  */
14
14
  export type TickerStyleVariant = 'simple' | 'broadcast';
15
15
 
16
+ /**
17
+ * Layout styles for broadcast ticker
18
+ * - 'simple': Single scrolling line
19
+ * - 'broadcast': Header + single scrolling line
20
+ * - 'two-line': Header + static headline + scrolling detail
21
+ * - 'professional': Full TV-style with all features (header, two-line, intro animations)
22
+ */
23
+ export type TickerLayoutStyle = 'simple' | 'broadcast' | 'two-line' | 'professional';
24
+
25
+ /**
26
+ * Intro animation types for news items
27
+ * - 'none': No intro animation
28
+ * - 'slide-in': Slide in from left
29
+ * - 'scale': Scale up from center
30
+ * - 'flash': Flashing effect
31
+ * - 'pulse': Pulsing effect
32
+ * - 'shake': Shake effect
33
+ */
34
+ export type IntroAnimationType = 'none' | 'slide-in' | 'scale' | 'flash' | 'pulse' | 'shake';
35
+
36
+ /**
37
+ * Item transition types
38
+ * - 'fade': Fade out/in
39
+ * - 'slide': Slide up out, slide in from bottom
40
+ * - 'none': Instant switch
41
+ */
42
+ export type ItemTransitionType = 'fade' | 'slide' | 'none';
43
+
16
44
  /**
17
45
  * Broadcast style theme presets
18
46
  */
@@ -23,6 +51,145 @@ export type BroadcastTheme =
23
51
  | 'news-blue' // Professional blue theme
24
52
  | 'custom'; // Custom colors via headerColor/bodyColor
25
53
 
54
+ /**
55
+ * Configuration for the top line (static headline) in two-line display
56
+ */
57
+ export interface TopLineConfig {
58
+ /** Display mode: 'static' keeps headline visible, 'scroll' makes it scroll slowly */
59
+ mode?: 'static' | 'scroll';
60
+
61
+ /** Enable multi-line text wrapping. Default: false */
62
+ multiLine?: boolean;
63
+
64
+ /** Maximum lines before truncation with ellipsis. Default: 2 */
65
+ maxLines?: number;
66
+
67
+ /**
68
+ * Force text to split into multiple lines even if short.
69
+ * When true, text will be split at approximately the midpoint.
70
+ * Default: false
71
+ */
72
+ forceMultiLine?: boolean;
73
+
74
+ /**
75
+ * Custom line break position (character index or percentage like '50%').
76
+ * Only used when forceMultiLine is true.
77
+ * Default: '50%' (midpoint)
78
+ */
79
+ breakAt?: number | string;
80
+
81
+ /** Minimum height in pixels. Default: 32 */
82
+ minHeight?: number;
83
+
84
+ /** Font size in pixels. Default: 16 */
85
+ fontSize?: number;
86
+
87
+ /** CSS line-height for multi-line text spacing. Default: 1.3 */
88
+ lineHeight?: number;
89
+
90
+ /** Text color. Defaults to parent textColor */
91
+ textColor?: string;
92
+
93
+ /** Background color. Defaults to transparent */
94
+ backgroundColor?: string;
95
+
96
+ /** Padding in pixels. Default: 8 */
97
+ padding?: number;
98
+ }
99
+
100
+ /**
101
+ * Configuration for the bottom line (scrolling detail) in two-line display
102
+ */
103
+ export interface BottomLineConfig {
104
+ /** Scroll speed in pixels per second. Default: 80 */
105
+ speed?: number;
106
+
107
+ /** Height in pixels. Default: 28 */
108
+ height?: number;
109
+
110
+ /** Font size in pixels. Default: 14 */
111
+ fontSize?: number;
112
+
113
+ /** Text color. Defaults to parent textColor */
114
+ textColor?: string;
115
+
116
+ /** Background color. Defaults to transparent */
117
+ backgroundColor?: string;
118
+ }
119
+
120
+ /**
121
+ * Configuration for two-line display (headline + scrolling detail)
122
+ */
123
+ export interface TwoLineDisplayConfig {
124
+ /** Enable two-line display mode. Default: false */
125
+ enabled?: boolean;
126
+
127
+ /** Top line (headline) configuration */
128
+ topLine?: TopLineConfig;
129
+
130
+ /** Bottom line (scrolling detail) configuration */
131
+ bottomLine?: BottomLineConfig;
132
+
133
+ /** Separator line between top and bottom. Default: true */
134
+ showSeparator?: boolean;
135
+
136
+ /** Separator color. Default: 'rgba(255,255,255,0.2)' */
137
+ separatorColor?: string;
138
+ }
139
+
140
+ /**
141
+ * Decorative separator type
142
+ */
143
+ export type SeparatorType = 'line' | 'pulse-line' | 'chevron' | 'diamond' | 'dot';
144
+
145
+ /**
146
+ * Configuration for decorative shapes and separators
147
+ */
148
+ export interface DecorativeShapesConfig {
149
+ /** Separator between globe and header text */
150
+ headerSeparator?: {
151
+ /** Separator type. Default: 'line' */
152
+ type?: SeparatorType;
153
+ /** Enable animation. Default: true */
154
+ animated?: boolean;
155
+ /** Color. Default: '#ffffff' */
156
+ color?: string;
157
+ /** Width in pixels. Default: 2 */
158
+ width?: number;
159
+ /** Height in pixels. Default: 20 */
160
+ height?: number;
161
+ };
162
+ }
163
+
164
+ /**
165
+ * Configuration for automatic item cycling
166
+ */
167
+ export interface ItemCyclingConfig {
168
+ /** Enable automatic item cycling. Default: false */
169
+ enabled?: boolean;
170
+
171
+ /** Default duration per item in seconds. Default: 10 */
172
+ defaultDuration?: number;
173
+
174
+ /** Transition type between items. Default: 'fade' */
175
+ transitionType?: ItemTransitionType;
176
+
177
+ /** Transition duration in ms. Default: 500 */
178
+ transitionDuration?: number;
179
+
180
+ /** Show progress bar for current item. Default: false */
181
+ showProgress?: boolean;
182
+
183
+ /** Progress bar color. Default: '#ffffff' */
184
+ progressColor?: string;
185
+
186
+ /** Progress bar height in pixels. Default: 3 */
187
+ progressHeight?: number;
188
+
189
+ /** Pause cycling on hover. Default: true */
190
+ pauseOnHover?: boolean;
191
+ }
192
+
26
193
  /**
27
194
  * Configuration for broadcast-style banner appearance
28
195
  */
@@ -30,6 +197,9 @@ export interface BroadcastStyleConfig {
30
197
  /** Theme preset. Default: 'breaking-red' */
31
198
  theme?: BroadcastTheme;
32
199
 
200
+ /** Layout style. Default: 'broadcast' */
201
+ layoutStyle?: TickerLayoutStyle;
202
+
33
203
  /** Header text (e.g., "BREAKING NEWS", "LIVE", "ALERT"). Default: 'BREAKING NEWS' */
34
204
  headerText?: string;
35
205
 
@@ -62,6 +232,18 @@ export interface BroadcastStyleConfig {
62
232
 
63
233
  /** LIVE badge pulse animation. Default: true */
64
234
  pulseLiveBadge?: boolean;
235
+
236
+ /** Two-line display configuration (for 'two-line' and 'professional' layouts) */
237
+ twoLineDisplay?: TwoLineDisplayConfig;
238
+
239
+ /** Decorative shapes configuration */
240
+ decorativeShapes?: DecorativeShapesConfig;
241
+
242
+ /** Default intro animation for items. Default: 'none' */
243
+ defaultIntroAnimation?: IntroAnimationType;
244
+
245
+ /** Default intro duration in ms. Default: 2000 */
246
+ defaultIntroDuration?: number;
65
247
  }
66
248
 
67
249
  /**
@@ -71,7 +253,7 @@ export interface FlashNewsTickerItem {
71
253
  /** Unique identifier for this item */
72
254
  id: string;
73
255
 
74
- /** Text content to display */
256
+ /** Text content to display (used as scrolling detail in two-line mode) */
75
257
  text: string;
76
258
 
77
259
  /**
@@ -81,6 +263,18 @@ export interface FlashNewsTickerItem {
81
263
  */
82
264
  html?: string;
83
265
 
266
+ /**
267
+ * Headline text for two-line display (static top line)
268
+ * Used only when layoutStyle is 'two-line' or 'professional'
269
+ */
270
+ headline?: string;
271
+
272
+ /**
273
+ * HTML content for headline (supports rich formatting)
274
+ * If provided, this takes precedence over 'headline'
275
+ */
276
+ headlineHtml?: string;
277
+
84
278
  /** Priority for ordering (higher = shown first). Default: 0 */
85
279
  priority?: number;
86
280
 
@@ -90,6 +284,36 @@ export interface FlashNewsTickerItem {
90
284
  /** Unix timestamp (ms) - when to stop showing this item */
91
285
  endTime?: number;
92
286
 
287
+ /**
288
+ * Display duration in seconds for this specific item
289
+ * Used when itemCycling is enabled. Overrides defaultDuration.
290
+ */
291
+ duration?: number;
292
+
293
+ /**
294
+ * Show intro animation for this item (e.g., "JUST IN", "BREAKING")
295
+ * Default: false
296
+ */
297
+ showIntro?: boolean;
298
+
299
+ /**
300
+ * Custom intro text (e.g., "JUST IN", "BREAKING", "EXCLUSIVE")
301
+ * Default: 'BREAKING'
302
+ */
303
+ introText?: string;
304
+
305
+ /**
306
+ * Intro animation type for this item
307
+ * Overrides broadcastStyle.defaultIntroAnimation
308
+ */
309
+ introAnimation?: IntroAnimationType;
310
+
311
+ /**
312
+ * Intro animation duration in ms
313
+ * Overrides broadcastStyle.defaultIntroDuration
314
+ */
315
+ introDuration?: number;
316
+
93
317
  /** Custom metadata for application-specific data */
94
318
  metadata?: Record<string, any>;
95
319
  }
@@ -162,6 +386,9 @@ export interface FlashNewsTickerConfig {
162
386
  /** Configuration for broadcast-style appearance (only used when styleVariant is 'broadcast') */
163
387
  broadcastStyle?: BroadcastStyleConfig;
164
388
 
389
+ /** Configuration for automatic item cycling (used in 'professional' layout) */
390
+ itemCycling?: ItemCyclingConfig;
391
+
165
392
  /** Configuration for top ticker (only used when position is 'both') */
166
393
  topConfig?: TickerDisplayConfig;
167
394