dune-react 0.0.39 → 0.0.40

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.
@@ -36,6 +36,85 @@ declare const conf: {
36
36
  description: {
37
37
  type: string;
38
38
  };
39
+ buttons: {
40
+ readonly type: "array";
41
+ readonly max: 3;
42
+ readonly getItemSummary: (item: {
43
+ label?: string;
44
+ }, index?: number) => string;
45
+ readonly arrayFields: {
46
+ readonly label: {
47
+ readonly type: "text";
48
+ };
49
+ readonly action: {
50
+ type: "custom";
51
+ label: string;
52
+ render: typeof import("../../..").ActionField;
53
+ };
54
+ readonly variant: {
55
+ readonly type: "select";
56
+ readonly options: readonly [{
57
+ readonly label: "primary";
58
+ readonly value: "default";
59
+ }, {
60
+ readonly label: "secondary";
61
+ readonly value: "secondary";
62
+ }, {
63
+ readonly label: "outline";
64
+ readonly value: "outline";
65
+ }, {
66
+ readonly label: "ghost";
67
+ readonly value: "ghost";
68
+ }, {
69
+ readonly label: "link";
70
+ readonly value: "link";
71
+ }, {
72
+ readonly label: "destructive";
73
+ readonly value: "destructive";
74
+ }];
75
+ };
76
+ readonly size: {
77
+ readonly type: "select";
78
+ readonly options: readonly [{
79
+ readonly label: "default";
80
+ readonly value: "default";
81
+ }, {
82
+ readonly label: "sm";
83
+ readonly value: "sm";
84
+ }, {
85
+ readonly label: "lg";
86
+ readonly value: "lg";
87
+ }, {
88
+ readonly label: "icon";
89
+ readonly value: "icon";
90
+ }];
91
+ };
92
+ readonly icon: {
93
+ type: "custom";
94
+ render: typeof import("../../../puck-core/fields/icon-picker-field").IconPickerField;
95
+ };
96
+ };
97
+ readonly defaultItemProps: {
98
+ readonly label: "Button";
99
+ readonly action: {
100
+ readonly type: "page";
101
+ readonly pageUrl: "";
102
+ readonly externalUrl: "";
103
+ readonly openInNewTab: "false";
104
+ readonly email: "";
105
+ readonly subject: "";
106
+ readonly phone: "";
107
+ readonly sectionId: "";
108
+ readonly downloadUrl: "";
109
+ };
110
+ readonly variant: "default";
111
+ readonly size: "default";
112
+ readonly icon: "none";
113
+ };
114
+ readonly ai: {
115
+ readonly instructions: "Buttons must use the same size";
116
+ };
117
+ };
39
118
  media: {
40
119
  type: "object";
41
120
  objectFields: {
@@ -1,6 +1,7 @@
1
1
  import { TabHero, TabHeroDefaults } from "./component.js";
2
2
  import { sectionWrapperFields } from "../../../puck-core/section-wrapper.js";
3
3
  import { mediaField } from "../../../puck-core/core/props/media.js";
4
+ import { buttonsField } from "../../../puck-core/core/props/interactive.js";
4
5
  const conf = {
5
6
  fields: {
6
7
  defaultTabValue: { type: "text" },
@@ -23,6 +24,7 @@ const conf = {
23
24
  value: { type: "text" },
24
25
  heading: { type: "text" },
25
26
  description: { type: "textarea" },
27
+ buttons: buttonsField,
26
28
  media: mediaField
27
29
  }
28
30
  }
@@ -7502,6 +7502,85 @@ declare const confMap: {
7502
7502
  description: {
7503
7503
  type: string;
7504
7504
  };
7505
+ buttons: {
7506
+ readonly type: "array";
7507
+ readonly max: 3;
7508
+ readonly getItemSummary: (item: {
7509
+ label?: string;
7510
+ }, index?: number) => string;
7511
+ readonly arrayFields: {
7512
+ readonly label: {
7513
+ readonly type: "text";
7514
+ };
7515
+ readonly action: {
7516
+ type: "custom";
7517
+ label: string;
7518
+ render: typeof import("..").ActionField;
7519
+ };
7520
+ readonly variant: {
7521
+ readonly type: "select";
7522
+ readonly options: readonly [{
7523
+ readonly label: "primary";
7524
+ readonly value: "default";
7525
+ }, {
7526
+ readonly label: "secondary";
7527
+ readonly value: "secondary";
7528
+ }, {
7529
+ readonly label: "outline";
7530
+ readonly value: "outline";
7531
+ }, {
7532
+ readonly label: "ghost";
7533
+ readonly value: "ghost";
7534
+ }, {
7535
+ readonly label: "link";
7536
+ readonly value: "link";
7537
+ }, {
7538
+ readonly label: "destructive";
7539
+ readonly value: "destructive";
7540
+ }];
7541
+ };
7542
+ readonly size: {
7543
+ readonly type: "select";
7544
+ readonly options: readonly [{
7545
+ readonly label: "default";
7546
+ readonly value: "default";
7547
+ }, {
7548
+ readonly label: "sm";
7549
+ readonly value: "sm";
7550
+ }, {
7551
+ readonly label: "lg";
7552
+ readonly value: "lg";
7553
+ }, {
7554
+ readonly label: "icon";
7555
+ readonly value: "icon";
7556
+ }];
7557
+ };
7558
+ readonly icon: {
7559
+ type: "custom";
7560
+ render: typeof import("../puck-core/fields/icon-picker-field").IconPickerField;
7561
+ };
7562
+ };
7563
+ readonly defaultItemProps: {
7564
+ readonly label: "Button";
7565
+ readonly action: {
7566
+ readonly type: "page";
7567
+ readonly pageUrl: "";
7568
+ readonly externalUrl: "";
7569
+ readonly openInNewTab: "false";
7570
+ readonly email: "";
7571
+ readonly subject: "";
7572
+ readonly phone: "";
7573
+ readonly sectionId: "";
7574
+ readonly downloadUrl: "";
7575
+ };
7576
+ readonly variant: "default";
7577
+ readonly size: "default";
7578
+ readonly icon: "none";
7579
+ };
7580
+ readonly ai: {
7581
+ readonly instructions: "Buttons must use the same size";
7582
+ };
7583
+ };
7505
7584
  media: {
7506
7585
  type: "object";
7507
7586
  objectFields: {
@@ -11058,6 +11137,96 @@ declare const confMap: {
11058
11137
  value: string;
11059
11138
  }[];
11060
11139
  };
11140
+ props: {
11141
+ type: string;
11142
+ label: string;
11143
+ objectFields: {
11144
+ media: {
11145
+ type: "object";
11146
+ objectFields: {
11147
+ src: import("@puckeditor/core").Field<string>;
11148
+ alt: {
11149
+ type: "text";
11150
+ };
11151
+ };
11152
+ };
11153
+ heading: {
11154
+ type: string;
11155
+ };
11156
+ button: {
11157
+ readonly type: "object";
11158
+ readonly objectFields: {
11159
+ readonly label: {
11160
+ readonly type: "text";
11161
+ };
11162
+ readonly action: {
11163
+ type: "custom";
11164
+ label: string;
11165
+ render: typeof import("..").ActionField;
11166
+ };
11167
+ readonly variant: {
11168
+ readonly type: "select";
11169
+ readonly options: readonly [{
11170
+ readonly label: "primary";
11171
+ readonly value: "default";
11172
+ }, {
11173
+ readonly label: "secondary";
11174
+ readonly value: "secondary";
11175
+ }, {
11176
+ readonly label: "outline";
11177
+ readonly value: "outline";
11178
+ }, {
11179
+ readonly label: "ghost";
11180
+ readonly value: "ghost";
11181
+ }, {
11182
+ readonly label: "link";
11183
+ readonly value: "link";
11184
+ }, {
11185
+ readonly label: "destructive";
11186
+ readonly value: "destructive";
11187
+ }];
11188
+ };
11189
+ readonly size: {
11190
+ readonly type: "select";
11191
+ readonly options: readonly [{
11192
+ readonly label: "default";
11193
+ readonly value: "default";
11194
+ }, {
11195
+ readonly label: "sm";
11196
+ readonly value: "sm";
11197
+ }, {
11198
+ readonly label: "lg";
11199
+ readonly value: "lg";
11200
+ }, {
11201
+ readonly label: "icon";
11202
+ readonly value: "icon";
11203
+ }];
11204
+ };
11205
+ readonly icon: {
11206
+ type: "custom";
11207
+ render: typeof import("../puck-core/fields/icon-picker-field").IconPickerField;
11208
+ };
11209
+ };
11210
+ };
11211
+ numberOfStars: {
11212
+ type: string;
11213
+ min: number;
11214
+ max: number;
11215
+ };
11216
+ quote: {
11217
+ type: string;
11218
+ };
11219
+ name: {
11220
+ type: string;
11221
+ };
11222
+ position: {
11223
+ type: string;
11224
+ };
11225
+ companyName: {
11226
+ type: string;
11227
+ };
11228
+ };
11229
+ };
11061
11230
  };
11062
11231
  };
11063
11232
  styles: {
@@ -2,7 +2,7 @@ import type { TestimonialComponentProps, BaseMedia, BaseButton } from "../props"
2
2
  type BackgroundImageCard = {
3
3
  component: "background";
4
4
  props: {
5
- backgroundImage: BaseMedia;
5
+ media: BaseMedia;
6
6
  heading: string;
7
7
  button: BaseButton;
8
8
  };
@@ -10,7 +10,7 @@ type BackgroundImageCard = {
10
10
  type LogoCard = {
11
11
  component: "logo";
12
12
  props: {
13
- logo: BaseMedia;
13
+ media: BaseMedia;
14
14
  };
15
15
  };
16
16
  type QuoteCard = {
@@ -59,9 +59,9 @@ const BentoTestimonial = (props) => {
59
59
  /* @__PURE__ */ jsx(
60
60
  CompoundMedia,
61
61
  {
62
- src: card.props.backgroundImage.src,
62
+ src: card.props.media.src,
63
63
  className: "size-full object-cover",
64
- alt: card.props.backgroundImage.alt
64
+ alt: card.props.media.alt
65
65
  }
66
66
  ),
67
67
  /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-black/50" })
@@ -84,8 +84,8 @@ const BentoTestimonial = (props) => {
84
84
  children: /* @__PURE__ */ jsx(
85
85
  CompoundMedia,
86
86
  {
87
- src: card.props.logo.src,
88
- alt: card.props.logo.alt,
87
+ src: card.props.media.src,
88
+ alt: card.props.media.alt,
89
89
  className: "max-h-16"
90
90
  }
91
91
  )
@@ -139,7 +139,7 @@ const BentoTestimonialDefaults = {
139
139
  {
140
140
  component: "background",
141
141
  props: {
142
- backgroundImage: {
142
+ media: {
143
143
  src: "https://picsum.photos/seed/bento-bg-1/600/400",
144
144
  alt: "Background image 1"
145
145
  },
@@ -150,7 +150,7 @@ const BentoTestimonialDefaults = {
150
150
  {
151
151
  component: "logo",
152
152
  props: {
153
- logo: {
153
+ media: {
154
154
  src: "https://file.springbrand.ai/web_assets/template-logo.svg",
155
155
  alt: "Logo 1"
156
156
  }
@@ -173,7 +173,7 @@ const BentoTestimonialDefaults = {
173
173
  {
174
174
  component: "logo",
175
175
  props: {
176
- logo: {
176
+ media: {
177
177
  src: "https://file.springbrand.ai/web_assets/template-logo.svg",
178
178
  alt: "Webflow logo 1"
179
179
  }
@@ -182,7 +182,7 @@ const BentoTestimonialDefaults = {
182
182
  {
183
183
  component: "background",
184
184
  props: {
185
- backgroundImage: {
185
+ media: {
186
186
  src: "https://picsum.photos/seed/bento-bg-2/600/400",
187
187
  alt: "Background image 2"
188
188
  },
@@ -193,7 +193,7 @@ const BentoTestimonialDefaults = {
193
193
  {
194
194
  component: "logo",
195
195
  props: {
196
- logo: {
196
+ media: {
197
197
  src: "https://file.springbrand.ai/web_assets/template-logo.svg",
198
198
  alt: "Logo 2"
199
199
  }
@@ -202,7 +202,7 @@ const BentoTestimonialDefaults = {
202
202
  {
203
203
  component: "background",
204
204
  props: {
205
- backgroundImage: {
205
+ media: {
206
206
  src: "https://picsum.photos/seed/bento-bg-3/600/400",
207
207
  alt: "Background image 3"
208
208
  },
@@ -227,7 +227,7 @@ const BentoTestimonialDefaults = {
227
227
  {
228
228
  component: "background",
229
229
  props: {
230
- backgroundImage: {
230
+ media: {
231
231
  src: "https://picsum.photos/seed/bento-bg-4/600/400",
232
232
  alt: "Background image 4"
233
233
  },
@@ -238,7 +238,7 @@ const BentoTestimonialDefaults = {
238
238
  {
239
239
  component: "logo",
240
240
  props: {
241
- logo: {
241
+ media: {
242
242
  src: "https://file.springbrand.ai/web_assets/template-logo.svg",
243
243
  alt: "Webflow logo 2"
244
244
  }
@@ -25,6 +25,96 @@ declare const conf: {
25
25
  value: string;
26
26
  }[];
27
27
  };
28
+ props: {
29
+ type: string;
30
+ label: string;
31
+ objectFields: {
32
+ media: {
33
+ type: "object";
34
+ objectFields: {
35
+ src: import("@puckeditor/core").Field<string>;
36
+ alt: {
37
+ type: "text";
38
+ };
39
+ };
40
+ };
41
+ heading: {
42
+ type: string;
43
+ };
44
+ button: {
45
+ readonly type: "object";
46
+ readonly objectFields: {
47
+ readonly label: {
48
+ readonly type: "text";
49
+ };
50
+ readonly action: {
51
+ type: "custom";
52
+ label: string;
53
+ render: typeof import("../../..").ActionField;
54
+ };
55
+ readonly variant: {
56
+ readonly type: "select";
57
+ readonly options: readonly [{
58
+ readonly label: "primary";
59
+ readonly value: "default";
60
+ }, {
61
+ readonly label: "secondary";
62
+ readonly value: "secondary";
63
+ }, {
64
+ readonly label: "outline";
65
+ readonly value: "outline";
66
+ }, {
67
+ readonly label: "ghost";
68
+ readonly value: "ghost";
69
+ }, {
70
+ readonly label: "link";
71
+ readonly value: "link";
72
+ }, {
73
+ readonly label: "destructive";
74
+ readonly value: "destructive";
75
+ }];
76
+ };
77
+ readonly size: {
78
+ readonly type: "select";
79
+ readonly options: readonly [{
80
+ readonly label: "default";
81
+ readonly value: "default";
82
+ }, {
83
+ readonly label: "sm";
84
+ readonly value: "sm";
85
+ }, {
86
+ readonly label: "lg";
87
+ readonly value: "lg";
88
+ }, {
89
+ readonly label: "icon";
90
+ readonly value: "icon";
91
+ }];
92
+ };
93
+ readonly icon: {
94
+ type: "custom";
95
+ render: typeof import("../../../puck-core/fields/icon-picker-field").IconPickerField;
96
+ };
97
+ };
98
+ };
99
+ numberOfStars: {
100
+ type: string;
101
+ min: number;
102
+ max: number;
103
+ };
104
+ quote: {
105
+ type: string;
106
+ };
107
+ name: {
108
+ type: string;
109
+ };
110
+ position: {
111
+ type: string;
112
+ };
113
+ companyName: {
114
+ type: string;
115
+ };
116
+ };
117
+ };
28
118
  };
29
119
  };
30
120
  styles: {
@@ -2,6 +2,8 @@ import { BentoTestimonial, BentoTestimonialDefaults } from "./component.js";
2
2
  import { descriptionField, headingField } from "../../../puck-core/core/props/content.js";
3
3
  import { testimonialStyleFields } from "../props.js";
4
4
  import { sectionWrapperFields } from "../../../puck-core/section-wrapper.js";
5
+ import { mediaField } from "../../../puck-core/core/props/media.js";
6
+ import { buttonField } from "../../../puck-core/core/props/interactive.js";
5
7
  const conf = {
6
8
  fields: {
7
9
  heading: headingField,
@@ -17,6 +19,23 @@ const conf = {
17
19
  { label: "Logo", value: "logo" },
18
20
  { label: "Quote", value: "quote" }
19
21
  ]
22
+ },
23
+ props: {
24
+ type: "object",
25
+ label: "Props",
26
+ objectFields: {
27
+ // Shared media field (BackgroundImageCard / LogoCard / QuoteCard)
28
+ media: mediaField,
29
+ // BackgroundImageCard
30
+ heading: { type: "text" },
31
+ button: buttonField,
32
+ // QuoteCard
33
+ numberOfStars: { type: "number", min: 0, max: 5 },
34
+ quote: { type: "textarea" },
35
+ name: { type: "text" },
36
+ position: { type: "text" },
37
+ companyName: { type: "text" }
38
+ }
20
39
  }
21
40
  }
22
41
  },
@@ -2,7 +2,6 @@ import { buttonsField, badgeField } from "./interactive.js";
2
2
  import { actionDefaults, actionField, buttonDefaults, buttonField, iconField, resolveActionUrl } from "./interactive.js";
3
3
  import { descriptionField, headingField, featuresField } from "./content.js";
4
4
  import { cardField, cardsField } from "./content.js";
5
- import { getPlaceholderMediaUrl, media16x9Placeholder, media1x1Placeholder, media9x16Placeholder, mediaField, mediasField } from "./media.js";
6
5
  const contentFields = {
7
6
  heading: headingField,
8
7
  description: descriptionField,
@@ -29,13 +28,7 @@ export {
29
28
  contentFieldsWithFeatures,
30
29
  descriptionField,
31
30
  featuresField,
32
- getPlaceholderMediaUrl,
33
31
  headingField,
34
32
  iconField,
35
- media16x9Placeholder,
36
- media1x1Placeholder,
37
- media9x16Placeholder,
38
- mediaField,
39
- mediasField,
40
33
  resolveActionUrl
41
34
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dune-react",
3
- "version": "0.0.39",
3
+ "version": "0.0.40",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {