@financial-times/cp-content-pipeline-ui 6.15.6 → 7.0.1
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 +22 -0
- package/lib/components/BigNumber/index.d.ts +4 -1
- package/lib/components/BigNumber/index.js +1 -1
- package/lib/components/BigNumber/index.js.map +1 -1
- package/lib/components/Body/index.test.js +12 -1
- package/lib/components/Body/index.test.js.map +1 -1
- package/lib/components/Byline/index.js +2 -2
- package/lib/components/Byline/index.js.map +1 -1
- package/lib/components/Clip/components/ClipTag.d.ts +3 -3
- package/lib/components/Clip/components/ClipTag.js.map +1 -1
- package/lib/components/Clip/components/ClosedCaptions.d.ts +2 -2
- package/lib/components/Clip/components/VideoDescription.d.ts +2 -2
- package/lib/components/Clip/components/VideoDescription.js.map +1 -1
- package/lib/components/Clip/template/component.d.ts +9 -4
- package/lib/components/Clip/template/component.js +19 -14
- package/lib/components/Clip/template/component.js.map +1 -1
- package/lib/components/Clip/test/fixtures.js +114 -77
- package/lib/components/Clip/test/fixtures.js.map +1 -1
- package/lib/components/Clip/test/snapshot.spec.js +110 -61
- package/lib/components/Clip/test/snapshot.spec.js.map +1 -1
- package/lib/components/Flourish/index.d.ts +4 -12
- package/lib/components/Flourish/index.js +1 -1
- package/lib/components/Flourish/index.js.map +1 -1
- package/lib/components/Flourish/test/snapshot.spec.js +48 -6
- package/lib/components/Flourish/test/snapshot.spec.js.map +1 -1
- package/lib/components/Heading/index.d.ts +2 -1
- package/lib/components/Heading/index.js +2 -2
- package/lib/components/Heading/index.js.map +1 -1
- package/lib/components/ImageOverrideWrappers/index.d.ts +4 -0
- package/lib/components/ImageOverrideWrappers/index.js +44 -0
- package/lib/components/ImageOverrideWrappers/index.js.map +1 -0
- package/lib/components/ImageSet/index.d.ts +12 -8
- package/lib/components/ImageSet/index.js +13 -8
- package/lib/components/ImageSet/index.js.map +1 -1
- package/lib/components/Layout/index.d.ts +3 -13
- package/lib/components/Layout/index.js +1 -1
- package/lib/components/Layout/index.js.map +1 -1
- package/lib/components/MainImage/index.js +2 -2
- package/lib/components/MainImage/index.js.map +1 -1
- package/lib/components/Paragraph/index.d.ts +4 -1
- package/lib/components/Paragraph/index.js.map +1 -1
- package/lib/components/Pullquote/index.d.ts +4 -1
- package/lib/components/Pullquote/index.js +7 -6
- package/lib/components/Pullquote/index.js.map +1 -1
- package/lib/components/Recommended/index.d.ts +5 -8
- package/lib/components/Recommended/index.js +1 -6
- package/lib/components/Recommended/index.js.map +1 -1
- package/lib/components/RichText/BasicComponents.d.ts +12 -11
- package/lib/components/RichText/BasicComponents.js +2 -2
- package/lib/components/RichText/BasicComponents.js.map +1 -1
- package/lib/components/RichText/index.d.ts +10 -3
- package/lib/components/RichText/index.js +8 -2
- package/lib/components/RichText/index.js.map +1 -1
- package/lib/components/Scrollytelling/ScrollyImage.d.ts +6 -3
- package/lib/components/Scrollytelling/ScrollyImage.js +2 -2
- package/lib/components/Scrollytelling/ScrollyImage.js.map +1 -1
- package/lib/components/Scrollytelling/index.d.ts +14 -6
- package/lib/components/Scrollytelling/index.js +3 -3
- package/lib/components/Scrollytelling/index.js.map +1 -1
- package/lib/components/Table/TableBody.d.ts +4 -1
- package/lib/components/Table/TableBody.js +1 -1
- package/lib/components/Table/TableBody.js.map +1 -1
- package/lib/components/Table/TableCell.d.ts +4 -4
- package/lib/components/Table/TableCell.js +2 -2
- package/lib/components/Table/TableCell.js.map +1 -1
- package/lib/components/Table/index.d.ts +4 -1
- package/lib/components/Table/index.js +1 -1
- package/lib/components/Table/index.js.map +1 -1
- package/lib/components/Topper/Picture.d.ts +1 -1
- package/lib/components/Topper/Picture.js +6 -3
- package/lib/components/Topper/Picture.js.map +1 -1
- package/lib/components/Topper/index.js +7 -1
- package/lib/components/Topper/index.js.map +1 -1
- package/lib/components/Tweet/index.d.ts +5 -3
- package/lib/components/Tweet/index.js +1 -1
- package/lib/components/Tweet/index.js.map +1 -1
- package/lib/components/Video/index.d.ts +4 -2
- package/lib/components/Video/index.js +1 -1
- package/lib/components/Video/index.js.map +1 -1
- package/lib/components/Workarounds.d.ts +89 -0
- package/lib/components/Workarounds.js +3 -0
- package/lib/components/Workarounds.js.map +1 -0
- package/lib/components/YoutubeVideo/index.d.ts +5 -2
- package/lib/components/YoutubeVideo/index.js +1 -1
- package/lib/components/YoutubeVideo/index.js.map +1 -1
- package/lib/components/types.d.ts +5 -0
- package/lib/components/types.js +3 -0
- package/lib/components/types.js.map +1 -0
- package/lib/context.d.ts +14 -0
- package/lib/context.js +2 -1
- package/lib/context.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/stories/Clip.stories.d.ts +39 -243
- package/lib/stories/Clip.stories.js +320 -307
- package/lib/stories/Clip.stories.js.map +1 -1
- package/package.json +2 -1
- package/src/components/BigNumber/index.tsx +6 -3
- package/src/components/Body/__snapshots__/index.test.tsx.snap +2 -1
- package/src/components/Body/index.test.tsx +12 -1
- package/src/components/Byline/index.tsx +9 -4
- package/src/components/Clip/components/ClipTag.tsx +3 -6
- package/src/components/Clip/components/ClosedCaptions.tsx +2 -2
- package/src/components/Clip/components/VideoDescription.tsx +2 -2
- package/src/components/Clip/template/component.tsx +39 -41
- package/src/components/Clip/test/__snapshots__/snapshot.spec.tsx.snap +4 -8
- package/src/components/Clip/test/fixtures.ts +127 -90
- package/src/components/Clip/test/snapshot.spec.tsx +123 -102
- package/src/components/Flourish/index.tsx +10 -21
- package/src/components/Flourish/test/snapshot.spec.tsx +48 -36
- package/src/components/Heading/index.tsx +6 -5
- package/src/components/ImageOverrideWrappers/index.tsx +34 -0
- package/src/components/ImageSet/index.tsx +75 -55
- package/src/components/Layout/index.tsx +6 -18
- package/src/components/MainImage/index.tsx +10 -8
- package/src/components/Paragraph/index.tsx +4 -1
- package/src/components/Pullquote/index.tsx +15 -8
- package/src/components/Recommended/index.tsx +11 -11
- package/src/components/RichText/BasicComponents.tsx +22 -20
- package/src/components/RichText/index.tsx +35 -12
- package/src/components/Scrollytelling/ScrollyImage.tsx +10 -7
- package/src/components/Scrollytelling/index.tsx +19 -9
- package/src/components/Table/TableBody.tsx +7 -3
- package/src/components/Table/TableCell.tsx +9 -7
- package/src/components/Table/index.tsx +12 -9
- package/src/components/Topper/Picture.tsx +17 -12
- package/src/components/Topper/index.tsx +7 -4
- package/src/components/Tweet/index.tsx +5 -3
- package/src/components/Video/index.tsx +4 -6
- package/src/components/Workarounds.ts +190 -0
- package/src/components/YoutubeVideo/index.tsx +5 -4
- package/src/components/types.ts +6 -0
- package/src/context.ts +22 -1
- package/src/index.ts +4 -1
- package/src/stories/Clip.stories.tsx +357 -341
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React, { useEffect } from 'react'
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react'
|
|
3
|
+
|
|
2
4
|
import ClipServer from '../components/Clip'
|
|
3
5
|
import ClipClient from '../components/Clip/client'
|
|
4
6
|
import oTracking from '@financial-times/o-tracking/main'
|
|
@@ -11,12 +13,16 @@ export default {
|
|
|
11
13
|
component: ClipServer,
|
|
12
14
|
tags: ['autodocs'],
|
|
13
15
|
argTypes: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
content: {
|
|
17
|
+
dataLayout: {
|
|
18
|
+
options: ['in-line', 'full-grid', 'mid-grid'],
|
|
19
|
+
control: { type: 'radio' },
|
|
20
|
+
},
|
|
17
21
|
},
|
|
18
22
|
},
|
|
19
|
-
}
|
|
23
|
+
} satisfies Meta<typeof ClipServer>
|
|
24
|
+
|
|
25
|
+
type Story = StoryObj<typeof ClipServer>
|
|
20
26
|
|
|
21
27
|
const ArticleWrapper: React.FC<React.PropsWithChildren> = ({ children }) => {
|
|
22
28
|
return (
|
|
@@ -185,7 +191,7 @@ const ClipStory = (args: ClipProps) => {
|
|
|
185
191
|
)
|
|
186
192
|
}
|
|
187
193
|
|
|
188
|
-
export const Inline = (args: ClipProps) => {
|
|
194
|
+
export const Inline: Story = (args: ClipProps) => {
|
|
189
195
|
return <ClipStory {...args} />
|
|
190
196
|
}
|
|
191
197
|
|
|
@@ -249,350 +255,358 @@ const ThumbnailClipStory = (args: ClipProps) => {
|
|
|
249
255
|
|
|
250
256
|
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
251
257
|
Inline.args = {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
__typename: 'Clip',
|
|
272
|
-
format: 'standard-inline',
|
|
273
|
-
dataSource: [
|
|
274
|
-
{
|
|
275
|
-
audioCodec: 'aac',
|
|
276
|
-
binaryUrl:
|
|
277
|
-
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984330352240/640x640.mp4',
|
|
278
|
-
duration: 26250,
|
|
279
|
-
mediaType: 'video/mp4',
|
|
280
|
-
pixelHeight: 640,
|
|
281
|
-
pixelWidth: 640,
|
|
282
|
-
videoCodec: 'h264',
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
audioCodec: 'aac',
|
|
286
|
-
binaryUrl:
|
|
287
|
-
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984330352240/1280x1280.mp4',
|
|
288
|
-
duration: 26250,
|
|
289
|
-
mediaType: 'video/mp4',
|
|
290
|
-
pixelHeight: 1080,
|
|
291
|
-
pixelWidth: 1080,
|
|
292
|
-
videoCodec: 'h264',
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
audioCodec: 'aac',
|
|
296
|
-
binaryUrl:
|
|
297
|
-
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984330352240/1920x1920.mp4',
|
|
298
|
-
duration: 26250,
|
|
299
|
-
mediaType: 'video/mp4',
|
|
300
|
-
pixelHeight: 1080,
|
|
301
|
-
pixelWidth: 1080,
|
|
302
|
-
videoCodec: 'h264',
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
audioCodec: 'mp3',
|
|
306
|
-
binaryUrl:
|
|
307
|
-
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984330352240/0x0.mp3',
|
|
308
|
-
duration: 26280,
|
|
309
|
-
mediaType: 'audio/mpeg',
|
|
310
|
-
pixelHeight: null,
|
|
311
|
-
pixelWidth: null,
|
|
312
|
-
videoCodec: null,
|
|
313
|
-
},
|
|
314
|
-
],
|
|
315
|
-
poster:
|
|
316
|
-
'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fspark-clips-prod.s3.eu-west-1.amazonaws.com%2Fposter-images%2F440be423-1483-4243-8cd7-22ef8d003e70?source=cp-content-pipeline&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
317
|
-
},
|
|
318
|
-
],
|
|
319
|
-
accessibility: {
|
|
320
|
-
captions: [
|
|
258
|
+
content: {
|
|
259
|
+
type: 'clip-set',
|
|
260
|
+
autoplay: false,
|
|
261
|
+
loop: false,
|
|
262
|
+
muted: false,
|
|
263
|
+
dataLayout: 'in-line',
|
|
264
|
+
id: '16cd2e1c-5299-4f4c-be67-1620fd0bc396',
|
|
265
|
+
noAudio: null,
|
|
266
|
+
caption:
|
|
267
|
+
'Former US president Donald Trump speaks on airport tarmac after being booked at Fulton County jail',
|
|
268
|
+
credits: 'Reuters',
|
|
269
|
+
description:
|
|
270
|
+
'Former US president Donald Trump speaks on airport tarmac after being booked at Fulton County jail',
|
|
271
|
+
displayTitle: null,
|
|
272
|
+
contentWarning: [],
|
|
273
|
+
source: null,
|
|
274
|
+
subtitle: null,
|
|
275
|
+
publishedDate: '2023-10-30T10:54:19.210Z',
|
|
276
|
+
clips: [
|
|
321
277
|
{
|
|
322
|
-
|
|
323
|
-
|
|
278
|
+
format: 'standard-inline',
|
|
279
|
+
dataSource: [
|
|
280
|
+
{
|
|
281
|
+
audioCodec: 'aac',
|
|
282
|
+
binaryUrl:
|
|
283
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984330352240/640x640.mp4',
|
|
284
|
+
duration: 26250,
|
|
285
|
+
mediaType: 'video/mp4',
|
|
286
|
+
pixelHeight: 640,
|
|
287
|
+
pixelWidth: 640,
|
|
288
|
+
videoCodec: 'h264',
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
audioCodec: 'aac',
|
|
292
|
+
binaryUrl:
|
|
293
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984330352240/1280x1280.mp4',
|
|
294
|
+
duration: 26250,
|
|
295
|
+
mediaType: 'video/mp4',
|
|
296
|
+
pixelHeight: 1080,
|
|
297
|
+
pixelWidth: 1080,
|
|
298
|
+
videoCodec: 'h264',
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
audioCodec: 'aac',
|
|
302
|
+
binaryUrl:
|
|
303
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984330352240/1920x1920.mp4',
|
|
304
|
+
duration: 26250,
|
|
305
|
+
mediaType: 'video/mp4',
|
|
306
|
+
pixelHeight: 1080,
|
|
307
|
+
pixelWidth: 1080,
|
|
308
|
+
videoCodec: 'h264',
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
audioCodec: 'mp3',
|
|
312
|
+
binaryUrl:
|
|
313
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984330352240/0x0.mp3',
|
|
314
|
+
duration: 26280,
|
|
315
|
+
mediaType: 'audio/mpeg',
|
|
316
|
+
pixelHeight: null,
|
|
317
|
+
pixelWidth: null,
|
|
318
|
+
videoCodec: null,
|
|
319
|
+
},
|
|
320
|
+
],
|
|
321
|
+
poster:
|
|
322
|
+
'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fspark-clips-prod.s3.eu-west-1.amazonaws.com%2Fposter-images%2F440be423-1483-4243-8cd7-22ef8d003e70?source=cp-content-pipeline&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
324
323
|
},
|
|
325
324
|
],
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
325
|
+
accessibility: {
|
|
326
|
+
captions: [
|
|
327
|
+
{
|
|
328
|
+
url: 'https://next-media-api.ft.com/clips/captions/32069811',
|
|
329
|
+
mediaType: 'text/vtt',
|
|
330
|
+
},
|
|
331
|
+
],
|
|
332
|
+
transcript: {
|
|
333
|
+
source: 'transcript',
|
|
334
|
+
structured: {
|
|
335
|
+
tree: {
|
|
336
|
+
type: 'body',
|
|
337
|
+
version: 1,
|
|
338
|
+
children: [
|
|
339
|
+
{
|
|
340
|
+
type: 'paragraph',
|
|
341
|
+
children: [
|
|
342
|
+
{
|
|
343
|
+
type: 'text',
|
|
344
|
+
value:
|
|
345
|
+
"What has taken place here is a travesty of justice. We did nothing wrong. I did nothing wrong, and everybody knows it. I've never had such support, and that goes with the other ones, too. ",
|
|
346
|
+
},
|
|
347
|
+
],
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
type: 'paragraph',
|
|
351
|
+
children: [
|
|
352
|
+
{
|
|
353
|
+
type: 'text',
|
|
354
|
+
value:
|
|
355
|
+
"What they're doing is election interference. They're trying to interfere with an election. There's never been anything like it in our country before. ",
|
|
356
|
+
},
|
|
357
|
+
],
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
type: 'paragraph',
|
|
361
|
+
children: [
|
|
362
|
+
{
|
|
363
|
+
type: 'text',
|
|
364
|
+
value:
|
|
365
|
+
"This is their way of campaigning. And this is one instance, but you have three other instances. It's election interference. ",
|
|
366
|
+
},
|
|
367
|
+
],
|
|
368
|
+
},
|
|
369
|
+
],
|
|
370
|
+
},
|
|
364
371
|
},
|
|
365
372
|
},
|
|
366
373
|
},
|
|
367
374
|
},
|
|
368
375
|
}
|
|
369
376
|
|
|
370
|
-
export const InlineSquare = (args: ClipProps) => {
|
|
377
|
+
export const InlineSquare: Story = (args: ClipProps) => {
|
|
371
378
|
return <ClipStory {...args} />
|
|
372
379
|
}
|
|
373
380
|
InlineSquare.args = {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
381
|
+
content: {
|
|
382
|
+
type: 'clip-set',
|
|
383
|
+
autoplay: true,
|
|
384
|
+
loop: true,
|
|
385
|
+
muted: true,
|
|
386
|
+
dataLayout: 'in-line',
|
|
387
|
+
id: '44e42a16-4cb5-4cf0-b5c2-518f6366d21a',
|
|
388
|
+
noAudio: null,
|
|
389
|
+
caption: null,
|
|
390
|
+
credits: 'FT',
|
|
391
|
+
description: 'Open-air cooking over fire',
|
|
392
|
+
displayTitle: null,
|
|
393
|
+
contentWarning: [],
|
|
394
|
+
source: null,
|
|
395
|
+
subtitle: null,
|
|
396
|
+
publishedDate: '2024-01-03T17:26:32.057Z',
|
|
397
|
+
clips: [
|
|
398
|
+
{
|
|
399
|
+
format: 'standard-inline',
|
|
400
|
+
dataSource: [
|
|
401
|
+
{
|
|
402
|
+
audioCodec: 'aac',
|
|
403
|
+
binaryUrl:
|
|
404
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/17043027476580/1920x1920.mp4',
|
|
405
|
+
duration: 10975,
|
|
406
|
+
mediaType: 'video/mp4',
|
|
407
|
+
pixelHeight: 1080,
|
|
408
|
+
pixelWidth: 1080,
|
|
409
|
+
videoCodec: 'h264',
|
|
410
|
+
},
|
|
411
|
+
],
|
|
412
|
+
poster:
|
|
413
|
+
'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fspark-clips-prod.s3.eu-west-1.amazonaws.com%2Fposter-images%2F78a110c8-24ff-4ca7-95e2-097ec6a22428?source=cp-content-pipeline&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
414
|
+
},
|
|
415
|
+
],
|
|
416
|
+
accessibility: {
|
|
417
|
+
captions: [],
|
|
418
|
+
transcript: null,
|
|
406
419
|
},
|
|
407
|
-
],
|
|
408
|
-
accessibility: {
|
|
409
|
-
captions: [],
|
|
410
|
-
transcript: null,
|
|
411
420
|
},
|
|
412
421
|
}
|
|
413
422
|
|
|
414
|
-
export const InlineLandscape = (args: ClipProps) => {
|
|
423
|
+
export const InlineLandscape: Story = (args: ClipProps) => {
|
|
415
424
|
return <ClipStory {...args} />
|
|
416
425
|
}
|
|
417
426
|
InlineLandscape.args = {
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
'
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
},
|
|
433
|
-
],
|
|
434
|
-
},
|
|
435
|
-
clips: [
|
|
436
|
-
{
|
|
437
|
-
__typename: 'Clip',
|
|
438
|
-
format: 'standard-inline',
|
|
439
|
-
dataSource: [
|
|
440
|
-
{
|
|
441
|
-
audioCodec: 'aac',
|
|
442
|
-
binaryUrl:
|
|
443
|
-
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984336376570/640x360.mp4',
|
|
444
|
-
duration: 29514,
|
|
445
|
-
mediaType: 'video/mp4',
|
|
446
|
-
pixelHeight: 360,
|
|
447
|
-
pixelWidth: 640,
|
|
448
|
-
videoCodec: 'h264',
|
|
449
|
-
},
|
|
450
|
-
{
|
|
451
|
-
audioCodec: 'aac',
|
|
452
|
-
binaryUrl:
|
|
453
|
-
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984336376570/1280x720.mp4',
|
|
454
|
-
duration: 29514,
|
|
455
|
-
mediaType: 'video/mp4',
|
|
456
|
-
pixelHeight: 720,
|
|
457
|
-
pixelWidth: 1280,
|
|
458
|
-
videoCodec: 'h264',
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
audioCodec: 'aac',
|
|
462
|
-
binaryUrl:
|
|
463
|
-
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984336376570/1920x1080.mp4',
|
|
464
|
-
duration: 29514,
|
|
465
|
-
mediaType: 'video/mp4',
|
|
466
|
-
pixelHeight: 1080,
|
|
467
|
-
pixelWidth: 1920,
|
|
468
|
-
videoCodec: 'h264',
|
|
469
|
-
},
|
|
427
|
+
content: {
|
|
428
|
+
type: 'clip-set',
|
|
429
|
+
id: '',
|
|
430
|
+
autoplay: false,
|
|
431
|
+
loop: false,
|
|
432
|
+
muted: false,
|
|
433
|
+
credits: 'FT',
|
|
434
|
+
caption: 'Luxaviation chief Patrick Hansen',
|
|
435
|
+
dataLayout: 'in-line',
|
|
436
|
+
description:
|
|
437
|
+
'Luxaviation chief Patrick Hansen speaks at the FT’s Business of Luxury summit in Monaco',
|
|
438
|
+
noAudio: false,
|
|
439
|
+
accessibility: {
|
|
440
|
+
captions: [
|
|
470
441
|
{
|
|
471
|
-
|
|
472
|
-
binaryUrl:
|
|
473
|
-
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984336376570/0x0.mp3',
|
|
474
|
-
duration: 29544,
|
|
475
|
-
mediaType: 'audio/mpeg',
|
|
476
|
-
pixelHeight: null,
|
|
477
|
-
pixelWidth: null,
|
|
478
|
-
videoCodec: null,
|
|
442
|
+
url: 'https://next-media-api.ft.com/captions/16862228218010.vtt',
|
|
479
443
|
},
|
|
480
444
|
],
|
|
481
|
-
poster:
|
|
482
|
-
'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fspark-clips-prod.s3.eu-west-1.amazonaws.com%2Fposter-images%2F3fbe0b92-8018-4686-8387-eea9fab7e392?source=cp-content-pipeline&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
483
445
|
},
|
|
484
|
-
|
|
446
|
+
clips: [
|
|
447
|
+
{
|
|
448
|
+
format: 'standard-inline',
|
|
449
|
+
dataSource: [
|
|
450
|
+
{
|
|
451
|
+
audioCodec: 'aac',
|
|
452
|
+
binaryUrl:
|
|
453
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984336376570/640x360.mp4',
|
|
454
|
+
duration: 29514,
|
|
455
|
+
mediaType: 'video/mp4',
|
|
456
|
+
pixelHeight: 360,
|
|
457
|
+
pixelWidth: 640,
|
|
458
|
+
videoCodec: 'h264',
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
audioCodec: 'aac',
|
|
462
|
+
binaryUrl:
|
|
463
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984336376570/1280x720.mp4',
|
|
464
|
+
duration: 29514,
|
|
465
|
+
mediaType: 'video/mp4',
|
|
466
|
+
pixelHeight: 720,
|
|
467
|
+
pixelWidth: 1280,
|
|
468
|
+
videoCodec: 'h264',
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
audioCodec: 'aac',
|
|
472
|
+
binaryUrl:
|
|
473
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984336376570/1920x1080.mp4',
|
|
474
|
+
duration: 29514,
|
|
475
|
+
mediaType: 'video/mp4',
|
|
476
|
+
pixelHeight: 1080,
|
|
477
|
+
pixelWidth: 1920,
|
|
478
|
+
videoCodec: 'h264',
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
audioCodec: 'mp3',
|
|
482
|
+
binaryUrl:
|
|
483
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984336376570/0x0.mp3',
|
|
484
|
+
duration: 29544,
|
|
485
|
+
mediaType: 'audio/mpeg',
|
|
486
|
+
pixelHeight: null,
|
|
487
|
+
pixelWidth: null,
|
|
488
|
+
videoCodec: null,
|
|
489
|
+
},
|
|
490
|
+
],
|
|
491
|
+
poster:
|
|
492
|
+
'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fspark-clips-prod.s3.eu-west-1.amazonaws.com%2Fposter-images%2F3fbe0b92-8018-4686-8387-eea9fab7e392?source=cp-content-pipeline&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
493
|
+
},
|
|
494
|
+
],
|
|
495
|
+
},
|
|
485
496
|
}
|
|
486
497
|
|
|
487
|
-
export const InlineAutoplay = (args: ClipProps) => {
|
|
498
|
+
export const InlineAutoplay: Story = (args: ClipProps) => {
|
|
488
499
|
return <ClipStory {...args} />
|
|
489
500
|
}
|
|
490
501
|
|
|
491
502
|
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
492
503
|
InlineAutoplay.args = {
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
504
|
+
content: {
|
|
505
|
+
type: 'clip-set',
|
|
506
|
+
autoplay: true,
|
|
507
|
+
loop: true,
|
|
508
|
+
muted: true,
|
|
509
|
+
dataLayout: 'in-line',
|
|
510
|
+
id: '362347ce-f304-47ec-8078-cae042a2f490',
|
|
511
|
+
noAudio: null,
|
|
512
|
+
caption: "'Trace Pong' leaves a line behind the path of the ball",
|
|
513
|
+
credits: 'Courtesy of the artist',
|
|
514
|
+
description: "'Trace Pong' leaves a line behind the path of the ball",
|
|
515
|
+
displayTitle: null,
|
|
516
|
+
contentWarning: [],
|
|
517
|
+
source: null,
|
|
518
|
+
subtitle: null,
|
|
519
|
+
publishedDate: '2023-10-30T10:51:59.822Z',
|
|
520
|
+
clips: [
|
|
521
|
+
{
|
|
522
|
+
format: 'standard-inline',
|
|
523
|
+
dataSource: [
|
|
524
|
+
{
|
|
525
|
+
audioCodec: 'aac',
|
|
526
|
+
binaryUrl:
|
|
527
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984305828900/640x360.mp4',
|
|
528
|
+
duration: 24052,
|
|
529
|
+
mediaType: 'video/mp4',
|
|
530
|
+
pixelHeight: 360,
|
|
531
|
+
pixelWidth: 640,
|
|
532
|
+
videoCodec: 'h264',
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
audioCodec: 'aac',
|
|
536
|
+
binaryUrl:
|
|
537
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984305828900/1280x720.mp4',
|
|
538
|
+
duration: 24052,
|
|
539
|
+
mediaType: 'video/mp4',
|
|
540
|
+
pixelHeight: 720,
|
|
541
|
+
pixelWidth: 1280,
|
|
542
|
+
videoCodec: 'h264',
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
audioCodec: 'aac',
|
|
546
|
+
binaryUrl:
|
|
547
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984305828900/1920x1080.mp4',
|
|
548
|
+
duration: 24052,
|
|
549
|
+
mediaType: 'video/mp4',
|
|
550
|
+
pixelHeight: 1080,
|
|
551
|
+
pixelWidth: 1920,
|
|
552
|
+
videoCodec: 'h264',
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
audioCodec: 'mp3',
|
|
556
|
+
binaryUrl:
|
|
557
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/optimised-media-files/16984305828900/0x0.mp3',
|
|
558
|
+
duration: 24072,
|
|
559
|
+
mediaType: 'audio/mpeg',
|
|
560
|
+
pixelHeight: null,
|
|
561
|
+
pixelWidth: null,
|
|
562
|
+
videoCodec: null,
|
|
563
|
+
},
|
|
564
|
+
],
|
|
565
|
+
poster:
|
|
566
|
+
'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fspark-clips-prod.s3.eu-west-1.amazonaws.com%2Fposter-images%2Ff5ca5815-b40d-4dac-80b6-b8e764817685?source=cp-content-pipeline&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
567
|
+
},
|
|
568
|
+
],
|
|
569
|
+
accessibility: {
|
|
570
|
+
captions: [],
|
|
571
|
+
transcript: null,
|
|
556
572
|
},
|
|
557
|
-
],
|
|
558
|
-
accessibility: {
|
|
559
|
-
captions: [],
|
|
560
|
-
transcript: null,
|
|
561
573
|
},
|
|
562
574
|
}
|
|
563
575
|
|
|
564
|
-
export const NoDataSource = (args: ClipProps) => {
|
|
576
|
+
export const NoDataSource: Story = (args: ClipProps) => {
|
|
565
577
|
return <ClipStory {...args} />
|
|
566
578
|
}
|
|
567
579
|
|
|
568
580
|
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
569
581
|
NoDataSource.args = {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
582
|
+
content: {
|
|
583
|
+
type: 'clip-set',
|
|
584
|
+
autoplay: true,
|
|
585
|
+
loop: true,
|
|
586
|
+
muted: true,
|
|
587
|
+
dataLayout: 'in-line',
|
|
588
|
+
id: '362347ce-f304-47ec-8078-cae042a2f490',
|
|
589
|
+
noAudio: null,
|
|
590
|
+
caption: "'Trace Pong' leaves a line behind the path of the ball",
|
|
591
|
+
credits: 'Courtesy of the artist',
|
|
592
|
+
description: "'Trace Pong' leaves a line behind the path of the ball",
|
|
593
|
+
displayTitle: null,
|
|
594
|
+
contentWarning: [],
|
|
595
|
+
source: null,
|
|
596
|
+
subtitle: null,
|
|
597
|
+
publishedDate: '2023-10-30T10:51:59.822Z',
|
|
598
|
+
clips: [
|
|
599
|
+
{
|
|
600
|
+
format: 'standard-inline',
|
|
601
|
+
dataSource: [],
|
|
602
|
+
poster:
|
|
603
|
+
'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fspark-clips-prod.s3.eu-west-1.amazonaws.com%2Fposter-images%2Ff5ca5815-b40d-4dac-80b6-b8e764817685?source=cp-content-pipeline&fit=scale-down&quality=highest&width=700&dpr=1',
|
|
604
|
+
},
|
|
605
|
+
],
|
|
606
|
+
accessibility: {
|
|
607
|
+
captions: [],
|
|
608
|
+
transcript: null,
|
|
591
609
|
},
|
|
592
|
-
],
|
|
593
|
-
accessibility: {
|
|
594
|
-
captions: [],
|
|
595
|
-
transcript: null,
|
|
596
610
|
},
|
|
597
611
|
}
|
|
598
612
|
|
|
@@ -602,37 +616,39 @@ export const ThumbnailClip = (args: ClipProps) => {
|
|
|
602
616
|
|
|
603
617
|
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
604
618
|
ThumbnailClip.args = {
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
autoplay: true,
|
|
610
|
-
clips: [
|
|
611
|
-
{
|
|
612
|
-
dataSource: [
|
|
613
|
-
{
|
|
614
|
-
audioCodec: 'aac',
|
|
615
|
-
binaryUrl:
|
|
616
|
-
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/raw-media-files/17144958736710',
|
|
617
|
-
duration: 161012,
|
|
618
|
-
mediaType: 'video/mp4',
|
|
619
|
-
pixelHeight: 1080,
|
|
620
|
-
pixelWidth: 1920,
|
|
621
|
-
videoCodec: 'h264',
|
|
622
|
-
},
|
|
623
|
-
],
|
|
624
|
-
id: 'inline-1',
|
|
625
|
-
poster:
|
|
626
|
-
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/poster-images/e37aa9c0-69bd-4bd0-8874-c90f0a265894',
|
|
619
|
+
content: {
|
|
620
|
+
accessibility: {
|
|
621
|
+
captions: [],
|
|
622
|
+
transcript: null,
|
|
627
623
|
},
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
624
|
+
autoplay: true,
|
|
625
|
+
clips: [
|
|
626
|
+
{
|
|
627
|
+
dataSource: [
|
|
628
|
+
{
|
|
629
|
+
audioCodec: 'aac',
|
|
630
|
+
binaryUrl:
|
|
631
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/raw-media-files/17144958736710',
|
|
632
|
+
duration: 161012,
|
|
633
|
+
mediaType: 'video/mp4',
|
|
634
|
+
pixelHeight: 1080,
|
|
635
|
+
pixelWidth: 1920,
|
|
636
|
+
videoCodec: 'h264',
|
|
637
|
+
},
|
|
638
|
+
],
|
|
639
|
+
id: 'inline-1',
|
|
640
|
+
poster:
|
|
641
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/poster-images/e37aa9c0-69bd-4bd0-8874-c90f0a265894',
|
|
642
|
+
},
|
|
643
|
+
],
|
|
644
|
+
dataLayout: '',
|
|
645
|
+
id: '362347ce-f304-47ec-8078-cae042a2f490',
|
|
646
|
+
loop: true,
|
|
647
|
+
muted: true,
|
|
648
|
+
noAudio: null,
|
|
649
|
+
poster:
|
|
650
|
+
'https://spark-clips-prod.s3.eu-west-1.amazonaws.com/poster-images/e37aa9c0-69bd-4bd0-8874-c90f0a265894',
|
|
651
|
+
publishedDate: '2023-10-30T10:51:59.822Z',
|
|
652
|
+
type: 'clip-set',
|
|
653
|
+
},
|
|
638
654
|
}
|