@financial-times/cp-content-pipeline-ui 6.15.6 → 7.0.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 +15 -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 +4 -2
- 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 +88 -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 +4 -2
- package/src/components/Video/index.tsx +4 -6
- package/src/components/Workarounds.ts +188 -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
package/CHANGELOG.md
CHANGED
|
@@ -574,6 +574,21 @@
|
|
|
574
574
|
* @financial-times/cp-content-pipeline-client bumped from ^3.7.2 to ^3.7.3
|
|
575
575
|
* @financial-times/cp-content-pipeline-schema bumped from ^2.10.1 to ^2.10.2
|
|
576
576
|
|
|
577
|
+
## [7.0.0](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-ui-v6.15.6...cp-content-pipeline-ui-v7.0.0) (2024-08-27)
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
### ⚠ BREAKING CHANGES
|
|
581
|
+
|
|
582
|
+
* switch author-link node for author w/ concept field, populate from annotations via reference
|
|
583
|
+
* **ui:** pass content tree node data explicitly in content field
|
|
584
|
+
|
|
585
|
+
### Features
|
|
586
|
+
|
|
587
|
+
* return new byline reference data in article.graphql ([39ec54d](https://github.com/Financial-Times/cp-content-pipeline/commit/39ec54db2b24e8959b30ca22d2220a3ce50e4e58))
|
|
588
|
+
* switch author-link node for author w/ concept field, populate from annotations via reference ([d47de59](https://github.com/Financial-Times/cp-content-pipeline/commit/d47de591fe67afca00186618343aeeb7ded9f1d2))
|
|
589
|
+
* **ui:** ensure component props match reference types ([91f09f4](https://github.com/Financial-Times/cp-content-pipeline/commit/91f09f498dbab106c87a8db2355d493560a167f4))
|
|
590
|
+
* **ui:** pass content tree node data explicitly in content field ([7deb144](https://github.com/Financial-Times/cp-content-pipeline/commit/7deb144e9e9c4fc8d69c7bbcd47947177d4219f1))
|
|
591
|
+
|
|
577
592
|
## [6.15.6](https://github.com/Financial-Times/cp-content-pipeline/compare/cp-content-pipeline-ui-v6.15.5...cp-content-pipeline-ui-v6.15.6) (2024-08-21)
|
|
578
593
|
|
|
579
594
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ContentTree } from '@financial-times/content-tree';
|
|
3
|
+
import { ContentProps } from '../types';
|
|
4
|
+
interface BigNumberProps extends ContentProps<ContentTree.BigNumber> {
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* Renders a BigNumber component
|
|
5
8
|
*/
|
|
6
|
-
declare const BigNumber: React.FC<
|
|
9
|
+
declare const BigNumber: React.FC<BigNumberProps>;
|
|
7
10
|
export default BigNumber;
|
|
@@ -7,7 +7,7 @@ const react_1 = __importDefault(require("react"));
|
|
|
7
7
|
/**
|
|
8
8
|
* Renders a BigNumber component
|
|
9
9
|
*/
|
|
10
|
-
const BigNumber = ({ description, number, }) => {
|
|
10
|
+
const BigNumber = ({ content: { description, number }, }) => {
|
|
11
11
|
return (react_1.default.createElement("div", { className: "n-content-big-number" },
|
|
12
12
|
react_1.default.createElement("span", { className: "n-content-big-number__title" }, number),
|
|
13
13
|
react_1.default.createElement("span", { className: "n-content-big-number__content" }, description)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/BigNumber/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/BigNumber/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AAQzB;;GAEG;AACH,MAAM,SAAS,GAA6B,CAAC,EAC3C,OAAO,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,GACjC,EAAE,EAAE;IACH,OAAO,CACL,uCAAK,SAAS,EAAC,sBAAsB;QACnC,wCAAM,SAAS,EAAC,6BAA6B,IAAE,MAAM,CAAQ;QAC7D,wCAAM,SAAS,EAAC,+BAA+B,IAAE,WAAW,CAAQ,CAChE,CACP,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,SAAS,CAAA"}
|
|
@@ -13,8 +13,10 @@ const baseContent = {
|
|
|
13
13
|
url: 'https://www.ft.com/content/00000000-0000-0000-0000-000000000000',
|
|
14
14
|
publishedDate: '2024-06-11T14:13:25.527Z',
|
|
15
15
|
publishedTimestamp: 1718115205527,
|
|
16
|
+
modifiedTimestamp: 1718115318431,
|
|
16
17
|
publishReference: 'asdfghjkl',
|
|
17
18
|
firstPublishedDate: '2024-06-11T14:13:25.527Z',
|
|
19
|
+
annotations: [],
|
|
18
20
|
body: {
|
|
19
21
|
structured: {
|
|
20
22
|
tree: {
|
|
@@ -50,8 +52,16 @@ const extraContentForType = {
|
|
|
50
52
|
__typename: 'ContentPackage',
|
|
51
53
|
contains: [
|
|
52
54
|
{
|
|
53
|
-
|
|
55
|
+
id: '00000000-0000-0000-0000-000000000000',
|
|
54
56
|
url: 'https://www.ft.com/content/00000000-0000-0000-0000-000000000000',
|
|
57
|
+
type: 'article',
|
|
58
|
+
title: 'teaser',
|
|
59
|
+
publishedDate: '1970-01-01T00:00:00Z',
|
|
60
|
+
firstPublishedDate: '1970-01-01T00:00:00Z',
|
|
61
|
+
metaPrefixText: 'Analysis',
|
|
62
|
+
indicators: {
|
|
63
|
+
accessLevel: 'subscribed',
|
|
64
|
+
},
|
|
55
65
|
relativeUrl: '/content/00000000-0000-0000-0000-000000000000',
|
|
56
66
|
},
|
|
57
67
|
],
|
|
@@ -63,6 +73,7 @@ const extraContentForType = {
|
|
|
63
73
|
...baseContent,
|
|
64
74
|
__typename: 'LiveBlogPost',
|
|
65
75
|
title: 'live post 1',
|
|
76
|
+
authors: [],
|
|
66
77
|
},
|
|
67
78
|
],
|
|
68
79
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/components/Body/index.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,kDAA+C;AAC/C,yCAAgD;AAGhD,MAAM,WAAW,GAA4B;IAC3C,UAAU,EAAE,SAAS;IACrB,KAAK,EAAE,OAAO;IACd,EAAE,EAAE,sCAAsC;IAC1C,GAAG,EAAE,iEAAiE;IACtE,aAAa,EAAE,0BAA0B;IACzC,kBAAkB,EAAE,aAAa;IACjC,gBAAgB,EAAE,WAAW;IAC7B,kBAAkB,EAAE,0BAA0B;IAC9C,IAAI,EAAE;QACJ,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,CAAC;gBACV,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,WAAW;wBACjB,QAAQ,EAAE;4BACR;gCACE,IAAI,EAAE,MAAM;gCACZ,KAAK,EAAE,4BAA4B;6BACpC;yBACF;qBACF;iBACF;aACF;YACD,UAAU,EAAE,EAAE;SACf;KACF;CACF,CAAA;AAED,MAAM,mBAAmB,GAKrB;IACF,KAAK,EAAE;QACL,UAAU,EAAE,OAAO;QACnB,KAAK,EAAE;YACL;gBACE,SAAS,EAAE,YAAY;gBACvB,GAAG,EAAE,iFAAiF;aACvF;SACF;KACF;IACD,cAAc,EAAE;QACd,UAAU,EAAE,gBAAgB;QAC5B,QAAQ,EAAE;YACR;gBACE,
|
|
1
|
+
{"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../../src/components/Body/index.test.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,kDAA+C;AAC/C,yCAAgD;AAGhD,MAAM,WAAW,GAA4B;IAC3C,UAAU,EAAE,SAAS;IACrB,KAAK,EAAE,OAAO;IACd,EAAE,EAAE,sCAAsC;IAC1C,GAAG,E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,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -5,9 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const RichText_1 = __importDefault(require("../RichText"));
|
|
8
|
-
const AuthorLink = (props) => props.
|
|
8
|
+
const AuthorLink = (props) => props.content.concept ? (react_1.default.createElement("a", { className: "n-content-tag--author", href: props.content.concept.relativeUrl, "data-trackable": "author", target: "_blank" }, props.children)) : null;
|
|
9
9
|
const bylineComponents = {
|
|
10
|
-
|
|
10
|
+
author: AuthorLink,
|
|
11
11
|
};
|
|
12
12
|
const Byline = ({ structuredContent, showEditedBy }) => {
|
|
13
13
|
return (react_1.default.createElement("p", { className: "article-info__byline" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Byline/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAgD;AAGhD,2DAAkC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Byline/index.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAgD;AAGhD,2DAAkC;AAYlC,MAAM,UAAU,GAAiD,CAAC,KAAK,EAAE,EAAE,CACzE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CACtB,qCACE,SAAS,EAAC,uBAAuB,EACjC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,oBACxB,QAAQ,EACvB,MAAM,EAAC,QAAQ,IAEd,KAAK,CAAC,QAAQ,CACb,CACL,CAAC,CAAC,CAAC,IAAI,CAAA;AAEV,MAAM,gBAAgB,GAAG;IACvB,MAAM,EAAE,UAAU;CACnB,CAAA;AAED,MAAM,MAAM,GAA0B,CAAC,EAAE,iBAAiB,EAAE,YAAY,EAAE,EAAE,EAAE;IAC5E,OAAO,CACL,qCAAG,SAAS,EAAC,sBAAsB;QAChC,YAAY,IAAI,CACf;;YACY,yCAAM,CACX,CACR;QACA,OAAO,iBAAiB,KAAK,QAAQ,CAAC,CAAC,CAAC,CACvC,8DAAG,iBAAiB,CAAI,CACzB,CAAC,CAAC,CAAC,CACF,8BAAC,kBAAQ,IACP,iBAAiB,EAAE,iBAAiB,EACpC,UAAU,EAAE,gBAAgB,GAC5B,CACH,CACC,CACL,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,MAAM,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import type * as ComponentWorkarounds from '../../Workarounds';
|
|
3
3
|
interface ClipTagProps {
|
|
4
4
|
id?: string;
|
|
5
|
-
clip: Clip;
|
|
5
|
+
clip: ComponentWorkarounds.Clip;
|
|
6
6
|
dataLayout?: string;
|
|
7
7
|
dataTrackable?: string;
|
|
8
8
|
description?: string;
|
|
@@ -14,7 +14,7 @@ interface ClipTagProps {
|
|
|
14
14
|
noInfoBox?: boolean;
|
|
15
15
|
noCaption?: boolean;
|
|
16
16
|
noClosedCaption?: boolean;
|
|
17
|
-
accessibility?:
|
|
17
|
+
accessibility?: ComponentWorkarounds.ClipAccessibility;
|
|
18
18
|
muted?: boolean;
|
|
19
19
|
credits?: string;
|
|
20
20
|
caption?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClipTag.js","sourceRoot":"","sources":["../../../../src/components/Clip/components/ClipTag.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,mCAKgB;
|
|
1
|
+
{"version":3,"file":"ClipTag.js","sourceRoot":"","sources":["../../../../src/components/Clip/components/ClipTag.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,mCAKgB;AAChB,8EAA0E;AAwBnE,MAAM,OAAO,GAA2B,CAAC,EAC9C,EAAE,EACF,UAAU,EACV,WAAW,EACX,MAAM,EACN,QAA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,EAAE,gBAAgB,KAAK,IAAI,EAAE,EAAE,uBACf,uBAAuB,EACzC,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,SAAS,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAC9C,GAAG,EAAE,SAAS,GACN,CACX,CAAA;gBACH,CAAC,CAAC;gBACF,8BAAC,sBAAc,IAAC,aAAa,EAAE,aAAa,GAAI,CAC/B,CACf;QACL,CAAC,CAAC,aAAa,IAAI,CAAC,SAAS,CAAC,IAAI,CACjC,uCAAK,SAAS,EAAC,0BAA0B;YACtC,CAAC,aAAa,IAAI,CACjB,8BAAC,wBAAgB,IACf,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,GAC5B,CACH;YACA,CAAC,SAAS,IAAI,8BAAC,eAAO,IAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAI,CAC1D,CACP,CACG,CACP,CAAA;AACH,CAAC,CAAA;AAtFY,QAAA,OAAO,WAsFnB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import type * as ComponentWorkarounds from '../../Workarounds';
|
|
3
3
|
interface ClosedCaptionsProps {
|
|
4
|
-
accessibility?:
|
|
4
|
+
accessibility?: ComponentWorkarounds.ClipAccessibility;
|
|
5
5
|
}
|
|
6
6
|
export declare const ClosedCaptions: React.FC<ClosedCaptionsProps>;
|
|
7
7
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import type * as ComponentWorkarounds from '../../Workarounds';
|
|
3
3
|
interface VideoDescriptionProps {
|
|
4
4
|
description?: string;
|
|
5
|
-
accessibility?:
|
|
5
|
+
accessibility?: ComponentWorkarounds.ClipAccessibility;
|
|
6
6
|
}
|
|
7
7
|
export declare const VideoDescription: React.FC<VideoDescriptionProps>;
|
|
8
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VideoDescription.js","sourceRoot":"","sources":["../../../../src/components/Clip/components/VideoDescription.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;
|
|
1
|
+
{"version":3,"file":"VideoDescription.js","sourceRoot":"","sources":["../../../../src/components/Clip/components/VideoDescription.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAyC;AACzC,qEAAoD;AAQ7C,MAAM,gBAAgB,GAAoC,CAAC,EAChE,WAAW,EACX,aAAa,GACd,EAAE,EAAE;IACH,MAAM,iBAAiB,GAAG,IAAA,kBAAU,EAAC,iBAAe,CAAC,CAAA;IAErD,IAAI,CAAC,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW;QAAE,OAAO,6DAAK,CAAA;IAE5D,MAAM,KAAK,GAAG,SAAS,WAAW,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,EAAE,CAAA;IAEnE,OAAO,CACL,2DACmB,YAAY,EAC7B,SAAS,EAAC,wCAAwC,+BACxB,QAAQ,oBACnB,iBAAiB,2CACM,yEAAyE,0CAC1E,yEAAyE;QAE9G,4DAAuB,mBAAmB,EAAC,SAAS,EAAC,oBAAoB;YACvE,wCAAM,SAAS,EAAC,6BAA6B,6BAEtC,CACA;QAER,WAAW,IAAI,aAAa,EAAE,UAAU,IAAI,CAC3C,uCAAK,SAAS,EAAC,qBAAqB;YAClC,uCAAK,SAAS,EAAC,yBAAyB;gBACtC;oBACE,0CACE,EAAE,EAAC,oBAAoB,EACvB,SAAS,EAAC,4CAA4C,wBAG/C;oBACT,0CACE,EAAE,EAAC,mBAAmB,EACtB,SAAS,EAAC,oCAAoC,iBAGvC,CACJ,CACH;YAEN,uCAAK,SAAS,EAAC,mBAAmB,EAAC,EAAE,EAAC,iBAAiB;gBACrD,qCAAG,SAAS,EAAC,yBAAyB,IAAE,WAAW,CAAK,CACpD;YAEN,uCAAK,SAAS,EAAC,mBAAmB,EAAC,EAAE,EAAC,gBAAgB;gBACpD,uCAAK,SAAS,EAAC,yBAAyB;oBACtC,8BAAC,iBAAiB,IAChB,iBAAiB,EAAE,aAAa,CAAC,UAAU,CAAC,UAAU,GACtD,CACE,CACF,CACF,CACP;QAEA,CAAC,CAAC,WAAW,IAAI,CAAC,aAAa,EAAE,UAAU,CAAC,IAAI,CAC/C,uCAAK,SAAS,EAAC,qBAAqB;YAClC,uCAAK,SAAS,EAAC,mBAAmB;gBAChC,sCAAI,SAAS,EAAC,0BAA0B,IAAE,KAAK,CAAM;gBACpD,WAAW,IAAI,CACd,qCAAG,SAAS,EAAC,yBAAyB,IAAE,WAAW,CAAK,CACzD;gBACA,aAAa,EAAE,UAAU,IAAI,CAC5B,uCAAK,SAAS,EAAC,oCAAoC;oBACjD,8BAAC,iBAAiB,IAChB,iBAAiB,EAAE,aAAa,CAAC,UAAU,CAAC,UAAU,GACtD,CACE,CACP,CACG,CACF,CACP,CACG,CACP,CAAA;AACH,CAAC,CAAA;AA7EY,QAAA,gBAAgB,oBA6E5B"}
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { ContentProps } from '../../types';
|
|
3
|
+
import type * as ComponentWorkarounds from '../../Workarounds';
|
|
3
4
|
type Preset = 'full-player' | 'thumbnail';
|
|
4
|
-
export interface ClipProps {
|
|
5
|
+
export interface ClipProps extends ContentProps<ComponentWorkarounds.ClipSet> {
|
|
6
|
+
preload?: string;
|
|
7
|
+
preset?: Preset;
|
|
8
|
+
}
|
|
9
|
+
export interface ClipPropsOld {
|
|
5
10
|
url?: string;
|
|
6
11
|
id?: string;
|
|
7
12
|
autoplay?: boolean;
|
|
8
13
|
loop?: boolean;
|
|
9
14
|
credits?: string;
|
|
10
|
-
clips?: Clip[];
|
|
15
|
+
clips?: ComponentWorkarounds.Clip[];
|
|
11
16
|
poster?: string;
|
|
12
17
|
posterAlt?: string;
|
|
13
18
|
dataLayout: string;
|
|
@@ -15,7 +20,7 @@ export interface ClipProps {
|
|
|
15
20
|
muted?: boolean;
|
|
16
21
|
caption?: string;
|
|
17
22
|
noAudio?: boolean;
|
|
18
|
-
accessibility?:
|
|
23
|
+
accessibility?: ComponentWorkarounds.ClipAccessibility;
|
|
19
24
|
preload?: string;
|
|
20
25
|
preset?: Preset;
|
|
21
26
|
}
|
|
@@ -5,36 +5,41 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const components_1 = require("../components");
|
|
8
|
-
const ClipComponent = ({
|
|
8
|
+
const ClipComponent = ({ content, preset = 'full-player', preload = 'auto', }) => {
|
|
9
|
+
let poster = 'poster' in content ? content.poster : '';
|
|
10
|
+
let id;
|
|
9
11
|
// We support currently a single clip, with multiple sources.
|
|
10
|
-
let clip
|
|
12
|
+
let clip;
|
|
11
13
|
// V2 has an array of clips
|
|
12
|
-
if (clips && clips[0]) {
|
|
13
|
-
clip = clips[0];
|
|
14
|
-
|
|
14
|
+
if (content.clips && content.clips[0]) {
|
|
15
|
+
clip = content.clips[0];
|
|
16
|
+
id = 'id' in content ? content.id : '';
|
|
17
|
+
if (clip.poster) {
|
|
18
|
+
poster = clip.poster;
|
|
19
|
+
}
|
|
15
20
|
}
|
|
16
21
|
else {
|
|
17
22
|
// Create a V1 compatible clip
|
|
18
|
-
id = url
|
|
23
|
+
id = 'url' in content ? content.url : '';
|
|
19
24
|
clip = {
|
|
20
|
-
type: '',
|
|
21
|
-
id: id ?? '',
|
|
22
25
|
dataSource: [
|
|
23
26
|
{
|
|
24
|
-
binaryUrl:
|
|
27
|
+
binaryUrl: id ?? '',
|
|
25
28
|
// V1 supports only mp4.
|
|
26
29
|
mediaType: 'video/mp4',
|
|
27
30
|
},
|
|
28
31
|
],
|
|
29
32
|
};
|
|
30
33
|
}
|
|
31
|
-
const posterAttribute = clip?.dataSource?.length && autoplay ? '' : poster;
|
|
34
|
+
const posterAttribute = clip?.dataSource?.length && content.autoplay ? '' : poster;
|
|
35
|
+
const noAudio = content.noAudio ?? false;
|
|
36
|
+
const accessibility = content.accessibility ?? {};
|
|
32
37
|
if (preset === 'thumbnail') {
|
|
33
|
-
return (react_1.default.createElement(components_1.ClipTag, { id: id, clip: clip, poster: poster, accessibility: accessibility, autoplay: autoplay, loop: loop, noAudio: noAudio, muted: muted, preload: preload, noCaption: true, noDescription: true, noInfoBox: true }));
|
|
38
|
+
return (react_1.default.createElement(components_1.ClipTag, { id: id, clip: clip, poster: poster, accessibility: accessibility, autoplay: content.autoplay, loop: content.loop, noAudio: noAudio, muted: content.muted, preload: preload, noCaption: true, noDescription: true, noInfoBox: true }));
|
|
34
39
|
}
|
|
35
|
-
return (react_1.default.createElement(components_1.ContentLayout, { dataLayout: dataLayout },
|
|
36
|
-
react_1.default.createElement(components_1.Container, { dataLayout: dataLayout },
|
|
37
|
-
react_1.default.createElement(components_1.ClipTag, { id: id, dataLayout: dataLayout, description: description, poster: posterAttribute, autoplay: autoplay, noAudio: noAudio, loop: loop, muted: muted, clip: clip, credits: credits, caption: caption, accessibility: accessibility, preload: preload, dataTrackable: "next-article-cp-clip" }))));
|
|
40
|
+
return (react_1.default.createElement(components_1.ContentLayout, { dataLayout: content.dataLayout },
|
|
41
|
+
react_1.default.createElement(components_1.Container, { dataLayout: content.dataLayout },
|
|
42
|
+
react_1.default.createElement(components_1.ClipTag, { id: id, dataLayout: content.dataLayout, description: content.description ?? '', poster: posterAttribute, autoplay: content.autoplay, noAudio: noAudio, loop: content.loop, muted: content.muted, clip: clip, credits: content.credits ?? '', caption: content.caption ?? '', accessibility: accessibility, preload: preload, dataTrackable: "next-article-cp-clip" }))));
|
|
38
43
|
};
|
|
39
44
|
exports.default = ClipComponent;
|
|
40
45
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/components/Clip/template/component.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/components/Clip/template/component.tsx"],"names":[],"mappings":";;;;;AAAA,kDAAyB;AACzB,8CAAiE;AA+BjE,MAAM,aAAa,GAAwB,CAAC,EAC1C,OAAO,EACP,MAAM,GAAG,aAAa,EACtB,OAAO,GAAG,MAAM,GACjB,EAAE,EAAE;IACH,IAAI,MAAM,GAAG,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;IACtD,IAAI,EAAU,CAAA;IACd,6DAA6D;IAC7D,IAAI,IAA+B,CAAA;IACnC,2BAA2B;IAC3B,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QACtC,IAAI,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QACvB,EAAE,GAAG,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAA;QACtC,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;QACtB,CAAC;IACH,CAAC;SAAM,CAAC;QACN,8BAA8B;QAC9B,EAAE,GAAG,KAAK,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAA;QACxC,IAAI,GAAG;YACL,UAAU,EAAE;gBACV;oBACE,SAAS,EAAE,EAAE,IAAI,EAAE;oBACnB,wBAAwB;oBACxB,SAAS,EAAE,WAAW;iBACvB;aACF;SACF,CAAA;IACH,CAAC;IAED,MAAM,eAAe,GACnB,IAAI,EAAE,UAAU,EAAE,MAAM,IAAI,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE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10,94 +10,131 @@ if (typeof global.TextEncoder === 'undefined') {
|
|
|
10
10
|
}
|
|
11
11
|
const index_1 = __importDefault(require("../template/index"));
|
|
12
12
|
exports.inlineVideo = (0, index_1.default)({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
content: {
|
|
14
|
+
type: 'clip',
|
|
15
|
+
id: '',
|
|
16
|
+
dataLayout: 'in-line',
|
|
17
|
+
url: 'https://d1e00ek4ebabms.cloudfront.net/production/84d7e1b0-e8b2-4ffc-a798-306f29dc9d52.png',
|
|
18
|
+
description: ' Dolor sit amet, consectetur adipiscing elit. Sed sit amet odio quis ante auctor dapibus. Sed dapibus cursus nisi, tincidunt sagittis sapien vehicula vitae.',
|
|
19
|
+
poster: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fd1e00ek4ebabms.cloudfront.net%2Fproduction%2F84d7e1b0-e8b2-4ffc-a798-306f29dc9d52.png?fit=scale-down&source=next&width=700',
|
|
20
|
+
posterAlt: '',
|
|
21
|
+
posterCredits: '',
|
|
22
|
+
caption: 'Aenean lobortis volutpat nunc vitae elementum',
|
|
23
|
+
autoplay: false,
|
|
24
|
+
muted: false,
|
|
25
|
+
loop: false,
|
|
26
|
+
credits: '',
|
|
27
|
+
},
|
|
18
28
|
});
|
|
19
29
|
exports.inlineVideoAutoplay = (0, index_1.default)({
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
content: {
|
|
31
|
+
type: 'clip',
|
|
32
|
+
id: '',
|
|
33
|
+
dataLayout: 'in-line',
|
|
34
|
+
url: 'https://d1e00ek4ebabms.cloudfront.net/production/84d7e1b0-e8b2-4ffc-a798-306f29dc9d52.png',
|
|
35
|
+
description: ' Dolor sit amet, consectetur adipiscing elit. Sed sit amet odio quis ante auctor dapibus. Sed dapibus cursus nisi, tincidunt sagittis sapien vehicula vitae.',
|
|
36
|
+
poster: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fd1e00ek4ebabms.cloudfront.net%2Fproduction%2F84d7e1b0-e8b2-4ffc-a798-306f29dc9d52.png?fit=scale-down&source=next&width=700',
|
|
37
|
+
posterAlt: '',
|
|
38
|
+
posterCredits: '',
|
|
39
|
+
caption: 'Aenean lobortis volutpat nunc vitae elementum',
|
|
40
|
+
autoplay: true,
|
|
41
|
+
muted: true,
|
|
42
|
+
loop: true,
|
|
43
|
+
credits: 'Copyright Line',
|
|
44
|
+
accessibility: {
|
|
45
|
+
captions: [
|
|
46
|
+
{
|
|
47
|
+
url: 'https://next-media-api.ft.com/captions/16862228218010.vtt',
|
|
48
|
+
},
|
|
49
|
+
],
|
|
50
|
+
},
|
|
35
51
|
},
|
|
36
52
|
});
|
|
37
53
|
exports.inlineVideoNoAudio = (0, index_1.default)({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
content: {
|
|
55
|
+
type: 'clip',
|
|
56
|
+
id: '',
|
|
57
|
+
dataLayout: 'in-line',
|
|
58
|
+
url: 'https://d1e00ek4ebabms.cloudfront.net/production/84d7e1b0-e8b2-4ffc-a798-306f29dc9d52.png',
|
|
59
|
+
description: ' Dolor sit amet, consectetur adipiscing elit. Sed sit amet odio quis ante auctor dapibus. Sed dapibus cursus nisi, tincidunt sagittis sapien vehicula vitae.',
|
|
60
|
+
poster: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fd1e00ek4ebabms.cloudfront.net%2Fproduction%2F84d7e1b0-e8b2-4ffc-a798-306f29dc9d52.png?fit=scale-down&source=next&width=700',
|
|
61
|
+
posterAlt: '',
|
|
62
|
+
posterCredits: '',
|
|
63
|
+
caption: 'Aenean lobortis volutpat nunc vitae elementum',
|
|
64
|
+
autoplay: true,
|
|
65
|
+
muted: true,
|
|
66
|
+
loop: true,
|
|
67
|
+
credits: 'Copyright Line',
|
|
68
|
+
accessibility: {
|
|
69
|
+
captions: [
|
|
70
|
+
{
|
|
71
|
+
url: 'https://next-media-api.ft.com/captions/16862228218010.vtt',
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
noAudio: true,
|
|
54
76
|
},
|
|
55
77
|
});
|
|
56
78
|
exports.teaserClipWithoutExpander = (0, index_1.default)({
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
79
|
+
content: {
|
|
80
|
+
type: 'clip',
|
|
81
|
+
id: '',
|
|
82
|
+
dataLayout: 'in-line',
|
|
83
|
+
url: 'https://d1e00ek4ebabms.cloudfront.net/production/84d7e1b0-e8b2-4ffc-a798-306f29dc9d52.png',
|
|
84
|
+
description: '',
|
|
85
|
+
poster: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fd1e00ek4ebabms.cloudfront.net%2Fproduction%2F84d7e1b0-e8b2-4ffc-a798-306f29dc9d52.png?fit=scale-down&source=next&width=700',
|
|
86
|
+
posterAlt: '',
|
|
87
|
+
posterCredits: '',
|
|
88
|
+
caption: '',
|
|
89
|
+
autoplay: false,
|
|
90
|
+
muted: false,
|
|
91
|
+
loop: false,
|
|
92
|
+
credits: '',
|
|
93
|
+
},
|
|
62
94
|
preset: 'thumbnail',
|
|
63
95
|
});
|
|
64
96
|
exports.teaserClipWithMultipleSources = (0, index_1.default)({
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
97
|
+
content: {
|
|
98
|
+
type: 'clip',
|
|
99
|
+
id: '',
|
|
100
|
+
url: '',
|
|
101
|
+
dataLayout: 'in-line',
|
|
102
|
+
description: ' Dolor sit amet, consectetur adipiscing elit. Sed sit amet odio quis ante auctor dapibus. Sed dapibus cursus nisi, tincidunt sagittis sapien vehicula vitae.',
|
|
103
|
+
poster: 'https://www.ft.com/__origami/service/image/v2/images/raw/https%3A%2F%2Fd1e00ek4ebabms.cloudfront.net%2Fproduction%2F84d7e1b0-e8b2-4ffc-a798-306f29dc9d52.png?fit=scale-down&source=next&width=700',
|
|
104
|
+
posterAlt: '',
|
|
105
|
+
posterCredits: '',
|
|
106
|
+
caption: 'Aenean lobortis volutpat nunc vitae elementum',
|
|
107
|
+
autoplay: true,
|
|
108
|
+
muted: true,
|
|
109
|
+
loop: true,
|
|
110
|
+
credits: 'Copyright Line',
|
|
111
|
+
clips: [
|
|
112
|
+
{
|
|
113
|
+
dataSource: [
|
|
114
|
+
{
|
|
115
|
+
binaryUrl: 'https://spark-clips-staging.s3.eu-west-1.amazonaws.com/raw-media-files/17018837600780',
|
|
116
|
+
mediaType: 'video/mp4',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
binaryUrl: 'https://ark-clips-staging.s3.eu-west-1.amazonaws.com/raw-media-files/17018837600780',
|
|
120
|
+
mediaType: 'video/mp4',
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
binaryUrl: 'https://k-clips-staging.s3.eu-west-1.amazonaws.com/raw-media-files/17018837600780',
|
|
124
|
+
mediaType: 'video/mp4',
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
dataSource: [
|
|
130
|
+
{
|
|
131
|
+
binaryUrl: 'https://ark-clips-staging.s3.eu-west-1.amazonaws.com/raw-media-files/17018837600780',
|
|
132
|
+
mediaType: 'video/mp4',
|
|
133
|
+
},
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
},
|
|
72
138
|
preload: 'none',
|
|
73
|
-
credits: 'Copyright Line',
|
|
74
|
-
clips: [
|
|
75
|
-
{
|
|
76
|
-
dataSource: [
|
|
77
|
-
{
|
|
78
|
-
binaryUrl: 'https://spark-clips-staging.s3.eu-west-1.amazonaws.com/raw-media-files/17018837600780',
|
|
79
|
-
mediaType: 'video/mp4',
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
binaryUrl: 'https://ark-clips-staging.s3.eu-west-1.amazonaws.com/raw-media-files/17018837600780',
|
|
83
|
-
mediaType: 'video/mp4',
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
binaryUrl: 'https://k-clips-staging.s3.eu-west-1.amazonaws.com/raw-media-files/17018837600780',
|
|
87
|
-
mediaType: 'video/mp4',
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
id: 'inline-1',
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
dataSource: [
|
|
94
|
-
{
|
|
95
|
-
binaryUrl: 'https://ark-clips-staging.s3.eu-west-1.amazonaws.com/raw-media-files/17018837600780',
|
|
96
|
-
mediaType: 'video/mp4',
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
id: 'inline-2',
|
|
100
|
-
},
|
|
101
|
-
],
|
|
102
139
|
});
|
|
103
140
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../../src/components/Clip/test/fixtures.ts"],"names":[],"mappings":";;;;;;AAAA,+BAAkC;AAClC,IAAI,OAAO,MAAM,CAAC,WAAW,KAAK,WAAW,EAAE,CAAC;IAC9C,MAAM,CAAC,WAAW,GAAG,kBAAW,CAAA;AAClC,CAAC;AACD,8DAAoC;AAEvB,QAAA,WAAW,GAAG,IAAA,eAAI,EAAC;IAC9B,UAAU,EAAE,SAAS;
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../../src/components/Clip/test/fixtures.ts"],"names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