@wix/editor-react-components 1.2838.0 → 1.2840.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.
Files changed (48) hide show
  1. package/dist/site/components/Image3/component.js +2 -489
  2. package/dist/site/components/Logo/component.js +1 -157
  3. package/dist/site/components/Logo/css.css +16 -15
  4. package/dist/site/components/TransparentVideo/css.css +5 -4
  5. package/dist/site/components/VideoScrub/css.css +5 -4
  6. package/dist/site/components/VideoUpload/css.css +5 -4
  7. package/dist/site/components/chunks/Image.js +160 -0
  8. package/dist/site/components/chunks/Video.js +10 -648
  9. package/dist/site/components/chunks/customElementInit.js +655 -0
  10. package/dist/site/components/chunks/index6.js +7 -6
  11. package/dist/site/components/translations/Repeater/messages_ar.json +3 -0
  12. package/dist/site/components/translations/Repeater/messages_bg.json +3 -0
  13. package/dist/site/components/translations/Repeater/messages_ca.json +3 -0
  14. package/dist/site/components/translations/Repeater/messages_cs.json +3 -0
  15. package/dist/site/components/translations/Repeater/messages_da.json +3 -0
  16. package/dist/site/components/translations/Repeater/messages_de.json +3 -0
  17. package/dist/site/components/translations/Repeater/messages_el.json +3 -0
  18. package/dist/site/components/translations/Repeater/messages_en.json +3 -0
  19. package/dist/site/components/translations/Repeater/messages_es.json +3 -0
  20. package/dist/site/components/translations/Repeater/messages_fi.json +3 -0
  21. package/dist/site/components/translations/Repeater/messages_fr.json +3 -0
  22. package/dist/site/components/translations/Repeater/messages_he.json +3 -0
  23. package/dist/site/components/translations/Repeater/messages_hi.json +3 -0
  24. package/dist/site/components/translations/Repeater/messages_hr.json +3 -0
  25. package/dist/site/components/translations/Repeater/messages_hu.json +3 -0
  26. package/dist/site/components/translations/Repeater/messages_id.json +3 -0
  27. package/dist/site/components/translations/Repeater/messages_it.json +3 -0
  28. package/dist/site/components/translations/Repeater/messages_ja.json +3 -0
  29. package/dist/site/components/translations/Repeater/messages_ko.json +3 -0
  30. package/dist/site/components/translations/Repeater/messages_lt.json +3 -0
  31. package/dist/site/components/translations/Repeater/messages_lv.json +3 -0
  32. package/dist/site/components/translations/Repeater/messages_ms.json +3 -0
  33. package/dist/site/components/translations/Repeater/messages_nl.json +3 -0
  34. package/dist/site/components/translations/Repeater/messages_no.json +3 -0
  35. package/dist/site/components/translations/Repeater/messages_pl.json +3 -0
  36. package/dist/site/components/translations/Repeater/messages_pt.json +3 -0
  37. package/dist/site/components/translations/Repeater/messages_ro.json +3 -0
  38. package/dist/site/components/translations/Repeater/messages_ru.json +3 -0
  39. package/dist/site/components/translations/Repeater/messages_sv.json +3 -0
  40. package/dist/site/components/translations/Repeater/messages_th.json +3 -0
  41. package/dist/site/components/translations/Repeater/messages_tl.json +3 -0
  42. package/dist/site/components/translations/Repeater/messages_tr.json +3 -0
  43. package/dist/site/components/translations/Repeater/messages_uk.json +3 -0
  44. package/dist/site/components/translations/Repeater/messages_vi.json +3 -0
  45. package/dist/site/components/translations/Repeater/messages_zh.json +3 -0
  46. package/dist/site/components/translations/version_file +1 -1
  47. package/package.json +5 -5
  48. package/dist/site/components/chunks/fastdom.js +0 -166
@@ -1,18 +1,4 @@
1
- .image__WopE9 {
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
  }
@@ -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
- }.image__OIbFL {
104
+ }
105
+ .image__WopE9 {
105
106
  display: block;
106
107
  width: 100%;
107
108
  height: 100%;
108
109
  }
109
- .image__OIbFL img {
110
+ .image__WopE9 img {
110
111
  max-width: var(--wix-img-max-width, 100%);
111
112
  }
112
- .image__OIbFL[data-animate-blur] img {
113
+ .image__WopE9[data-animate-blur] img {
113
114
  filter: blur(9px);
114
115
  transition: filter 0.8s ease-in;
115
116
  }
116
- .image__OIbFL[data-animate-blur] img[data-load-done] {
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
- }.image__OIbFL {
140
+ }
141
+ .image__WopE9 {
141
142
  display: block;
142
143
  width: 100%;
143
144
  height: 100%;
144
145
  }
145
- .image__OIbFL img {
146
+ .image__WopE9 img {
146
147
  max-width: var(--wix-img-max-width, 100%);
147
148
  }
148
- .image__OIbFL[data-animate-blur] img {
149
+ .image__WopE9[data-animate-blur] img {
149
150
  filter: blur(9px);
150
151
  transition: filter 0.8s ease-in;
151
152
  }
152
- .image__OIbFL[data-animate-blur] img[data-load-done] {
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
- }.image__OIbFL {
477
+ }
478
+ .image__WopE9 {
478
479
  display: block;
479
480
  width: 100%;
480
481
  height: 100%;
481
482
  }
482
- .image__OIbFL img {
483
+ .image__WopE9 img {
483
484
  max-width: var(--wix-img-max-width, 100%);
484
485
  }
485
- .image__OIbFL[data-animate-blur] img {
486
+ .image__WopE9[data-animate-blur] img {
486
487
  filter: blur(9px);
487
488
  transition: filter 0.8s ease-in;
488
489
  }
489
- .image__OIbFL[data-animate-blur] img[data-load-done] {
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
+ };