@contentful/experiences-components-react 0.0.1-alpha.10

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Contentful
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,112 @@
1
+ # Experience Builder Components
2
+
3
+ > Experience Builder is currently in a private alpha and not available publicly. If you are interested in participating in the alpha, please reach out to your Contentful account team.
4
+
5
+ This folder contains the source code for the default/example components that can be used with Experience Builder. These components can be used as-is to kick start building your experiences, or used as an example for building your own components.
6
+
7
+ ## In this guide
8
+
9
+ - [Components](#components)
10
+ - [Getting started](#getting-started)
11
+ * [Installation](#installation)
12
+ - [Styling](#styling)
13
+ * [Including default styles](#including-default-styles)
14
+ * [Adding custom styles](#adding-custom-styles)
15
+ - [withExperienceBuilder util](#withexperiencebuilder-util)
16
+ * [Usage](#usage)
17
+
18
+
19
+ ## Components
20
+
21
+ The following components are available:
22
+
23
+ - [Button](src/components/Button/README.md)
24
+ - [Heading](src/components/Heading/README.md)
25
+ - [Image](src/components/Image/README.md)
26
+ - [RichText](src/components/RichText/README.md)
27
+ - [Text](src/components/Text/README.md)
28
+
29
+ ## Getting started
30
+
31
+ ### Installation
32
+
33
+ ```bash
34
+ npm install @contentful/experiences-components-react
35
+ ```
36
+
37
+ ## Styling
38
+
39
+ By default, the components are unstyled. This allows you to style the components to match your brand and design system. If you want a set of default styles to get started, see below.
40
+
41
+ ### Including default styles
42
+
43
+ A set of optional, default styles are included with the components. To include them, import the `styles.css` file from the `@contentful/experiences-components-react` package:
44
+
45
+ ```jsx
46
+ import '@contentful/experiences-components-react/styles.css';
47
+ ```
48
+
49
+ ### Adding custom styles
50
+
51
+ Each component has a css class that you can use to add your own styles. The classes are named in the style of `cf-{component-name}` (ie `cf-button`).
52
+
53
+ For example, to style the `Button` component, you can do the following:
54
+
55
+ ```css
56
+ .cf-button {
57
+ /* your styles here */
58
+ }
59
+ ```
60
+
61
+ All components also support passing in custom class names via the `className` prop. This allows you to add your own class names to the component, which you can then use to style the component.
62
+
63
+ ## withExperienceBuilder util
64
+
65
+ We provide a helper function (as a [higher-order-component](https://legacy.reactjs.org/docs/higher-order-components.html)) to make it easier to register your own custom components with Experience Builder. This function helps ensure your component has all the required props and is properly registered with Experience Builder.
66
+
67
+ ### Usage
68
+
69
+ ```jsx
70
+ import { withExperienceBuilder } from '@/utils/withExperienceBuilder';
71
+ import { MyComponent } from './MyComponent';
72
+
73
+ export const ExperienceBuilderMyComponent = withExperienceBuilder(
74
+ // Your component
75
+ MyComponent,
76
+ // component registration configuration for EB
77
+ {
78
+ id: 'my-component',
79
+ name: 'My Component',
80
+ category: 'Custom',
81
+ variables: {
82
+ label: {
83
+ type: 'Text',
84
+ defaultValue: 'My Component',
85
+ },
86
+ },
87
+ },
88
+ );
89
+ ```
90
+
91
+ ### Container wrapping
92
+
93
+ By default, the `withExperienceBuilder` function will not wrap your component in a container. However, it is often useful to have your component wrapped. If the components is wrapped, all the styles generated from Experience Builder will be applied to the wrapping container instead of the component itself. This will make it so the additional styles don't interfere with your component's styles.
94
+
95
+ To wrap your component, pass in the `wrapComponent` option:
96
+
97
+ ```jsx
98
+ export const ExperienceBuilderMyComponent = withExperienceBuilder(
99
+ // Your component
100
+ MyComponent,
101
+ // component registration configuration for EB
102
+ { /* EB config */ },
103
+ // wrap the component with a container (defaults to false)
104
+ { wrapComponent: true }
105
+ );
106
+ ```
107
+
108
+ You can also provide the tag name the container will use (which defaults to 'div'):
109
+
110
+ ```tsx
111
+ { wrapComponent: true, wrapContainerTag: 'span' }
112
+ ```
@@ -0,0 +1,296 @@
1
+ import { ComponentDefinition, OptimizedImageAsset, ExperienceTreeNode, ExperienceDataSource, ExperienceUnboundValues, StyleProps, ResolveDesignValueType } from '@contentful/experiences-core/types';
2
+ import React$1, { RefObject, CSSProperties, SyntheticEvent } from 'react';
3
+ import { EntityStore } from '@contentful/experiences-core';
4
+ import { Document } from '@contentful/rich-text-types';
5
+
6
+ interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
7
+ /**
8
+ * The URL to navigate to when the button is clicked. When provided, the button will be wrapped in an anchor tag.
9
+ * @default undefined
10
+ * @optional
11
+ * @example
12
+ * ```tsx
13
+ * <Button url="https://www.google.com" label="Go" />
14
+ * ```
15
+ */
16
+ url?: string;
17
+ /**
18
+ * The target to use when navigating to the URL (if `url` is provided).
19
+ * @default undefined
20
+ * @optional
21
+ * @example
22
+ * ```tsx
23
+ * <Button url="https://www.google.com" target="_blank" label="Go" />
24
+ * ```
25
+ */
26
+ target?: string;
27
+ /**
28
+ * When `url` is provided, this function will be called instead of navigating to the URL. This allows the developer to handle the navigation themselves.
29
+ * @default undefined
30
+ * @optional
31
+ * @example
32
+ * ```tsx
33
+ * <Button
34
+ * url="https://www.google.com"
35
+ * target="_blank"
36
+ * onNavigate={(url, target) => {
37
+ * // dev can now do route via code
38
+ * }}
39
+ * label="Go"
40
+ * />
41
+ * ```
42
+ */
43
+ onNavigate?: (url: string, target?: string) => void;
44
+ /**
45
+ * The text to display in the button. If not provided, children will be used instead.
46
+ * @default undefined
47
+ * @optional
48
+ * @example
49
+ * ```tsx
50
+ * <Button label="Go" />
51
+ * ```
52
+ */
53
+ label?: string;
54
+ /**
55
+ * The children to display in the button. If label is provided, label will be used instead of this.
56
+ * @default null
57
+ * @optional
58
+ * @example
59
+ * ```tsx
60
+ * <Button>Go</Button>
61
+ * ```
62
+ */
63
+ children?: React$1.ReactNode;
64
+ }
65
+ declare const Button: React$1.FC<ButtonProps>;
66
+
67
+ declare const ButtonComponentDefinition: ComponentDefinition;
68
+
69
+ interface HeadingProps extends React$1.HTMLAttributes<HTMLHeadingElement> {
70
+ /**
71
+ * The text to display in the heading. If not provided, children will be used instead.
72
+ * @default undefined
73
+ * @optional
74
+ * @example
75
+ * ```tsx
76
+ * <Heading text="My Heading" />
77
+ * ```
78
+ */
79
+ text?: string;
80
+ /**
81
+ * The children to display in the heading. If text is provided, this will not be used.
82
+ * @default null
83
+ * @optional
84
+ * @example
85
+ * ```tsx
86
+ * <Heading>My Heading</Heading>
87
+ * ```
88
+ */
89
+ children?: React$1.ReactNode;
90
+ /**
91
+ * The type of heading to render
92
+ * @default h1
93
+ * @optional
94
+ * @example
95
+ * ```tsx
96
+ * <Heading type="h1">My Heading</Heading>
97
+ * ```
98
+ */
99
+ type?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
100
+ }
101
+ declare const Heading: React$1.FC<HeadingProps>;
102
+
103
+ declare const HeadingComponentDefinition: ComponentDefinition;
104
+
105
+ interface RichTextProps extends Omit<React$1.HTMLAttributes<HTMLElement>, 'value'> {
106
+ /**
107
+ * Renders the text in a specific HTML tag.
108
+ * @default p
109
+ * @optional
110
+ * @example
111
+ * ```tsx
112
+ * <RichText as="span" value={document}/>
113
+ * ```
114
+ */
115
+ as?: 'p' | 'span' | 'div' | 'label' | 'caption' | 'small' | 'strong' | 'em';
116
+ /**
117
+ * The document to display
118
+ * @example
119
+ * ```tsx
120
+ * <RichText value={{
121
+ nodeType: BLOCKS.DOCUMENT,
122
+ data: {},
123
+ content: [
124
+ {
125
+ nodeType: BLOCKS.PARAGRAPH,
126
+ data: {},
127
+ content: [{ nodeType: 'text', value: 'abc', marks: [], data: {} }],
128
+ },
129
+ ],
130
+ }} />
131
+ * ```
132
+ */
133
+ value: Document;
134
+ }
135
+ declare const RichText: React$1.FC<RichTextProps>;
136
+
137
+ declare const RichTextComponentDefinition: ComponentDefinition;
138
+
139
+ interface TextProps extends React$1.HTMLAttributes<HTMLElement> {
140
+ /**
141
+ * The URL to navigate to when the text is clicked. When provided, the text will be wrapped in an anchor tag.
142
+ * @default undefined
143
+ * @optional
144
+ * @example
145
+ * ```tsx
146
+ * <Text url="https://www.google.com" label="Go">My Text</Text>
147
+ * ```
148
+ */
149
+ url?: string;
150
+ /**
151
+ * The target to use when navigating to the URL (if `url` is provided).
152
+ * @default undefined
153
+ * @optional
154
+ * @example
155
+ * ```tsx
156
+ * <Text url="https://www.google.com" target="_blank" label="Go">My Text</Text>
157
+ * ```
158
+ */
159
+ target?: string;
160
+ /**
161
+ * When `url` is provided, this function will be called instead of navigating to the URL. This allows the developer to handle the navigation themselves.
162
+ * @default undefined
163
+ * @optional
164
+ * @example
165
+ * ```tsx
166
+ * <Text
167
+ * url="https://www.google.com"
168
+ * target="_blank"
169
+ * onNavigate={(url, target) => {
170
+ * // dev can now handle routing via code
171
+ * }}
172
+ * label="Go">
173
+ * My Text
174
+ * </Text>
175
+ * ```
176
+ */
177
+ onNavigate?: (url: string, target?: string) => void;
178
+ /**
179
+ * The text to display. If not provided, children will be used instead.
180
+ * @default undefined
181
+ * @optional
182
+ * @example
183
+ * ```tsx
184
+ * <Text value="My Text" />
185
+ * ```
186
+ */
187
+ value?: string;
188
+ /**
189
+ * The children to display in the text. If text is provided, text will be used instead of this.
190
+ * @default null
191
+ * @optional
192
+ * @example
193
+ * ```tsx
194
+ * <Text>My Text</Text>
195
+ * ```
196
+ */
197
+ children?: React$1.ReactNode;
198
+ /**
199
+ * Renders the text in a specific HTML tag.
200
+ * @default p
201
+ * @optional
202
+ * @example
203
+ * ```tsx
204
+ * <Text>My Text</Text>
205
+ * ```
206
+ */
207
+ as?: 'p' | 'span' | 'div' | 'label' | 'caption' | 'small' | 'strong' | 'em';
208
+ }
209
+ declare const Text: React$1.FC<TextProps>;
210
+
211
+ declare const TextComponentDefinition: ComponentDefinition;
212
+
213
+ interface ImageProps extends React$1.ImgHTMLAttributes<HTMLImageElement> {
214
+ cfImageAsset?: OptimizedImageAsset | string;
215
+ }
216
+ declare const Image: React$1.FC<ImageProps>;
217
+
218
+ declare const ImageComponentDefinition: ComponentDefinition;
219
+
220
+ type ContentfulContainerAsHyperlinkProps<EditorMode = boolean> = (EditorMode extends true ? {
221
+ editorMode?: EditorMode;
222
+ node: ExperienceTreeNode;
223
+ dataSource?: ExperienceDataSource;
224
+ unboundValues?: ExperienceUnboundValues;
225
+ resolveDesignValue?: any;
226
+ entityStore?: RefObject<EntityStore>;
227
+ areEntitiesFetched?: boolean;
228
+ renderDropzone: (node: ExperienceTreeNode, props?: Record<string, any>) => React$1.ReactNode;
229
+ } : {
230
+ editorMode: EditorMode;
231
+ }) & {
232
+ children?: React$1.ReactNode;
233
+ className?: string;
234
+ cfHyperlink?: StyleProps['cfHyperlink'];
235
+ cfOpenInNewTab?: StyleProps['cfOpenInNewTab'];
236
+ WrapperComponent?: React$1.ElementType;
237
+ };
238
+
239
+ declare const ContentfulContainer: React$1.FC<ContentfulContainerAsHyperlinkProps>;
240
+
241
+ interface ColumnsBaseProps {
242
+ editorMode: boolean;
243
+ className?: string;
244
+ children?: React.ReactNode;
245
+ }
246
+ interface ColumnsEditorModeProps extends ColumnsBaseProps {
247
+ editorMode: true;
248
+ cfColumns: string;
249
+ node: ExperienceTreeNode;
250
+ renderDropzone: (node: ExperienceTreeNode, props?: Record<string, unknown>) => React.ReactNode;
251
+ }
252
+ interface ColumnsDeliveryModeProps extends ColumnsBaseProps {
253
+ editorMode: false;
254
+ }
255
+ interface SingleColumnEditorModeProps extends ColumnsBaseProps {
256
+ editorMode: true;
257
+ node: ExperienceTreeNode;
258
+ renderDropzone: (node: ExperienceTreeNode, props?: Record<string, unknown>) => React.ReactNode;
259
+ cfColumnSpan: string;
260
+ wrapperClassName: string;
261
+ ['data-ctfl-draggable-id']: string;
262
+ Tooltip: React.ReactNode;
263
+ innerRef: (element?: HTMLElement | null | undefined) => void;
264
+ draggableProps: Record<string, unknown>;
265
+ dragHandleProps: Record<string, unknown>;
266
+ style: CSSProperties;
267
+ className: string;
268
+ onMouseOver: (e: SyntheticEvent<Element, Event>) => void;
269
+ onMouseOut: (e: SyntheticEvent<Element, Event>) => void;
270
+ onMouseDown: (e: SyntheticEvent<Element, Event>) => void;
271
+ onMouseUp: (e: SyntheticEvent<Element, Event>) => void;
272
+ onClick: (e: SyntheticEvent<Element, Event>) => void;
273
+ }
274
+ interface SingleColumnDeliveryModeProps extends ColumnsBaseProps {
275
+ editorMode: false;
276
+ }
277
+ type ColumnsProps = ColumnsEditorModeProps | ColumnsDeliveryModeProps;
278
+ type SingleColumnProps = SingleColumnEditorModeProps | SingleColumnDeliveryModeProps;
279
+
280
+ declare const Columns: React$1.FC<ColumnsProps>;
281
+
282
+ declare const SingleColumn: React$1.FC<SingleColumnProps>;
283
+
284
+ type AssemblyProps<EditorMode = boolean> = EditorMode extends true ? {
285
+ children?: React$1.ReactNode;
286
+ className?: string;
287
+ cfHyperlink?: StyleProps['cfHyperlink'];
288
+ cfOpenInNewTab?: StyleProps['cfOpenInNewTab'];
289
+ editorMode?: EditorMode;
290
+ node: ExperienceTreeNode;
291
+ resolveDesignValue?: ResolveDesignValueType;
292
+ renderDropzone: (node: ExperienceTreeNode, props?: Record<string, any>) => React$1.ReactNode;
293
+ } : Record<string, any>;
294
+ declare const Assembly: React$1.FC<AssemblyProps>;
295
+
296
+ export { Assembly, type AssemblyProps, Button, ButtonComponentDefinition, type ButtonProps, Columns, ContentfulContainer, Heading, HeadingComponentDefinition, type HeadingProps, Image, ImageComponentDefinition, type ImageProps, RichText, RichTextComponentDefinition, type RichTextProps, SingleColumn, Text, TextComponentDefinition, type TextProps };
package/dist/index.js ADDED
@@ -0,0 +1,609 @@
1
+ import React, { forwardRef } from 'react';
2
+ import styleInject from 'style-inject';
3
+ import { documentToReactComponents } from '@contentful/rich-text-react-renderer';
4
+ import { BLOCKS } from '@contentful/rich-text-types';
5
+
6
+ const CONTENTFUL_DEFAULT_CATEGORY = 'Contentful';
7
+ const CONTENTFUL_COMPONENTS = {
8
+ section: {
9
+ id: 'contentful-section',
10
+ name: 'Section',
11
+ },
12
+ container: {
13
+ id: 'contentful-container',
14
+ name: 'Container',
15
+ },
16
+ columns: {
17
+ id: 'contentful-columns',
18
+ name: 'Columns',
19
+ },
20
+ singleColumn: {
21
+ id: 'contentful-single-column',
22
+ name: 'Column',
23
+ },
24
+ button: {
25
+ id: 'contentful-button',
26
+ name: 'Button',
27
+ },
28
+ heading: {
29
+ id: 'contentful-heading',
30
+ name: 'Heading',
31
+ },
32
+ image: {
33
+ id: 'contentful-image',
34
+ name: 'Image',
35
+ },
36
+ richText: {
37
+ id: 'contentful-richText',
38
+ name: 'Rich Text',
39
+ },
40
+ text: {
41
+ id: 'contentful-text',
42
+ name: 'Text',
43
+ },
44
+ };
45
+ var PostMessageMethods;
46
+ (function (PostMessageMethods) {
47
+ PostMessageMethods["REQUEST_ENTITIES"] = "REQUEST_ENTITIES";
48
+ PostMessageMethods["REQUESTED_ENTITIES"] = "REQUESTED_ENTITIES";
49
+ })(PostMessageMethods || (PostMessageMethods = {}));
50
+
51
+ function combineClasses(...classes) {
52
+ return classes
53
+ .filter((val) => val)
54
+ .map((c) => c.trim())
55
+ .join(' ');
56
+ }
57
+
58
+ const Button = ({ children, className, label, onClick, onNavigate, target, url, ...props }) => {
59
+ const classes = combineClasses('cf-button', className);
60
+ const handleClick = (event) => {
61
+ if (onNavigate && url) {
62
+ event.preventDefault();
63
+ onNavigate(url, target);
64
+ }
65
+ onClick && onClick(event);
66
+ };
67
+ const button = (React.createElement("button", { className: classes, "data-url": url, "data-target": target, onClick: handleClick, ...props }, label ? label : children));
68
+ return url ? (React.createElement("a", { href: url, target: target }, button)) : (button);
69
+ };
70
+
71
+ const ButtonComponentDefinition = {
72
+ id: CONTENTFUL_COMPONENTS.button.id,
73
+ name: CONTENTFUL_COMPONENTS.button.name,
74
+ category: CONTENTFUL_DEFAULT_CATEGORY,
75
+ builtInStyles: [
76
+ 'cfMargin',
77
+ 'cfMaxWidth',
78
+ 'cfLetterSpacing',
79
+ 'cfTextItalic',
80
+ 'cfTextUnderline',
81
+ 'cfTextBold',
82
+ 'cfLineHeight',
83
+ 'cfBorder',
84
+ 'cfBorderRadius',
85
+ ],
86
+ tooltip: {
87
+ description: 'Drop onto the canvas to add button that can be used to trigger an action.',
88
+ },
89
+ variables: {
90
+ cfFontSize: {
91
+ displayName: 'Font Size',
92
+ type: 'Text',
93
+ group: 'style',
94
+ description: 'The font size of the button.',
95
+ defaultValue: '16px',
96
+ },
97
+ cfFontWeight: {
98
+ displayName: 'Font Weight',
99
+ type: 'Text',
100
+ group: 'style',
101
+ description: 'The font weight of the button.',
102
+ defaultValue: '600',
103
+ },
104
+ cfTextColor: {
105
+ displayName: 'Text Color',
106
+ type: 'Text',
107
+ group: 'style',
108
+ description: 'The text color of the button.',
109
+ defaultValue: 'rgba(255, 255, 255, 1)',
110
+ },
111
+ cfBackgroundColor: {
112
+ displayName: 'Background color',
113
+ type: 'Text',
114
+ group: 'style',
115
+ description: 'The background color of the button.',
116
+ defaultValue: 'rgba(0, 0, 0, 1)',
117
+ },
118
+ cfPadding: {
119
+ displayName: 'Padding',
120
+ type: 'Text',
121
+ group: 'style',
122
+ description: 'The padding of the button.',
123
+ defaultValue: '6px 12px 6px 12px',
124
+ },
125
+ cfWidth: {
126
+ displayName: 'Width',
127
+ type: 'Text',
128
+ group: 'style',
129
+ description: 'The width of the button.',
130
+ defaultValue: 'fit-content',
131
+ },
132
+ cfHeight: {
133
+ displayName: 'Height',
134
+ type: 'Text',
135
+ group: 'style',
136
+ description: 'The height of the button.',
137
+ defaultValue: 'fit-content',
138
+ },
139
+ cfTextAlign: {
140
+ displayName: 'Text Align',
141
+ type: 'Text',
142
+ group: 'style',
143
+ description: 'The text align of the button.',
144
+ defaultValue: 'center',
145
+ },
146
+ label: {
147
+ displayName: 'Label',
148
+ type: 'Text',
149
+ defaultValue: 'Button',
150
+ },
151
+ url: {
152
+ displayName: 'URL',
153
+ type: 'Text',
154
+ defaultValue: '/',
155
+ },
156
+ target: {
157
+ displayName: 'Target',
158
+ type: 'Text',
159
+ defaultValue: '',
160
+ },
161
+ },
162
+ };
163
+
164
+ var css_248z$5 = ".cf-heading {\n white-space: pre-line;\n}\n";
165
+ styleInject(css_248z$5);
166
+
167
+ const Heading = ({ children, className, text, type = 'h1', ...props }) => {
168
+ const Tag = type;
169
+ const classes = combineClasses('cf-heading', className);
170
+ return (React.createElement(Tag, { className: classes, ...props }, text ? text : children));
171
+ };
172
+
173
+ const HeadingComponentDefinition = {
174
+ id: CONTENTFUL_COMPONENTS.heading.id,
175
+ name: CONTENTFUL_COMPONENTS.heading.name,
176
+ category: CONTENTFUL_DEFAULT_CATEGORY,
177
+ builtInStyles: [
178
+ 'cfMargin',
179
+ 'cfPadding',
180
+ 'cfFontWeight',
181
+ 'cfLetterSpacing',
182
+ 'cfTextAlign',
183
+ 'cfTextColor',
184
+ 'cfTextTransform',
185
+ 'cfTextItalic',
186
+ 'cfTextUnderline',
187
+ 'cfWidth',
188
+ 'cfMaxWidth',
189
+ 'cfBackgroundColor',
190
+ 'cfBorder',
191
+ 'cfBorderRadius',
192
+ ],
193
+ tooltip: {
194
+ description: 'Drop onto the canvas to add a heading.',
195
+ },
196
+ variables: {
197
+ // Built-in style variables with default values changed
198
+ cfHeight: {
199
+ displayName: 'Height',
200
+ type: 'Text',
201
+ group: 'style',
202
+ description: 'The height of the button.',
203
+ defaultValue: 'fit-content',
204
+ },
205
+ cfFontSize: {
206
+ displayName: 'Font Size',
207
+ type: 'Text',
208
+ group: 'style',
209
+ description: 'The font size of the heading.',
210
+ defaultValue: '32px',
211
+ },
212
+ cfLineHeight: {
213
+ displayName: 'Line Height',
214
+ type: 'Text',
215
+ group: 'style',
216
+ description: 'The line height of the heading.',
217
+ defaultValue: '48px',
218
+ },
219
+ cfTextBold: {
220
+ displayName: 'Bold',
221
+ type: 'Boolean',
222
+ group: 'style',
223
+ description: 'The text bold of the heading.',
224
+ defaultValue: true,
225
+ },
226
+ // Component specific variables
227
+ text: {
228
+ displayName: 'text',
229
+ type: 'Text',
230
+ description: 'The text to display in the heading.',
231
+ defaultValue: 'Heading',
232
+ },
233
+ type: {
234
+ displayName: 'Type',
235
+ type: 'Text',
236
+ defaultValue: 'h1',
237
+ description: 'Determines the HTML tag of the heading. Value can be h1, h2, h3, h4, h5, or h6.',
238
+ validations: {
239
+ in: [
240
+ { value: 'h1', displayName: 'H1' },
241
+ { value: 'h2', displayName: 'H2' },
242
+ { value: 'h3', displayName: 'H3' },
243
+ { value: 'h4', displayName: 'H4' },
244
+ { value: 'h5', displayName: 'H5' },
245
+ { value: 'h6', displayName: 'H6' },
246
+ ],
247
+ },
248
+ },
249
+ },
250
+ };
251
+
252
+ var css_248z$4 = ".cf-richtext {\n white-space: pre-line;\n}\n";
253
+ styleInject(css_248z$4);
254
+
255
+ const RichText = ({ as = 'p', className, value, ...props }) => {
256
+ const classes = combineClasses('cf-richtext', className);
257
+ const Tag = as;
258
+ return documentToReactComponents(value, {
259
+ renderNode: {
260
+ [BLOCKS.PARAGRAPH]: (_node, children) => {
261
+ return (React.createElement(Tag, { className: classes, ...props }, children));
262
+ },
263
+ },
264
+ });
265
+ };
266
+
267
+ const RichTextComponentDefinition = {
268
+ id: CONTENTFUL_COMPONENTS.richText.id,
269
+ name: CONTENTFUL_COMPONENTS.richText.name,
270
+ category: CONTENTFUL_DEFAULT_CATEGORY,
271
+ builtInStyles: [
272
+ 'cfMargin',
273
+ 'cfPadding',
274
+ 'cfFontWeight',
275
+ 'cfLetterSpacing',
276
+ 'cfTextTransform',
277
+ 'cfMaxWidth',
278
+ 'cfBackgroundColor',
279
+ 'cfBorder',
280
+ 'cfBorderRadius',
281
+ ],
282
+ tooltip: {
283
+ description: 'Drop onto the canvas to add text with Rich text formatting options.',
284
+ },
285
+ variables: {
286
+ // Built-in style variables with default values changed
287
+ cfLineHeight: {
288
+ displayName: 'Line Height',
289
+ type: 'Text',
290
+ group: 'style',
291
+ description: 'The line height of the heading.',
292
+ defaultValue: '24px',
293
+ },
294
+ cfTextAlign: {
295
+ displayName: 'Text Align',
296
+ type: 'Text',
297
+ group: 'style',
298
+ description: 'The text alignment of the heading.',
299
+ defaultValue: 'center',
300
+ },
301
+ cfWidth: {
302
+ displayName: 'Width',
303
+ type: 'Text',
304
+ group: 'style',
305
+ description: 'The width of the button.',
306
+ defaultValue: 'fit-content',
307
+ },
308
+ cfHeight: {
309
+ displayName: 'Height',
310
+ type: 'Text',
311
+ group: 'style',
312
+ description: 'The height of the button.',
313
+ defaultValue: 'fit-content',
314
+ },
315
+ value: {
316
+ displayName: 'Value',
317
+ description: 'The text to display.',
318
+ type: 'RichText',
319
+ defaultValue: {
320
+ nodeType: 'document',
321
+ data: {},
322
+ content: [
323
+ {
324
+ nodeType: 'paragraph',
325
+ data: {},
326
+ content: [
327
+ {
328
+ nodeType: 'text',
329
+ value: 'Rich text',
330
+ marks: [],
331
+ data: {},
332
+ },
333
+ ],
334
+ },
335
+ ],
336
+ },
337
+ },
338
+ },
339
+ };
340
+
341
+ var css_248z$3 = ".cf-text {\n white-space: pre-line;\n}\n";
342
+ styleInject(css_248z$3);
343
+
344
+ const Text = ({ as = 'p', children, className, value, url, target, onNavigate, onClick, ...props }) => {
345
+ const handleClick = (event) => {
346
+ if (onNavigate && url) {
347
+ event.preventDefault();
348
+ onNavigate(url, target);
349
+ }
350
+ onClick && onClick(event);
351
+ };
352
+ const Tag = as;
353
+ const textAsTag = (React.createElement(Tag, { className: combineClasses('cf-text', className), onClick: handleClick, "data-url": url, ...(target ? { 'data-target': target } : {}), ...props }, value ? value : children));
354
+ if (!url) {
355
+ return textAsTag;
356
+ }
357
+ return (React.createElement("a", { className: "cf-text-link", href: url, ...(target ? { target } : {}) }, textAsTag));
358
+ };
359
+
360
+ const TextComponentDefinition = {
361
+ id: CONTENTFUL_COMPONENTS.text.id,
362
+ name: CONTENTFUL_COMPONENTS.text.name,
363
+ category: CONTENTFUL_DEFAULT_CATEGORY,
364
+ builtInStyles: [
365
+ 'cfMargin',
366
+ 'cfPadding',
367
+ 'cfFontSize',
368
+ 'cfFontWeight',
369
+ 'cfLineHeight',
370
+ 'cfLetterSpacing',
371
+ 'cfTextColor',
372
+ 'cfTextAlign',
373
+ 'cfTextTransform',
374
+ 'cfTextBold',
375
+ 'cfTextItalic',
376
+ 'cfTextUnderline',
377
+ 'cfBackgroundColor',
378
+ 'cfBorder',
379
+ 'cfBorderRadius',
380
+ 'cfWidth',
381
+ 'cfMaxWidth',
382
+ ],
383
+ tooltip: {
384
+ description: 'Drop onto the canvas to add plain text.',
385
+ },
386
+ variables: {
387
+ cfHeight: {
388
+ displayName: 'Height',
389
+ type: 'Text',
390
+ group: 'style',
391
+ description: 'The height of the button.',
392
+ defaultValue: 'fit-content',
393
+ },
394
+ value: {
395
+ displayName: 'Value',
396
+ description: 'The text to display. If not provided, children will be used instead.',
397
+ type: 'Text',
398
+ defaultValue: 'Text',
399
+ },
400
+ as: {
401
+ displayName: 'As',
402
+ description: 'Renders the text in a specific HTML tag.',
403
+ type: 'Text',
404
+ defaultValue: 'p',
405
+ validations: {
406
+ in: [
407
+ { value: 'p', displayName: 'p' },
408
+ { value: 'span', displayName: 'span' },
409
+ { value: 'div', displayName: 'div' },
410
+ { value: 'label', displayName: 'label' },
411
+ { value: 'caption', displayName: 'caption' },
412
+ { value: 'small', displayName: 'small' },
413
+ { value: 'strong', displayName: 'strong' },
414
+ { value: 'em', displayName: 'em' },
415
+ ],
416
+ },
417
+ },
418
+ url: {
419
+ displayName: 'URL',
420
+ type: 'Text',
421
+ defaultValue: '',
422
+ },
423
+ target: {
424
+ displayName: 'Target',
425
+ type: 'Text',
426
+ defaultValue: '',
427
+ },
428
+ },
429
+ };
430
+
431
+ var css_248z$2 = ".cf-no-image {\n position: relative;\n}\n\n.cf-no-image img {\n background-color: var(--cf-color-gray100);\n outline-offset: -2px;\n outline: 2px solid rgba(var(--cf-color-gray400-rgb), 0.5);\n}\n\n[data-ctfl-draggable-id] .cf-no-image {\n width: 100%;\n height: 100%;\n}\n\n[data-ctfl-draggable-id] .cf-no-image img {\n width: 100%;\n}\n\n.cf-no-image svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n height: var(--cf-text-3xl);\n width: var(--cf-text-3xl);\n max-height: 100%;\n max-width: 100%;\n}\n\n.cf-no-image svg path {\n fill: var(--cf-color-gray400);\n}\n";
432
+ styleInject(css_248z$2);
433
+
434
+ const Image = ({ className = '', src, cfImageAsset, ...props }) => {
435
+ if (!cfImageAsset && !src) {
436
+ return (React.createElement("div", { className: "cf-no-image" },
437
+ React.createElement("img", { className: className, src: "data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAA", ...props }),
438
+ React.createElement("svg", { fill: "none", viewBox: "0 0 17 16", xmlns: "http://www.w3.org/2000/svg" },
439
+ React.createElement("path", { fill: "#fff", d: "M13.5 2h-10a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1m-10 1h10v4.836l-1.543-1.543a1 1 0 0 0-1.414 0L3.836 13H3.5zm10 10H5.25l6-6 2.25 2.25zm-7-5.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3m0-2a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1" }))));
440
+ }
441
+ if (typeof cfImageAsset === 'string') {
442
+ return React.createElement("img", { src: cfImageAsset, className: 'cf-image ' + className, ...props });
443
+ }
444
+ if (cfImageAsset) {
445
+ return (React.createElement("img", { src: cfImageAsset.url, srcSet: cfImageAsset.srcSet?.length ? cfImageAsset.srcSet?.join(', ') : undefined, sizes: cfImageAsset.sizes ? cfImageAsset.sizes : undefined, className: 'cf-image ' + className, ...props }));
446
+ }
447
+ if (src) {
448
+ return React.createElement("img", { src: src, className: 'cf-image ' + className, ...props });
449
+ }
450
+ };
451
+
452
+ const ImageComponentDefinition = {
453
+ id: CONTENTFUL_COMPONENTS.image.id,
454
+ name: CONTENTFUL_COMPONENTS.image.name,
455
+ category: CONTENTFUL_DEFAULT_CATEGORY,
456
+ builtInStyles: ['cfMargin', 'cfPadding', 'cfImageAsset', 'cfImageOptions'],
457
+ tooltip: {
458
+ description: 'Drop onto the canvas to upload an image.',
459
+ },
460
+ variables: {
461
+ alt: {
462
+ displayName: 'Alt',
463
+ type: 'Text',
464
+ description: 'Alternative text for the image',
465
+ },
466
+ },
467
+ };
468
+
469
+ var css_248z$1 = ".contentful-container {\n position: relative;\n display: flex;\n box-sizing: border-box;\n pointer-events: all;\n}\n\n.contentful-container::-webkit-scrollbar {\n display: none; /* Safari and Chrome */\n}\n\n.cf-single-column-wrapper {\n position: relative;\n}\n\n.cf-container-wrapper {\n position: relative;\n width: 100%;\n}\n\n.cf-container-label {\n position: absolute;\n pointer-events: none;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n overflow-x: clip;\n font-family: var(--exp-builder-font-stack-primary);\n font-size: 12px;\n color: var(--exp-builder-gray400);\n z-index: 10;\n}\n\n/* used by ContentfulSectionAsHyperlink.tsx */\n\n.contentful-container-link,\n.contentful-container-link:active,\n.contentful-container-link:visited,\n.contentful-container-link:hover,\n.contentful-container-link:read-write,\n.contentful-container-link:focus-visible {\n color: inherit;\n text-decoration: unset;\n outline: unset;\n}\n";
470
+ styleInject(css_248z$1);
471
+
472
+ const Flex = forwardRef(({ id, children, onMouseEnter, onMouseUp, onMouseLeave, onMouseDown, onClick, flex, flexBasis, flexShrink, flexDirection, gap, justifyContent, justifyItems, justifySelf, alignItems, alignSelf, alignContent, order, flexWrap, flexGrow, className, cssStyles, ...props }, ref) => {
473
+ return (React.createElement("div", { id: id, ref: ref, style: {
474
+ display: 'flex',
475
+ flex,
476
+ flexBasis,
477
+ flexShrink,
478
+ flexDirection,
479
+ gap,
480
+ justifyContent,
481
+ justifyItems,
482
+ justifySelf,
483
+ alignItems,
484
+ alignSelf,
485
+ alignContent,
486
+ order,
487
+ flexWrap,
488
+ flexGrow,
489
+ ...cssStyles,
490
+ }, className: className, onMouseEnter: onMouseEnter, onMouseUp: onMouseUp, onMouseDown: onMouseDown, onMouseLeave: onMouseLeave, onClick: onClick, ...props }, children));
491
+ });
492
+ Flex.displayName = 'Flex';
493
+
494
+ /* eslint-disable */ /* TODO: fix eslint errors */
495
+ const ContentfulContainerAsHyperlink = (props) => {
496
+ const { cfHyperlink, cfOpenInNewTab, editorMode, className, children } = props;
497
+ if (editorMode === false) {
498
+ let anchorTagProps = {};
499
+ if (cfOpenInNewTab) {
500
+ anchorTagProps = {
501
+ target: '_blank',
502
+ rel: 'noopener noreferrer',
503
+ };
504
+ }
505
+ return (React.createElement("a", { className: combineClasses(className, 'contentful-container', 'contentful-container-link'), href: cfHyperlink, ...anchorTagProps }, children));
506
+ }
507
+ const { renderDropzone, node } = props;
508
+ const stopPropagationInEditorMode = (e) => {
509
+ e.stopPropagation();
510
+ e.preventDefault();
511
+ };
512
+ return renderDropzone(node, {
513
+ ['data-test-id']: 'contentful-container',
514
+ className: combineClasses(className, 'contentful-container', 'contentful-container-link'),
515
+ zoneId: node.data.id,
516
+ WrapperComponent: 'a',
517
+ onClick: stopPropagationInEditorMode,
518
+ });
519
+ };
520
+
521
+ /* eslint-disable */
522
+ const ContentfulContainer = (props) => {
523
+ const { className, editorMode, children, cfHyperlink } = props;
524
+ if (cfHyperlink) {
525
+ return React.createElement(ContentfulContainerAsHyperlink, { ...props }, children);
526
+ }
527
+ if (editorMode === false) {
528
+ return (React.createElement(Flex, { "data-test-id": "contentful-container", className: combineClasses(className, 'contentful-container') }, children));
529
+ }
530
+ // Extract properties that are only available in editor mode
531
+ const { renderDropzone, node } = props;
532
+ const isEmpty = !node.children.length;
533
+ const renderDropzoneComponent = () => {
534
+ return renderDropzone(node, {
535
+ ['data-test-id']: 'contentful-container',
536
+ id: 'ContentfulContainer',
537
+ className: combineClasses('contentful-container', className),
538
+ WrapperComponent: Flex,
539
+ });
540
+ };
541
+ // Perform ternary so that we only render the wrapper div if the container is empty
542
+ return isEmpty ? (React.createElement("div", { className: "cf-container-wrapper", "data-ctfl-draggable-id": node.data.id },
543
+ React.createElement("div", { className: "cf-container-label" }, node.data.blockId === CONTENTFUL_COMPONENTS.section.id ? 'Section' : 'Container'),
544
+ renderDropzoneComponent())) : (renderDropzoneComponent());
545
+ };
546
+
547
+ var css_248z = ".Columns {\n display: flex;\n gap: 24px;\n grid-template-columns: repeat(12, 1fr);\n flex-direction: column;\n min-height: 0; /* NEW */\n min-width: 0; /* NEW; needed for Firefox */\n}\n\n@media (min-width: 768px) {\n .Columns {\n display: grid;\n }\n}\n\n.cf-single-column-wrapper {\n position: relative;\n}\n\n.cf-single-column {\n pointer-events: all;\n}\n\n.cf-single-column-label {\n pointer-events: none;\n position: absolute;\n z-index: -1;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n font-family: var(--exp-builder-font-stack-primary);\n font-size: 12px;\n color: var(--exp-builder-gray400);\n z-index: 100;\n}\n";
548
+ styleInject(css_248z);
549
+
550
+ const ColumnWrapper = forwardRef((props, ref) => {
551
+ return (React.createElement("div", { ref: ref, ...props, style: {
552
+ ...(props.style || {}),
553
+ display: 'grid',
554
+ gridTemplateColumns: 'repeat(12, [col-start] 1fr)',
555
+ } }, props.children));
556
+ });
557
+ ColumnWrapper.displayName = 'ColumnWrapper';
558
+ const Columns = (props) => {
559
+ const { editorMode, className, children } = props;
560
+ if (!editorMode) {
561
+ return (React.createElement(ColumnWrapper, { className: combineClasses(className, 'Columns') }, children));
562
+ }
563
+ const { node, renderDropzone } = props;
564
+ return renderDropzone(node, {
565
+ ['data-test-id']: 'contentful-columns',
566
+ className: className,
567
+ WrapperComponent: ColumnWrapper,
568
+ });
569
+ };
570
+
571
+ const SingleColumn = (props) => {
572
+ const { className, editorMode, children } = props;
573
+ if (editorMode === false) {
574
+ return React.createElement(Flex, { className: className }, children);
575
+ }
576
+ const { renderDropzone, node, innerRef, Tooltip, style, dragHandleProps, draggableProps, cfColumnSpan, editorMode: edit, wrapperClassName, ...editorProps } = props;
577
+ const isEmpty = !node.children.length;
578
+ return (React.createElement("div", { ref: innerRef, ...dragHandleProps, ...draggableProps, ...editorProps, className: combineClasses(wrapperClassName, 'cf-single-column-wrapper', isEmpty ? 'cf-single-column-empty' : ''), style: {
579
+ ...style,
580
+ gridColumn: `span ${cfColumnSpan}`,
581
+ } },
582
+ Tooltip,
583
+ isEmpty && React.createElement("div", { className: "cf-single-column-label" }, "Column"),
584
+ renderDropzone(node, {
585
+ ['data-test-id']: 'contentful-single-column',
586
+ className: combineClasses('cf-single-column', className),
587
+ WrapperComponent: Flex,
588
+ })));
589
+ };
590
+
591
+ const assemblyStyle = { display: 'contents' };
592
+ // Feel free to do any magic as regards variable definitions for assemblies
593
+ // Or if this isn't necessary by the time we figure that part out, we can bid this part farewell
594
+ const Assembly = (props) => {
595
+ if (props.editorMode) {
596
+ const { node } = props;
597
+ return props.renderDropzone(node, {
598
+ ['data-test-id']: 'contentful-assembly',
599
+ className: props.className,
600
+ style: assemblyStyle,
601
+ });
602
+ }
603
+ // Using a display contents so assembly content/children
604
+ // can appear as if they are direct children of the div wrapper's parent
605
+ return React.createElement("div", { "data-test-id": "assembly", ...props, style: assemblyStyle });
606
+ };
607
+
608
+ export { Assembly, Button, ButtonComponentDefinition, Columns, ContentfulContainer, Heading, HeadingComponentDefinition, Image, ImageComponentDefinition, RichText, RichTextComponentDefinition, SingleColumn, Text, TextComponentDefinition };
609
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../core/dist/constants.js","../../src/utils/combineClasses.ts","../../src/components/Button/Button.tsx","../../src/components/Button/index.ts","../../src/components/Heading/Heading.tsx","../../src/components/Heading/index.ts","../../src/components/RichText/RichText.tsx","../../src/components/RichText/index.ts","../../src/components/Text/Text.tsx","../../src/components/Text/index.ts","../../src/components/Image/Image.tsx","../../src/components/Image/index.ts","../../src/components/Layout/Flex.tsx","../../src/components/ContentfulContainer/ContentfulContainerAsHyperlink.tsx","../../src/components/ContentfulContainer/ContentfulContainer.tsx","../../src/components/Columns/Columns.tsx","../../src/components/Columns/SingleColumn.tsx","../../src/components/Assembly/Assembly.tsx"],"sourcesContent":["const SCROLL_STATES = {\n Start: 'scrollStart',\n IsScrolling: 'isScrolling',\n End: 'scrollEnd',\n};\nconst OUTGOING_EVENTS = {\n Connected: 'connected',\n DesignTokens: 'registerDesignTokens',\n HoveredSection: 'hoveredSection',\n MouseMove: 'mouseMove',\n NewHoveredElement: 'newHoveredElement',\n ComponentSelected: 'componentSelected',\n RegisteredComponents: 'registeredComponents',\n RequestComponentTreeUpdate: 'requestComponentTreeUpdate',\n ComponentDragCanceled: 'componentDragCanceled',\n ComponentDropped: 'componentDropped',\n ComponentMoved: 'componentMoved',\n CanvasReload: 'canvasReload',\n UpdateSelectedComponentCoordinates: 'updateSelectedComponentCoordinates',\n UpdateHoveredComponentCoordinates: 'updateHoveredComponentCoordinates',\n CanvasScroll: 'canvasScrolling',\n CanvasError: 'canvasError',\n ComponentMoveStarted: 'componentMoveStarted',\n ComponentMoveEnded: 'componentMoveEnded',\n OutsideCanvasClick: 'outsideCanvasClick',\n};\nconst INCOMING_EVENTS = {\n RequestEditorMode: 'requestEditorMode',\n ExperienceUpdated: 'componentTreeUpdated',\n ComponentDraggingChanged: 'componentDraggingChanged',\n ComponentDragCanceled: 'componentDragCanceled',\n ComponentDragStarted: 'componentDragStarted',\n ComponentDragEnded: 'componentDragEnded',\n ComponentMoveEnded: 'componentMoveEnded',\n CanvasResized: 'canvasResized',\n SelectComponent: 'selectComponent',\n HoverComponent: 'hoverComponent',\n UpdatedEntity: 'updatedEntity',\n AssembliesAdded: 'assembliesAdded',\n AssembliesRegistered: 'assembliesRegistered',\n InitEditor: 'initEditor',\n MouseMove: 'mouseMove',\n};\nconst INTERNAL_EVENTS = {\n ComponentsRegistered: 'cfComponentsRegistered',\n VisualEditorInitialize: 'cfVisualEditorInitialize',\n};\nconst VISUAL_EDITOR_EVENTS = {\n Ready: 'cfVisualEditorReady',\n};\nconst VISUAL_EDITOR_CONTAINER_ID = 'cf-visual-editor';\nconst CONTENTFUL_COMPONENT_CATEGORY = 'contentful-component';\nconst CONTENTFUL_DEFAULT_CATEGORY = 'Contentful';\nconst CONTENTFUL_COMPONENTS = {\n section: {\n id: 'contentful-section',\n name: 'Section',\n },\n container: {\n id: 'contentful-container',\n name: 'Container',\n },\n columns: {\n id: 'contentful-columns',\n name: 'Columns',\n },\n singleColumn: {\n id: 'contentful-single-column',\n name: 'Column',\n },\n button: {\n id: 'contentful-button',\n name: 'Button',\n },\n heading: {\n id: 'contentful-heading',\n name: 'Heading',\n },\n image: {\n id: 'contentful-image',\n name: 'Image',\n },\n richText: {\n id: 'contentful-richText',\n name: 'Rich Text',\n },\n text: {\n id: 'contentful-text',\n name: 'Text',\n },\n};\nconst ASSEMBLY_NODE_TYPE = 'assembly';\nconst ASSEMBLY_DEFAULT_CATEGORY = 'Assemblies';\nconst ASSEMBLY_BLOCK_NODE_TYPE = 'assemblyBlock';\nconst ASSEMBLY_NODE_TYPES = [ASSEMBLY_NODE_TYPE, ASSEMBLY_BLOCK_NODE_TYPE];\nconst LATEST_SCHEMA_VERSION = '2023-09-28';\nconst CF_STYLE_ATTRIBUTES = [\n 'cfHorizontalAlignment',\n 'cfVerticalAlignment',\n 'cfMargin',\n 'cfPadding',\n 'cfBackgroundColor',\n 'cfWidth',\n 'cfMaxWidth',\n 'cfHeight',\n 'cfImageAsset',\n 'cfImageOptions',\n 'cfBackgroundImageUrl',\n 'cfBackgroundImageOptions',\n 'cfFlexDirection',\n 'cfFlexWrap',\n 'cfBorder',\n 'cfBorderRadius',\n 'cfGap',\n 'cfFontSize',\n 'cfFontWeight',\n 'cfLineHeight',\n 'cfLetterSpacing',\n 'cfTextColor',\n 'cfTextAlign',\n 'cfTextTransform',\n 'cfTextBold',\n 'cfTextItalic',\n 'cfTextUnderline',\n // For backwards compatibility\n // we need to keep those in this constant array\n // so that omit() in <VisualEditorBlock> and <CompositionBlock>\n // can filter them out and not pass as props\n 'cfBackgroundImageScaling',\n 'cfBackgroundImageAlignment',\n 'cfBackgroundImageAlignmentVertical',\n 'cfBackgroundImageAlignmentHorizontal',\n];\nconst EMPTY_CONTAINER_HEIGHT = '80px';\nconst DEFAULT_IMAGE_WIDTH = '500px';\nvar PostMessageMethods;\n(function (PostMessageMethods) {\n PostMessageMethods[\"REQUEST_ENTITIES\"] = \"REQUEST_ENTITIES\";\n PostMessageMethods[\"REQUESTED_ENTITIES\"] = \"REQUESTED_ENTITIES\";\n})(PostMessageMethods || (PostMessageMethods = {}));\nconst SUPPORTED_IMAGE_FORMATS = ['jpg', 'png', 'webp', 'gif', 'avif'];\n\nexport { ASSEMBLY_BLOCK_NODE_TYPE, ASSEMBLY_DEFAULT_CATEGORY, ASSEMBLY_NODE_TYPE, ASSEMBLY_NODE_TYPES, CF_STYLE_ATTRIBUTES, CONTENTFUL_COMPONENTS, CONTENTFUL_COMPONENT_CATEGORY, CONTENTFUL_DEFAULT_CATEGORY, DEFAULT_IMAGE_WIDTH, EMPTY_CONTAINER_HEIGHT, INCOMING_EVENTS, INTERNAL_EVENTS, LATEST_SCHEMA_VERSION, OUTGOING_EVENTS, PostMessageMethods, SCROLL_STATES, SUPPORTED_IMAGE_FORMATS, VISUAL_EDITOR_CONTAINER_ID, VISUAL_EDITOR_EVENTS };\n//# sourceMappingURL=constants.js.map\n",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"names":[],"mappings":";;;;;AAoDA,MAAM,2BAA2B,GAAG,YAAY,CAAC;AACjD,MAAM,qBAAqB,GAAG;AAC9B,IAAI,OAAO,EAAE;AACb,QAAQ,EAAE,EAAE,oBAAoB;AAChC,QAAQ,IAAI,EAAE,SAAS;AACvB,KAAK;AACL,IAAI,SAAS,EAAE;AACf,QAAQ,EAAE,EAAE,sBAAsB;AAClC,QAAQ,IAAI,EAAE,WAAW;AACzB,KAAK;AACL,IAAI,OAAO,EAAE;AACb,QAAQ,EAAE,EAAE,oBAAoB;AAChC,QAAQ,IAAI,EAAE,SAAS;AACvB,KAAK;AACL,IAAI,YAAY,EAAE;AAClB,QAAQ,EAAE,EAAE,0BAA0B;AACtC,QAAQ,IAAI,EAAE,QAAQ;AACtB,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,QAAQ,EAAE,EAAE,mBAAmB;AAC/B,QAAQ,IAAI,EAAE,QAAQ;AACtB,KAAK;AACL,IAAI,OAAO,EAAE;AACb,QAAQ,EAAE,EAAE,oBAAoB;AAChC,QAAQ,IAAI,EAAE,SAAS;AACvB,KAAK;AACL,IAAI,KAAK,EAAE;AACX,QAAQ,EAAE,EAAE,kBAAkB;AAC9B,QAAQ,IAAI,EAAE,OAAO;AACrB,KAAK;AACL,IAAI,QAAQ,EAAE;AACd,QAAQ,EAAE,EAAE,qBAAqB;AACjC,QAAQ,IAAI,EAAE,WAAW;AACzB,KAAK;AACL,IAAI,IAAI,EAAE;AACV,QAAQ,EAAE,EAAE,iBAAiB;AAC7B,QAAQ,IAAI,EAAE,MAAM;AACpB,KAAK;AACL,CAAC,CAAC;AA6CF,IAAI,kBAAkB,CAAC;AACvB,CAAC,UAAU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C,cAAc,GAAG,qBAAqB;YACvC,SAAS,EAAE,KAAK,CAAC,SAAS;AAC1B,YAAA,KAAK,EAAE,aAAa;AACrB,SAAA,CAAC,CAAC;KACJ;;;IAGD,OAAO,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAA,cAAA,EAAkB,UAAU,EAAK,GAAA,KAAK,EAAE,KAAK,EAAE,aAAa,EAAA,CAAI,CAAC;AAC1E;;;;"}
package/package.json ADDED
@@ -0,0 +1,85 @@
1
+ {
2
+ "name": "@contentful/experiences-components-react",
3
+ "version": "0.0.1-alpha.10",
4
+ "description": "A basic set of components to use with Studio Experiences",
5
+ "homepage": "https://github.com/contentful/experience-builder/tree/next/packages/components#readme",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/contentful/experience-builder.git"
9
+ },
10
+ "main": "./dist/index.js",
11
+ "module": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "style": "./styles.css",
14
+ "type": "module",
15
+ "publishConfig": {
16
+ "registry": "https://npm.pkg.github.com/"
17
+ },
18
+ "scripts": {
19
+ "clean": "rimraf dist && rimraf styles.css",
20
+ "predev": "npm run clean",
21
+ "dev": "rollup -c ./rollup.config.mjs --watch --environment DEV",
22
+ "prebuild": "npm run clean",
23
+ "build": "rollup -c ./rollup.config.mjs",
24
+ "lint": "eslint src --ext '.ts,.tsx,.js,.jsx' --max-warnings 0 --ignore-path ../../.eslintignore",
25
+ "lint:fix": "eslint src --ext '.ts,.tsx,.js,.jsx' --fix",
26
+ "test:component": "npx cypress run --component",
27
+ "storybook": "storybook dev -p 6006",
28
+ "build-storybook": "storybook build",
29
+ "depcruise": "depcruise src"
30
+ },
31
+ "author": "",
32
+ "license": "MIT",
33
+ "files": [
34
+ "readme.md",
35
+ "styles.css",
36
+ "package.json",
37
+ "dist/**/*.*"
38
+ ],
39
+ "devDependencies": {
40
+ "@rollup/plugin-commonjs": "^25.0.4",
41
+ "@rollup/plugin-node-resolve": "^15.2.1",
42
+ "@rollup/plugin-terser": "^0.4.3",
43
+ "@rollup/plugin-typescript": "^11.1.3",
44
+ "@storybook/addon-essentials": "^7.4.1",
45
+ "@storybook/addon-interactions": "^7.4.1",
46
+ "@storybook/addon-links": "^7.4.1",
47
+ "@storybook/addon-onboarding": "^1.0.8",
48
+ "@storybook/blocks": "^7.4.1",
49
+ "@storybook/react": "^7.4.1",
50
+ "@storybook/react-vite": "^7.4.1",
51
+ "@storybook/testing-library": "^0.2.0",
52
+ "@types/react": "^18.2.21",
53
+ "@typescript-eslint/eslint-plugin": "^7.0.2",
54
+ "@vitejs/plugin-react": "^4.0.4",
55
+ "cypress": "^13.1.0",
56
+ "eslint": "^8.49.0",
57
+ "eslint-config-prettier": "^9.0.0",
58
+ "eslint-plugin-prettier": "^5.0.1",
59
+ "eslint-plugin-storybook": "^0.8.0",
60
+ "prettier": "^3.0.3",
61
+ "react": "^18.2.0",
62
+ "react-dom": "^18.2.0",
63
+ "rimraf": "^5.0.1",
64
+ "rollup": "^4.12.0",
65
+ "rollup-plugin-dts": "^6.0.2",
66
+ "rollup-plugin-postcss": "^4.0.2",
67
+ "rollup-plugin-ts": "^3.4.5",
68
+ "storybook": "^7.4.1",
69
+ "tslib": "^2.6.2",
70
+ "typescript": "^5.2.2",
71
+ "vite": "^4.4.9",
72
+ "vite-plugin-svgr": "^4.1.0"
73
+ },
74
+ "peerDependencies": {
75
+ "react": ">=17.0.0",
76
+ "react-dom": ">=17.0.0"
77
+ },
78
+ "dependencies": {
79
+ "@contentful/experiences-core": "0.0.1-alpha.10",
80
+ "@contentful/rich-text-react-renderer": "^15.17.2",
81
+ "postcss-import": "^15.1.0",
82
+ "style-inject": "^0.3.0"
83
+ },
84
+ "gitHead": "0ceb98b028d0d11f3c76c6c48e016fe8a10e9339"
85
+ }
package/styles.css ADDED
@@ -0,0 +1,70 @@
1
+ @import url(https://fonts.googleapis.com/css2?family=Archivo:ital,wght@0,400;0,500;0,600;1,400;1,600&display=swap);
2
+
3
+ :root {
4
+ /* All sizing comments based of 16px base body font size */
5
+
6
+ /* color */
7
+ --cf-color-white: #fff;
8
+ --cf-color-black: #000;
9
+ --cf-color-gray100: #f7f9fa;
10
+ --cf-color-gray400: #aec1cc;
11
+ --cf-color-gray400-rgb: 174, 193, 204;
12
+
13
+ /* spacing */
14
+ --cf-spacing-0: 0rem; /* 0px */
15
+ --cf-spacing-1: 0.125rem; /* 2px */
16
+ --cf-spacing-2: 0.25rem; /* 4px */
17
+ --cf-spacing-3: 0.375rem; /* 6px */
18
+ --cf-spacing-4: 0.5rem; /* 8px */
19
+ --cf-spacing-5: 0.625rem; /* 10px */
20
+ --cf-spacing-6: 0.75rem; /* 12px */
21
+ --cf-spacing-7: 0.875rem; /* 14px */
22
+ --cf-spacing-8: 1rem; /* 16px */
23
+ --cf-spacing-9: 1.25rem; /* 20px */
24
+ --cf-spacing-10: 1.5rem; /* 24px */
25
+ --cf-spacing-11: 1.75rem; /* 28px */
26
+ --cf-spacing-12: 2rem; /* 32px */
27
+ --cf-spacing-13: 2.25rem; /* 36px */
28
+
29
+ /* font-size */
30
+ --cf-text-xs: 0.75rem; /* 12px */
31
+ --cf-text-sm: 0.875rem; /* 14px */
32
+ --cf-text-base: 1rem; /* 16px */
33
+ --cf-text-lg: 1.125rem; /* 18px */
34
+ --cf-text-xl: 1.25rem; /* 20px */
35
+ --cf-text-2xl: 1.5rem; /* 24px */
36
+ --cf-text-3xl: 2rem; /* 32px */
37
+ --cf-text-4xl: 2.75rem; /* 44px */
38
+
39
+ /* font-weight */
40
+ --cf-font-light: 300;
41
+ --cf-font-normal: 400;
42
+ --cf-font-medium: 500;
43
+ --cf-font-semibold: 600;
44
+ --cf-font-bold: 700;
45
+ --cf-font-extra-bold: 800;
46
+ --cf-font-black: 900;
47
+
48
+ /* border-radius */
49
+ --cf-border-radius-none: 0px; /* none */
50
+ --cf-border-radius-sm: 0.125rem; /* 2px */
51
+ --cf-border-radius: 0.25rem; /* 4px */
52
+ --cf-border-radius-md: 0.375rem; /* 6px */
53
+ --cf-border-radius-lg: 0.5rem; /* 8px */
54
+ --cf-border-radius-xl: 0.75rem; /* 12px */
55
+ --cf-border-radius-2xl: 1rem; /* 16px */
56
+ --cf-border-radius-3xl: 1.5rem; /* 24px */
57
+ --cf-border-radius-full: 9999px; /* full */
58
+
59
+ /* font-family */
60
+ --cf-font-family-sans: Archivo, Helvetica, Arial, sans-serif;
61
+ --cf-font-family-serif: Georgia, Cambria, Times New Roman, Times, serif;
62
+
63
+ /* max widths */
64
+ --cf-max-width-full: 100%;
65
+
66
+ /* component specific colors */
67
+ --cf-button-bg: var(--cf-color-black);
68
+ --cf-button-color: var(--cf-color-white);
69
+ --cf-text-color: var(--cf-color-black);
70
+ }