@arc-ui/community-components 3.3.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 +132 -12
- package/CHANGELOG.md +12 -0
- package/lib/Accordion/Accordion.mjs +1 -1
- package/lib/ActionTile/ActionTile.mjs +9 -9
- package/lib/ArticleSidebar/ArticleSidebar.mjs +44 -44
- package/lib/Author/Author.mjs +1 -1
- package/lib/BannerWithTabs/BannerWithTabs.mjs +6 -6
- package/lib/ContentInfoWidget/ContentInfoWidget.mjs +6 -6
- package/lib/CopyLead/CopyLead.cjs +18 -8
- package/lib/CopyLead/CopyLead.mjs +59 -49
- package/lib/DownloadList/DownloadList.mjs +9 -9
- package/lib/FAQs/FAQs.mjs +21 -21
- package/lib/FeaturePost/FeaturePost.cjs +1 -1
- package/lib/FeaturePost/FeaturePost.mjs +53 -53
- package/lib/Highlights/Highlights.mjs +19 -19
- package/lib/InlineLinkGroup/InlineLinkGroup.mjs +10 -10
- package/lib/LinkTile/LinkTile.mjs +5 -5
- package/lib/ProductNavigation/ProductNavigation.cjs +1 -1
- package/lib/ProductNavigation/ProductNavigation.mjs +17 -17
- package/lib/PromoListing/PromoListing.cjs +1 -1
- package/lib/PromoListing/PromoListing.mjs +15 -15
- package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.cjs +2 -2
- package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.mjs +8 -8
- package/lib/Quote/Quote.mjs +8 -8
- package/lib/SectionHeading/SectionHeading.mjs +1 -1
- package/lib/Statistics/Statistics.mjs +31 -31
- package/lib/Summary/Summary.cjs +1 -1
- package/lib/Summary/Summary.mjs +11 -11
- package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +1 -1
- 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/Preview-Dx1kCzJ1.cjs +102 -0
- package/lib/_shared/cjs/VideoCardThumbnail-BqYgpk0u.cjs +440 -0
- package/lib/_shared/cjs/dash.all.min-BPXzla24.cjs +6 -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-DrOTh90S.mjs → Accordion-DtU7jbCv.mjs} +15 -15
- package/lib/_shared/esm/Author-CJQFrQM9.mjs +27 -0
- package/lib/_shared/esm/Preview-CmbKOgEO.mjs +100 -0
- package/lib/_shared/esm/{SectionHeading-DZOg_gYi.mjs → SectionHeading-BskdQ2Tt.mjs} +9 -9
- package/lib/_shared/esm/{ThumbnailSignpost-DaZByYIH.mjs → ThumbnailSignpost-CBSdQiHw.mjs} +12 -12
- 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/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 +249 -123
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +55 -2
- package/lib/index.d.mts +55 -2
- package/lib/index.mjs +248 -124
- package/lib/index.mjs.map +1 -1
- package/lib/styles.css +1 -1
- package/package.json +17 -14
- package/rollup.config.js +1 -1
- 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/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.tsx +2 -0
- 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 +2 -0
- 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/_shared/esm/Author-BVCRPgkl.mjs +0 -27
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { M as MediaTracksMixin, C as CustomVideoElement } from './mixin-BGGG8VrM.mjs';
|
|
3
|
+
|
|
4
|
+
class DashVideoElement extends MediaTracksMixin(CustomVideoElement) {
|
|
5
|
+
static shadowRootOptions = { ...CustomVideoElement.shadowRootOptions };
|
|
6
|
+
static getTemplateHTML = (attrs) => {
|
|
7
|
+
const { src, ...rest } = attrs;
|
|
8
|
+
return CustomVideoElement.getTemplateHTML(rest);
|
|
9
|
+
};
|
|
10
|
+
#apiInit;
|
|
11
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
12
|
+
if (attrName !== "src") {
|
|
13
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
14
|
+
}
|
|
15
|
+
if (attrName === "src" && oldValue != newValue) {
|
|
16
|
+
this.load();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
async _initThumbnails(representation) {
|
|
20
|
+
const generateAllCues = async (totalThumbnails2, thumbnailDuration2) => {
|
|
21
|
+
const promises = [];
|
|
22
|
+
const timescale = representation.timescale || 1;
|
|
23
|
+
const startNumber = representation.startNumber || 1;
|
|
24
|
+
const pto = representation.presentationTimeOffset ? representation.presentationTimeOffset / timescale : 0;
|
|
25
|
+
const tduration = representation.segmentDuration;
|
|
26
|
+
for (let thIndex = 0; thIndex < totalThumbnails2; thIndex++) {
|
|
27
|
+
const startTime = calculateThumbnailStartTime({
|
|
28
|
+
thIndex,
|
|
29
|
+
thduration: thumbnailDuration2,
|
|
30
|
+
ttiles: totalThumbnails2,
|
|
31
|
+
tduration,
|
|
32
|
+
startNumber,
|
|
33
|
+
pto
|
|
34
|
+
});
|
|
35
|
+
const endTime = startTime + thumbnailDuration2;
|
|
36
|
+
const promise = new Promise((resolve, reject) => {
|
|
37
|
+
this.api.provideThumbnail(startTime, ({ url, width, height, x, y }) => {
|
|
38
|
+
try {
|
|
39
|
+
const cue = new VTTCue(
|
|
40
|
+
startTime,
|
|
41
|
+
endTime,
|
|
42
|
+
`${url}#xywh=${x},${y},${width},${height}`
|
|
43
|
+
);
|
|
44
|
+
resolve(cue);
|
|
45
|
+
} catch (err) {
|
|
46
|
+
reject(err);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
promises.push(promise);
|
|
51
|
+
}
|
|
52
|
+
return await Promise.all(promises).catch((e) => console.error("Error processing thumbnails", e));
|
|
53
|
+
};
|
|
54
|
+
const { totalThumbnails, thumbnailDuration } = calculateThumbnailTimes(representation);
|
|
55
|
+
const cues = await generateAllCues(totalThumbnails, thumbnailDuration);
|
|
56
|
+
let track = this.nativeEl.querySelector('track[label="thumbnails"]');
|
|
57
|
+
if (!track) {
|
|
58
|
+
track = createThumbnailTrack();
|
|
59
|
+
this.nativeEl.appendChild(track);
|
|
60
|
+
const vttUrl = cuesToVttBlobUrl(cues);
|
|
61
|
+
track.src = vttUrl;
|
|
62
|
+
track.dispatchEvent(new Event("change"));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
async load() {
|
|
66
|
+
if (this.#apiInit) {
|
|
67
|
+
this.api.attachSource(this.src);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this.#apiInit = true;
|
|
71
|
+
const Dash = await import('./dash.all.min-CbWI_8dN.mjs');
|
|
72
|
+
this.api = Dash.MediaPlayer().create();
|
|
73
|
+
this.api.initialize(this.nativeEl, this.src, this.autoplay);
|
|
74
|
+
this.api.on(Dash.MediaPlayer.events.STREAM_INITIALIZED, () => {
|
|
75
|
+
const bitrateList = this.api.getRepresentationsByType("video");
|
|
76
|
+
let videoTrack = this.videoTracks.getTrackById("main");
|
|
77
|
+
if (!videoTrack) {
|
|
78
|
+
videoTrack = this.addVideoTrack("main");
|
|
79
|
+
videoTrack.id = "main";
|
|
80
|
+
videoTrack.selected = true;
|
|
81
|
+
}
|
|
82
|
+
bitrateList.forEach((rep) => {
|
|
83
|
+
const bitrate = rep.bandwidth ?? rep.bitrate ?? (Number.isFinite(rep.bitrateInKbit) ? rep.bitrateInKbit * 1e3 : void 0);
|
|
84
|
+
const rendition = videoTrack.addRendition(rep.id, rep.width, rep.height, rep.mimeType ?? rep.codec, bitrate);
|
|
85
|
+
rendition.id = rep.id;
|
|
86
|
+
});
|
|
87
|
+
this.videoRenditions.addEventListener("change", () => {
|
|
88
|
+
const selected = this.videoRenditions[this.videoRenditions.selectedIndex];
|
|
89
|
+
if (selected == null ? void 0 : selected.id) {
|
|
90
|
+
this.api.updateSettings({ streaming: { abr: { autoSwitchBitrate: { video: false } } } });
|
|
91
|
+
this.api.setRepresentationForTypeById("video", selected.id, true);
|
|
92
|
+
} else {
|
|
93
|
+
this.api.updateSettings({ streaming: { abr: { autoSwitchBitrate: { video: true } } } });
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
if (!this.api.isDynamic()) {
|
|
97
|
+
const imageReps = this.api.getRepresentationsByType("image");
|
|
98
|
+
imageReps.forEach(async (rep, idx) => {
|
|
99
|
+
if (idx > 0) return;
|
|
100
|
+
this._initThumbnails(rep);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function calculateThumbnailTimes(representation) {
|
|
107
|
+
var _a, _b;
|
|
108
|
+
const essentialProp = representation.essentialProperties[0];
|
|
109
|
+
const [htiles, vtiles] = essentialProp.value.split("x").map(Number);
|
|
110
|
+
const ttiles = htiles * vtiles;
|
|
111
|
+
const periodDuration = ((_b = (_a = representation.adaptation) == null ? void 0 : _a.period) == null ? void 0 : _b.duration) || null;
|
|
112
|
+
const tileDuration = representation.segmentDuration;
|
|
113
|
+
const timescale = representation.timescale || 1;
|
|
114
|
+
const tduration = tileDuration / timescale;
|
|
115
|
+
const thduration = tduration / ttiles;
|
|
116
|
+
const totalThumbnails = periodDuration != null ? Math.ceil(periodDuration / thduration) : Math.ceil(tileDuration / thduration);
|
|
117
|
+
return { totalThumbnails, thumbnailDuration: thduration };
|
|
118
|
+
}
|
|
119
|
+
function calculateThumbnailStartTime({ thIndex, tduration, thduration, ttiles, startNumber, pto }) {
|
|
120
|
+
const tnumber = Math.floor(thIndex / ttiles) + startNumber;
|
|
121
|
+
const thnumber = thIndex % ttiles + 1;
|
|
122
|
+
const tileStartTime = (tnumber - 1) * tduration - pto;
|
|
123
|
+
const thumbnailStartTime = (thnumber - 1) * thduration;
|
|
124
|
+
return tileStartTime + thumbnailStartTime;
|
|
125
|
+
}
|
|
126
|
+
function createThumbnailTrack() {
|
|
127
|
+
const track = document.createElement("track");
|
|
128
|
+
track.kind = "metadata";
|
|
129
|
+
track.label = "thumbnails";
|
|
130
|
+
track.srclang = "en";
|
|
131
|
+
track.mode = "hidden";
|
|
132
|
+
track.default = true;
|
|
133
|
+
return track;
|
|
134
|
+
}
|
|
135
|
+
function cuesToVttBlobUrl(cues) {
|
|
136
|
+
let vtt = "WEBVTT\n\n";
|
|
137
|
+
for (const cue of cues) {
|
|
138
|
+
vtt += `${formatTime(cue.startTime)} --> ${formatTime(cue.endTime)}
|
|
139
|
+
`;
|
|
140
|
+
vtt += `${cue.text}
|
|
141
|
+
|
|
142
|
+
`;
|
|
143
|
+
}
|
|
144
|
+
const blob = new Blob([vtt], { type: "text/vtt" });
|
|
145
|
+
return URL.createObjectURL(blob);
|
|
146
|
+
function formatTime(t) {
|
|
147
|
+
const h = String(Math.floor(t / 3600)).padStart(2, "0");
|
|
148
|
+
const m = String(Math.floor(t % 3600 / 60)).padStart(2, "0");
|
|
149
|
+
const s = (t % 60).toFixed(3).padStart(6, "0");
|
|
150
|
+
return `${h}:${m}:${s}`;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (globalThis.customElements && !globalThis.customElements.get("dash-video")) {
|
|
154
|
+
globalThis.customElements.define("dash-video", DashVideoElement);
|
|
155
|
+
}
|
|
156
|
+
var dash_video_element_default = DashVideoElement;
|
|
157
|
+
|
|
158
|
+
// ../../node_modules/ce-la-react/dist/ce-la-react.js
|
|
159
|
+
var reservedReactProps = /* @__PURE__ */ new Set([
|
|
160
|
+
"style",
|
|
161
|
+
"children",
|
|
162
|
+
"ref",
|
|
163
|
+
"key",
|
|
164
|
+
"suppressContentEditableWarning",
|
|
165
|
+
"suppressHydrationWarning",
|
|
166
|
+
"dangerouslySetInnerHTML"
|
|
167
|
+
]);
|
|
168
|
+
var reactPropToAttrNameMap = {
|
|
169
|
+
className: "class",
|
|
170
|
+
htmlFor: "for"
|
|
171
|
+
};
|
|
172
|
+
function defaultToAttributeName(propName) {
|
|
173
|
+
return propName.toLowerCase();
|
|
174
|
+
}
|
|
175
|
+
function defaultToAttributeValue(propValue) {
|
|
176
|
+
if (typeof propValue === "boolean") return propValue ? "" : void 0;
|
|
177
|
+
if (typeof propValue === "function") return void 0;
|
|
178
|
+
if (typeof propValue === "object" && propValue !== null) return void 0;
|
|
179
|
+
return propValue;
|
|
180
|
+
}
|
|
181
|
+
function createComponent({
|
|
182
|
+
react: React2,
|
|
183
|
+
tagName,
|
|
184
|
+
elementClass,
|
|
185
|
+
events,
|
|
186
|
+
displayName,
|
|
187
|
+
defaultProps,
|
|
188
|
+
toAttributeName = defaultToAttributeName,
|
|
189
|
+
toAttributeValue = defaultToAttributeValue
|
|
190
|
+
}) {
|
|
191
|
+
const IS_REACT_19_OR_NEWER = Number.parseInt(React2.version) >= 19;
|
|
192
|
+
const ReactComponent = React2.forwardRef((props, ref) => {
|
|
193
|
+
var _a, _b;
|
|
194
|
+
const elementRef = React2.useRef(null);
|
|
195
|
+
const prevElemPropsRef = React2.useRef(/* @__PURE__ */ new Map());
|
|
196
|
+
const eventProps = {};
|
|
197
|
+
const attrs = {};
|
|
198
|
+
const reactProps = {};
|
|
199
|
+
const elementProps = {};
|
|
200
|
+
for (const [k, v] of Object.entries(props)) {
|
|
201
|
+
if (reservedReactProps.has(k)) {
|
|
202
|
+
reactProps[k] = v;
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
const attrName = toAttributeName(reactPropToAttrNameMap[k] ?? k);
|
|
206
|
+
if (elementClass.prototype && k in elementClass.prototype && !(k in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) && !((_b = elementClass.observedAttributes) == null ? void 0 : _b.some((attr) => attr === attrName))) {
|
|
207
|
+
elementProps[k] = v;
|
|
208
|
+
continue;
|
|
209
|
+
}
|
|
210
|
+
if (k.startsWith("on")) {
|
|
211
|
+
eventProps[k] = v;
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
const attrValue = toAttributeValue(v);
|
|
215
|
+
if (attrName && attrValue != null) {
|
|
216
|
+
attrs[attrName] = String(attrValue);
|
|
217
|
+
if (!IS_REACT_19_OR_NEWER) {
|
|
218
|
+
reactProps[attrName] = attrValue;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
if (attrName && IS_REACT_19_OR_NEWER) {
|
|
222
|
+
const attrValueFromDefault = defaultToAttributeValue(v);
|
|
223
|
+
if (attrValue !== attrValueFromDefault) {
|
|
224
|
+
reactProps[attrName] = attrValue;
|
|
225
|
+
} else {
|
|
226
|
+
reactProps[attrName] = v;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
if (typeof window !== "undefined") {
|
|
231
|
+
for (const propName in eventProps) {
|
|
232
|
+
const callback = eventProps[propName];
|
|
233
|
+
const useCapture = propName.endsWith("Capture");
|
|
234
|
+
const eventName = ((events == null ? void 0 : events[propName]) ?? propName.slice(2).toLowerCase()).slice(
|
|
235
|
+
0,
|
|
236
|
+
useCapture ? -7 : void 0
|
|
237
|
+
);
|
|
238
|
+
React2.useLayoutEffect(() => {
|
|
239
|
+
const eventTarget = elementRef == null ? void 0 : elementRef.current;
|
|
240
|
+
if (!eventTarget || typeof callback !== "function") return;
|
|
241
|
+
eventTarget.addEventListener(eventName, callback, useCapture);
|
|
242
|
+
return () => {
|
|
243
|
+
eventTarget.removeEventListener(eventName, callback, useCapture);
|
|
244
|
+
};
|
|
245
|
+
}, [elementRef == null ? void 0 : elementRef.current, callback]);
|
|
246
|
+
}
|
|
247
|
+
React2.useLayoutEffect(() => {
|
|
248
|
+
if (elementRef.current === null) return;
|
|
249
|
+
const newElemProps = /* @__PURE__ */ new Map();
|
|
250
|
+
for (const key in elementProps) {
|
|
251
|
+
setProperty(elementRef.current, key, elementProps[key]);
|
|
252
|
+
prevElemPropsRef.current.delete(key);
|
|
253
|
+
newElemProps.set(key, elementProps[key]);
|
|
254
|
+
}
|
|
255
|
+
for (const [key, _value] of prevElemPropsRef.current) {
|
|
256
|
+
setProperty(elementRef.current, key, void 0);
|
|
257
|
+
}
|
|
258
|
+
prevElemPropsRef.current = newElemProps;
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
if (typeof window === "undefined" && (elementClass == null ? void 0 : elementClass.getTemplateHTML) && (elementClass == null ? void 0 : elementClass.shadowRootOptions)) {
|
|
262
|
+
const { mode, delegatesFocus } = elementClass.shadowRootOptions;
|
|
263
|
+
const templateShadowRoot = React2.createElement("template", {
|
|
264
|
+
shadowrootmode: mode,
|
|
265
|
+
shadowrootdelegatesfocus: delegatesFocus,
|
|
266
|
+
dangerouslySetInnerHTML: {
|
|
267
|
+
__html: elementClass.getTemplateHTML(attrs, props)
|
|
268
|
+
},
|
|
269
|
+
key: "ce-la-react-ssr-template-shadow-root"
|
|
270
|
+
});
|
|
271
|
+
reactProps.children = [templateShadowRoot, reactProps.children];
|
|
272
|
+
}
|
|
273
|
+
return React2.createElement(tagName, {
|
|
274
|
+
...defaultProps,
|
|
275
|
+
...reactProps,
|
|
276
|
+
ref: React2.useCallback(
|
|
277
|
+
(node) => {
|
|
278
|
+
elementRef.current = node;
|
|
279
|
+
if (typeof ref === "function") {
|
|
280
|
+
ref(node);
|
|
281
|
+
} else if (ref !== null) {
|
|
282
|
+
ref.current = node;
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
[ref]
|
|
286
|
+
)
|
|
287
|
+
}, reactProps.children);
|
|
288
|
+
});
|
|
289
|
+
ReactComponent.displayName = displayName ?? elementClass.name;
|
|
290
|
+
return ReactComponent;
|
|
291
|
+
}
|
|
292
|
+
function setProperty(node, name, value) {
|
|
293
|
+
var _a;
|
|
294
|
+
node[name] = value;
|
|
295
|
+
if (value == null && name in (((_a = globalThis.HTMLElement) == null ? void 0 : _a.prototype) ?? {})) {
|
|
296
|
+
node.removeAttribute(name);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// dist/react.ts
|
|
301
|
+
var react_default = createComponent({
|
|
302
|
+
react: React__default,
|
|
303
|
+
tagName: "dash-video",
|
|
304
|
+
elementClass: dash_video_element_default,
|
|
305
|
+
toAttributeName(propName) {
|
|
306
|
+
if (propName === "muted") return "";
|
|
307
|
+
if (propName === "defaultMuted") return "muted";
|
|
308
|
+
return defaultToAttributeName(propName);
|
|
309
|
+
}
|
|
310
|
+
});
|
|
311
|
+
/*! Bundled license information:
|
|
312
|
+
|
|
313
|
+
ce-la-react/dist/ce-la-react.js:
|
|
314
|
+
(**
|
|
315
|
+
* @license
|
|
316
|
+
* Copyright 2018 Google LLC
|
|
317
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
318
|
+
*
|
|
319
|
+
* Modified version of `@lit/react` for vanilla custom elements with support for SSR.
|
|
320
|
+
*)
|
|
321
|
+
*/
|
|
322
|
+
|
|
323
|
+
export { react_default as default };
|