@wix/editor-react-components 1.2837.0 → 1.2839.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/AccordionComponent/manifest.js +1 -1
- package/dist/site/components/AudioPlayer/manifest.js +1 -1
- package/dist/site/components/Breadcrumbs/manifest.js +1 -1
- package/dist/site/components/Button/manifest.js +1 -1
- package/dist/site/components/Checkbox/Checkbox.types.d.ts +11 -11
- package/dist/site/components/Checkbox/component.js +67 -119
- package/dist/site/components/Checkbox/constants.d.ts +21 -24
- package/dist/site/components/Checkbox/css.css +48 -164
- package/dist/site/components/Checkbox/manifest.js +178 -89
- package/dist/site/components/CheckboxGroup/manifest.js +1 -1
- package/dist/site/components/CollapsibleText/manifest.js +1 -1
- package/dist/site/components/GoogleMap/manifest.js +1 -1
- package/dist/site/components/HTMLComponent/manifest.js +1 -1
- package/dist/site/components/Image3/component.js +2 -489
- package/dist/site/components/LinkBar/manifest.js +1 -1
- package/dist/site/components/Logo/component.js +1 -157
- package/dist/site/components/Logo/css.css +16 -15
- package/dist/site/components/Lottie/manifest.js +1 -1
- package/dist/site/components/Menu/manifest.js +1 -1
- package/dist/site/components/MultiStateBox/manifest.js +1 -1
- package/dist/site/components/RadioButtons/manifest.js +1 -1
- package/dist/site/components/ShareButtons/manifest.js +1 -1
- package/dist/site/components/Slideshow/manifest.js +1 -1
- package/dist/site/components/Tabs/manifest.js +1 -1
- package/dist/site/components/TestComp/manifest.js +1 -1
- package/dist/site/components/TextBox/manifest.js +1 -1
- package/dist/site/components/TextInput/manifest.js +2 -16
- package/dist/site/components/TransparentVideo/css.css +5 -4
- package/dist/site/components/VideoScrub/css.css +5 -4
- package/dist/site/components/VideoUpload/css.css +5 -4
- package/dist/site/components/chunks/Image.js +160 -0
- package/dist/site/components/chunks/Video.js +10 -648
- package/dist/site/components/chunks/constants40.js +29 -31
- package/dist/site/components/chunks/customElementInit.js +655 -0
- package/dist/site/components/chunks/index6.js +7 -6
- package/dist/site/components/chunks/manifestSdkMixins.js +25 -7
- package/package.json +5 -5
- package/dist/site/components/Checkbox/component.preview.d.ts +0 -4
- package/dist/site/components/chunks/fastdom.js +0 -166
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
.
|
|
2
|
-
display: block;
|
|
3
|
-
width: 100%;
|
|
4
|
-
height: 100%;
|
|
5
|
-
}
|
|
6
|
-
.image__WopE9 img {
|
|
7
|
-
max-width: var(--wix-img-max-width, 100%);
|
|
8
|
-
}
|
|
9
|
-
.image__WopE9[data-animate-blur] img {
|
|
10
|
-
filter: blur(9px);
|
|
11
|
-
transition: filter 0.8s ease-in;
|
|
12
|
-
}
|
|
13
|
-
.image__WopE9[data-animate-blur] img[data-load-done] {
|
|
14
|
-
filter: none;
|
|
15
|
-
}.logo__Y9w6a {
|
|
1
|
+
.logo__Y9w6a {
|
|
16
2
|
display: flex;
|
|
17
3
|
align-items: center;
|
|
18
4
|
justify-content: center;
|
|
@@ -42,4 +28,19 @@
|
|
|
42
28
|
width: 100%;
|
|
43
29
|
height: 100%;
|
|
44
30
|
display: block;
|
|
31
|
+
}
|
|
32
|
+
.image__WopE9 {
|
|
33
|
+
display: block;
|
|
34
|
+
width: 100%;
|
|
35
|
+
height: 100%;
|
|
36
|
+
}
|
|
37
|
+
.image__WopE9 img {
|
|
38
|
+
max-width: var(--wix-img-max-width, 100%);
|
|
39
|
+
}
|
|
40
|
+
.image__WopE9[data-animate-blur] img {
|
|
41
|
+
filter: blur(9px);
|
|
42
|
+
transition: filter 0.8s ease-in;
|
|
43
|
+
}
|
|
44
|
+
.image__WopE9[data-animate-blur] img[data-load-done] {
|
|
45
|
+
filter: none;
|
|
45
46
|
}
|
|
@@ -2,7 +2,7 @@ import { b as DISPLAY_GROUPS, E as ELEMENTS, D as DATA, L as LAYOUT, A as Archet
|
|
|
2
2
|
import { g as getTranslationResources } from "../chunks/translationResources.js";
|
|
3
3
|
import { g as getSelector } from "../chunks/manifest.js";
|
|
4
4
|
import { c as speedConstraints, d as playButtonDefaults, e as DisplayNames, r as rootDataDefaults, b as showButtonOnHoverDefaults, f as borderDefaultValue, i as initialSize, C as COMPONENT_TYPE, s as semanticSelectors } from "../chunks/constants29.js";
|
|
5
|
-
import {
|
|
5
|
+
import { b as manifestFocusable, d as manifestMouseHover, e as manifestClickable } from "../chunks/manifestSdkMixins.js";
|
|
6
6
|
const manifest = {
|
|
7
7
|
id: "13165477-8205-4050-b078-424a1479159e",
|
|
8
8
|
type: COMPONENT_TYPE,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as ELEMENTS, C as CSS_PROPERTIES, b as DISPLAY_GROUPS, N as NativeStateType, a as ACTIONS, D as DATA, L as LAYOUT, I as INTERACTIONS, A as Archetype } from "../chunks/chunk-LDITHLYN.js";
|
|
2
2
|
import { g as getTranslationResources } from "../chunks/translationResources.js";
|
|
3
3
|
import { c as DesignStates, f as DisplayNames, s as selectors, g as DropdownAnchorPositions, h as DropdownAppliedStyleProperties, i as elementKeys, j as customActionKeys, k as MENU_ANIMATED_ICON_SPEC, m as states, p as presets, n as menuBuiltInActions, C as COMPONENT_TYPE } from "../chunks/constants27.js";
|
|
4
|
-
import {
|
|
4
|
+
import { d as manifestMouseHover } from "../chunks/manifestSdkMixins.js";
|
|
5
5
|
const dropdownItemConfig = {
|
|
6
6
|
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
7
7
|
[ELEMENTS.ELEMENT_TYPE.inlineElement]: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { b as DISPLAY_GROUPS, a as ACTIONS, D as DATA, L as LAYOUT, c as ContainerType, A as Archetype } from "../chunks/chunk-LDITHLYN.js";
|
|
2
2
|
import { D as DESCRIPTIONS, a as DISPLAY_NAMES, s as selectors } from "../chunks/constants26.js";
|
|
3
|
-
import {
|
|
3
|
+
import { b as manifestFocusable, d as manifestMouseHover, e as manifestClickable, c as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
4
4
|
import { g as getSelector } from "../chunks/manifest.js";
|
|
5
5
|
const manifest = {
|
|
6
6
|
id: "32d6f6fe-72ef-4490-82aa-d3b13cce6ef1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as ELEMENTS, N as NativeStateType, C as CSS_PROPERTIES, b as DISPLAY_GROUPS, D as DATA, a as ACTIONS, L as LAYOUT, A as Archetype } from "../chunks/chunk-LDITHLYN.js";
|
|
2
2
|
import { D as DisplayNames, c as DesignStates, d as defaultValues, s as selectors } from "../chunks/constants24.js";
|
|
3
3
|
import { g as getSelector } from "../chunks/manifest.js";
|
|
4
|
-
import {
|
|
4
|
+
import { b as manifestFocusable, c as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
5
5
|
import { m as manifestValidation } from "../chunks/manifest2.js";
|
|
6
6
|
const manifest = {
|
|
7
7
|
id: "01a3965d-95d7-49e2-903a-3a496de97054",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { C as CSS_PROPERTIES, N as NativeStateType, E as ELEMENTS, a as ACTIONS, D as DATA, I as INTERACTIONS, L as LAYOUT, A as Archetype } from "../chunks/chunk-LDITHLYN.js";
|
|
2
2
|
import { g as getTranslationResources } from "../chunks/translationResources.js";
|
|
3
3
|
import { h as elementKeys, i as DesignStates, j as DisplayNames, k as DisplayConfig, d as DefaultValues, I as IconPositionOptions, S as StaticDisplayFilters, l as PageToShareOptions, m as DefaultButtons, B as ButtonWidthOptions, b as COMPONENT_TYPE } from "../chunks/constants22.js";
|
|
4
|
-
import {
|
|
4
|
+
import { d as manifestMouseHover } from "../chunks/manifestSdkMixins.js";
|
|
5
5
|
const presets = {
|
|
6
6
|
horizontal: "horizontal",
|
|
7
7
|
vertical: "vertical"
|
|
@@ -2,7 +2,7 @@ import { E as ELEMENTS, C as CSS_PROPERTIES, D as DATA, a as ACTIONS, I as INTER
|
|
|
2
2
|
import { g as getTranslationResources } from "../chunks/translationResources.js";
|
|
3
3
|
import { g as getSelector } from "../chunks/manifest.js";
|
|
4
4
|
import { c as DisplayNames, a as semanticClassNames, d as slideshowCssCustomPropertiesDefaults, e as slideshowCssPropertiesDefaults, s as slideshowDataDefaults, C as COMPONENT_TYPE } from "../chunks/Slideshow.semanticClassNames.js";
|
|
5
|
-
import {
|
|
5
|
+
import { d as manifestMouseHover, e as manifestClickable, f as manifestPlayable, c as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
6
6
|
const navigationButtons = {
|
|
7
7
|
elementType: ELEMENTS.ELEMENT_TYPE.refElement,
|
|
8
8
|
refElement: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { E as ELEMENTS, N as NativeStateType, C as CSS_PROPERTIES, a as ACTIONS, I as INTERACTIONS, b as DISPLAY_GROUPS, D as DATA, L as LAYOUT, c as ContainerType, A as Archetype } from "../chunks/chunk-LDITHLYN.js";
|
|
2
2
|
import { D as DesignStates, c as classes, R as ROOT_MENU_ITEM_CSS_PROPERTIES, a as ROOT_MENU_ITEM_CUSTOM_PROPERTIES } from "../chunks/constants20.js";
|
|
3
|
-
import {
|
|
3
|
+
import { b as manifestFocusable, d as manifestMouseHover, e as manifestClickable, c as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
4
4
|
const menuItemConfig = {
|
|
5
5
|
elementType: ELEMENTS.ELEMENT_TYPE.inlineElement,
|
|
6
6
|
[ELEMENTS.ELEMENT_TYPE.inlineElement]: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { L as LAYOUT, N as NativeStateType, E as ELEMENTS, D as DATA, b as DISPLAY_GROUPS, C as CSS_PROPERTIES, A as Archetype } from "../chunks/chunk-LDITHLYN.js";
|
|
2
|
-
import {
|
|
2
|
+
import { b as manifestFocusable, d as manifestMouseHover, e as manifestClickable } from "../chunks/manifestSdkMixins.js";
|
|
3
3
|
const DesignStates = {
|
|
4
4
|
testCompCard: {
|
|
5
5
|
hover: { displayName: "Hover", className: "test-comp-card--hover" },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { E as ELEMENTS, N as NativeStateType, b as DISPLAY_GROUPS, C as CSS_PROPERTIES, D as DATA, L as LAYOUT, A as Archetype } from "../chunks/chunk-LDITHLYN.js";
|
|
2
2
|
import { D as DisplayNames, b as DesignStates, d as defaultValues, s as selectors } from "../chunks/constants18.js";
|
|
3
3
|
import { g as getSelector } from "../chunks/manifest.js";
|
|
4
|
-
import {
|
|
4
|
+
import { b as manifestFocusable, c as manifestChangeable } from "../chunks/manifestSdkMixins.js";
|
|
5
5
|
import { m as manifestValidation } from "../chunks/manifest2.js";
|
|
6
6
|
const manifest = {
|
|
7
7
|
id: "002d94d7-bec7-4082-8d00-fe4ede12024d",
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { I as INTERACTIONS, D as DATA, b as DISPLAY_GROUPS, E as ELEMENTS, C as CSS_PROPERTIES, N as NativeStateType, L as LAYOUT, A as Archetype } from "../chunks/chunk-LDITHLYN.js";
|
|
2
|
-
import { D as DomEventType } from "../chunks/types.impl.js";
|
|
3
2
|
import { D as DesignStates, a as DisplayNames, F as FunctionalStateKeys, c as componentClassNames } from "../chunks/constants3.js";
|
|
4
|
-
import { m as
|
|
3
|
+
import { m as manifestKeyboard, a as manifestInputable, b as manifestFocusable } from "../chunks/manifestSdkMixins.js";
|
|
5
4
|
const designState = (s, pseudoClass) => ({
|
|
6
5
|
displayName: s.displayName,
|
|
7
6
|
className: s.className,
|
|
@@ -350,26 +349,13 @@ const manifest = {
|
|
|
350
349
|
},
|
|
351
350
|
...manifestFocusable(),
|
|
352
351
|
...manifestInputable(),
|
|
353
|
-
|
|
354
|
-
displayName: "On Key Up",
|
|
355
|
-
dataType: DATA.DATA_TYPE.function,
|
|
356
|
-
[DATA.DATA_TYPE.function]: {
|
|
357
|
-
parameters: [{ domEvent: DomEventType.KEYBOARD }]
|
|
358
|
-
}
|
|
359
|
-
},
|
|
352
|
+
...manifestKeyboard(),
|
|
360
353
|
onValueChange: {
|
|
361
354
|
displayName: "On Value Change",
|
|
362
355
|
dataType: DATA.DATA_TYPE.function,
|
|
363
356
|
[DATA.DATA_TYPE.function]: {
|
|
364
357
|
parameters: [{ dataType: DATA.DATA_TYPE.text }]
|
|
365
358
|
}
|
|
366
|
-
},
|
|
367
|
-
onKeyDown: {
|
|
368
|
-
displayName: "On Key Down",
|
|
369
|
-
dataType: DATA.DATA_TYPE.function,
|
|
370
|
-
[DATA.DATA_TYPE.function]: {
|
|
371
|
-
parameters: [{ domEvent: DomEventType.KEYBOARD }]
|
|
372
|
-
}
|
|
373
359
|
}
|
|
374
360
|
},
|
|
375
361
|
interactions: {
|
|
@@ -101,18 +101,19 @@
|
|
|
101
101
|
--position-left: calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));
|
|
102
102
|
--position-top: calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));
|
|
103
103
|
object-position: var(--video-position, clamp(100%, var(--position-left), 0%) clamp(100%, var(--position-top), 0%));
|
|
104
|
-
}
|
|
104
|
+
}
|
|
105
|
+
.image__WopE9 {
|
|
105
106
|
display: block;
|
|
106
107
|
width: 100%;
|
|
107
108
|
height: 100%;
|
|
108
109
|
}
|
|
109
|
-
.
|
|
110
|
+
.image__WopE9 img {
|
|
110
111
|
max-width: var(--wix-img-max-width, 100%);
|
|
111
112
|
}
|
|
112
|
-
.
|
|
113
|
+
.image__WopE9[data-animate-blur] img {
|
|
113
114
|
filter: blur(9px);
|
|
114
115
|
transition: filter 0.8s ease-in;
|
|
115
116
|
}
|
|
116
|
-
.
|
|
117
|
+
.image__WopE9[data-animate-blur] img[data-load-done] {
|
|
117
118
|
filter: none;
|
|
118
119
|
}
|
|
@@ -137,19 +137,20 @@
|
|
|
137
137
|
--position-left: calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));
|
|
138
138
|
--position-top: calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));
|
|
139
139
|
object-position: var(--video-position, clamp(100%, var(--position-left), 0%) clamp(100%, var(--position-top), 0%));
|
|
140
|
-
}
|
|
140
|
+
}
|
|
141
|
+
.image__WopE9 {
|
|
141
142
|
display: block;
|
|
142
143
|
width: 100%;
|
|
143
144
|
height: 100%;
|
|
144
145
|
}
|
|
145
|
-
.
|
|
146
|
+
.image__WopE9 img {
|
|
146
147
|
max-width: var(--wix-img-max-width, 100%);
|
|
147
148
|
}
|
|
148
|
-
.
|
|
149
|
+
.image__WopE9[data-animate-blur] img {
|
|
149
150
|
filter: blur(9px);
|
|
150
151
|
transition: filter 0.8s ease-in;
|
|
151
152
|
}
|
|
152
|
-
.
|
|
153
|
+
.image__WopE9[data-animate-blur] img[data-load-done] {
|
|
153
154
|
filter: none;
|
|
154
155
|
}
|
|
155
156
|
.presetWrapper__J1yzj {
|
|
@@ -474,18 +474,19 @@
|
|
|
474
474
|
--position-left: calc(50cqw - 1cqh * var(--focal-x, 50) * var(--aspect-ratio, 1));
|
|
475
475
|
--position-top: calc(50cqh - 1cqw * var(--focal-y, 50) / var(--aspect-ratio, 1));
|
|
476
476
|
object-position: var(--video-position, clamp(100%, var(--position-left), 0%) clamp(100%, var(--position-top), 0%));
|
|
477
|
-
}
|
|
477
|
+
}
|
|
478
|
+
.image__WopE9 {
|
|
478
479
|
display: block;
|
|
479
480
|
width: 100%;
|
|
480
481
|
height: 100%;
|
|
481
482
|
}
|
|
482
|
-
.
|
|
483
|
+
.image__WopE9 img {
|
|
483
484
|
max-width: var(--wix-img-max-width, 100%);
|
|
484
485
|
}
|
|
485
|
-
.
|
|
486
|
+
.image__WopE9[data-animate-blur] img {
|
|
486
487
|
filter: blur(9px);
|
|
487
488
|
transition: filter 0.8s ease-in;
|
|
488
489
|
}
|
|
489
|
-
.
|
|
490
|
+
.image__WopE9[data-animate-blur] img[data-load-done] {
|
|
490
491
|
filter: none;
|
|
491
492
|
}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { i as imageKit, g as getPlaceholder } from "./index6.js";
|
|
3
|
+
const image = "image__WopE9";
|
|
4
|
+
const styles = {
|
|
5
|
+
image
|
|
6
|
+
};
|
|
7
|
+
const { STATIC_MEDIA_URL } = imageKit;
|
|
8
|
+
const fetchLQIP = ({ fittingType, src, target, options }) => {
|
|
9
|
+
const placeholder = getPlaceholder(fittingType, src, target, {
|
|
10
|
+
...options,
|
|
11
|
+
autoEncode: true
|
|
12
|
+
});
|
|
13
|
+
if ((placeholder == null ? void 0 : placeholder.uri) && !/^[a-z]+:/.test(placeholder.uri)) {
|
|
14
|
+
placeholder.uri = `${STATIC_MEDIA_URL}${placeholder.uri}`;
|
|
15
|
+
}
|
|
16
|
+
return placeholder;
|
|
17
|
+
};
|
|
18
|
+
const SCHEME_RE = /^[a-z]+:/;
|
|
19
|
+
const Image = (props) => {
|
|
20
|
+
var _a, _b;
|
|
21
|
+
const { id, containerId, uri, alt, name = "", role, width, height, displayMode, devicePixelRatio, quality, alignType, bgEffectName = "", focalPoint, upscaleMethod, className = "", crop, imageStyles = {}, targetWidth, targetHeight, targetScale, onLoad = () => {
|
|
22
|
+
}, onError = () => {
|
|
23
|
+
}, shouldUseLQIP, containerWidth, containerHeight, getPlaceholder: getPlaceholder2, isInFirstFold, placeholderTransition, socialAttrs, isSEOBot, skipMeasure, hasAnimation, encoding, isFluidLayout, baseHostURL } = props;
|
|
24
|
+
const imageRef = React.useRef(null);
|
|
25
|
+
let hasSsrSrc = "";
|
|
26
|
+
const hasBlurTransition = placeholderTransition === "blur";
|
|
27
|
+
const ssrImageData = React.useRef(null);
|
|
28
|
+
if (!ssrImageData.current) {
|
|
29
|
+
if (getPlaceholder2 || shouldUseLQIP || isInFirstFold || isSEOBot) {
|
|
30
|
+
const options = {
|
|
31
|
+
upscaleMethod,
|
|
32
|
+
...quality ? quality : {},
|
|
33
|
+
shouldLoadHQImage: isInFirstFold,
|
|
34
|
+
isSEOBot,
|
|
35
|
+
hasAnimation,
|
|
36
|
+
encoding,
|
|
37
|
+
baseHostURL
|
|
38
|
+
};
|
|
39
|
+
ssrImageData.current = (getPlaceholder2 || fetchLQIP)({
|
|
40
|
+
fittingType: displayMode,
|
|
41
|
+
src: {
|
|
42
|
+
id: uri,
|
|
43
|
+
width,
|
|
44
|
+
height,
|
|
45
|
+
crop,
|
|
46
|
+
name,
|
|
47
|
+
focalPoint
|
|
48
|
+
},
|
|
49
|
+
target: {
|
|
50
|
+
width: containerWidth,
|
|
51
|
+
height: containerHeight,
|
|
52
|
+
alignment: alignType,
|
|
53
|
+
htmlTag: "img"
|
|
54
|
+
},
|
|
55
|
+
options
|
|
56
|
+
});
|
|
57
|
+
hasSsrSrc = !ssrImageData.current.transformed || isInFirstFold || isSEOBot ? "" : "true";
|
|
58
|
+
} else {
|
|
59
|
+
ssrImageData.current = {
|
|
60
|
+
uri: void 0,
|
|
61
|
+
css: { img: {} },
|
|
62
|
+
attr: { img: {}, container: {} },
|
|
63
|
+
transformed: false
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
const isLQIP = !isSEOBot && (getPlaceholder2 || shouldUseLQIP) && !isInFirstFold && ssrImageData.current.transformed;
|
|
68
|
+
const imageInfo = React.useMemo(() => JSON.stringify({
|
|
69
|
+
containerId,
|
|
70
|
+
...containerId && { containerId },
|
|
71
|
+
...alignType && { alignType },
|
|
72
|
+
...skipMeasure && { skipMeasure: true },
|
|
73
|
+
displayMode,
|
|
74
|
+
...containerWidth && { targetWidth: containerWidth },
|
|
75
|
+
...containerHeight && { targetHeight: containerHeight },
|
|
76
|
+
...targetWidth && { targetWidth },
|
|
77
|
+
...targetHeight && { targetHeight },
|
|
78
|
+
...targetScale && { targetScale },
|
|
79
|
+
isLQIP,
|
|
80
|
+
isSEOBot,
|
|
81
|
+
lqipTransition: placeholderTransition,
|
|
82
|
+
encoding,
|
|
83
|
+
imageData: {
|
|
84
|
+
width,
|
|
85
|
+
height,
|
|
86
|
+
uri,
|
|
87
|
+
name,
|
|
88
|
+
displayMode,
|
|
89
|
+
hasAnimation,
|
|
90
|
+
...quality && { quality },
|
|
91
|
+
...devicePixelRatio && { devicePixelRatio },
|
|
92
|
+
...focalPoint && { focalPoint },
|
|
93
|
+
...crop && { crop },
|
|
94
|
+
...upscaleMethod && { upscaleMethod }
|
|
95
|
+
}
|
|
96
|
+
}), [
|
|
97
|
+
containerId,
|
|
98
|
+
alignType,
|
|
99
|
+
skipMeasure,
|
|
100
|
+
displayMode,
|
|
101
|
+
containerWidth,
|
|
102
|
+
containerHeight,
|
|
103
|
+
targetWidth,
|
|
104
|
+
targetHeight,
|
|
105
|
+
targetScale,
|
|
106
|
+
isLQIP,
|
|
107
|
+
isSEOBot,
|
|
108
|
+
placeholderTransition,
|
|
109
|
+
encoding,
|
|
110
|
+
width,
|
|
111
|
+
height,
|
|
112
|
+
uri,
|
|
113
|
+
name,
|
|
114
|
+
hasAnimation,
|
|
115
|
+
quality,
|
|
116
|
+
devicePixelRatio,
|
|
117
|
+
focalPoint,
|
|
118
|
+
crop,
|
|
119
|
+
upscaleMethod
|
|
120
|
+
]);
|
|
121
|
+
const ssrResult = ssrImageData.current;
|
|
122
|
+
const src = ssrResult == null ? void 0 : ssrResult.uri;
|
|
123
|
+
const srcset = ssrResult == null ? void 0 : ssrResult.srcset;
|
|
124
|
+
const placeholderStyle = (_a = ssrResult.css) == null ? void 0 : _a.img;
|
|
125
|
+
const classNames = `${styles.image} ${className}`;
|
|
126
|
+
React.useEffect(() => {
|
|
127
|
+
const imgElement = imageRef.current;
|
|
128
|
+
if (onLoad && (imgElement == null ? void 0 : imgElement.currentSrc) && (imgElement == null ? void 0 : imgElement.complete)) {
|
|
129
|
+
onLoad({
|
|
130
|
+
target: imgElement
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
}, []);
|
|
134
|
+
const maxWidth = ssrResult && !(ssrResult == null ? void 0 : ssrResult.transformed) ? `max(${width}px, 100%)` : targetWidth ? `${targetWidth}px` : null;
|
|
135
|
+
return React.createElement(
|
|
136
|
+
"wow-image",
|
|
137
|
+
{ id, class: classNames, "data-image-info": imageInfo, "data-motion-part": `BG_IMG ${containerId}`, "data-bg-effect-name": bgEffectName, "data-has-ssr-src": hasSsrSrc, "data-animate-blur": !isSEOBot && isLQIP && hasBlurTransition ? "" : void 0, "data-is-responsive": isFluidLayout ? "true" : void 0, style: maxWidth ? { "--wix-img-max-width": maxWidth } : {} },
|
|
138
|
+
React.createElement("img", {
|
|
139
|
+
src,
|
|
140
|
+
ref: imageRef,
|
|
141
|
+
alt: alt || "",
|
|
142
|
+
role,
|
|
143
|
+
style: { ...placeholderStyle, ...imageStyles },
|
|
144
|
+
onLoad,
|
|
145
|
+
onError,
|
|
146
|
+
width: containerWidth ? containerWidth : void 0,
|
|
147
|
+
height: containerHeight ? containerHeight : void 0,
|
|
148
|
+
...socialAttrs,
|
|
149
|
+
srcSet: isInFirstFold ? (_b = srcset == null ? void 0 : srcset.dpr) == null ? void 0 : _b.map((s) => SCHEME_RE.test(s) ? s : `${STATIC_MEDIA_URL}${s}`).join(", ") : void 0,
|
|
150
|
+
// @ts-expect-error fetchpriority type should work in react > 18.3 https://github.com/facebook/react/pull/25927
|
|
151
|
+
fetchpriority: isInFirstFold ? "high" : void 0,
|
|
152
|
+
loading: isInFirstFold === false ? "lazy" : void 0,
|
|
153
|
+
// The src attribute triggers a mismatch warning because wow-image updates its src outside of the React lifecycle. This causes React to retain the old value in the virtual DOM, which could potentially lead to a bug where the old value is re-rendered during updates. However, we’re confident that this issue is not reproducing in current (16-18) React versions
|
|
154
|
+
suppressHydrationWarning: true
|
|
155
|
+
})
|
|
156
|
+
);
|
|
157
|
+
};
|
|
158
|
+
export {
|
|
159
|
+
Image as I
|
|
160
|
+
};
|