@wix/editor-react-components 1.2448.0 → 1.2450.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/dist/site/components/GoogleMap/component.js +1 -1
- package/dist/site/components/Image3/component.js +1 -1
- package/dist/site/components/TransparentVideo/component.js +28 -82
- package/dist/site/components/TransparentVideo/css.css +6 -4
- package/dist/site/components/chunks/Image.js +1 -1
- package/dist/site/components/chunks/customElementInit.js +1 -1
- package/dist/site/components/chunks/index4.js +2312 -1405
- package/dist/site/components/chunks/index5.js +1405 -2312
- package/dist/site/components/chunks/parseHtml.js +1 -1
- package/dist/site/components/chunks/parseSvg.js +1 -1
- package/package.json +3 -3
- package/dist/site/components/TransparentVideo/transparentVideoPoster.d.ts +0 -9
|
@@ -8,7 +8,7 @@ import { e as getTabIndexAttribute, f as convertA11yKeysToHtmlFormat } from "../
|
|
|
8
8
|
import { createPortal } from "react-dom";
|
|
9
9
|
import { g as getDefaultExportFromCjs } from "../chunks/_commonjsHelpers.js";
|
|
10
10
|
import { G as GOOGLE_MAPS_DIRECTIONS_BASE_URL, M as MIN_ZOOM, a as MAX_ZOOM, T as TestIds, D as DEFAULT_ZOOM, b as MAP_IDS, c as MAP_TYPES, A as API_KEY, d as DEFAULT_LOCATION, e as DefaultTranslations, f as TranslationKeys, g as TRANSLATIONS_NAMESPACES, C as COMPANY_NAME_DEFAULT, h as COMPANY_NAME_KEY, i as COMPONENT_NAME_DEFAULT, j as COMPONENT_NAME_KEY } from "../chunks/consts.js";
|
|
11
|
-
import { p as parse } from "../chunks/
|
|
11
|
+
import { p as parse } from "../chunks/index4.js";
|
|
12
12
|
import { useService } from "@wix/services-manager-react";
|
|
13
13
|
import { E as EnvironmentDefinition } from "../chunks/index2.js";
|
|
14
14
|
import { u as useConsentPolicyProps, C as ConsentPolicyWrapper } from "../chunks/useConsentPolicyProps.js";
|
|
@@ -4,7 +4,7 @@ import { a as getDataAttributes, n as normalizeWixUri } from "../chunks/dataUtil
|
|
|
4
4
|
import { e as getTabIndexAttribute } from "../chunks/a11y.js";
|
|
5
5
|
import { L as Link } from "../chunks/Link.js";
|
|
6
6
|
import * as React from "react";
|
|
7
|
-
import { a as getData, g as getPlaceholder, S as STATIC_MEDIA_URL$1 } from "../chunks/
|
|
7
|
+
import { a as getData, g as getPlaceholder, S as STATIC_MEDIA_URL$1 } from "../chunks/index5.js";
|
|
8
8
|
import { g as getMediaSizeQueryString, c as camelToKebab, a as getMediaUrlByContext, i as initCustomElement } from "../chunks/customElementInit.js";
|
|
9
9
|
import { useService } from "@wix/services-manager-react";
|
|
10
10
|
import { R as RenderingContextDefinition } from "../chunks/index3.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React__default, { useRef, useState, useEffect, useMemo, useCallback } from "react";
|
|
3
|
+
import { p as parse } from "../chunks/index4.js";
|
|
3
4
|
import { F as FilterEffectType, V as VideoStartType, a as VideoEndType, b as VideoPlayingState } from "../chunks/TransparentVideo.types.js";
|
|
4
|
-
import
|
|
5
|
+
import "../chunks/index5.js";
|
|
5
6
|
import { c as clsx } from "../chunks/clsx.js";
|
|
6
7
|
import { V as Video } from "../chunks/Video.js";
|
|
7
|
-
import { p as parse } from "../chunks/index5.js";
|
|
8
8
|
function getSepia(amount) {
|
|
9
9
|
return `${0.393 + 0.607 * (1 - amount)} ${0.769 - 0.769 * (1 - amount)} ${0.189 - 0.189 * (1 - amount)} 0 0
|
|
10
10
|
${0.349 - 0.349 * (1 - amount)} ${0.686 + 0.314 * (1 - amount)} ${0.168 - 0.168 * (1 - amount)} 0 0
|
|
@@ -620,25 +620,6 @@ const getFilterEffectString = (id, filterEffect) => {
|
|
|
620
620
|
{}
|
|
621
621
|
);
|
|
622
622
|
};
|
|
623
|
-
const removeMediaPrefix = (uri) => {
|
|
624
|
-
if (uri.startsWith("media/")) {
|
|
625
|
-
return uri.replace(/^media\//, "");
|
|
626
|
-
}
|
|
627
|
-
if (uri.startsWith("/media/")) {
|
|
628
|
-
return uri.replace(/^\/media\//, "");
|
|
629
|
-
}
|
|
630
|
-
return uri;
|
|
631
|
-
};
|
|
632
|
-
const formatPosterUrl = (uri, width, height) => {
|
|
633
|
-
if (!uri) {
|
|
634
|
-
return void 0;
|
|
635
|
-
}
|
|
636
|
-
if (uri.startsWith("http")) {
|
|
637
|
-
return uri;
|
|
638
|
-
}
|
|
639
|
-
const normalizedUri = removeMediaPrefix(uri);
|
|
640
|
-
return `${STATIC_MEDIA_URL}${normalizedUri}`;
|
|
641
|
-
};
|
|
642
623
|
const SVG_FILTER_ID_PREFIX = "svg_filter_";
|
|
643
624
|
const replaceCompIdPlaceholder = (str, compId) => str.replace(/<%= compId %>/g, compId);
|
|
644
625
|
const getActiveFilterEffect = (props) => {
|
|
@@ -3449,7 +3430,6 @@ const audioToggle = "audioToggle__k2EqB";
|
|
|
3449
3430
|
const playWrapper = "playWrapper__yH3ix";
|
|
3450
3431
|
const videoWrapper = "videoWrapper__e-kgj";
|
|
3451
3432
|
const hidden = "hidden__L52Wy";
|
|
3452
|
-
const poster = "poster__d1pI5";
|
|
3453
3433
|
const isShown = "isShown__QBpcz";
|
|
3454
3434
|
const filterEffectSvg = "filterEffectSvg__B9Lye";
|
|
3455
3435
|
const styles = {
|
|
@@ -3459,41 +3439,9 @@ const styles = {
|
|
|
3459
3439
|
playWrapper,
|
|
3460
3440
|
videoWrapper,
|
|
3461
3441
|
hidden,
|
|
3462
|
-
poster,
|
|
3463
3442
|
isShown,
|
|
3464
3443
|
filterEffectSvg
|
|
3465
3444
|
};
|
|
3466
|
-
const TransparentVideoPoster = React__default.memo(
|
|
3467
|
-
(props) => {
|
|
3468
|
-
var _a;
|
|
3469
|
-
const {
|
|
3470
|
-
containerId,
|
|
3471
|
-
posterFilterId,
|
|
3472
|
-
ariaLabel,
|
|
3473
|
-
posterUrl,
|
|
3474
|
-
filterEffectSvgString
|
|
3475
|
-
} = props;
|
|
3476
|
-
const posterId = (_a = posterUrl.split("/").at(-1)) == null ? void 0 : _a.split(".")[0];
|
|
3477
|
-
const instanceId = `poster-${posterId}_${containerId}`;
|
|
3478
|
-
const defsStr = filterEffectSvgString ? closeSelfClosingSvgTags(
|
|
3479
|
-
replaceCompIdPlaceholder(filterEffectSvgString, posterFilterId)
|
|
3480
|
-
) : "";
|
|
3481
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3482
|
-
/* @__PURE__ */ jsx(
|
|
3483
|
-
"img",
|
|
3484
|
-
{
|
|
3485
|
-
style: { filter: `url(#${posterFilterId})` },
|
|
3486
|
-
alt: ariaLabel,
|
|
3487
|
-
className: styles.poster,
|
|
3488
|
-
src: posterUrl,
|
|
3489
|
-
id: `img_${instanceId}`
|
|
3490
|
-
}
|
|
3491
|
-
),
|
|
3492
|
-
defsStr && /* @__PURE__ */ jsx("svg", { id: `svg_${instanceId}`, className: styles.filterEffectSvg, children: /* @__PURE__ */ jsx("defs", { children: parse(defsStr) }) })
|
|
3493
|
-
] });
|
|
3494
|
-
}
|
|
3495
|
-
);
|
|
3496
|
-
TransparentVideoPoster.displayName = "TransparentVideoPoster";
|
|
3497
3445
|
const MutedIcon = () => (
|
|
3498
3446
|
/* oxlint-disable-next-line jsx_a11y/role-supports-aria-props */
|
|
3499
3447
|
/* @__PURE__ */ jsx("svg", { preserveAspectRatio: "xMidYMid meet", "data-bbox": "5.726 5.999 21.997 18.001", "data-type": "shape", xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", role: "presentation", "aria-hidden": "true", "aria-label": "", children: /* @__PURE__ */ jsxs("g", { children: [
|
|
@@ -3552,7 +3500,6 @@ const PlayIcon = () => /* @__PURE__ */ jsx(
|
|
|
3552
3500
|
}
|
|
3553
3501
|
);
|
|
3554
3502
|
function TransparentVideo(props) {
|
|
3555
|
-
var _a;
|
|
3556
3503
|
const filterEffects = getActiveFilterEffect(props);
|
|
3557
3504
|
const {
|
|
3558
3505
|
a11y,
|
|
@@ -3577,8 +3524,12 @@ function TransparentVideo(props) {
|
|
|
3577
3524
|
shouldDisplayAudioToggle,
|
|
3578
3525
|
shouldDisplayPlayButton
|
|
3579
3526
|
} = useTransparentVideo({ ...props, filterEffect: filterEffects });
|
|
3580
|
-
const
|
|
3581
|
-
|
|
3527
|
+
const filterDefs = filterEffects ? closeSelfClosingSvgTags(
|
|
3528
|
+
replaceCompIdPlaceholder(
|
|
3529
|
+
getFilterEffectString(posterFilterId, filterEffects),
|
|
3530
|
+
posterFilterId
|
|
3531
|
+
)
|
|
3532
|
+
) : "";
|
|
3582
3533
|
return /* @__PURE__ */ jsxs(
|
|
3583
3534
|
"div",
|
|
3584
3535
|
{
|
|
@@ -3592,19 +3543,27 @@ function TransparentVideo(props) {
|
|
|
3592
3543
|
onMouseLeave: onMouseOutHandler,
|
|
3593
3544
|
children: [
|
|
3594
3545
|
video && /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
3595
|
-
/* @__PURE__ */ jsx(
|
|
3596
|
-
|
|
3546
|
+
/* @__PURE__ */ jsx(
|
|
3547
|
+
"div",
|
|
3597
3548
|
{
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3549
|
+
className: styles.videoWrapper,
|
|
3550
|
+
style: filterEffects ? { filter: `url(#${posterFilterId})` } : void 0,
|
|
3551
|
+
children: /* @__PURE__ */ jsx(
|
|
3552
|
+
Video,
|
|
3553
|
+
{
|
|
3554
|
+
id: `wix-video-${id}`,
|
|
3555
|
+
videoRef,
|
|
3556
|
+
videoMedia: { ...video, name: (a11y == null ? void 0 : a11y.ariaLabel) || video.name },
|
|
3557
|
+
muted: shouldMuteVideo,
|
|
3558
|
+
loop: videoEndType === VideoEndType.loop,
|
|
3559
|
+
autoplay: shouldAutoplay,
|
|
3560
|
+
qualityPolicy: "adaptive",
|
|
3561
|
+
playbackRate
|
|
3562
|
+
}
|
|
3563
|
+
)
|
|
3606
3564
|
}
|
|
3607
|
-
)
|
|
3565
|
+
),
|
|
3566
|
+
filterDefs && /* @__PURE__ */ jsx("svg", { className: styles.filterEffectSvg, children: /* @__PURE__ */ jsx("defs", { children: parse(filterDefs) }) }),
|
|
3608
3567
|
/* @__PURE__ */ jsx(
|
|
3609
3568
|
"canvas",
|
|
3610
3569
|
{
|
|
@@ -3621,19 +3580,6 @@ function TransparentVideo(props) {
|
|
|
3621
3580
|
}
|
|
3622
3581
|
)
|
|
3623
3582
|
] }),
|
|
3624
|
-
posterUrl && shouldDisplayPoster && /* @__PURE__ */ jsx(
|
|
3625
|
-
TransparentVideoPoster,
|
|
3626
|
-
{
|
|
3627
|
-
containerId: id,
|
|
3628
|
-
posterUrl,
|
|
3629
|
-
posterFilterId,
|
|
3630
|
-
filterEffectSvgString: getFilterEffectString(
|
|
3631
|
-
posterFilterId,
|
|
3632
|
-
filterEffects
|
|
3633
|
-
),
|
|
3634
|
-
ariaLabel: a11y == null ? void 0 : a11y.ariaLabel
|
|
3635
|
-
}
|
|
3636
|
-
),
|
|
3637
3583
|
shouldDisplayAudioToggle && /* @__PURE__ */ jsx(
|
|
3638
3584
|
"div",
|
|
3639
3585
|
{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as getData, b as getFileExtension, f as fileType, c as alignTypes, d as fittingTypes } from "./
|
|
1
|
+
import { a as getData, b as getFileExtension, f as fileType, c as alignTypes, d as fittingTypes } from "./index5.js";
|
|
2
2
|
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers.js";
|
|
3
3
|
var fastdom$2 = { exports: {} };
|
|
4
4
|
var fastdom$1 = fastdom$2.exports;
|