@wix/ditto-codegen-public 1.0.217 → 1.0.218

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 (31) hide show
  1. package/dist/examples-apps/react-builder/component.tsx +117 -0
  2. package/dist/examples-apps/react-builder/components/Badge.tsx +14 -0
  3. package/dist/examples-apps/react-builder/components/Button.tsx +31 -0
  4. package/dist/examples-apps/react-builder/components/Counter.tsx +14 -0
  5. package/dist/examples-apps/react-builder/components/FeaturedImage.tsx +31 -0
  6. package/dist/examples-apps/react-builder/components/SocialLinks.tsx +61 -0
  7. package/dist/examples-apps/react-builder/components/Subtitle.tsx +11 -0
  8. package/dist/examples-apps/react-builder/components/Tags.tsx +25 -0
  9. package/dist/examples-apps/react-builder/components/Title.tsx +11 -0
  10. package/dist/examples-apps/react-builder/components/index.ts +8 -0
  11. package/dist/examples-apps/react-builder/manifest.json +325 -0
  12. package/dist/examples-apps/react-builder/style.css +197 -0
  13. package/dist/examples-apps/react-builder/types.ts +68 -0
  14. package/dist/out.js +615 -61
  15. package/dist/wix-cli-templates/src/site/components/my-component/component.tsx +6 -3
  16. package/dist/wix-cli-templates/src/site/components/my-component/manifest.json +14 -0
  17. package/dist/wix-cli-templates/src/site/components/my-component/styles.module.css +1 -1
  18. package/package.json +2 -2
  19. package/dist/examples-apps/inventory-countdown/.nvmrc +0 -1
  20. package/dist/examples-apps/inventory-countdown/README.md +0 -21
  21. package/dist/examples-apps/inventory-countdown/package-lock.json +0 -7457
  22. package/dist/examples-apps/inventory-countdown/package.json +0 -33
  23. package/dist/examples-apps/inventory-countdown/src/assets/stock-counter/site-plugin-logo.svg +0 -27
  24. package/dist/examples-apps/inventory-countdown/src/env.d.ts +0 -4
  25. package/dist/examples-apps/inventory-countdown/src/site/plugins/custom-elements/stock-counter/consts.ts +0 -1
  26. package/dist/examples-apps/inventory-countdown/src/site/plugins/custom-elements/stock-counter/panel.tsx +0 -81
  27. package/dist/examples-apps/inventory-countdown/src/site/plugins/custom-elements/stock-counter/plugin.json +0 -24
  28. package/dist/examples-apps/inventory-countdown/src/site/plugins/custom-elements/stock-counter/plugin.module.css +0 -4
  29. package/dist/examples-apps/inventory-countdown/src/site/plugins/custom-elements/stock-counter/plugin.tsx +0 -132
  30. package/dist/examples-apps/inventory-countdown/tsconfig.json +0 -8
  31. package/dist/examples-apps/inventory-countdown/wix.config.json +0 -5
