@wix/editor-react-components 1.2832.0 → 1.2834.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 (108) hide show
  1. package/dist/site/components/AccordionComponent/component.js +2 -2
  2. package/dist/site/components/AccordionComponent/manifest.js +2 -2
  3. package/dist/site/components/AnimatedIcon/component.js +2 -3
  4. package/dist/site/components/AnimatedIcon/manifest.js +2 -2
  5. package/dist/site/components/AudioPlayer/component.js +9 -10
  6. package/dist/site/components/AudioPlayer/manifest.js +2 -2
  7. package/dist/site/components/BoxContainer/component.js +1 -2
  8. package/dist/site/components/Breadcrumbs/component.js +14 -15
  9. package/dist/site/components/Breadcrumbs/manifest.js +6 -6
  10. package/dist/site/components/Breadcrumbs/useBreadcrumbItems.d.ts +3 -1
  11. package/dist/site/components/Button/manifest.js +8 -2
  12. package/dist/site/components/Checkbox/component.js +4 -5
  13. package/dist/site/components/Checkbox/manifest.js +8 -2
  14. package/dist/site/components/CheckboxGroup/component.js +4 -5
  15. package/dist/site/components/CheckboxGroup/manifest.js +8 -2
  16. package/dist/site/components/CollapsibleText/component.js +3 -4
  17. package/dist/site/components/CollapsibleText/manifest.js +12 -2
  18. package/dist/site/components/DatePicker/component.js +4 -4
  19. package/dist/site/components/DatePicker/manifest.js +4 -2
  20. package/dist/site/components/Dropdown/component.js +3 -3
  21. package/dist/site/components/Dropdown/manifest.js +2 -1
  22. package/dist/site/components/GoogleMap/component.js +5 -6
  23. package/dist/site/components/GoogleMap/manifest.js +5 -1
  24. package/dist/site/components/HTMLComponent/component.js +15 -18
  25. package/dist/site/components/HTMLComponent/manifest.js +12 -4
  26. package/dist/site/components/HeadingTextBlock/component.js +2 -2
  27. package/dist/site/components/HipaaIcon/component.js +2 -2
  28. package/dist/site/components/HipaaIcon/manifest.js +3 -3
  29. package/dist/site/components/ImageReveal/component.js +2 -2
  30. package/dist/site/components/LegacyAppWidget/component.js +1 -1
  31. package/dist/site/components/LegacyContainer/component.js +1 -1
  32. package/dist/site/components/LegacyMultiStateBox/component.js +1 -1
  33. package/dist/site/components/Line/component.js +2 -5
  34. package/dist/site/components/Line/manifest.js +2 -2
  35. package/dist/site/components/Lottie/component.js +4 -5
  36. package/dist/site/components/Lottie/manifest.js +10 -2
  37. package/dist/site/components/MarkdownBlock/component.js +1 -1
  38. package/dist/site/components/Menu/component.js +9 -11
  39. package/dist/site/components/Menu/manifest.js +10 -4
  40. package/dist/site/components/MultiStateBox/manifest.js +1 -1
  41. package/dist/site/components/RadioButtons/component.js +4 -5
  42. package/dist/site/components/RadioButtons/manifest.js +8 -2
  43. package/dist/site/components/Repeater/manifest.js +1 -1
  44. package/dist/site/components/ShareButtons/component.js +6 -5
  45. package/dist/site/components/ShareButtons/manifest.js +2 -2
  46. package/dist/site/components/Slideshow/component.js +4 -4
  47. package/dist/site/components/Slideshow/manifest.js +8 -2
  48. package/dist/site/components/SlotsPlaceholder/component.js +3 -3
  49. package/dist/site/components/SlotsPlaceholder/manifest.js +2 -2
  50. package/dist/site/components/SocialPlayerSnapchat/manifest.js +1 -1
  51. package/dist/site/components/SocialPlayerTikTok/manifest.js +1 -1
  52. package/dist/site/components/SocialPlayerVimeo/manifest.js +1 -1
  53. package/dist/site/components/SocialPlayerYoutube/manifest.js +1 -1
  54. package/dist/site/components/Tabs/component.js +2 -3
  55. package/dist/site/components/Tabs/manifest.js +2 -2
  56. package/dist/site/components/TestComp/TestComp.d.ts +1 -0
  57. package/dist/site/components/TestComp/component.js +3 -0
  58. package/dist/site/components/TestComp/manifest.js +8 -0
  59. package/dist/site/components/TextBox/component.js +4 -5
  60. package/dist/site/components/TextBox/manifest.js +8 -2
  61. package/dist/site/components/TextEffects3d/component.js +1 -1
  62. package/dist/site/components/TextEffectsBauhaus/component.js +1 -1
  63. package/dist/site/components/TextEffectsGlass/component.js +1 -1
  64. package/dist/site/components/TextEffectsGlitch/component.js +1 -1
  65. package/dist/site/components/TextEffectsLetterPress/component.js +1 -1
  66. package/dist/site/components/TextEffectsMatrix/component.js +1 -1
  67. package/dist/site/components/TextEffectsNeonSign/component.js +1 -1
  68. package/dist/site/components/TextEffectsNoisy/component.js +1 -1
  69. package/dist/site/components/TextEffectsOutlineOut/component.js +1 -1
  70. package/dist/site/components/TextEffectsRetro/component.js +1 -1
  71. package/dist/site/components/TextEffectsShook/component.js +1 -1
  72. package/dist/site/components/TextEffectsSticker/component.js +1 -1
  73. package/dist/site/components/TextEffectsStriped/component.js +1 -1
  74. package/dist/site/components/TextInput/component.js +2 -3
  75. package/dist/site/components/TextInput/manifest.js +8 -2
  76. package/dist/site/components/TextMarquee/component.js +5 -6
  77. package/dist/site/components/TextMarquee/manifest.js +3 -2
  78. package/dist/site/components/TimePicker/component.js +5 -5
  79. package/dist/site/components/TimePicker/manifest.js +4 -2
  80. package/dist/site/components/TransparentVideo/manifest.js +1 -1
  81. package/dist/site/components/VideoScrub/component.js +3 -3
  82. package/dist/site/components/VideoScrub/manifest.js +2 -2
  83. package/dist/site/components/VideoUpload/component.js +2 -3
  84. package/dist/site/components/VideoUpload/manifest.js +3 -2
  85. package/dist/site/components/chunks/AnimatedIcon.js +1 -1
  86. package/dist/site/components/chunks/Button.js +6 -7
  87. package/dist/site/components/chunks/index10.js +238 -3
  88. package/dist/site/components/chunks/index11.js +2 -31127
  89. package/dist/site/components/chunks/index12.js +3 -3
  90. package/dist/site/components/chunks/index13.js +31123 -38
  91. package/dist/site/components/chunks/index14.js +5 -0
  92. package/dist/site/components/chunks/index15.js +5 -0
  93. package/dist/site/components/chunks/index16.js +5 -0
  94. package/dist/site/components/chunks/index17.js +46 -0
  95. package/dist/site/components/chunks/index2.js +3 -3
  96. package/dist/site/components/chunks/index3.js +1 -1
  97. package/dist/site/components/chunks/index4.js +1 -1
  98. package/dist/site/components/chunks/index5.js +1 -1
  99. package/dist/site/components/chunks/index7.js +3 -67
  100. package/dist/site/components/chunks/index8.js +52 -2006
  101. package/dist/site/components/chunks/index9.js +2012 -230
  102. package/dist/site/components/chunks/parseHtml.js +1 -1
  103. package/dist/site/components/chunks/parseSvg.js +1 -1
  104. package/dist/site/components/chunks/staticService.js +1 -1
  105. package/dist/site/components/chunks/urlUtils.js +21 -0
  106. package/dist/site/components/chunks/useConsentPolicyProps.js +8 -8
  107. package/dist/site/components/chunks/useCurrentLanguage.js +20 -0
  108. package/package.json +9 -7
