@arc-ui/community-components 3.2.0 → 3.4.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/.turbo/turbo-build.log +133 -13
- package/CHANGELOG.md +31 -0
- package/lib/Accordion/Accordion.cjs +2 -3
- package/lib/Accordion/Accordion.mjs +2 -3
- package/lib/ActionTile/ActionTile.cjs +4 -5
- package/lib/ActionTile/ActionTile.mjs +10 -11
- package/lib/ActionTile/styles.css +1 -1
- package/lib/ArticleSidebar/ArticleSidebar.cjs +9 -10
- package/lib/ArticleSidebar/ArticleSidebar.mjs +46 -47
- package/lib/Author/Author.cjs +2 -3
- package/lib/Author/Author.mjs +2 -3
- package/lib/BannerWithTabs/BannerWithTabs.cjs +4 -5
- package/lib/BannerWithTabs/BannerWithTabs.mjs +8 -9
- package/lib/ContentInfoWidget/ContentInfoWidget.cjs +3 -2
- package/lib/ContentInfoWidget/ContentInfoWidget.mjs +8 -7
- package/lib/CopyLead/CopyLead.cjs +32 -23
- package/lib/CopyLead/CopyLead.mjs +60 -51
- package/lib/DownloadList/DownloadList.cjs +6 -8
- package/lib/DownloadList/DownloadList.mjs +11 -13
- package/lib/FAQs/FAQs.cjs +5 -6
- package/lib/FAQs/FAQs.mjs +22 -23
- package/lib/FeaturePost/FeaturePost.cjs +14 -15
- package/lib/FeaturePost/FeaturePost.mjs +54 -55
- package/lib/Highlights/Highlights.cjs +11 -12
- package/lib/Highlights/Highlights.mjs +24 -25
- package/lib/InlineLinkGroup/InlineLinkGroup.cjs +25 -0
- package/lib/InlineLinkGroup/InlineLinkGroup.mjs +23 -0
- package/lib/InlineLinkGroup/styles.css +1 -0
- package/lib/LinkTile/LinkTile.cjs +6 -6
- package/lib/LinkTile/LinkTile.mjs +7 -7
- package/lib/LinkTile/styles.css +1 -1
- package/lib/ProductNavigation/ProductNavigation.cjs +6 -7
- package/lib/ProductNavigation/ProductNavigation.mjs +18 -19
- package/lib/PromoListing/PromoListing.cjs +7 -8
- package/lib/PromoListing/PromoListing.mjs +17 -18
- package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.cjs +7 -8
- package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.mjs +9 -10
- package/lib/Quote/Quote.cjs +5 -6
- package/lib/Quote/Quote.mjs +9 -10
- package/lib/SectionHeading/SectionHeading.cjs +2 -3
- package/lib/SectionHeading/SectionHeading.mjs +2 -3
- package/lib/Statistics/Statistics.cjs +21 -19
- package/lib/Statistics/Statistics.mjs +35 -33
- package/lib/Statistics/styles.css +1 -1
- package/lib/Summary/Summary.cjs +4 -4
- package/lib/Summary/Summary.mjs +13 -13
- package/lib/ThumbnailSignpost/ThumbnailSignpost.cjs +2 -3
- package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +2 -3
- package/lib/VideoHeroCard/VideoHeroCard.cjs +76 -0
- package/lib/VideoHeroCard/VideoHeroCard.mjs +74 -0
- package/lib/VideoPortraitCard/VideoPortraitCard.cjs +22 -0
- package/lib/VideoPortraitCard/VideoPortraitCard.mjs +20 -0
- package/lib/_shared/cjs/{Accordion-DfNGOjTm.cjs → Accordion-QqDoB3pY.cjs} +8 -9
- package/lib/_shared/cjs/{Author-D4dKNQem.cjs → Author-aL8YXi7C.cjs} +4 -5
- package/lib/_shared/cjs/Preview-Dx1kCzJ1.cjs +102 -0
- package/lib/_shared/cjs/{SectionHeading-DeSFM0HV.cjs → SectionHeading-Dj-dJfv3.cjs} +4 -5
- package/lib/_shared/cjs/{ThumbnailSignpost-GkOiwt-Z.cjs → ThumbnailSignpost-SBnrGooA.cjs} +4 -5
- package/lib/_shared/cjs/VideoCardThumbnail-BqYgpk0u.cjs +440 -0
- package/lib/_shared/cjs/dash.all.min-BPXzla24.cjs +6 -0
- package/lib/_shared/cjs/{tslib.es6-BxB9I209.cjs → filter-attrs-C26zOt4_.cjs} +25 -0
- package/lib/_shared/cjs/hls-Ckhp5fVA.cjs +36628 -0
- package/lib/_shared/cjs/index-DjiIVIaV.cjs +96 -0
- package/lib/_shared/cjs/index-oGP6D6gL.cjs +14826 -0
- package/lib/_shared/cjs/{index.es-Dq8bYrbW.cjs → index.es-B0J3cvrY.cjs} +1 -1
- package/lib/_shared/cjs/mixin-BFwaXKGB.cjs +1027 -0
- package/lib/_shared/cjs/react-CEvhi3LL.cjs +737 -0
- package/lib/_shared/cjs/react-CqsEClV0.cjs +466 -0
- package/lib/_shared/cjs/react-DE6M3seI.cjs +496 -0
- package/lib/_shared/cjs/react-Dri2yjKm.cjs +554 -0
- package/lib/_shared/cjs/react-DxToimBj.cjs +4239 -0
- package/lib/_shared/cjs/react-JTfV8OSA.cjs +325 -0
- package/lib/_shared/cjs/react-caXJFZ8W.cjs +400 -0
- package/lib/_shared/cjs/react-fep2ei7j.cjs +727 -0
- package/lib/_shared/esm/{Accordion-cd1oYvBv.mjs → Accordion-DtU7jbCv.mjs} +16 -17
- package/lib/_shared/esm/Author-CJQFrQM9.mjs +27 -0
- package/lib/_shared/esm/Preview-CmbKOgEO.mjs +100 -0
- package/lib/_shared/esm/{SectionHeading-CpDLCndw.mjs → SectionHeading-BskdQ2Tt.mjs} +10 -11
- package/lib/_shared/esm/{ThumbnailSignpost-BeRiXbUp.mjs → ThumbnailSignpost-CBSdQiHw.mjs} +13 -14
- package/lib/_shared/esm/VideoCardThumbnail-VfOKmPCv.mjs +437 -0
- package/lib/_shared/esm/dash.all.min-CbWI_8dN.mjs +4 -0
- package/lib/_shared/esm/{tslib.es6-D6Wu-xwB.mjs → filter-attrs-D-1kWaCP.mjs} +25 -1
- package/lib/_shared/esm/hls-AFbJDS9D.mjs +36625 -0
- package/lib/_shared/esm/index-CrcIrdjn.mjs +14799 -0
- package/lib/_shared/esm/index-DYnuIO1L.mjs +94 -0
- package/lib/_shared/esm/{index.es-Bfdys5__.mjs → index.es-DraZ-qKh.mjs} +1 -1
- package/lib/_shared/esm/mixin-BGGG8VrM.mjs +1024 -0
- package/lib/_shared/esm/react-BGimq-TB.mjs +4237 -0
- package/lib/_shared/esm/react-BHT4t_eQ.mjs +494 -0
- package/lib/_shared/esm/react-BSd0sGcO.mjs +464 -0
- package/lib/_shared/esm/react-CSr43fZV.mjs +552 -0
- package/lib/_shared/esm/react-Ca6E7Fr-.mjs +398 -0
- package/lib/_shared/esm/react-DG070IvZ.mjs +725 -0
- package/lib/_shared/esm/react-DZyqy7W7.mjs +735 -0
- package/lib/_shared/esm/react-WW_9iHcl.mjs +323 -0
- package/lib/index.cjs +299 -181
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +77 -63
- package/lib/index.d.mts +77 -63
- package/lib/index.mjs +297 -181
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +1 -1
- package/package.json +15 -12
- package/rollup.config.js +1 -1
- package/src/components/ActionTile/ActionTile.module.css +56 -37
- package/src/components/ActionTile/ActionTile.tsx +1 -1
- package/src/components/ArticleSidebar/ArticleSidebar.tsx +4 -6
- package/src/components/Author/Author.tsx +0 -3
- package/src/components/BannerWithTabs/BannerWithTabs.tsx +4 -6
- package/src/components/ContentInfoWidget/ContentInfoWidget.tsx +3 -4
- package/src/components/CopyLead/components/MediaContent/MediaContent.tsx +7 -6
- package/src/components/CopyLead/templates/Content/Content.tsx +5 -3
- package/src/components/CopyLead/templates/Media/Media.tsx +5 -6
- package/src/components/DownloadList/DownloadList.tsx +8 -8
- package/src/components/FeaturePost/FeaturePost.tsx +3 -7
- package/src/components/Highlights/Highlights.tsx +3 -2
- package/src/components/Highlights/components/HighlightItem/HighlightItem.tsx +3 -2
- package/src/components/Highlights/components/HighlightList/HighlightList.tsx +5 -2
- package/src/components/InlineLinkGroup/InlineLinkGroup.module.css +81 -0
- package/src/components/InlineLinkGroup/InlineLinkGroup.tsx +67 -0
- package/src/components/InlineLinkGroup/index.ts +5 -0
- package/src/components/LinkTile/LinkTile.module.css +62 -26
- package/src/components/LinkTile/LinkTile.tsx +8 -1
- package/src/components/PromoListing/PromoListing.tsx +3 -11
- package/src/components/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.tsx +2 -0
- package/src/components/Quote/Quote.tsx +1 -7
- package/src/components/Statistics/Statistics.module.css +0 -10
- package/src/components/Statistics/Statistics.tsx +35 -32
- package/src/components/Summary/Summary.tsx +3 -1
- package/src/components/VideoHeroCard/VideoHeroCard.tsx +63 -0
- package/src/components/VideoHeroCard/components/VideoHeroCardContent/VideoHeroCardContent.module.css +32 -0
- package/src/components/VideoHeroCard/components/VideoHeroCardContent/VideoHeroCardContent.tsx +97 -0
- package/src/components/VideoHeroCard/components/VideoHeroCardContent/index.ts +4 -0
- package/src/components/VideoHeroCard/index.ts +1 -0
- package/src/components/VideoPortraitCard/VideoPortraitCard.tsx +54 -0
- package/src/components/VideoPortraitCard/index.ts +4 -0
- package/src/components/index.ts +3 -1
- package/src/internal/MultiLineText/MultiLineText.tsx +25 -0
- package/src/internal/MultiLineText/index.ts +1 -0
- package/src/internal/VideoCardPlayer/VideoCardPlayer.module.css +54 -0
- package/src/internal/VideoCardPlayer/VideoCardPlayer.tsx +62 -0
- package/src/internal/VideoCardPlayer/components/VideoCardPlayIcon/VideoCardPlayIcon.module.css +41 -0
- package/src/internal/VideoCardPlayer/components/VideoCardPlayIcon/VideoCardPlayIcon.tsx +28 -0
- package/src/internal/VideoCardPlayer/components/VideoCardPlayIcon/index.ts +1 -0
- package/src/internal/VideoCardPlayer/components/VideoCardThumbnail/VideoCardThumbnail.module.css +58 -0
- package/src/internal/VideoCardPlayer/components/VideoCardThumbnail/VideoCardThumbnail.tsx +38 -0
- package/src/internal/VideoCardPlayer/components/VideoCardThumbnail/index.ts +1 -0
- package/src/internal/VideoCardPlayer/index.ts +2 -0
- package/src/internal/VideoCardPlayer/types/player-props.ts +6 -0
- package/versions.json +1 -1
- package/lib/HeroLink/HeroLink.cjs +0 -35
- package/lib/HeroLink/HeroLink.mjs +0 -33
- package/lib/HeroLink/styles.css +0 -1
- package/lib/_shared/cjs/filter-attrs-BizjMsy0.cjs +0 -27
- package/lib/_shared/esm/Author-HnYsFTPT.mjs +0 -28
- package/lib/_shared/esm/filter-attrs-DZ7RCEZm.mjs +0 -25
- package/src/components/HeroLink/HeroLink.module.css +0 -44
- package/src/components/HeroLink/HeroLink.tsx +0 -136
- package/src/components/HeroLink/index.ts +0 -2
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
function MediaPlayedRangesMixin(Base) {
|
|
2
|
+
return class MediaPlayedRanges extends Base {
|
|
3
|
+
_playedRanges = [];
|
|
4
|
+
_currentPlayedRange = null;
|
|
5
|
+
_RANGE_EPSILON = 0.5;
|
|
6
|
+
_seeking = false;
|
|
7
|
+
connectedCallback() {
|
|
8
|
+
if (super.connectedCallback) super.connectedCallback();
|
|
9
|
+
this.addEventListener("play", () => this.onPlaybackStart({ time: this.currentTime }));
|
|
10
|
+
this.addEventListener("pause", () => this.onPlaybackStop({ time: this.currentTime }));
|
|
11
|
+
this.addEventListener("ended", () => this.onPlaybackStop({ time: this.currentTime }));
|
|
12
|
+
this.addEventListener("seeking", () => this.onSeeking());
|
|
13
|
+
this.addEventListener("seeked", () => this.onSeeked({ time: this.currentTime }));
|
|
14
|
+
}
|
|
15
|
+
onPlaybackStart(param = {}) {
|
|
16
|
+
this._seeking = false;
|
|
17
|
+
const { time } = param;
|
|
18
|
+
const t = typeof time === "number" ? time : this.currentTime;
|
|
19
|
+
if (!this._currentPlayedRange) {
|
|
20
|
+
this._currentPlayedRange = { start: t, end: t };
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
onSeeking() {
|
|
24
|
+
this._seeking = true;
|
|
25
|
+
this._commitCurrentRange();
|
|
26
|
+
}
|
|
27
|
+
onSeeked(param = {}) {
|
|
28
|
+
this._seeking = false;
|
|
29
|
+
const { time } = param;
|
|
30
|
+
const t = typeof time === "number" ? time : this.currentTime;
|
|
31
|
+
this._currentPlayedRange = { start: t, end: t };
|
|
32
|
+
}
|
|
33
|
+
onPlaybackStop(param = {}) {
|
|
34
|
+
const { time } = param;
|
|
35
|
+
const t = typeof time === "number" ? time : this.currentTime;
|
|
36
|
+
this._commitCurrentRange(t);
|
|
37
|
+
}
|
|
38
|
+
_commitCurrentRange(time) {
|
|
39
|
+
if (!this._currentPlayedRange) return;
|
|
40
|
+
if (typeof time === "number") {
|
|
41
|
+
this._currentPlayedRange.end = time;
|
|
42
|
+
}
|
|
43
|
+
const { start, end } = this._currentPlayedRange;
|
|
44
|
+
this._currentPlayedRange = null;
|
|
45
|
+
this.addPlayedRange(start, end);
|
|
46
|
+
}
|
|
47
|
+
addPlayedRange(start, end) {
|
|
48
|
+
if (start >= end) return;
|
|
49
|
+
const EPS = this._RANGE_EPSILON;
|
|
50
|
+
const allRanges = [...this._playedRanges, { start, end }];
|
|
51
|
+
allRanges.sort((a, b) => a.start - b.start);
|
|
52
|
+
const merged = [];
|
|
53
|
+
for (const range of allRanges) {
|
|
54
|
+
if (!merged.length) {
|
|
55
|
+
merged.push({ ...range });
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const last = merged[merged.length - 1];
|
|
59
|
+
if (range.start <= last.end + EPS) {
|
|
60
|
+
last.start = Math.min(last.start, range.start);
|
|
61
|
+
last.end = Math.max(last.end, range.end);
|
|
62
|
+
} else {
|
|
63
|
+
merged.push({ ...range });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
this._playedRanges = merged;
|
|
67
|
+
}
|
|
68
|
+
get played() {
|
|
69
|
+
const time = this.currentTime;
|
|
70
|
+
if (!this.paused && !this._currentPlayedRange && typeof time === "number") {
|
|
71
|
+
this._currentPlayedRange = { start: time, end: time };
|
|
72
|
+
}
|
|
73
|
+
if (this._currentPlayedRange && typeof time === "number") {
|
|
74
|
+
if (time > this._currentPlayedRange.end) {
|
|
75
|
+
this._currentPlayedRange.end = time;
|
|
76
|
+
}
|
|
77
|
+
this.addPlayedRange(this._currentPlayedRange.start, this._currentPlayedRange.end);
|
|
78
|
+
}
|
|
79
|
+
if (!this._playedRanges.length) {
|
|
80
|
+
return createTimeRangesObj([[0, 0]]);
|
|
81
|
+
}
|
|
82
|
+
return createTimeRangesObj(this._playedRanges.map((r) => [r.start, r.end]));
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function createTimeRangesObj(ranges) {
|
|
87
|
+
Object.defineProperties(ranges, {
|
|
88
|
+
start: { value: (i) => ranges[i][0] },
|
|
89
|
+
end: { value: (i) => ranges[i][1] }
|
|
90
|
+
});
|
|
91
|
+
return ranges;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { MediaPlayedRangesMixin as M };
|