@wix/editor-react-components 1.2809.0 → 1.2811.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.
@@ -50,13 +50,13 @@ export declare const DisplayNames: {
50
50
  hoverToPreview: string;
51
51
  error: string;
52
52
  generatingAnimation: string;
53
- emptyStateTitle: string;
54
53
  sectionHelper: string;
55
54
  sectionHelperLink: string;
56
55
  };
57
56
  displayName: string;
58
57
  panel: {
59
58
  chooseIcon: string;
59
+ preview: string;
60
60
  replaceIcon: string;
61
61
  AnimatedIconCreationButton: string;
62
62
  duration: string;
@@ -1,4 +1,8 @@
1
1
  import { default as React } from 'react';
2
2
  import { AnimatedSvgRef, AnimatedSvgEditorProps } from '../types';
3
- declare const AnimatedIconPanelWrapper: React.ForwardRefExoticComponent<AnimatedSvgEditorProps & React.RefAttributes<AnimatedSvgRef>>;
3
+ interface AnimatedIconPanelWrapperProps extends AnimatedSvgEditorProps {
4
+ /** Rendered icon size in px */
5
+ size?: number;
6
+ }
7
+ declare const AnimatedIconPanelWrapper: React.ForwardRefExoticComponent<AnimatedIconPanelWrapperProps & React.RefAttributes<AnimatedSvgRef>>;
4
8
  export default AnimatedIconPanelWrapper;
@@ -4,7 +4,7 @@ interface IconSelectorProps {
4
4
  label: string;
5
5
  svgData: SvgData | null;
6
6
  onUpdateImage: () => void;
7
- span?: number;
7
+ className?: string;
8
8
  dataHook?: string;
9
9
  }
10
10
  declare const IconSelector: React.FC<IconSelectorProps>;
@@ -1,7 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { Translations } from '../translations/consts';
3
3
  interface DurationSectionProps {
4
- isAnimated: boolean;
5
4
  animationDuration: number;
6
5
  onDurationChange: (newDuration: number) => Promise<void>;
7
6
  translations: Translations;
@@ -0,0 +1,16 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ interface IconPreviewBoxProps {
3
+ svgId?: string | null;
4
+ duration: number;
5
+ iconSize?: number;
6
+ height?: string;
7
+ /** When provided, an empty box renders as an "add" affordance that calls this */
8
+ onAddIcon?: () => void;
9
+ addIconInfo?: string;
10
+ /** Custom content (e.g. a loader) rendered instead of the icon */
11
+ children?: ReactNode;
12
+ placeholderDataHook?: string;
13
+ dataHook?: string;
14
+ }
15
+ declare const IconPreviewBox: React.FC<IconPreviewBoxProps>;
16
+ export default IconPreviewBox;
@@ -4,7 +4,9 @@ import { Translations } from '../translations/consts';
4
4
  interface SvgDisplaySectionProps {
5
5
  currentSvg: SvgData | null;
6
6
  animationDuration: number;
7
+ isAnimated: boolean;
7
8
  onChooseIcon: () => Promise<void>;
9
+ onCreateIcon: () => void;
8
10
  translations: Translations;
9
11
  dataHook?: string;
10
12
  }
@@ -12,8 +12,14 @@ export declare const DURATION_CONSTANTS: {
12
12
  readonly MIN_DURATION: 0;
13
13
  readonly MAX_DURATION: 2;
14
14
  };
15
+ export declare const DURATION_UNIT = "s";
15
16
  export declare const UI_CONSTANTS: {
16
17
  readonly BACKGROUND_COLOR: "var(--wds-add-item-fill, #F8F6F6)";
17
- readonly BORDER_RADIUS: "8px";
18
- readonly NUMBER_INPUT_WIDTH: "80px";
18
+ readonly SLOT_BORDER_RADIUS: "var(--wds-add-item-border-radius, 12px)";
19
+ readonly NUMBER_INPUT_WIDTH: "72px";
20
+ readonly PREVIEW_BOX_HEIGHT: "130px";
21
+ readonly CREATION_PREVIEW_BOX_HEIGHT: "130px";
22
+ readonly ICON_SELECTOR_HEIGHT: "75px";
23
+ readonly PREVIEW_ICON_SIZE: 70;
24
+ readonly SELECTOR_ICON_SIZE: 38;
19
25
  };
@@ -2,7 +2,7 @@ export declare const CUSTOMIZE_ICON_PANEL_DATA_HOOKS: {
2
2
  PANEL: string;
3
3
  ICON_TYPE_SECTION: string;
4
4
  SVG_DISPLAY_SECTION: string;
5
- CREATE_ANIMATED_SECTION: string;
5
+ PREVIEW_BOX: string;
6
6
  DURATION_SECTION: string;
7
7
  TRIGGER_SECTION: string;
8
8
  CHOOSE_ICON_BUTTON: string;
@@ -12,7 +12,10 @@ export declare const CUSTOMIZE_ICON_PANEL_DATA_HOOKS: {
12
12
  TRIGGER_TOGGLE: string;
13
13
  CREATION_PANEL: string;
14
14
  CREATION_BACK: string;
15
+ CREATION_INSTRUCTION: string;
15
16
  CREATION_START_ICON: string;
16
17
  CREATION_END_ICON: string;
17
18
  CREATION_PREVIEW: string;
19
+ CREATION_PREVIEW_BOX: string;
20
+ CREATION_PREVIEW_PLACEHOLDER: string;
18
21
  };
@@ -0,0 +1,16 @@
1
+ /** Reads the resolved WDS primary text color at `element`, falling back to black. */
2
+ export declare const readThemeTextColor: (element: Element | null) => string;
3
+ interface ThemedSvgOptions {
4
+ /** Square canvas the image is drawn on, in px */
5
+ canvasSize: number;
6
+ /** Rendered icon size, centered on the canvas, in px */
7
+ iconSize: number;
8
+ /** Fill applied to paths that do not set their own */
9
+ color: string;
10
+ }
11
+ /**
12
+ * Wraps an SVG document in a square canvas so an `<img>` (e.g. WDS ImageViewer)
13
+ * shows it centered at a fixed size and in the panel's text color.
14
+ */
15
+ export declare const buildThemedSvgDataUrl: (svgText: string, { canvasSize, iconSize, color }: ThemedSvgOptions) => string;
16
+ export {};
@@ -3,17 +3,17 @@ export declare const TranslationKeys: {
3
3
  readonly iconTypeAnimatedOption: "custompanel_animatedicon_icon_type_toggle_animated_label";
4
4
  readonly iconTypeStaticOption: "custompanel_animatedicon_icon_type_toggle_static_label";
5
5
  readonly iconTypeTooltip: "custompanel_animatedicon_icon_type_tooltip_description";
6
- readonly createCta: "custompanel_animatedicon_image_viewer_create_cta";
6
+ readonly createIconCta: "custompanel_animatedicon_create_icon_cta";
7
7
  readonly replaceCta: "custompanel_animatedicon_image_viewer_replace_cta";
8
8
  readonly chooseIcon: "custompanel_animatedicon_image_viewer_field_label";
9
+ readonly previewLabel: "custompanel_animatedicon_preview_field_label";
9
10
  readonly durationLabel: "custompanel_animatedicon_border_radius_duration_label";
10
- readonly durationSuffix: "custompanel_animatedicon_borderRadius_input_suffix_label";
11
11
  readonly previewTooltip: "custompanel_animatedicon_sidePanel_field_preview_tooltip";
12
12
  readonly loaderMessage: "custompanel_animatedicon_loader_message_text";
13
13
  readonly sectionHelperDescription: "custompanel_animatedicon_sectionHelper_description";
14
14
  readonly sectionHelperLink: "custompanel_animatedicon_sectionHelper_description_link";
15
15
  readonly endIconLabel: "custompanel_animatedicon_sidePanel_endIcon_label";
16
- readonly sidePanelTitle: "custompanel_animatedicon_sidePanel_title";
16
+ readonly creationInstruction: "custompanel_animatedicon_statusMessage_helperText";
17
17
  readonly startIconLabel: "custompanel_animatedicon_sidePanel_startIcon_label";
18
18
  readonly triggerFieldLabel: "custompanel_animatedicon_trigger_field_label";
19
19
  readonly triggerHoverOption: "custompanel_animatedicon_trigger_toggle_hover_label";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor-react-components",
3
- "version": "1.2809.0",
3
+ "version": "1.2811.0",
4
4
  "description": "React components for the Wix Editor",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -224,5 +224,5 @@
224
224
  "registry": "https://registry.npmjs.org/",
225
225
  "access": "public"
226
226
  },
227
- "falconPackageHash": "94fef56746e0501edab5639a63a467e87bb9e7f1f9e5cdf69dad4a9f"
227
+ "falconPackageHash": "574fd382c33bdfef46af28d46fcc4d940e7d61bde589c8f104930f0d"
228
228
  }
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Translations } from '../translations/consts';
3
- interface TitleProps {
4
- translations: Translations;
5
- }
6
- declare const Title: React.FC<TitleProps>;
7
- export default Title;
@@ -1,10 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Translations } from '../translations/consts';
3
- interface AnimatedIconCreationSectionProps {
4
- onAnimatedIcon: () => void;
5
- isAnimated: boolean;
6
- translations: Translations;
7
- dataHook?: string;
8
- }
9
- declare const AnimatedIconCreationSection: React.FC<AnimatedIconCreationSectionProps>;
10
- export default AnimatedIconCreationSection;