@@ -0,0 +1,117 @@
1
+ import React from 'react';
2
+ import './style.css';
3
+
4
+ import {
5
+ Badge,
6
+ Title,
7
+ Subtitle,
8
+ Tags,
9
+ Counter,
10
+ Button,
11
+ FeaturedImage,
12
+ SocialLinks,
13
+ } from './components';
14
+
15
+ import type {
16
+ Text,
17
+ RichText,
18
+ NumberType,
19
+ BooleanValue,
20
+ WebUrl,
21
+ Link,
22
+ Image,
23
+ Direction,
24
+ Wix,
25
+ } from './types';
26
+
27
+ interface PerfectExampleProps {
28
+ className: string;
29
+ id: string;
30
+ wix?: Wix;
31
+ direction?: Direction;
32
+ elementProps?: {
33
+ badge?: {
34
+ badgeText?: Text;
35
+ };
36
+ title?: {
37
+ titleText?: Text;
38
+ };
39
+ subtitle?: {
40
+ subtitleText?: Text;
41
+ };
42
+ tags?: {
43
+ tagsText?: Text;
44
+ };
45
+ counter?: {
46
+ counterValue?: NumberType;
47
+ counterLabel?: Text;
48
+ };
49
+ button?: {
50
+ buttonText?: Text;
51
+ buttonLink?: Link;
52
+ buttonDisabled?: BooleanValue;
53
+ };
54
+ featuredImage?: {
55
+ image?: Image;
56
+ imageAlt?: Text;
57
+ };
58
+ socialLinks?: {
59
+ facebookUrl?: WebUrl;
60
+ twitterUrl?: WebUrl;
61
+ instagramUrl?: WebUrl;
62
+ };
63
+ };
64
+ }
65
+
66
+ const PerfectExample: React.FC<PerfectExampleProps> = ({
67
+ className,
68
+ id,
69
+ wix,
70
+ direction,
71
+ elementProps,
72
+ }) => {
73
+ const rm = wix?.elementsRemovalState || {};
74
+
75
+ return (
76
+ <div className={`perfect-example ${className}`} id={id} dir={direction}>
77
+ {!rm['badge'] && (
78
+ <Badge className="perfect-example__badge" {...elementProps?.badge} />
79
+ )}
80
+
81
+ {!rm['title'] && (
82
+ <Title className="perfect-example__title" {...elementProps?.title} />
83
+ )}
84
+
85
+
86
+ {!rm['subtitle'] && (
87
+ <Subtitle className="perfect-example__subtitle" {...elementProps?.subtitle} />
88
+ )}
89
+
90
+
91
+ {!rm['tags'] && (
92
+ <Tags className="perfect-example__tags" {...elementProps?.tags} />
93
+ )}
94
+
95
+ {!rm['counter'] && (
96
+ <Counter className="perfect-example__counter" {...elementProps?.counter} />
97
+ )}
98
+
99
+ <div className="perfect-example__buttons">
100
+ {!rm['button'] && (
101
+ <Button className="perfect-example__button" {...elementProps?.button} />
102
+ )}
103
+
104
+ </div>
105
+
106
+ {!rm['featuredImage'] && (
107
+ <FeaturedImage className="perfect-example__image" {...elementProps?.featuredImage} />
108
+ )}
109
+
110
+ {!rm['socialLinks'] && (
111
+ <SocialLinks className="perfect-example__social" {...elementProps?.socialLinks} />
112
+ )}
113
+ </div>
114
+ );
115
+ };
116
+
117
+ export default PerfectExample;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { Text } from '../types';
3
+
4
+ interface BadgeComponentProps {
5
+ className: string;
6
+ badgeText?: Text;
7
+ }
8
+
9
+ export const Badge: React.FC<BadgeComponentProps> = ({ className, badgeText }) => (
10
+ <span className={className}>
11
+ {badgeText || 'New'}
12
+ </span>
13
+ );
14
+
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import type { Text, Link, BooleanValue } from '../types';
3
+
4
+ interface ButtonComponentProps {
5
+ className: string;
6
+ buttonText?: Text;
7
+ buttonLink?: Link;
8
+ buttonDisabled?: BooleanValue;
9
+ }
10
+
11
+ export const Button: React.FC<ButtonComponentProps> = ({ className, buttonText, buttonLink, buttonDisabled }) => {
12
+ const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {
13
+ if (buttonDisabled || !buttonLink?.href || buttonLink.href === '#') {
14
+ e.preventDefault();
15
+ }
16
+ };
17
+
18
+ return (
19
+ <a
20
+ href={buttonLink?.href || '#'}
21
+ target={buttonLink?.target}
22
+ rel={buttonLink?.rel}
23
+ onClick={handleClick}
24
+ className={className}
25
+ aria-disabled={buttonDisabled}
26
+ style={{ pointerEvents: buttonDisabled ? 'none' : 'auto', opacity: buttonDisabled ? 0.5 : 1 }}
27
+ >
28
+ {buttonText || 'Get Started'}
29
+ </a>
30
+ );
31
+ };
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { NumberType } from '../types';
3
+
4
+ interface CounterComponentProps {
5
+ className: string;
6
+ counterValue?: NumberType;
7
+ }
8
+
9
+ export const Counter: React.FC<CounterComponentProps> = ({ className, counterValue }) => (
10
+ <div className={className}>
11
+ <span className="perfect-example__counter-value">{counterValue ?? 100}</span>
12
+ </div>
13
+ );
14
+
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import type { Image, Text } from '../types';
3
+
4
+ interface FeaturedImageComponentProps {
5
+ className: string;
6
+ image?: Image;
7
+ imageAlt?: Text;
8
+ }
9
+
10
+ export const FeaturedImage: React.FC<FeaturedImageComponentProps> = ({ className, image, imageAlt }) => (
11
+ <div className="perfect-example__image-wrapper">
12
+ {image?.url ? (
13
+ <img
14
+ className={className}
15
+ src={image.url}
16
+ alt={imageAlt || image.alt || 'Featured image'}
17
+ loading="lazy"
18
+ />
19
+ ) : (
20
+ <div className={`${className} perfect-example__image--placeholder`}>
21
+ <svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5">
22
+ <rect x="3" y="3" width="18" height="18" rx="2" ry="2" />
23
+ <circle cx="8.5" cy="8.5" r="1.5" />
24
+ <polyline points="21 15 16 10 5 21" />
25
+ </svg>
26
+ <span>Add Image</span>
27
+ </div>
28
+ )}
29
+ </div>
30
+ );
31
+
@@ -0,0 +1,61 @@
1
+ import React from 'react';
2
+ import type { WebUrl } from '../types';
3
+
4
+ interface SocialLinksComponentProps {
5
+ className: string;
6
+ facebookUrl?: WebUrl;
7
+ twitterUrl?: WebUrl;
8
+ instagramUrl?: WebUrl;
9
+ }
10
+
11
+ const SocialIcon: React.FC<{ type: 'facebook' | 'twitter' | 'instagram' }> = ({ type }) => {
12
+ const paths: Record<string, string> = {
13
+ facebook: 'M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z',
14
+ twitter: 'M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z',
15
+ instagram: 'M16 4H8a4 4 0 0 0-4 4v8a4 4 0 0 0 4 4h8a4 4 0 0 0 4-4V8a4 4 0 0 0-4-4zm-4 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6zm4.5-7.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z',
16
+ };
17
+
18
+ return (
19
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
20
+ <path d={paths[type]} />
21
+ </svg>
22
+ );
23
+ };
24
+
25
+ export const SocialLinks: React.FC<SocialLinksComponentProps> = ({
26
+ className,
27
+ facebookUrl,
28
+ twitterUrl,
29
+ instagramUrl
30
+ }) => {
31
+ const links = [
32
+ { type: 'facebook' as const, url: facebookUrl },
33
+ { type: 'twitter' as const, url: twitterUrl },
34
+ { type: 'instagram' as const, url: instagramUrl },
35
+ ].filter(link => link.url);
36
+
37
+ const displayLinks = links.length > 0 ? links : [
38
+ { type: 'facebook' as const, url: '#' },
39
+ { type: 'twitter' as const, url: '#' },
40
+ { type: 'instagram' as const, url: '#' },
41
+ ];
42
+
43
+ return (
44
+ <div className={className}>
45
+ {displayLinks.map(({ type, url }) => (
46
+ <a
47
+ key={type}
48
+ href={url || '#'}
49
+ target="_blank"
50
+ rel="noopener noreferrer"
51
+ className="perfect-example__social-link"
52
+ aria-label={type}
53
+ onClick={(e) => { if (!url || url === '#') e.preventDefault(); }}
54
+ >
55
+ <SocialIcon type={type} />
56
+ </a>
57
+ ))}
58
+ </div>
59
+ );
60
+ };
61
+
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { Text } from '../types';
3
+
4
+ interface SubtitleComponentProps {
5
+ className: string;
6
+ subtitleText?: Text;
7
+ }
8
+
9
+ export const Subtitle: React.FC<SubtitleComponentProps> = ({ className, subtitleText }) => (
10
+ <p className={className}>{subtitleText || 'The ultimate React component builder showcase'}</p>
11
+ );
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import type { Text } from '../types';
3
+
4
+ interface TagsComponentProps {
5
+ className: string;
6
+ tagsText?: Text;
7
+ }
8
+
9
+ const DEFAULT_TAGS = 'React, Builder, Wix';
10
+
11
+ export const Tags: React.FC<TagsComponentProps> = ({ className, tagsText }) => {
12
+ const tagsString = tagsText || DEFAULT_TAGS;
13
+ const tags = tagsString.split(',').map(tag => tag.trim()).filter(tag => tag.length > 0);
14
+
15
+ return (
16
+ <div className={className}>
17
+ {tags.map((tag, index) => (
18
+ <span key={index} className="perfect-example__tag">
19
+ {tag}
20
+ </span>
21
+ ))}
22
+ </div>
23
+ );
24
+ };
25
+
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { Text } from '../types';
3
+
4
+ interface TitleComponentProps {
5
+ className: string;
6
+ titleText?: Text;
7
+ }
8
+
9
+ export const Title: React.FC<TitleComponentProps> = ({ className, titleText }) => (
10
+ <h1 className={className}>{titleText || 'Perfect Example'}</h1>
11
+ );
@@ -0,0 +1,8 @@
1
+ export { Badge } from './Badge';
2
+ export { Title } from './Title';
3
+ export { Subtitle } from './Subtitle';
4
+ export { Tags } from './Tags';
5
+ export { Counter } from './Counter';
6
+ export { Button } from './Button';
7
+ export { FeaturedImage } from './FeaturedImage';
8
+ export { SocialLinks } from './SocialLinks';
@@ -0,0 +1,325 @@
1
+ {
2
+ "editorElement": {
3
+ "selector": ".perfect-example",
4
+ "displayName": "Perfect Example",
5
+ "archetype": "Container",
6
+ "interactions": {
7
+ "triggers": ["viewEnter", "pageVisible", "animationEnd", "viewProgress", "pointerMove"],
8
+ "effectGroups": ["UNKNOWN_EFFECT_GROUP"]
9
+ },
10
+ "layout": {
11
+ "resizeDirection": "horizontalAndVertical",
12
+ "contentResizeDirection": "vertical",
13
+ "disableStretching": false,
14
+ "disablePositioning": false
15
+ },
16
+ "data": {
17
+ "direction": {
18
+ "dataType": "direction",
19
+ "displayName": "Text Direction"
20
+ }
21
+ },
22
+ "cssProperties": {
23
+ "backgroundColor": {
24
+ "displayName": "Background",
25
+ "defaultValue": "#ff6b6b"
26
+ },
27
+ "padding": {
28
+ "displayName": "Padding",
29
+ "defaultValue": "40px"
30
+ },
31
+ "borderRadius": {
32
+ "displayName": "Border Radius",
33
+ "defaultValue": "0"
34
+ },
35
+ "border": {
36
+ "displayName": "Border",
37
+ "defaultValue": "none"
38
+ },
39
+ "gap": {
40
+ "displayName": "Gap",
41
+ "defaultValue": "20px"
42
+ },
43
+ "boxShadow": {
44
+ "displayName": "Shadow",
45
+ "defaultValue": "none"
46
+ },
47
+ "opacity": {
48
+ "displayName": "Opacity",
49
+ "defaultValue": "1"
50
+ },
51
+ "display": {
52
+ "displayName": "Display",
53
+ "defaultValue": "flex",
54
+ "display": {
55
+ "displayValues": ["none", "flex", "block"]
56
+ }
57
+ },
58
+ "flexDirection": {
59
+ "displayName": "Direction",
60
+ "defaultValue": "column"
61
+ },
62
+ "alignItems": {
63
+ "displayName": "Align Items",
64
+ "defaultValue": "center"
65
+ },
66
+ "justifyContent": {
67
+ "displayName": "Justify",
68
+ "defaultValue": "center"
69
+ }
70
+ },
71
+ "elements": {
72
+ "badge": {
73
+ "elementType": "inlineElement",
74
+ "inlineElement": {
75
+ "selector": ".perfect-example__badge",
76
+ "displayName": "Badge",
77
+ "archetype": "Text",
78
+ "data": {
79
+ "badgeText": {
80
+ "dataType": "text",
81
+ "displayName": "Badge Text",
82
+ "text": { "maxLength": 30 }
83
+ }
84
+ },
85
+ "cssProperties": {
86
+ "backgroundColor": { "displayName": "Background", "defaultValue": "#ffffff" },
87
+ "color": { "displayName": "Color", "defaultValue": "#ff6b6b" },
88
+ "font": { "displayName": "Font", "defaultValue": "normal normal 600 12px/1.3em wix-madefor-display-v2" },
89
+ "padding": { "displayName": "Padding", "defaultValue": "4px 12px" },
90
+ "borderRadius": { "displayName": "Radius", "defaultValue": "20px" },
91
+ "textTransform": { "displayName": "Transform", "defaultValue": "uppercase" },
92
+ "letterSpacing": { "displayName": "Spacing", "defaultValue": "0.05em" },
93
+ "display": {
94
+ "displayName": "Display",
95
+ "defaultValue": "inline-block",
96
+ "display": { "displayValues": ["none", "inline_block"] }
97
+ }
98
+ },
99
+ "behaviors": { "selectable": true, "removable": true }
100
+ }
101
+ },
102
+ "title": {
103
+ "elementType": "inlineElement",
104
+ "inlineElement": {
105
+ "selector": ".perfect-example__title",
106
+ "displayName": "Title",
107
+ "archetype": "Text",
108
+ "data": {
109
+ "titleText": {
110
+ "dataType": "text",
111
+ "displayName": "Title Text",
112
+ "text": { "maxLength": 100 }
113
+ }
114
+ },
115
+ "cssProperties": {
116
+ "color": { "displayName": "Color", "defaultValue": "#ffffff" },
117
+ "font": { "displayName": "Font", "defaultValue": "normal normal 700 48px/1.2em wix-madefor-display-v2" },
118
+ "textAlign": { "displayName": "Align", "defaultValue": "center" },
119
+ "textShadow": { "displayName": "Shadow", "defaultValue": "none" },
120
+ "width": { "displayName": "Width", "defaultValue": "100%" },
121
+ "display": {
122
+ "displayName": "Display",
123
+ "defaultValue": "block",
124
+ "display": { "displayValues": ["none", "block"] }
125
+ }
126
+ },
127
+ "behaviors": { "selectable": true, "removable": true }
128
+ }
129
+ },
130
+ "subtitle": {
131
+ "elementType": "inlineElement",
132
+ "inlineElement": {
133
+ "selector": ".perfect-example__subtitle",
134
+ "displayName": "Subtitle",
135
+ "archetype": "Text",
136
+ "data": {
137
+ "subtitleText": {
138
+ "dataType": "text",
139
+ "displayName": "Subtitle Text",
140
+ "text": { "maxLength": 200 }
141
+ }
142
+ },
143
+ "cssProperties": {
144
+ "color": { "displayName": "Color", "defaultValue": "rgba(255, 255, 255, 0.9)" },
145
+ "font": { "displayName": "Font", "defaultValue": "normal normal 400 18px/1.5em wix-madefor-display-v2" },
146
+ "textAlign": { "displayName": "Align", "defaultValue": "center" },
147
+ "width": { "displayName": "Width", "defaultValue": "100%" },
148
+ "opacity": { "displayName": "Opacity", "defaultValue": "0.9" },
149
+ "display": {
150
+ "displayName": "Display",
151
+ "defaultValue": "block",
152
+ "display": { "displayValues": ["none", "block"] }
153
+ }
154
+ },
155
+ "behaviors": { "selectable": true, "removable": true }
156
+ }
157
+ },
158
+ "tags": {
159
+ "elementType": "inlineElement",
160
+ "inlineElement": {
161
+ "selector": ".perfect-example__tags",
162
+ "displayName": "Tags",
163
+ "archetype": "Container",
164
+ "data": {
165
+ "tagsText": {
166
+ "dataType": "text",
167
+ "displayName": "Tags (comma separated)",
168
+ "text": { "maxLength": 200 }
169
+ }
170
+ },
171
+ "cssProperties": {
172
+ "gap": { "displayName": "Gap", "defaultValue": "8px" },
173
+ "width": { "displayName": "Width", "defaultValue": "auto" },
174
+ "display": {
175
+ "displayName": "Display",
176
+ "defaultValue": "flex",
177
+ "display": { "displayValues": ["none", "flex"] }
178
+ }
179
+ },
180
+ "behaviors": { "selectable": true, "removable": true }
181
+ }
182
+ },
183
+ "counter": {
184
+ "elementType": "inlineElement",
185
+ "inlineElement": {
186
+ "selector": ".perfect-example__counter",
187
+ "displayName": "Counter",
188
+ "archetype": "Text",
189
+ "data": {
190
+ "counterValue": {
191
+ "dataType": "number",
192
+ "displayName": "Count",
193
+ "number": { "minimum": 0, "maximum": 9999 }
194
+ }
195
+ },
196
+ "cssProperties": {
197
+ "color": { "displayName": "Color", "defaultValue": "#ffffff" },
198
+ "font": { "displayName": "Font", "defaultValue": "normal normal 700 36px/1.2em wix-madefor-display-v2" },
199
+ "display": {
200
+ "displayName": "Display",
201
+ "defaultValue": "flex",
202
+ "display": { "displayValues": ["none", "flex"] }
203
+ }
204
+ },
205
+ "behaviors": { "selectable": true, "removable": true }
206
+ }
207
+ },
208
+ "button": {
209
+ "elementType": "inlineElement",
210
+ "inlineElement": {
211
+ "selector": ".perfect-example__button",
212
+ "displayName": "Button",
213
+ "archetype": "Button",
214
+ "data": {
215
+ "buttonText": {
216
+ "dataType": "text",
217
+ "displayName": "Button Text",
218
+ "text": { "maxLength": 50 }
219
+ },
220
+ "buttonLink": {
221
+ "dataType": "link",
222
+ "displayName": "Button Link",
223
+ "link": {
224
+ "linkTypes": ["externalLink", "pageLink", "anchorLink", "emailLink", "phoneLink"]
225
+ }
226
+ },
227
+ "buttonDisabled": {
228
+ "dataType": "booleanValue",
229
+ "displayName": "Disabled"
230
+ }
231
+ },
232
+ "cssProperties": {
233
+ "backgroundColor": { "displayName": "Background", "defaultValue": "#ffffff" },
234
+ "color": { "displayName": "Text Color", "defaultValue": "#ff6b6b" },
235
+ "font": { "displayName": "Font", "defaultValue": "normal normal 600 16px/1.4em wix-madefor-display-v2" },
236
+ "padding": { "displayName": "Padding", "defaultValue": "12px 32px" },
237
+ "borderRadius": { "displayName": "Radius", "defaultValue": "50px" },
238
+ "border": { "displayName": "Border", "defaultValue": "none" },
239
+ "boxShadow": { "displayName": "Shadow", "defaultValue": "0 4px 15px rgba(0, 0, 0, 0.2)" },
240
+ "opacity": { "displayName": "Opacity", "defaultValue": "1" },
241
+ "display": {
242
+ "displayName": "Display",
243
+ "defaultValue": "inline-flex",
244
+ "display": { "displayValues": ["none", "inline_flex"] }
245
+ }
246
+ },
247
+ "behaviors": { "selectable": true, "removable": true }
248
+ }
249
+ },
250
+ "featuredImage": {
251
+ "elementType": "inlineElement",
252
+ "inlineElement": {
253
+ "selector": ".perfect-example__image",
254
+ "displayName": "Featured Image",
255
+ "archetype": "Image",
256
+ "data": {
257
+ "image": {
258
+ "dataType": "image",
259
+ "displayName": "Image"
260
+ },
261
+ "imageAlt": {
262
+ "dataType": "text",
263
+ "displayName": "Alt Text",
264
+ "text": { "maxLength": 100 }
265
+ }
266
+ },
267
+ "cssProperties": {
268
+ "borderRadius": { "displayName": "Radius", "defaultValue": "12px" },
269
+ "width": { "displayName": "Width", "defaultValue": "100%" },
270
+ "height": { "displayName": "Height", "defaultValue": "auto" },
271
+ "boxShadow": { "displayName": "Shadow", "defaultValue": "0 10px 40px rgba(0, 0, 0, 0.3)" },
272
+ "objectFit": { "displayName": "Fit", "defaultValue": "cover" },
273
+ "opacity": { "displayName": "Opacity", "defaultValue": "1" },
274
+ "display": {
275
+ "displayName": "Display",
276
+ "defaultValue": "block",
277
+ "display": { "displayValues": ["none", "block"] }
278
+ }
279
+ },
280
+ "behaviors": { "selectable": true, "removable": true }
281
+ }
282
+ },
283
+ "socialLinks": {
284
+ "elementType": "inlineElement",
285
+ "inlineElement": {
286
+ "selector": ".perfect-example__social",
287
+ "displayName": "Social Links",
288
+ "archetype": "Social",
289
+ "data": {
290
+ "facebookUrl": {
291
+ "dataType": "webUrl",
292
+ "displayName": "Facebook URL"
293
+ },
294
+ "twitterUrl": {
295
+ "dataType": "webUrl",
296
+ "displayName": "Twitter URL"
297
+ },
298
+ "instagramUrl": {
299
+ "dataType": "webUrl",
300
+ "displayName": "Instagram URL"
301
+ }
302
+ },
303
+ "cssProperties": {
304
+ "gap": { "displayName": "Gap", "defaultValue": "16px" },
305
+ "display": {
306
+ "displayName": "Display",
307
+ "defaultValue": "flex",
308
+ "display": { "displayValues": ["none", "flex"] }
309
+ }
310
+ },
311
+ "behaviors": { "selectable": true, "removable": true }
312
+ }
313
+ }
314
+ },
315
+ "actions": {
316
+ "editContent": {
317
+ "displayName": "Edit Content",
318
+ "execution": {
319
+ "actionType": "data",
320
+ "data": { "dataItemKey": "titleText" }
321
+ }
322
+ }
323
+ }
324
+ }
325
+ }