@contentful/experiences-components-react 3.8.2 → 3.8.3-dev-20251013T1057-2d4f2cd.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.
package/dist/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- import { ComponentDefinition, OptimizedImageAsset, StyleProps } from '@contentful/experiences-core/types';
2
- import React, { HTMLAttributes } from 'react';
3
- import { StructureComponentProps } from '@/types';
1
+ import { ComponentDefinition, OptimizedImageAsset, EditorProperties, StyleProps } from '@contentful/experiences-core';
2
+ import React$1, { HTMLAttributes } from 'react';
4
3
  import { Document } from '@contentful/rich-text-types';
5
4
 
6
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
+ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
7
6
  /**
8
7
  * The URL to navigate to when the button is clicked. When provided, the button will be wrapped in an anchor tag.
9
8
  * @default undefined
@@ -60,13 +59,13 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
60
59
  * <Button>Go</Button>
61
60
  * ```
62
61
  */
63
- children?: React.ReactNode;
62
+ children?: React$1.ReactNode;
64
63
  }
65
- declare const Button: React.FC<ButtonProps>;
64
+ declare const Button: React$1.FC<ButtonProps>;
66
65
 
67
66
  declare const ButtonComponentDefinition: ComponentDefinition;
68
67
 
69
- interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
68
+ interface HeadingProps extends React$1.HTMLAttributes<HTMLHeadingElement> {
70
69
  /**
71
70
  * The text to display in the heading. If not provided, children will be used instead.
72
71
  * @default undefined
@@ -86,7 +85,7 @@ interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
86
85
  * <Heading>My Heading</Heading>
87
86
  * ```
88
87
  */
89
- children?: React.ReactNode;
88
+ children?: React$1.ReactNode;
90
89
  /**
91
90
  * The type of heading to render
92
91
  * @default h1
@@ -98,11 +97,11 @@ interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement> {
98
97
  */
99
98
  type?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
100
99
  }
101
- declare const Heading: React.FC<HeadingProps>;
100
+ declare const Heading: React$1.FC<HeadingProps>;
102
101
 
103
102
  declare const HeadingComponentDefinition: ComponentDefinition;
104
103
 
105
- interface RichTextProps extends Omit<React.HTMLAttributes<HTMLElement>, 'value'> {
104
+ interface RichTextProps extends Omit<React$1.HTMLAttributes<HTMLElement>, 'value'> {
106
105
  /**
107
106
  * Renders the text in a specific HTML tag.
108
107
  * @default p
@@ -132,11 +131,11 @@ interface RichTextProps extends Omit<React.HTMLAttributes<HTMLElement>, 'value'>
132
131
  */
133
132
  value: Document;
134
133
  }
135
- declare const RichText: React.FC<RichTextProps>;
134
+ declare const RichText: React$1.FC<RichTextProps>;
136
135
 
137
136
  declare const RichTextComponentDefinition: ComponentDefinition;
138
137
 
139
- interface TextProps extends React.HTMLAttributes<HTMLElement> {
138
+ interface TextProps extends React$1.HTMLAttributes<HTMLElement> {
140
139
  /**
141
140
  * The URL to navigate to when the text is clicked. When provided, the text will be wrapped in an anchor tag.
142
141
  * @default undefined
@@ -194,7 +193,7 @@ interface TextProps extends React.HTMLAttributes<HTMLElement> {
194
193
  * <Text>My Text</Text>
195
194
  * ```
196
195
  */
197
- children?: React.ReactNode;
196
+ children?: React$1.ReactNode;
198
197
  /**
199
198
  * Renders the text in a specific HTML tag.
200
199
  * @default p
@@ -206,24 +205,26 @@ interface TextProps extends React.HTMLAttributes<HTMLElement> {
206
205
  */
207
206
  as?: 'p' | 'span' | 'div' | 'label' | 'caption' | 'small' | 'strong' | 'em';
208
207
  }
209
- declare const Text: React.FC<TextProps>;
208
+ declare const Text: React$1.FC<TextProps>;
210
209
 
211
210
  declare const TextComponentDefinition: ComponentDefinition;
212
211
 
213
- interface ImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
212
+ interface ImageProps extends React$1.ImgHTMLAttributes<HTMLImageElement> {
214
213
  cfImageAsset?: OptimizedImageAsset | string;
215
214
  }
216
- declare const Image: React.FC<ImageProps>;
215
+ declare const Image: React$1.FC<ImageProps>;
217
216
 
218
217
  declare const ImageComponentDefinition: ComponentDefinition;
219
218
 
219
+ type StructureComponentProps<OtherProps> = React.PropsWithChildren<Partial<EditorProperties> & OtherProps>;
220
+
220
221
  type ContentfulContainerAsHyperlinkProps = StructureComponentProps<{
221
222
  className?: string;
222
223
  cfHyperlink?: StyleProps['cfHyperlink'];
223
224
  cfOpenInNewTab?: StyleProps['cfOpenInNewTab'];
224
225
  }>;
225
226
 
226
- declare const ContentfulContainer: React.FC<ContentfulContainerAsHyperlinkProps>;
227
+ declare const ContentfulContainer: React$1.FC<ContentfulContainerAsHyperlinkProps>;
227
228
 
228
229
  declare const containerDefinition: ComponentDefinition;
229
230
  declare const sectionDefinition: ComponentDefinition;
@@ -231,31 +232,31 @@ declare const sectionDefinition: ComponentDefinition;
231
232
  type ContentfulDividerProps = {
232
233
  className?: string;
233
234
  };
234
- declare const ContentfulDivider: ({ className, ...props }: ContentfulDividerProps) => React.JSX.Element;
235
+ declare const ContentfulDivider: ({ className, ...props }: ContentfulDividerProps) => React$1.JSX.Element;
235
236
 
236
237
  declare const dividerDefinition: ComponentDefinition;
237
238
 
238
239
  type ColumnsProps = StructureComponentProps<{
239
240
  className?: string;
240
241
  }>;
241
- declare const Columns: ({ className, children, ...otherProps }: ColumnsProps) => React.JSX.Element;
242
+ declare const Columns: ({ className, children, ...otherProps }: ColumnsProps) => React$1.JSX.Element;
242
243
 
243
244
  type SingleColumnProps = StructureComponentProps<{
244
245
  className?: string;
245
246
  }>;
246
- declare const SingleColumn: React.FC<SingleColumnProps>;
247
+ declare const SingleColumn: React$1.FC<SingleColumnProps>;
247
248
 
248
249
  declare const columnsDefinition: ComponentDefinition;
249
250
  declare const singleColumnDefinition: ComponentDefinition;
250
251
 
251
252
  type AssemblyProps = StructureComponentProps<HTMLAttributes<HTMLDivElement>>;
252
- declare const Assembly: React.FC<AssemblyProps>;
253
+ declare const Assembly: React$1.FC<AssemblyProps>;
253
254
 
254
255
  interface CarouselProps {
255
256
  className?: string;
256
- children?: React.ReactNode;
257
+ children?: React$1.ReactNode;
257
258
  }
258
- declare const Carousel: React.FC<CarouselProps>;
259
+ declare const Carousel: React$1.FC<CarouselProps>;
259
260
 
260
261
  declare const carouselDefinition: ComponentDefinition;
261
262