@@ -5,10 +5,12 @@ import React__default, { useRef, useCallback, useEffect, useMemo } from "react";
5
5
  import { u as useConsentPolicyProps, C as ConsentPolicyWrapper } from "../chunks/useConsentPolicyProps.js";
6
6
  import { a as getDataAttributes } from "../chunks/dataUtils.js";
7
7
  import { useService } from "@wix/services-manager-react";
8
- import { d as defineStaticService } from "../chunks/staticService.js";
9
- import { E as EnvironmentDefinition } from "../chunks/index2.js";
8
+ import { R as RenderingContextDefinition } from "../chunks/index3.js";
9
+ import { E as ExperimentsDefinition } from "../chunks/index7.js";
10
+ import { C as ConfigurationDefinition } from "../chunks/index15.js";
11
+ import { d as defineService } from "../chunks/index11.js";
10
12
  import { T as TranslationsDefinition } from "../chunks/index4.js";
11
- import { A as ALLOWED_PROTOCOLS, S as SANDBOX, C as COMPONENT_TYPE, H as HTML_COMPONENT_TITLE_KEY, a as ARIA_LABEL_NAMESPACE, L as LEGACY_HTML_COMPONENT_TITLE_KEY, b as HTML_COMPONENT_TITLE_DEFAULT, D as DEFAULT_CONSENT_POLICY, c as ConsentTranslations } from "../chunks/constants35.js";
13
+ import { A as ALLOWED_PROTOCOLS, C as COMPONENT_TYPE, H as HTML_COMPONENT_TITLE_KEY, a as ARIA_LABEL_NAMESPACE, L as LEGACY_HTML_COMPONENT_TITLE_KEY, b as HTML_COMPONENT_TITLE_DEFAULT, D as DEFAULT_CONSENT_POLICY, S as SANDBOX, c as ConsentTranslations } from "../chunks/constants35.js";
12
14
  const isBrowser = () => typeof window !== "undefined";
13
15
  function useIFrame({
14
16
  reducer = () => ({}),
@@ -163,7 +165,7 @@ const HTMLComponent$1 = React.forwardRef((props, forwardRef) => {
163
165
  }
164
166
  ) }) });
165
167
  });
