@gravity-ui/page-constructor 5.18.1-alpha.0 → 5.20.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 (29) hide show
  1. package/build/cjs/blocks/CardLayout/schema.d.ts +32 -0
  2. package/build/cjs/blocks/ContentLayout/schema.d.ts +34 -6
  3. package/build/cjs/blocks/HeaderSlider/HeaderSlider.js +2 -2
  4. package/build/cjs/components/Image/Image.js +2 -2
  5. package/build/cjs/components/Image/schema.d.ts +40 -0
  6. package/build/cjs/components/Image/schema.js +8 -0
  7. package/build/cjs/components/ImageBase/ImageBase.d.ts +1 -1
  8. package/build/cjs/components/ImageBase/ImageBase.js +8 -2
  9. package/build/cjs/components/Media/Image/Image.js +2 -2
  10. package/build/cjs/context/imageContext/imageContext.d.ts +2 -3
  11. package/build/cjs/models/constructor-items/common.d.ts +3 -2
  12. package/build/cjs/schema/constants.d.ts +8 -0
  13. package/build/cjs/sub-blocks/BackgroundCard/schema.d.ts +8 -0
  14. package/build/esm/blocks/CardLayout/schema.d.ts +32 -0
  15. package/build/esm/blocks/ContentLayout/schema.d.ts +34 -6
  16. package/build/esm/blocks/HeaderSlider/HeaderSlider.js +1 -1
  17. package/build/esm/components/Image/Image.js +2 -2
  18. package/build/esm/components/Image/schema.d.ts +40 -0
  19. package/build/esm/components/Image/schema.js +8 -0
  20. package/build/esm/components/ImageBase/ImageBase.d.ts +1 -1
  21. package/build/esm/components/ImageBase/ImageBase.js +9 -2
  22. package/build/esm/components/Media/Image/Image.js +1 -1
  23. package/build/esm/context/imageContext/imageContext.d.ts +2 -3
  24. package/build/esm/models/constructor-items/common.d.ts +3 -2
  25. package/build/esm/schema/constants.d.ts +8 -0
  26. package/build/esm/sub-blocks/BackgroundCard/schema.d.ts +8 -0
  27. package/package.json +1 -1
  28. package/server/models/constructor-items/common.d.ts +3 -2
  29. package/widget/index.js +1 -1
@@ -1,7 +1,7 @@
1
1
  import React, { Fragment, useEffect, useState } from 'react';
2
2
  import { animated, config, useSpring } from '@react-spring/web';
3
3
  import debounce from 'lodash/debounce';
4
- import { SliderNewBlock as SliderBlock } from '../../../blocks/unstable';
4
+ import SliderBlock from '../../../blocks/Slider/Slider';
5
5
  import { SliderType } from '../../../models';
6
6
  import { block, getQaAttrubutes } from '../../../utils';
7
7
  import BackgroundImage from '../../BackgroundImage/BackgroundImage';
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { ImageBaseProps } from '../../components';
3
- export type Image = React.ComponentClass<ImageBaseProps> | React.FC<ImageBaseProps>;
2
+ import type { ImageBaseProps } from '../../components';
4
3
  export type ImageContextProps = {
5
- Image?: Image;
4
+ Image?: React.ComponentType<ImageBaseProps>;
6
5
  };
7
6
  export declare const ImageContext: React.Context<ImageContextProps>;
@@ -1,4 +1,4 @@
1
- import React, { CSSProperties, HTMLProps, ReactNode } from 'react';
1
+ import React, { CSSProperties, DetailedHTMLProps, HTMLProps, ImgHTMLAttributes, ReactNode } from 'react';
2
2
  import { ButtonView, ButtonProps as UikitButtonProps } from '@gravity-ui/uikit';
3
3
  import { ThemeSupporting } from '../../utils';
4
4
  import { AnalyticsEventsBase, AnalyticsEventsProp, ClassNameProps, QAProps } from '../common';
@@ -96,8 +96,9 @@ interface LoopProps {
96
96
  start: number;
97
97
  end?: number;
98
98
  }
99
- export interface ImageInfoProps extends Pick<HTMLProps<HTMLImageElement>, 'aria-describedby'> {
99
+ export interface ImageInfoProps extends Pick<DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, 'aria-describedby' | 'loading'> {
100
100
  alt?: string;
101
+ fetchPriority?: 'high' | 'low' | 'auto';
101
102
  disableCompress?: boolean;
102
103
  }
103
104
  export interface ImageObjectProps extends ImageInfoProps {
@@ -796,6 +796,14 @@ export declare const cardSchemas: {
796
796
  disableCompress: {
797
797
  type: string;
798
798
  };
799
+ loading: {
800
+ type: string;
801
+ enum: string[];
802
+ };
803
+ fetchPriority: {
804
+ type: string;
805
+ enum: string[];
806
+ };
799
807
  };
800
808
  } & {
801
809
  optionName: string;
@@ -45,6 +45,14 @@ export declare const BackgroundCard: {
45
45
  disableCompress: {
46
46
  type: string;
47
47
  };
48
+ loading: {
49
+ type: string;
50
+ enum: string[];
51
+ };
52
+ fetchPriority: {
53
+ type: string;
54
+ enum: string[];
55
+ };
48
56
  };
49
57
  } & {
50
58
  optionName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/page-constructor",
3
- "version": "5.18.1-alpha.0",
3
+ "version": "5.20.0",
4
4
  "description": "Gravity UI Page Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,4 +1,4 @@
1
- import React, { CSSProperties, HTMLProps, ReactNode } from 'react';
1
+ import React, { CSSProperties, DetailedHTMLProps, HTMLProps, ImgHTMLAttributes, ReactNode } from 'react';
2
2
  import { ButtonView, ButtonProps as UikitButtonProps } from '@gravity-ui/uikit';
3
3
  import { ThemeSupporting } from '../../utils';
4
4
  import { AnalyticsEventsBase, AnalyticsEventsProp, ClassNameProps, QAProps } from '../common';
@@ -96,8 +96,9 @@ interface LoopProps {
96
96
  start: number;
97
97
  end?: number;
98
98
  }
99
- export interface ImageInfoProps extends Pick<HTMLProps<HTMLImageElement>, 'aria-describedby'> {
99
+ export interface ImageInfoProps extends Pick<DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, 'aria-describedby' | 'loading'> {
100
100
  alt?: string;
101
+ fetchPriority?: 'high' | 'low' | 'auto';
101
102
  disableCompress?: boolean;
102
103
  }
103
104
  export interface ImageObjectProps extends ImageInfoProps {