@wayke-se/components-react 6.0.0-beta.1 → 6.0.0-beta.3

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 (30) hide show
  1. package/README.md +5 -4
  2. package/dist/index.js +498 -533
  3. package/dist/index.js.map +4 -4
  4. package/dist/style.css +11 -1
  5. package/dist/types/src/Gql/ad/queries.d.ts +1 -1
  6. package/dist/types/src/Gql/ad/types.d.ts +31 -1
  7. package/dist/types/src/Gql/ad/useRelatedAds.d.ts +3 -2
  8. package/dist/types/src/Gql/ad/view.d.ts +4 -1
  9. package/dist/types/src/Gql/facets.d.ts +2 -0
  10. package/dist/types/src/components/Content/index.d.ts +7 -2
  11. package/dist/types/src/components/FilterPanel/faceSelector.d.ts +3 -1
  12. package/dist/types/src/components/FilterPanel/rangeFacet.d.ts +3 -1
  13. package/dist/types/src/components/Gallery/wrapper.d.ts +7 -4
  14. package/dist/types/src/components/ProductCard/wrapper.d.ts +0 -7
  15. package/dist/types/src/components/RangeSlider/RangeSliderSimple.d.ts +4 -3
  16. package/dist/types/src/components/RangeSlider/SliderWithLabel.d.ts +1 -2
  17. package/dist/types/src/components/RangeSlider/index.d.ts +3 -1
  18. package/dist/types/src/components/RangeSlider/wrapper.d.ts +11 -10
  19. package/dist/types/src/components/ResponsiveImage/index.d.ts +17 -0
  20. package/dist/types/src/components/Sphere/SphereViewer.d.ts +0 -1
  21. package/dist/types/src/layouts/searchItem/Related.d.ts +1 -1
  22. package/dist/types/src/utils/image.d.ts +10 -0
  23. package/dist/types/src/utils/markdown.d.ts +3 -0
  24. package/package.json +4 -6
  25. package/dist/assets/ajax-loader-BOAPMZMT.gif +0 -0
  26. package/dist/assets/slick-EVLS6IWX.eot +0 -0
  27. package/dist/assets/slick-MU5EZO5G.woff +0 -0
  28. package/dist/assets/slick-NKQ64RRA.ttf +0 -0
  29. package/dist/types/src/components/RangeSlider/handle.d.ts +0 -9
  30. package/dist/types/src/components/RangeSlider/track.d.ts +0 -9
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ type ImgProps = React.ImgHTMLAttributes<HTMLImageElement>;
3
+ interface ResponsiveImageProps extends Omit<ImgProps, 'src' | 'srcSet' | 'sizes'> {
4
+ src: string;
5
+ /** Widths to offer; each is snapped to one the image service accepts. */
6
+ widths: number[];
7
+ /** How wide the image is shown, as for <img sizes>. */
8
+ sizes: string;
9
+ /** The styled <img> to render. */
10
+ img?: React.ElementType<ImgProps>;
11
+ }
12
+ /**
13
+ * An ad image in the size and format the browser needs (AVIF, WebP, else JPEG),
14
+ * decoded off the main thread. Images from other hosts get the largest width.
15
+ */
16
+ declare const ResponsiveImage: ({ src, widths, sizes, img: Img, ...rest }: ResponsiveImageProps) => React.JSX.Element;
17
+ export default ResponsiveImage;
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import '@photo-sphere-viewer/core/index.css';
3
2
  type PropsType = {
4
3
  id: string;
5
4
  src: string;
@@ -5,6 +5,6 @@ interface RelatedProps {
5
5
  placeholderImage?: string;
6
6
  displayBranchName?: boolean;
7
7
  }
8
- /** The latest cars of the same make. */
8
+ /** The latest cars of the same make, then of other makes. */
9
9
  declare const Related: ({ adId, manufacturer, placeholderImage, displayBranchName }: RelatedProps) => React.JSX.Element | null;
10
10
  export default Related;
@@ -1,3 +1,4 @@
1
+ export declare const isCfit: (src: string) => boolean;
1
2
  export type ImageSpec = [width: number, height: number];
2
3
  interface ImageOptions {
3
4
  width: number;
@@ -11,4 +12,13 @@ export declare const imageUrl: (src: string, { width, height, webp }: ImageOptio
11
12
  */
12
13
  export declare const imageWithWidth: (src: string, width: number, height?: number) => string;
13
14
  export declare const imageSrcSet: (src: string, specs: ImageSpec[], webp?: boolean) => string;
15
+ /**
16
+ * srcsets for a cfit image in AVIF, WebP and JPEG, as web-ui-v2's gallery has
17
+ * them: the browser takes the first format it supports, in the width it needs.
18
+ */
19
+ export declare const cfitSources: (src: string, widths: number[]) => {
20
+ avif: string;
21
+ webp: string;
22
+ jpeg: string;
23
+ };
14
24
  export {};
@@ -0,0 +1,3 @@
1
+ /** Only the allowlisted tags and attributes survive; event handlers and style never do. */
2
+ export declare const sanitizeHtml: (html: string) => string;
3
+ export declare const markdownToHtml: (text: string | null | undefined) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wayke-se/components-react",
3
- "version": "6.0.0-beta.1",
3
+ "version": "6.0.0-beta.3",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,7 +49,6 @@
49
49
  "@types/node": "^24.19.2",
50
50
  "@types/react": "^19.3.0",
51
51
  "@types/react-dom": "^19.3.0",
52
- "@types/react-slick": "^0.23.13",
53
52
  "dotenv": "^18.0.9",
54
53
  "esbuild": "^0.28.2",
55
54
  "husky": "^9.1.7",
@@ -65,15 +64,14 @@
65
64
  "dependencies": {
66
65
  "@emotion/is-prop-valid": "^1.4.0",
67
66
  "@photo-sphere-viewer/core": "^5.15.1",
67
+ "@radix-ui/react-slider": "^1.6.1",
68
68
  "@wayke-se/ecom-web": "^2.1.1",
69
69
  "date-fns": "^4.4.0",
70
+ "dompurify": "^3.4.17",
70
71
  "i18next": "^26.5.11",
71
72
  "libphonenumber-js": "^1.13.15",
72
73
  "marked": "^18.1.2",
73
- "react-compound-slider": "^3.4.0",
74
- "react-i18next": "^17.1.9",
75
- "react-slick": "^0.31.0",
76
- "scroll-into-view-if-needed": "^3.1.0"
74
+ "react-i18next": "^17.1.9"
77
75
  },
78
76
  "allowScripts": {
79
77
  "esbuild": true,
Binary file
Binary file
Binary file
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { GetHandleProps, SliderItem } from 'react-compound-slider';
3
- interface IHandleProps {
4
- domain: number[];
5
- handle: SliderItem;
6
- getHandleProps: GetHandleProps;
7
- }
8
- export declare const Handle: ({ domain: [min, max], handle: { id, value, percent }, getHandleProps, }: IHandleProps) => React.JSX.Element;
9
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import { GetTrackProps, SliderItem } from 'react-compound-slider';
3
- interface ITrackProps {
4
- source: SliderItem;
5
- target: SliderItem;
6
- getTrackProps: GetTrackProps;
7
- }
8
- export declare const Track: ({ source, target, getTrackProps }: ITrackProps) => React.JSX.Element;
9
- export {};