166
- const TopologyDefinition = defineStaticService("@wix/viewer-service-topology");
168
+ const TopologyDefinition = defineService("@wix/site-service-topology");
167
169
  const setProtocol = (url, staticHTMLComponentUrl) => {
168
170
  const topologyProtocol = staticHTMLComponentUrl.startsWith("https") ? "https:" : "http:";
169
171
  const protocol = url.startsWith("https") ? "https:" : topologyProtocol;
@@ -178,17 +180,18 @@ const useHTMLComponentProps = ({
178
180
  isPreview,
179
181
  shouldUseConsentPolicy
180
182
  }) => {
181
- var _a, _b, _c;
182
183
  const { topology } = useService(TopologyDefinition);
183
- const environment = useService(EnvironmentDefinition);
184
+ const { SSR: isSSR } = useService(RenderingContextDefinition);
185
+ const { sandboxInHTMLComp } = useService(ConfigurationDefinition);
186
+ const { isOpen } = useService(ExperimentsDefinition);
184
187
  const { translate } = useService(TranslationsDefinition);
185
188
  const consentPolicyProps = useConsentPolicyProps({
186
189
  namespace: COMPONENT_TYPE,
187
190
  translationEntries: ConsentTranslations
188
191
  });
189
192
  const memoizedProps = useMemo(() => {
190
- var _a2;
191
- const sandbox = (environment == null ? void 0 : environment.useSandboxInHTMLComp) ? SANDBOX : void 0;
193
+ var _a;
194
+ const sandbox = sandboxInHTMLComp ? SANDBOX : void 0;
192
195
  const allow = props.allowFullScreen ? "fullscreen" : void 0;
193
196
  const iframeUrl = setProtocol(
194
197
  props.url ?? "",
@@ -205,7 +208,7 @@ const useHTMLComponentProps = ({
205
208
  return {
206
209
  ...props,
207
210
  url: iframeUrl,
208
- title: ((_a2 = props.a11y) == null ? void 0 : _a2.ariaLabel) ?? "",
211
+ title: ((_a = props.a11y) == null ? void 0 : _a.ariaLabel) ?? "",
209
212
  scrolling: props.scrolling ?? "auto",
210
213
  sandbox,
211
214
  allow,
@@ -226,20 +229,14 @@ const useHTMLComponentProps = ({
226
229
  translate,
227
230
  isPreview,
228
231
  topology == null ? void 0 : topology.staticHTMLComponentUrl,
229
- environment == null ? void 0 : environment.useSandboxInHTMLComp,
232
+ sandboxInHTMLComp,
230
233
  consentPolicyProps,
231
234
  shouldUseConsentPolicy
232
235
  ]);
233
236
  return {
234
237
  componentProps: memoizedProps,
235
- isSSR: ((_a = environment == null ? void 0 : environment.isSSR) == null ? void 0 : _a.call(environment)) ?? false,
236
- isClassNameToRootEnabled: (((_b = environment == null ? void 0 : environment.isExperimentOpen) == null ? void 0 : _b.call(
237
- environment,
238
- CLASS_NAME_ON_COMPONENT_ROOT_EXPERIMENT
239
- )) || ((_c = environment == null ? void 0 : environment.isExperimentOpen) == null ? void 0 : _c.call(
240
- environment,
241
- MOVE_PREVIEW_IDENTITY_CLASSES_TO_ROOT_EXPERIMENT
242
- ))) ?? false
238
+ isSSR,
239
+ isClassNameToRootEnabled: isOpen(CLASS_NAME_ON_COMPONENT_ROOT_EXPERIMENT) || isOpen(MOVE_PREVIEW_IDENTITY_CLASSES_TO_ROOT_EXPERIMENT)
243
240
  };
244
241
  };
245
242
  const codeBlockIcon = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.02637%2012.7462L10.0254%205L10.9936%205.24987L8.99465%2012.9961L8.02637%2012.7462Z'%20fill='black'%20/%3e%3cpath%20d='M7.41%2010.998L5.42%208.99799L7.41%207.00799L6.71%206.29799L4%208.99799L6.71%2011.708L7.41%2010.998Z'%20fill='black'%20/%3e%3cpath%20d='M14.9901%208.99799L12.2901%2011.708L11.5801%2010.998L13.5801%208.99799L11.5801%207.00799L12.2901%206.29799L14.9901%208.99799Z'%20fill='black'%20/%3e%3cpath%20d='M16.01%206.99769H18.51C19.34%206.99769%2020.01%207.66769%2020.01%208.49769V17.4977C20.01%2018.3277%2019.34%2018.9977%2018.51%2018.9977H7.51001C6.68001%2018.9977%206.01001%2018.3277%206.01001%2017.4977V13.9977H7.01001V17.4977C7.01001%2017.7777%207.23001%2017.9977%207.51001%2017.9977H18.51C18.79%2017.9977%2019.01%2017.7777%2019.01%2017.4977V8.49769C19.01%208.21769%2018.79%207.99769%2018.51%207.99769H16.01V6.99769Z'%20fill='black'%20/%3e%3c/svg%3e";
@@ -180,8 +180,12 @@ const manifest = {
180
180
  dependencies: {
181
181
  serviceDependencies: [
182
182
  "@wix/viewer-service-consent-policy",
183
- "@wix/viewer-service-environment",
184
- "@wix/viewer-service-topology",
183
+ "@wix/site-service-configuration",
184
+ "@wix/site-service-device-info",
185
+ "@wix/site-service-editor-context",
186
+ "@wix/site-service-experiments",
187
+ "@wix/site-service-rendering-context",
188
+ "@wix/site-service-topology",
185
189
  "@wix/site-service-translations"
186
190
  ]
187
191
  }
@@ -192,8 +196,12 @@ const manifest = {
192
196
  dependencies: {
193
197
  serviceDependencies: [
194
198
  "@wix/viewer-service-consent-policy",
195
- "@wix/viewer-service-environment",
196
- "@wix/viewer-service-topology",
199
+ "@wix/site-service-configuration",
200
+ "@wix/site-service-device-info",
201
+ "@wix/site-service-editor-context",
202
+ "@wix/site-service-experiments",
203
+ "@wix/site-service-rendering-context",
204
+ "@wix/site-service-topology",
197
205
  "@wix/site-service-translations"
198
206
  ]
199
207
  }
@@ -1,8 +1,8 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { c as clsx } from "../chunks/clsx.js";
3
- import "../chunks/index11.js";
3
+ import "../chunks/index13.js";
4
4
  import "react";
5
- import { T as Typography } from "../chunks/index13.js";
5
+ import { T as Typography } from "../chunks/index17.js";
6
6
  import { d as directionStyles } from "../chunks/direction.module.js";
7
7
  import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
8
8
  import { d as defaultValues, m as manifestClasses } from "../chunks/constants34.js";
@@ -2,9 +2,9 @@ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { c as clsx } from "../chunks/clsx.js";
3
3
  import { useService } from "@wix/services-manager-react";
4
4
  import { T as TranslationsDefinition } from "../chunks/index4.js";
5
- import { d as defineService } from "../chunks/index10.js";
5
+ import { d as defineService } from "../chunks/index11.js";
6
6
  import { C as COMPONENT_TYPE, T as TRANSLATIONS_NAMESPACE, a as TranslationKeys, L as LegacyTranslationKeys, D as DefaultTranslations } from "../chunks/constants33.js";
7
- const RendererConfigurationDefinition = defineService("@wix/viewer-service-renderer-configuration");
7
+ const RendererConfigurationDefinition = defineService("@wix/site-service-renderer-configuration");
8
8
  const hipaaIcon = "hipaaIcon__VA3L3";
9
9
  const compliant = "compliant__1NZWT";
10
10
  const badge = "badge__zEAc-";
@@ -69,7 +69,7 @@ const manifest = {
69
69
  moduleSpecifier: "@wix/editor-react-components/HipaaIcon",
70
70
  dependencies: {
71
71
  serviceDependencies: [
72
- "@wix/viewer-service-renderer-configuration",
72
+ "@wix/site-service-renderer-configuration",
73
73
  "@wix/site-service-translations"
74
74
  ]
75
75
  }
@@ -78,8 +78,8 @@ const manifest = {
78
78
  componentUrl: "./site/components/HipaaIcon/component.preview.tsx",
79
79
  dependencies: {
80
80
  serviceDependencies: [
81
- "@wix/viewer-service-renderer-configuration",
82
- "@wix/viewer-service-environment",
81
+ "@wix/site-service-renderer-configuration",
82
+ "@wix/site-service-editor-context",
83
83
  "@wix/site-service-translations"
84
84
  ]
85
85
  }
@@ -3,8 +3,8 @@ import { useRef, useState, useEffect } from "react";
3
3
  import Image3 from "../Image3/component.js";
4
4
  import { c as clsx } from "../chunks/clsx.js";
5
5
  import { c as convertA11yKeysToHtmlFormat } from "../chunks/a11y.js";
6
- import "../chunks/index11.js";
7
- import { T as Typography } from "../chunks/index13.js";
6
+ import "../chunks/index13.js";
7
+ import { T as Typography } from "../chunks/index17.js";
8
8
  import { d as directionStyles } from "../chunks/direction.module.js";
9
9
  import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
10
10
  import { D as DEFAULT_SLIDER_POSITION, A as ARIA_LABELS, m as manifestClasses, C as CHEVRON_PATH, d as defaultValues, S as SLIDER_STEP } from "../chunks/constants32.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { c as cn } from "../chunks/index7.js";
2
+ import { c as cn } from "../chunks/index8.js";
3
3
  import { c as clsx } from "../chunks/clsx.js";
4
4
  import { a as getDataAttributes } from "../chunks/dataUtils.js";
5
5
  import { R as ResponsiveContainer } from "../chunks/ResponsiveContainer.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { c as cn } from "../chunks/index7.js";
2
+ import { c as cn } from "../chunks/index8.js";
3
3
  import * as React from "react";
4
4
  import { R as ResponsiveBox$1 } from "../chunks/ResponsiveBox.js";
5
5
  import { R as ResponsiveContainer } from "../chunks/ResponsiveContainer.js";
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { c as cn } from "../chunks/index7.js";
2
+ import { c as cn } from "../chunks/index8.js";
3
3
  import { a as getDataAttributes } from "../chunks/dataUtils.js";
4
4
  import { f as getAriaAttributes } from "../chunks/a11y.js";
5
5
  import { c as clsx } from "../chunks/clsx.js";
@@ -5,7 +5,7 @@ import { a as getDataAttributes } from "../chunks/dataUtils.js";
5
5
  import { e as getTabIndexAttribute, c as convertA11yKeysToHtmlFormat } from "../chunks/a11y.js";
6
6
  import { d as directionStyles } from "../chunks/direction.module.js";
7
7
  import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
8
- import { E as EnvironmentDefinition } from "../chunks/index2.js";
8
+ import { L as LocaleDefinition } from "../chunks/index12.js";
9
9
  import { useService } from "@wix/services-manager-react";
10
10
  const semanticClassNames = {
11
11
  root: "line"
@@ -27,10 +27,7 @@ const Line = (props) => {
27
27
  direction,
28
28
  wix
29
29
  } = props;
30
- const { getLanguageDirection } = useService(
31
- EnvironmentDefinition
32
- );
33
- const environmentDirection = getLanguageDirection();
30
+ const { direction: environmentDirection } = useService(LocaleDefinition);
34
31
  const presetsWrapperProps = (wix == null ? void 0 : wix.presetsWrapperProps) || {};
35
32
  const { tabIndex, ariaLabel, ...restA11y } = a11y || {};
36
33
  const accessibleName = ariaLabel == null ? void 0 : ariaLabel.trim();
@@ -638,13 +638,13 @@ const manifest = {
638
638
  componentUrl: "./site/components/Line/component.tsx",
639
639
  moduleSpecifier: "@wix/editor-react-components/Line",
640
640
  dependencies: {
641
- serviceDependencies: ["@wix/viewer-service-environment"]
641
+ serviceDependencies: ["@wix/site-service-locale"]
642
642
  }
643
643
  },
644
644
  editor: {
645
645
  componentUrl: "./site/components/Line/component.preview.tsx",
646
646
  dependencies: {
647
- serviceDependencies: ["@wix/viewer-service-environment"]
647
+ serviceDependencies: ["@wix/site-service-locale"]
648
648
  }
649
649
  }
650
650
  },
@@ -8,7 +8,8 @@ import { r as rootDataDefaults, s as semanticSelectors, C as COMPONENT_TYPE, A a
8
8
  import React__default, { useEffect, useState, useRef, useMemo } from "react";
9
9
  import { g as getDefaultExportFromCjs } from "../chunks/_commonjsHelpers.js";
10
10
  import { c as convertA11yKeysToHtmlFormat } from "../chunks/a11y.js";
11
- import { E as EnvironmentDefinition } from "../chunks/index2.js";
11
+ import { R as RenderingContextDefinition } from "../chunks/index3.js";
12
+ import { D as DeviceInfoDefinition } from "../chunks/index2.js";
12
13
  import { u as useHasDisplayedElement } from "../chunks/useHasDisplayedElement.js";
13
14
  var lottie$2 = { exports: {} };
14
15
  var lottie$1 = lottie$2.exports;
@@ -16814,10 +16815,8 @@ function useLottie({
16814
16815
  speed = rootDataDefaults.speed,
16815
16816
  allowClickToStop = rootDataDefaults.allowClickToStop
16816
16817
  }) {
16817
- var _a;
16818
- const environment = useService(EnvironmentDefinition);
16819
- const reducedMotion = (environment == null ? void 0 : environment.reducedMotion) ?? false;
16820
- const isSSR = ((_a = environment == null ? void 0 : environment.isSSR) == null ? void 0 : _a.call(environment)) ?? false;
16818
+ const { reducedMotion } = useService(DeviceInfoDefinition);
16819
+ const { SSR: isSSR } = useService(RenderingContextDefinition);
16821
16820
  const shouldUseCanvasRenderer = useMemo(
16822
16821
  () => !isSSR && isIOS(window),
16823
16822
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -177,7 +177,11 @@ const manifest = {
177
177
  moduleSpecifier: "@wix/editor-react-components/Lottie",
178
178
  dependencies: {
179
179
  serviceDependencies: [
180
- "@wix/viewer-service-environment",
180
+ "@wix/site-service-device-info",
181
+ "@wix/site-service-editor-context",
182
+ "@wix/site-service-locale",
183
+ "@wix/viewer-service-multilingual",
184
+ "@wix/site-service-rendering-context",
181
185
  "@wix/site-service-translations"
182
186
  ],
183
187
  componentDependencies: [
@@ -190,7 +194,11 @@ const manifest = {
190
194
  componentUrl: "./site/components/Lottie/component.preview.tsx",
191
195
  dependencies: {
192
196
  serviceDependencies: [
193
- "@wix/viewer-service-environment",
197
+ "@wix/site-service-device-info",
198
+ "@wix/site-service-editor-context",
199
+ "@wix/site-service-locale",
200
+ "@wix/viewer-service-multilingual",
201
+ "@wix/site-service-rendering-context",
194
202
  "@wix/site-service-translations"
195
203
  ]
196
204
  }
@@ -6,7 +6,7 @@ import { d as directionStyles } from "../chunks/direction.module.js";
6
6
  import { C as COMPONENT_TYPE, T as TranslationKeys, a as TRANSLATIONS_NAMESPACE, L as LegacyTranslationKeys, D as DefaultTranslations, m as manifestClasses, d as defaultValues } from "../chunks/constants28.js";
7
7
  import "react";
8
8
  import { g as getDefaultExportFromCjs } from "../chunks/_commonjsHelpers.js";
9
- import { r as requireCjs } from "../chunks/index9.js";
9
+ import { r as requireCjs } from "../chunks/index10.js";
10
10
  function ok$1() {
11
11
  }
12
12
  function unreachable() {
@@ -1,8 +1,9 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { c as clsx } from "../chunks/clsx.js";
3
3
  import { useService, useGetService } from "@wix/services-manager-react";
4
- import { U as UrlDefinition } from "../chunks/index12.js";
5
- import { d as defineService } from "../chunks/index10.js";
4
+ import { t as toUrlWithoutQuery } from "../chunks/urlUtils.js";
5
+ import { U as UrlDefinition } from "../chunks/index16.js";
6
+ import { d as defineService } from "../chunks/index11.js";
6
7
  import { T as TranslationsDefinition } from "../chunks/index4.js";
7
8
  import { M as MenuAnimationName, d as defaultTranslations, a as MenuOrientation, A as AnimationPhase, V as VerticalDropdownDisplay, D as DropdownAnimationName, H as HamburgerMenuAnimationName, b as MenuParts, s as selectors, c as DesignStates, u as useAnimationState, C as COMPONENT_TYPE, e as ARIA_LABEL_NAMESPACE, t as translationsKeys, l as legacyTranslationsKeys } from "../chunks/constants27.js";
8
9
  import React__default, { createContext, useContext, useRef, useCallback, useMemo, useState, useEffect, useLayoutEffect, forwardRef } from "react";
@@ -14,8 +15,9 @@ import { i as isEmptyObject, a as getDataAttributes } from "../chunks/dataUtils.
14
15
  import { g as getWixBannerHeight } from "../chunks/getWixBannerHeight.js";
15
16
  import { u as useResizeObserver } from "../chunks/useResizeObserver.js";
16
17
  import { d as directionStyles } from "../chunks/direction.module.js";
17
- import { E as EnvironmentDefinition } from "../chunks/index2.js";
18
+ import { L as LocaleDefinition } from "../chunks/index12.js";
18
19
  import AnimatedIconWithReducedMotion from "../AnimatedIcon/component.js";
20
+ import { D as DeviceInfoDefinition } from "../chunks/index2.js";
19
21
  import { B as Button } from "../chunks/Button.js";
20
22
  import { c as convertA11yKeysToHtmlFormat } from "../chunks/a11y.js";
21
23
  const AnchorsDefinition = defineService("@wix/viewer-service-anchors");
@@ -2103,10 +2105,7 @@ const classes$1 = {
2103
2105
  const DEFAULT_ANIMATED_ICON_DURATION = 0.2;
2104
2106
  const NavbarMenu = (props) => {
2105
2107
  var _a;
2106
- const { getLanguageDirection } = useService(
2107
- EnvironmentDefinition
2108
- );
2109
- const siteDirection = getLanguageDirection();
2108
+ const { direction: siteDirection } = useService(LocaleDefinition);
2110
2109
  const {
2111
2110
  id,
2112
2111
  className,
@@ -2287,8 +2286,7 @@ const HamburgerMenu = ({
2287
2286
  }) => {
2288
2287
  var _a, _b;
2289
2288
  const { translations, navAriaLabel } = useMenuContext();
2290
- const environment = useService(EnvironmentDefinition);
2291
- const reducedMotion = (environment == null ? void 0 : environment.reducedMotion) ?? false;
2289
+ const { reducedMotion } = useService(DeviceInfoDefinition);
2292
2290
  const siteScrollBlocker = useService(SiteScrollBlockerDefinition);
2293
2291
  const [isOpen, setIsOpen] = useState(false);
2294
2292
  useEffect(() => {
@@ -2479,8 +2477,8 @@ const Menu = (props) => {
2479
2477
  onItemMouseIn,
2480
2478
  onItemMouseOut
2481
2479
  } = props;
2482
- const { getCurrentUrl } = useService(UrlDefinition);
2483
- const currentUrl = getCurrentUrl();
2480
+ const url = useService(UrlDefinition);
2481
+ const currentUrl = toUrlWithoutQuery(url.currentUrl, url.siteUrl);
2484
2482
  const getService = useGetService();
2485
2483
  let activeAnchor;
2486
2484
  try {
@@ -1491,11 +1491,14 @@ const manifest = {
1491
1491
  componentDependencies: ["@wix/editor-react-components/AnimatedIcon"],
1492
1492
  serviceDependencies: [
1493
1493
  "@wix/viewer-service-anchors",
1494
- "@wix/viewer-service-environment",
1494
+ "@wix/site-service-device-info",
1495
+ "@wix/site-service-editor-context",
1496
+ "@wix/site-service-locale",
1497
+ "@wix/viewer-service-multilingual",
1495
1498
  "@wix/viewer-service-link-utils",
1496
1499
  "@wix/site-service-site-scroll-blocker",
1497
1500
  "@wix/site-service-translations",
1498
- "@wix/viewer-service-url"
1501
+ "@wix/site-service-url"
1499
1502
  ]
1500
1503
  }
1501
1504
  },
@@ -1504,11 +1507,14 @@ const manifest = {
1504
1507
  dependencies: {
1505
1508
  serviceDependencies: [
1506
1509
  "@wix/viewer-service-anchors",
1507
- "@wix/viewer-service-environment",
1510
+ "@wix/site-service-device-info",
1511
+ "@wix/site-service-editor-context",
1512
+ "@wix/site-service-locale",
1513
+ "@wix/viewer-service-multilingual",
1508
1514
  "@wix/viewer-service-link-utils",
1509
1515
  "@wix/site-service-site-scroll-blocker",
1510
1516
  "@wix/site-service-translations",
1511
- "@wix/viewer-service-url"
1517
+ "@wix/site-service-url"
1512
1518
  ]
1513
1519
  }
1514
1520
  },
@@ -113,7 +113,7 @@ const manifest = {
113
113
  editor: {
114
114
  componentUrl: "./site/components/MultiStateBox/component.preview.tsx",
115
115
  dependencies: {
116
- serviceDependencies: ["@wix/viewer-service-environment"]
116
+ serviceDependencies: ["@wix/site-service-editor-context"]
117
117
  }
118
118
  },
119
119
  client: {
@@ -1,9 +1,8 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { c as clsx } from "../chunks/clsx.js";
4
- import { a as Fieldset, T as Tooltip, R as Radio, b as InfoCircle_default, c as RadioGroup_RadioGroup_RadioGroup } from "../chunks/index11.js";
5
- import { useService } from "@wix/services-manager-react";
6
- import { E as EnvironmentDefinition } from "../chunks/index2.js";
4
+ import { a as Fieldset, T as Tooltip, R as Radio, b as InfoCircle_default, c as RadioGroup_RadioGroup_RadioGroup } from "../chunks/index13.js";
5
+ import { u as useCurrentLanguage } from "../chunks/useCurrentLanguage.js";
7
6
  import { f as formatClassNames } from "../chunks/classNames.js";
8
7
  import { a as getDataAttributes } from "../chunks/dataUtils.js";
9
8
  import { u as useValidatedField, R as RequiredIndicator, I as InfoCircleSmall_default } from "../chunks/useValidatedField.js";
@@ -41,7 +40,7 @@ const noop = () => {
41
40
  };
42
41
  function RadioButtonsComponent(props) {
43
42
  var _a, _b;
44
- const environmentService = useService(EnvironmentDefinition);
43
+ const { language } = useCurrentLanguage();
45
44
  const {
46
45
  id,
47
46
  className = "",
@@ -120,7 +119,7 @@ function RadioButtonsComponent(props) {
120
119
  ...getDataAttributes(props),
121
120
  className: rootClassName,
122
121
  dir: direction,
123
- lang: environmentService.language,
122
+ lang: language,
124
123
  "data-testid": TestIds.root,
125
124
  children: /* @__PURE__ */ jsxs(
126
125
  Fieldset.Root,
@@ -264,13 +264,19 @@ const manifest = {
264
264
  client: {
265
265
  componentUrl: "./site/components/RadioButtons/component.tsx",
266
266
  dependencies: {
267
- serviceDependencies: ["@wix/viewer-service-environment"]
267
+ serviceDependencies: [
268
+ "@wix/site-service-locale",
269
+ "@wix/viewer-service-multilingual"
270
+ ]
268
271
  }
269
272
  },
270
273
  editor: {
271
274
  componentUrl: "./site/components/RadioButtons/component.preview.tsx",
272
275
  dependencies: {
273
- serviceDependencies: ["@wix/viewer-service-environment"]
276
+ serviceDependencies: [
277
+ "@wix/site-service-locale",
278
+ "@wix/viewer-service-multilingual"
279
+ ]
274
280
  }
275
281
  }
276
282
  },
@@ -654,7 +654,7 @@ const manifest = {
654
654
  componentUrl: "./site/components/Repeater/component.preview.tsx",
655
655
  dependencies: {
656
656
  serviceDependencies: [
657
- "@wix/viewer-service-environment",
657
+ "@wix/site-service-editor-context",
658
658
  "@wix/site-service-translations"
659
659
  ]
660
660
  }
@@ -2,7 +2,8 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import React__default, { useState, useEffect, useRef, useMemo, createElement } from "react";
3
3
  import { c as clsx } from "../chunks/clsx.js";
4
4
  import { T as TranslationsDefinition } from "../chunks/index4.js";
5
- import { U as UrlDefinition } from "../chunks/index12.js";
5
+ import { t as toUrlWithoutQuery } from "../chunks/urlUtils.js";
6
+ import { U as UrlDefinition } from "../chunks/index16.js";
6
7
  import { useService } from "@wix/services-manager-react";
7
8
  import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
8
9
  import { d as directionStyles } from "../chunks/direction.module.js";
@@ -382,7 +383,7 @@ const shareButtonsStyles = {
382
383
  const ShareButtons = (props) => {
383
384
  var _a;
384
385
  const { translate } = useService(TranslationsDefinition);
385
- const { getCurrentUrl, getExternalBaseUrl } = useService(UrlDefinition);
386
+ const { currentUrl, siteUrl } = useService(UrlDefinition);
386
387
  const memoizedProps = useMemo(() => {
387
388
  const translateOwn = translate(COMPONENT_TYPE);
388
389
  const translateLegacy = translate("ShareButtons");
@@ -422,8 +423,8 @@ const ShareButtons = (props) => {
422
423
  buttonsFromProps.length ? buttonsFromProps : []
423
424
  );
424
425
  const shareUrlByPage = {
425
- [PagesToShare.home]: getExternalBaseUrl(),
426
- [PagesToShare.current]: getCurrentUrl()
426
+ [PagesToShare.home]: siteUrl,
427
+ [PagesToShare.current]: toUrlWithoutQuery(currentUrl, siteUrl)
427
428
  };
428
429
  const a11y2 = removeAriaPrefix(props.a11y ?? {});
429
430
  return {
@@ -440,7 +441,7 @@ const ShareButtons = (props) => {
440
441
  !props.direction && directionStyles.fallbackDirection
441
442
  )
442
443
  };
443
- }, [props, translate, getExternalBaseUrl, getCurrentUrl]);
444
+ }, [props, translate, siteUrl, currentUrl]);
444
445
  const { id, className, buttons, shareUrl, a11y } = memoizedProps;
445
446
  if (buttons.length === 0) {
446
447
  console.error(noButtonsErrorMessage);
@@ -411,7 +411,7 @@ const manifest = {
411
411
  dependencies: {
412
412
  serviceDependencies: [
413
413
  "@wix/site-service-translations",
414
- "@wix/viewer-service-url"
414
+ "@wix/site-service-url"
415
415
  ]
416
416
  }
417
417
  },
@@ -420,7 +420,7 @@ const manifest = {
420
420
  dependencies: {
421
421
  serviceDependencies: [
422
422
  "@wix/site-service-translations",
423
- "@wix/viewer-service-url"
423
+ "@wix/site-service-url"
424
424
  ]
425
425
  }
426
426
  }
@@ -7,7 +7,8 @@ import { B as Button } from "../chunks/Button.js";
7
7
  import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
8
8
  import { d as directionStyles } from "../chunks/direction.module.js";
9
9
  import { useService } from "@wix/services-manager-react";
10
- import { E as EnvironmentDefinition } from "../chunks/index2.js";
10
+ import { L as LocaleDefinition } from "../chunks/index12.js";
11
+ import { D as DeviceInfoDefinition } from "../chunks/index2.js";
11
12
  import { T as TranslationsDefinition } from "../chunks/index4.js";
12
13
  const validateActiveSlide = (activeSlide, slidesLength) => {
13
14
  if (activeSlide === void 0) {
@@ -578,7 +579,8 @@ const Slideshow = (props) => {
578
579
  onMouseIn,
579
580
  onMouseOut
580
581
  } = props;
581
- const environmentService = useService(EnvironmentDefinition);
582
+ const { direction: siteDirection } = useService(LocaleDefinition);
583
+ const { reducedMotion } = useService(DeviceInfoDefinition);
582
584
  const { translate } = useService(TranslationsDefinition);
583
585
  const translateOwn = translate(COMPONENT_TYPE);
584
586
  const translateLegacy = translate(ARIA_LABEL_NAMESPACE);
@@ -586,8 +588,6 @@ const Slideshow = (props) => {
586
588
  TranslationKeys[key],
587
589
  translateLegacy(LegacyTranslationKeys[key], DefaultTranslations[key])
588
590
  );
589
- const reducedMotion = environmentService.reducedMotion ?? false;
590
- const siteDirection = environmentService.getLanguageDirection();
591
591
  const presetsWrapperProps = ((_a = props.wix) == null ? void 0 : _a.presetsWrapperProps) || {};
592
592
  const visibilityProps = useVisibilityProps({ isHidden, hidden });
593
593
  const navigationButtonsProps = elementProps == null ? void 0 : elementProps.navigationButtons;
@@ -1100,7 +1100,10 @@ const manifest = {
1100
1100
  moduleSpecifier: "@wix/editor-react-components/Slideshow",
1101
1101
  dependencies: {
1102
1102
  serviceDependencies: [
1103
- "@wix/viewer-service-environment",
1103
+ "@wix/site-service-device-info",
1104
+ "@wix/site-service-editor-context",
1105
+ "@wix/site-service-locale",
1106
+ "@wix/viewer-service-multilingual",
1104
1107
  "@wix/site-service-translations"
1105
1108
  ]
1106
1109
  }
@@ -1109,7 +1112,10 @@ const manifest = {
1109
1112
  componentUrl: "./site/components/Slideshow/component.preview.tsx",
1110
1113
  dependencies: {
1111
1114
  serviceDependencies: [
1112
- "@wix/viewer-service-environment",
1115
+ "@wix/site-service-device-info",
1116
+ "@wix/site-service-editor-context",
1117
+ "@wix/site-service-locale",
1118
+ "@wix/viewer-service-multilingual",
1113
1119
  "@wix/site-service-translations"
1114
1120
  ]
1115
1121
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
+ import { E as EditorContextDefinition } from "../chunks/index14.js";
2
3
  import { c as clsx } from "../chunks/clsx.js";
3
- import { E as EnvironmentDefinition } from "../chunks/index2.js";
4
4
  import { useService } from "@wix/services-manager-react";
5
5
  import * as React from "react";
6
6
  const Plugin = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: size || "24", height: size || "24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M19.35 9.16a.48.48 0 00-.7 0l-3.16 3.16-3.82-3.82 3.13-3.13a.502.502 0 10-.71-.71L11 7.79 9 5.85l-1 1-1.61 1.64a6.442 6.442 0 009.11 9.11l2.63-2.6-1.94-2 3.16-3.16a.5.5 0 000-.68zM7.09 16.89a5.45 5.45 0 010-7.68l7.7 7.69a5.45 5.45 0 01-7.7-.01zm9.34-1.63l-.94.94-7.7-7.7L9 7.27l7.7 7.7-.27.29z" }));
@@ -13,7 +13,7 @@ const classes = {
13
13
  const Wrapper = ({ children, ...props }) => /* @__PURE__ */ jsx("div", { ...props, children });
14
14
  const SlotsPlaceholder = (props) => {
15
15
  const { id, className, content, a11y } = props;
16
- const { getPreviewMode } = useService(EnvironmentDefinition);
16
+ const { previewMode } = useService(EditorContextDefinition);
17
17
  const isEmptySlot = !content;
18
18
  const wrapperProps = {
19
19
  ...a11y,
@@ -23,7 +23,7 @@ const SlotsPlaceholder = (props) => {
23
23
  id
24
24
  };
25
25
  if (isEmptySlot) {
26
- return (getPreviewMode == null ? void 0 : getPreviewMode()) ? /* @__PURE__ */ jsx(Wrapper, { ...wrapperProps, children: /* @__PURE__ */ jsx(Plugin_default, { id: "empty-slots-placeholder" }) }) : null;
26
+ return previewMode ? /* @__PURE__ */ jsx(Wrapper, { ...wrapperProps, children: /* @__PURE__ */ jsx(Plugin_default, { id: "empty-slots-placeholder" }) }) : null;
27
27
  }
28
28
  return /* @__PURE__ */ jsx(Wrapper, { ...wrapperProps, children: content });
29
29
  };
@@ -52,9 +52,9 @@ const manifest = {
52
52
  client: {
53
53
  componentUrl: "./site/components/SlotsPlaceholder/component.tsx",
54
54
  moduleSpecifier: "@wix/editor-react-components/SlotsPlaceholder",
55
- serviceDependencies: ["@wix/viewer-service-environment"],
55
+ serviceDependencies: ["@wix/site-service-editor-context"],
56
56
  dependencies: {
57
- serviceDependencies: ["@wix/viewer-service-environment"]
57
+ serviceDependencies: ["@wix/site-service-editor-context"]
58
58
  }
59
59
  },
60
60
  sdk: {
@@ -23,7 +23,7 @@ const manifest = {
23
23
  editor: {
24
24
  componentUrl: "./site/components/SocialPlayerSnapchat/component.preview.tsx",
25
25
  dependencies: {
26
- serviceDependencies: ["@wix/viewer-service-environment"]
26
+ serviceDependencies: ["@wix/site-service-editor-context"]
27
27
  }
28
28
  },
29
29
  sdk: {
@@ -23,7 +23,7 @@ const manifest = {
23
23
  editor: {
24
24
  componentUrl: "./site/components/SocialPlayerTikTok/component.preview.tsx",
25
25
  dependencies: {
26
- serviceDependencies: ["@wix/viewer-service-environment"]
26
+ serviceDependencies: ["@wix/site-service-editor-context"]
27
27
  }
28
28
  },
29
29
  sdk: {