@builder.io/sdk-solid 1.0.28 → 1.0.30
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/lib/browser/dev.js +412 -412
- package/lib/browser/dev.jsx +894 -895
- package/lib/browser/index.js +412 -412
- package/lib/browser/index.jsx +893 -894
- package/lib/edge/dev.js +412 -412
- package/lib/edge/dev.jsx +894 -895
- package/lib/edge/index.js +412 -412
- package/lib/edge/index.jsx +893 -894
- package/lib/node/dev.js +412 -412
- package/lib/node/dev.jsx +894 -895
- package/lib/node/index.js +412 -412
- package/lib/node/index.jsx +893 -894
- package/package.json +4 -4
package/lib/edge/dev.jsx
CHANGED
|
@@ -5028,1010 +5028,1010 @@ var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : tru
|
|
|
5028
5028
|
// src/components/content/content.tsx
|
|
5029
5029
|
import { Show as Show13, createSignal as createSignal17 } from "solid-js";
|
|
5030
5030
|
|
|
5031
|
-
// src/blocks/
|
|
5032
|
-
var
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
borderRadius: "4px",
|
|
5045
|
-
textAlign: "center",
|
|
5046
|
-
cursor: "pointer"
|
|
5031
|
+
// src/blocks/accordion/component-info.ts
|
|
5032
|
+
var defaultTitle = {
|
|
5033
|
+
"@type": "@builder.io/sdk:Element",
|
|
5034
|
+
layerName: "Accordion item title",
|
|
5035
|
+
responsiveStyles: {
|
|
5036
|
+
large: {
|
|
5037
|
+
marginTop: "10px",
|
|
5038
|
+
position: "relative",
|
|
5039
|
+
display: "flex",
|
|
5040
|
+
alignItems: "stretch",
|
|
5041
|
+
flexDirection: "column",
|
|
5042
|
+
paddingBottom: "10px"
|
|
5043
|
+
}
|
|
5047
5044
|
},
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
type: "url",
|
|
5056
|
-
bubble: true
|
|
5057
|
-
}, {
|
|
5058
|
-
name: "openLinkInNewTab",
|
|
5059
|
-
type: "boolean",
|
|
5060
|
-
defaultValue: false,
|
|
5061
|
-
friendlyName: "Open link in new tab"
|
|
5062
|
-
}],
|
|
5063
|
-
static: true,
|
|
5064
|
-
noWrap: true
|
|
5065
|
-
};
|
|
5066
|
-
|
|
5067
|
-
// src/blocks/columns/component-info.ts
|
|
5068
|
-
var componentInfo2 = {
|
|
5069
|
-
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
5070
|
-
name: "Columns",
|
|
5071
|
-
isRSC: true,
|
|
5072
|
-
inputs: [{
|
|
5073
|
-
name: "columns",
|
|
5074
|
-
type: "array",
|
|
5075
|
-
broadcast: true,
|
|
5076
|
-
subFields: [{
|
|
5077
|
-
name: "blocks",
|
|
5078
|
-
type: "array",
|
|
5079
|
-
hideFromUI: true,
|
|
5080
|
-
defaultValue: [{
|
|
5081
|
-
"@type": "@builder.io/sdk:Element",
|
|
5082
|
-
responsiveStyles: {
|
|
5083
|
-
large: {
|
|
5084
|
-
display: "flex",
|
|
5085
|
-
flexDirection: "column",
|
|
5086
|
-
alignItems: "stretch",
|
|
5087
|
-
flexShrink: "0",
|
|
5088
|
-
position: "relative",
|
|
5089
|
-
marginTop: "30px",
|
|
5090
|
-
textAlign: "center",
|
|
5091
|
-
lineHeight: "normal",
|
|
5092
|
-
height: "auto",
|
|
5093
|
-
minHeight: "20px",
|
|
5094
|
-
minWidth: "20px",
|
|
5095
|
-
overflow: "hidden"
|
|
5096
|
-
}
|
|
5097
|
-
},
|
|
5098
|
-
component: {
|
|
5099
|
-
name: "Image",
|
|
5100
|
-
options: {
|
|
5101
|
-
image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
|
|
5102
|
-
backgroundPosition: "center",
|
|
5103
|
-
backgroundSize: "cover",
|
|
5104
|
-
aspectRatio: 0.7004048582995948
|
|
5105
|
-
}
|
|
5106
|
-
}
|
|
5107
|
-
}, {
|
|
5108
|
-
"@type": "@builder.io/sdk:Element",
|
|
5109
|
-
responsiveStyles: {
|
|
5110
|
-
large: {
|
|
5111
|
-
display: "flex",
|
|
5112
|
-
flexDirection: "column",
|
|
5113
|
-
alignItems: "stretch",
|
|
5114
|
-
flexShrink: "0",
|
|
5115
|
-
position: "relative",
|
|
5116
|
-
marginTop: "30px",
|
|
5117
|
-
textAlign: "center",
|
|
5118
|
-
lineHeight: "normal",
|
|
5119
|
-
height: "auto"
|
|
5120
|
-
}
|
|
5121
|
-
},
|
|
5122
|
-
component: {
|
|
5123
|
-
name: "Text",
|
|
5124
|
-
options: {
|
|
5125
|
-
text: "<p>Enter some text...</p>"
|
|
5126
|
-
}
|
|
5127
|
-
}
|
|
5128
|
-
}]
|
|
5129
|
-
}, {
|
|
5130
|
-
name: "width",
|
|
5131
|
-
type: "number",
|
|
5132
|
-
hideFromUI: true,
|
|
5133
|
-
helperText: "Width %, e.g. set to 50 to fill half of the space"
|
|
5134
|
-
}, {
|
|
5135
|
-
name: "link",
|
|
5136
|
-
type: "url",
|
|
5137
|
-
helperText: "Optionally set a url that clicking this column will link to"
|
|
5138
|
-
}],
|
|
5139
|
-
defaultValue: [{
|
|
5140
|
-
blocks: [{
|
|
5141
|
-
"@type": "@builder.io/sdk:Element",
|
|
5142
|
-
responsiveStyles: {
|
|
5143
|
-
large: {
|
|
5144
|
-
display: "flex",
|
|
5145
|
-
flexDirection: "column",
|
|
5146
|
-
alignItems: "stretch",
|
|
5147
|
-
flexShrink: "0",
|
|
5148
|
-
position: "relative",
|
|
5149
|
-
marginTop: "30px",
|
|
5150
|
-
textAlign: "center",
|
|
5151
|
-
lineHeight: "normal",
|
|
5152
|
-
height: "auto",
|
|
5153
|
-
minHeight: "20px",
|
|
5154
|
-
minWidth: "20px",
|
|
5155
|
-
overflow: "hidden"
|
|
5156
|
-
}
|
|
5157
|
-
},
|
|
5158
|
-
component: {
|
|
5159
|
-
name: "Image",
|
|
5160
|
-
options: {
|
|
5161
|
-
image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
|
|
5162
|
-
backgroundPosition: "center",
|
|
5163
|
-
backgroundSize: "cover",
|
|
5164
|
-
aspectRatio: 0.7004048582995948
|
|
5165
|
-
}
|
|
5166
|
-
}
|
|
5167
|
-
}, {
|
|
5168
|
-
"@type": "@builder.io/sdk:Element",
|
|
5169
|
-
responsiveStyles: {
|
|
5170
|
-
large: {
|
|
5171
|
-
display: "flex",
|
|
5172
|
-
flexDirection: "column",
|
|
5173
|
-
alignItems: "stretch",
|
|
5174
|
-
flexShrink: "0",
|
|
5175
|
-
position: "relative",
|
|
5176
|
-
marginTop: "30px",
|
|
5177
|
-
textAlign: "center",
|
|
5178
|
-
lineHeight: "normal",
|
|
5179
|
-
height: "auto"
|
|
5180
|
-
}
|
|
5181
|
-
},
|
|
5182
|
-
component: {
|
|
5183
|
-
name: "Text",
|
|
5184
|
-
options: {
|
|
5185
|
-
text: "<p>Enter some text...</p>"
|
|
5186
|
-
}
|
|
5187
|
-
}
|
|
5188
|
-
}]
|
|
5189
|
-
}, {
|
|
5190
|
-
blocks: [{
|
|
5191
|
-
"@type": "@builder.io/sdk:Element",
|
|
5192
|
-
responsiveStyles: {
|
|
5193
|
-
large: {
|
|
5194
|
-
display: "flex",
|
|
5195
|
-
flexDirection: "column",
|
|
5196
|
-
alignItems: "stretch",
|
|
5197
|
-
flexShrink: "0",
|
|
5198
|
-
position: "relative",
|
|
5199
|
-
marginTop: "30px",
|
|
5200
|
-
textAlign: "center",
|
|
5201
|
-
lineHeight: "normal",
|
|
5202
|
-
height: "auto",
|
|
5203
|
-
minHeight: "20px",
|
|
5204
|
-
minWidth: "20px",
|
|
5205
|
-
overflow: "hidden"
|
|
5206
|
-
}
|
|
5207
|
-
},
|
|
5208
|
-
component: {
|
|
5209
|
-
name: "Image",
|
|
5210
|
-
options: {
|
|
5211
|
-
image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
|
|
5212
|
-
backgroundPosition: "center",
|
|
5213
|
-
backgroundSize: "cover",
|
|
5214
|
-
aspectRatio: 0.7004048582995948
|
|
5215
|
-
}
|
|
5216
|
-
}
|
|
5217
|
-
}, {
|
|
5218
|
-
"@type": "@builder.io/sdk:Element",
|
|
5219
|
-
responsiveStyles: {
|
|
5220
|
-
large: {
|
|
5221
|
-
display: "flex",
|
|
5222
|
-
flexDirection: "column",
|
|
5223
|
-
alignItems: "stretch",
|
|
5224
|
-
flexShrink: "0",
|
|
5225
|
-
position: "relative",
|
|
5226
|
-
marginTop: "30px",
|
|
5227
|
-
textAlign: "center",
|
|
5228
|
-
lineHeight: "normal",
|
|
5229
|
-
height: "auto"
|
|
5230
|
-
}
|
|
5231
|
-
},
|
|
5232
|
-
component: {
|
|
5233
|
-
name: "Text",
|
|
5234
|
-
options: {
|
|
5235
|
-
text: "<p>Enter some text...</p>"
|
|
5236
|
-
}
|
|
5237
|
-
}
|
|
5238
|
-
}]
|
|
5239
|
-
}],
|
|
5240
|
-
onChange: (options) => {
|
|
5241
|
-
function clearWidths() {
|
|
5242
|
-
columns.forEach((col) => {
|
|
5243
|
-
col.delete("width");
|
|
5244
|
-
});
|
|
5045
|
+
children: [{
|
|
5046
|
+
"@type": "@builder.io/sdk:Element",
|
|
5047
|
+
responsiveStyles: {
|
|
5048
|
+
large: {
|
|
5049
|
+
textAlign: "left",
|
|
5050
|
+
display: "flex",
|
|
5051
|
+
flexDirection: "column"
|
|
5245
5052
|
}
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
if (containsColumnWithoutWidth) {
|
|
5252
|
-
clearWidths();
|
|
5253
|
-
} else {
|
|
5254
|
-
const sumWidths = columns.reduce((memo, col) => {
|
|
5255
|
-
return memo + col.get("width");
|
|
5256
|
-
}, 0);
|
|
5257
|
-
const widthsDontAddUp = sumWidths !== 100;
|
|
5258
|
-
if (widthsDontAddUp) {
|
|
5259
|
-
clearWidths();
|
|
5260
|
-
}
|
|
5261
|
-
}
|
|
5262
|
-
}
|
|
5053
|
+
},
|
|
5054
|
+
component: {
|
|
5055
|
+
name: "Text",
|
|
5056
|
+
options: {
|
|
5057
|
+
text: "I am an accordion title. Click me!"
|
|
5263
5058
|
}
|
|
5264
5059
|
}
|
|
5265
|
-
}, {
|
|
5266
|
-
name: "space",
|
|
5267
|
-
type: "number",
|
|
5268
|
-
defaultValue: 20,
|
|
5269
|
-
helperText: "Size of gap between columns",
|
|
5270
|
-
advanced: true
|
|
5271
|
-
}, {
|
|
5272
|
-
name: "stackColumnsAt",
|
|
5273
|
-
type: "string",
|
|
5274
|
-
defaultValue: "tablet",
|
|
5275
|
-
helperText: "Convert horizontal columns to vertical at what device size",
|
|
5276
|
-
enum: ["tablet", "mobile", "never"],
|
|
5277
|
-
advanced: true
|
|
5278
|
-
}, {
|
|
5279
|
-
name: "reverseColumnsWhenStacked",
|
|
5280
|
-
type: "boolean",
|
|
5281
|
-
defaultValue: false,
|
|
5282
|
-
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
5283
|
-
advanced: true
|
|
5284
5060
|
}]
|
|
5285
5061
|
};
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5293
|
-
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
name: "Image",
|
|
5299
|
-
static: true,
|
|
5300
|
-
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
5301
|
-
defaultStyles: {
|
|
5302
|
-
position: "relative",
|
|
5303
|
-
minHeight: "20px",
|
|
5304
|
-
minWidth: "20px",
|
|
5305
|
-
overflow: "hidden"
|
|
5062
|
+
var defaultDetail = {
|
|
5063
|
+
"@type": "@builder.io/sdk:Element",
|
|
5064
|
+
layerName: "Accordion item detail",
|
|
5065
|
+
responsiveStyles: {
|
|
5066
|
+
large: {
|
|
5067
|
+
position: "relative",
|
|
5068
|
+
display: "flex",
|
|
5069
|
+
alignItems: "stretch",
|
|
5070
|
+
flexDirection: "column",
|
|
5071
|
+
marginTop: "10px",
|
|
5072
|
+
paddingBottom: "10px"
|
|
5073
|
+
}
|
|
5306
5074
|
},
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
const DEFAULT_ASPECT_RATIO = 0.7041;
|
|
5317
|
-
options.delete("srcset");
|
|
5318
|
-
options.delete("noWebp");
|
|
5319
|
-
function loadImage(url, timeout = 6e4) {
|
|
5320
|
-
return new Promise((resolve, reject) => {
|
|
5321
|
-
const img = document.createElement("img");
|
|
5322
|
-
let loaded = false;
|
|
5323
|
-
img.onload = () => {
|
|
5324
|
-
loaded = true;
|
|
5325
|
-
resolve(img);
|
|
5326
|
-
};
|
|
5327
|
-
img.addEventListener("error", (event) => {
|
|
5328
|
-
console.warn("Image load failed", event.error);
|
|
5329
|
-
reject(event.error);
|
|
5330
|
-
});
|
|
5331
|
-
img.src = url;
|
|
5332
|
-
setTimeout(() => {
|
|
5333
|
-
if (!loaded) {
|
|
5334
|
-
reject(new Error("Image load timed out"));
|
|
5335
|
-
}
|
|
5336
|
-
}, timeout);
|
|
5337
|
-
});
|
|
5338
|
-
}
|
|
5339
|
-
function round2(num) {
|
|
5340
|
-
return Math.round(num * 1e3) / 1e3;
|
|
5075
|
+
children: [{
|
|
5076
|
+
"@type": "@builder.io/sdk:Element",
|
|
5077
|
+
responsiveStyles: {
|
|
5078
|
+
large: {
|
|
5079
|
+
paddingTop: "50px",
|
|
5080
|
+
textAlign: "left",
|
|
5081
|
+
display: "flex",
|
|
5082
|
+
flexDirection: "column",
|
|
5083
|
+
paddingBottom: "50px"
|
|
5341
5084
|
}
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
}
|
|
5348
|
-
});
|
|
5349
|
-
if (value && (!aspectRatio || aspectRatio === DEFAULT_ASPECT_RATIO)) {
|
|
5350
|
-
return loadImage(value).then((img) => {
|
|
5351
|
-
const possiblyUpdatedAspectRatio = options.get("aspectRatio");
|
|
5352
|
-
if (options.get("image") === value && (!possiblyUpdatedAspectRatio || possiblyUpdatedAspectRatio === DEFAULT_ASPECT_RATIO)) {
|
|
5353
|
-
if (img.width && img.height) {
|
|
5354
|
-
options.set("aspectRatio", round2(img.height / img.width));
|
|
5355
|
-
options.set("height", img.height);
|
|
5356
|
-
options.set("width", img.width);
|
|
5357
|
-
}
|
|
5358
|
-
}
|
|
5359
|
-
});
|
|
5085
|
+
},
|
|
5086
|
+
component: {
|
|
5087
|
+
name: "Text",
|
|
5088
|
+
options: {
|
|
5089
|
+
text: "I am an accordion detail, hello!"
|
|
5360
5090
|
}
|
|
5361
5091
|
}
|
|
5362
|
-
}, {
|
|
5363
|
-
name: "backgroundSize",
|
|
5364
|
-
type: "text",
|
|
5365
|
-
defaultValue: "cover",
|
|
5366
|
-
enum: [{
|
|
5367
|
-
label: "contain",
|
|
5368
|
-
value: "contain",
|
|
5369
|
-
helperText: "The image should never get cropped"
|
|
5370
|
-
}, {
|
|
5371
|
-
label: "cover",
|
|
5372
|
-
value: "cover",
|
|
5373
|
-
helperText: "The image should fill it's box, cropping when needed"
|
|
5374
|
-
}]
|
|
5375
|
-
}, {
|
|
5376
|
-
name: "backgroundPosition",
|
|
5377
|
-
type: "text",
|
|
5378
|
-
defaultValue: "center",
|
|
5379
|
-
enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
|
|
5380
|
-
}, {
|
|
5381
|
-
name: "altText",
|
|
5382
|
-
type: "string",
|
|
5383
|
-
helperText: "Text to display when the user has images off"
|
|
5384
|
-
}, {
|
|
5385
|
-
name: "height",
|
|
5386
|
-
type: "number",
|
|
5387
|
-
hideFromUI: true
|
|
5388
|
-
}, {
|
|
5389
|
-
name: "width",
|
|
5390
|
-
type: "number",
|
|
5391
|
-
hideFromUI: true
|
|
5392
|
-
}, {
|
|
5393
|
-
name: "sizes",
|
|
5394
|
-
type: "string",
|
|
5395
|
-
hideFromUI: true
|
|
5396
|
-
}, {
|
|
5397
|
-
name: "srcset",
|
|
5398
|
-
type: "string",
|
|
5399
|
-
hideFromUI: true
|
|
5400
|
-
}, {
|
|
5401
|
-
name: "lazy",
|
|
5402
|
-
type: "boolean",
|
|
5403
|
-
defaultValue: true,
|
|
5404
|
-
hideFromUI: true
|
|
5405
|
-
}, {
|
|
5406
|
-
name: "fitContent",
|
|
5407
|
-
type: "boolean",
|
|
5408
|
-
helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio",
|
|
5409
|
-
defaultValue: true
|
|
5410
|
-
}, {
|
|
5411
|
-
name: "aspectRatio",
|
|
5412
|
-
type: "number",
|
|
5413
|
-
helperText: "This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",
|
|
5414
|
-
advanced: true,
|
|
5415
|
-
defaultValue: 0.7041
|
|
5416
5092
|
}]
|
|
5417
5093
|
};
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5094
|
+
var componentInfo = {
|
|
5095
|
+
name: "Builder:Accordion",
|
|
5096
|
+
canHaveChildren: true,
|
|
5097
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
5098
|
+
defaultStyles: {
|
|
5099
|
+
display: "flex",
|
|
5100
|
+
flexDirection: "column",
|
|
5101
|
+
alignItems: "stretch"
|
|
5102
|
+
},
|
|
5424
5103
|
inputs: [{
|
|
5425
|
-
name: "
|
|
5426
|
-
type: "
|
|
5427
|
-
|
|
5104
|
+
name: "items",
|
|
5105
|
+
type: "list",
|
|
5106
|
+
broadcast: true,
|
|
5107
|
+
subFields: [{
|
|
5108
|
+
name: "title",
|
|
5109
|
+
type: "uiBlocks",
|
|
5110
|
+
hideFromUI: true,
|
|
5111
|
+
defaultValue: [defaultTitle]
|
|
5112
|
+
}, {
|
|
5113
|
+
name: "detail",
|
|
5114
|
+
type: "uiBlocks",
|
|
5115
|
+
hideFromUI: true,
|
|
5116
|
+
defaultValue: [defaultDetail]
|
|
5117
|
+
}],
|
|
5118
|
+
defaultValue: [{
|
|
5119
|
+
title: [defaultTitle],
|
|
5120
|
+
detail: [defaultDetail]
|
|
5121
|
+
}, {
|
|
5122
|
+
title: [defaultTitle],
|
|
5123
|
+
detail: [defaultDetail]
|
|
5124
|
+
}],
|
|
5125
|
+
showIf: (options) => !options.get("useChildrenForItems")
|
|
5428
5126
|
}, {
|
|
5429
|
-
name: "
|
|
5127
|
+
name: "oneAtATime",
|
|
5128
|
+
helperText: "Only allow opening one at a time (collapse all others when new item openned)",
|
|
5430
5129
|
type: "boolean",
|
|
5431
|
-
defaultValue: false
|
|
5130
|
+
defaultValue: false
|
|
5131
|
+
}, {
|
|
5132
|
+
name: "grid",
|
|
5133
|
+
helperText: "Display as a grid",
|
|
5134
|
+
type: "boolean",
|
|
5135
|
+
defaultValue: false
|
|
5136
|
+
}, {
|
|
5137
|
+
name: "gridRowWidth",
|
|
5138
|
+
helperText: "Display as a grid",
|
|
5139
|
+
type: "string",
|
|
5140
|
+
showIf: (options) => options.get("grid"),
|
|
5141
|
+
defaultValue: "25%"
|
|
5142
|
+
}, {
|
|
5143
|
+
name: "useChildrenForItems",
|
|
5144
|
+
type: "boolean",
|
|
5145
|
+
helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
|
|
5432
5146
|
advanced: true,
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
paddingRight: "20px",
|
|
5438
|
-
paddingTop: "50px",
|
|
5439
|
-
paddingBottom: "50px",
|
|
5440
|
-
marginTop: "0px",
|
|
5441
|
-
width: "100vw",
|
|
5442
|
-
marginLeft: "calc(50% - 50vw)"
|
|
5443
|
-
},
|
|
5444
|
-
canHaveChildren: true,
|
|
5445
|
-
defaultChildren: [{
|
|
5446
|
-
"@type": "@builder.io/sdk:Element",
|
|
5447
|
-
responsiveStyles: {
|
|
5448
|
-
large: {
|
|
5449
|
-
textAlign: "center"
|
|
5450
|
-
}
|
|
5451
|
-
},
|
|
5452
|
-
component: {
|
|
5453
|
-
name: "Text",
|
|
5454
|
-
options: {
|
|
5455
|
-
text: "<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"
|
|
5147
|
+
defaultValue: false,
|
|
5148
|
+
onChange: (options) => {
|
|
5149
|
+
if (options.get("useChildrenForItems") === true) {
|
|
5150
|
+
options.set("items", []);
|
|
5456
5151
|
}
|
|
5457
5152
|
}
|
|
5458
5153
|
}]
|
|
5459
5154
|
};
|
|
5460
5155
|
|
|
5461
|
-
// src/blocks/
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
5468
|
-
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
5469
|
-
inputs: [{
|
|
5470
|
-
name: "name",
|
|
5471
|
-
type: "string",
|
|
5472
|
-
required: true,
|
|
5473
|
-
defaultValue: "children"
|
|
5474
|
-
}]
|
|
5156
|
+
// src/blocks/accordion/accordion.tsx
|
|
5157
|
+
import { Show as Show8, For as For5, createSignal as createSignal9, createMemo as createMemo9 } from "solid-js";
|
|
5158
|
+
|
|
5159
|
+
// src/blocks/accordion/helpers.ts
|
|
5160
|
+
var convertOrderNumberToString = (order) => {
|
|
5161
|
+
return order.toString();
|
|
5475
5162
|
};
|
|
5476
5163
|
|
|
5477
|
-
// src/blocks/
|
|
5478
|
-
function
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5164
|
+
// src/blocks/accordion/accordion.tsx
|
|
5165
|
+
function Accordion(props) {
|
|
5166
|
+
const [open, setOpen] = createSignal9([]);
|
|
5167
|
+
const onlyOneAtATime = createMemo9(() => {
|
|
5168
|
+
return Boolean(props.grid || props.oneAtATime);
|
|
5169
|
+
});
|
|
5170
|
+
const accordionStyles = createMemo9(() => {
|
|
5171
|
+
const styles = {
|
|
5172
|
+
display: "flex",
|
|
5173
|
+
alignItems: "stretch",
|
|
5174
|
+
flexDirection: "column",
|
|
5175
|
+
...props.grid && {
|
|
5176
|
+
flexDirection: "row",
|
|
5177
|
+
alignItems: "flex-start",
|
|
5178
|
+
flexWrap: "wrap"
|
|
5179
|
+
}
|
|
5180
|
+
};
|
|
5181
|
+
return Object.fromEntries(
|
|
5182
|
+
Object.entries(styles).map(([key, value]) => [
|
|
5183
|
+
camelToKebabCase(key),
|
|
5184
|
+
value
|
|
5185
|
+
])
|
|
5186
|
+
);
|
|
5187
|
+
});
|
|
5188
|
+
const accordionTitleStyles = createMemo9(() => {
|
|
5189
|
+
const shared = {
|
|
5190
|
+
display: "flex",
|
|
5191
|
+
flexDirection: "column"
|
|
5192
|
+
};
|
|
5193
|
+
const styles = Object.fromEntries(
|
|
5194
|
+
Object.entries({
|
|
5195
|
+
...shared,
|
|
5196
|
+
alignItems: "stretch",
|
|
5197
|
+
cursor: "pointer"
|
|
5198
|
+
}).map(([key, value]) => [camelToKebabCase(key), value])
|
|
5199
|
+
);
|
|
5200
|
+
return Object.fromEntries(
|
|
5201
|
+
Object.entries(styles).filter(([_, value]) => value !== void 0)
|
|
5202
|
+
);
|
|
5203
|
+
});
|
|
5204
|
+
function getAccordionTitleClassName(index) {
|
|
5205
|
+
return `builder-accordion-title builder-accordion-title-${open().includes(index) ? "open" : "closed"}`;
|
|
5206
|
+
}
|
|
5207
|
+
function getAccordionDetailClassName(index) {
|
|
5208
|
+
return `builder-accordion-detail builder-accordion-detail-${open().includes(index) ? "open" : "closed"}`;
|
|
5209
|
+
}
|
|
5210
|
+
const openGridItemOrder = createMemo9(() => {
|
|
5211
|
+
let itemOrder = null;
|
|
5212
|
+
const getOpenGridItemPosition = props.grid && open().length;
|
|
5213
|
+
if (getOpenGridItemPosition && document) {
|
|
5214
|
+
const openItemIndex = open()[0];
|
|
5215
|
+
const openItem = document.querySelector(
|
|
5216
|
+
`.builder-accordion-title[data-index="${openItemIndex}"]`
|
|
5217
|
+
);
|
|
5218
|
+
let subjectItem = openItem;
|
|
5219
|
+
itemOrder = openItemIndex;
|
|
5220
|
+
if (subjectItem) {
|
|
5221
|
+
let prevItemRect = subjectItem.getBoundingClientRect();
|
|
5222
|
+
while (subjectItem = subjectItem && subjectItem.nextElementSibling) {
|
|
5223
|
+
if (subjectItem) {
|
|
5224
|
+
if (subjectItem.classList.contains("builder-accordion-detail")) {
|
|
5225
|
+
continue;
|
|
5226
|
+
}
|
|
5227
|
+
const subjectItemRect = subjectItem.getBoundingClientRect();
|
|
5228
|
+
if (subjectItemRect.left > prevItemRect.left) {
|
|
5229
|
+
const index = parseInt(
|
|
5230
|
+
subjectItem.getAttribute("data-index") || "",
|
|
5231
|
+
10
|
|
5232
|
+
);
|
|
5233
|
+
if (!isNaN(index)) {
|
|
5234
|
+
prevItemRect = subjectItemRect;
|
|
5235
|
+
itemOrder = index;
|
|
5236
|
+
}
|
|
5237
|
+
} else {
|
|
5238
|
+
break;
|
|
5239
|
+
}
|
|
5240
|
+
}
|
|
5241
|
+
}
|
|
5242
|
+
}
|
|
5243
|
+
}
|
|
5244
|
+
if (typeof itemOrder === "number") {
|
|
5245
|
+
itemOrder = itemOrder + 1;
|
|
5246
|
+
}
|
|
5247
|
+
return itemOrder;
|
|
5248
|
+
});
|
|
5249
|
+
const accordionDetailStyles = createMemo9(() => {
|
|
5250
|
+
const styles = {
|
|
5251
|
+
...{
|
|
5252
|
+
order: typeof openGridItemOrder() === "number" ? openGridItemOrder() : void 0
|
|
5253
|
+
},
|
|
5254
|
+
...props.grid && {
|
|
5255
|
+
width: "100%"
|
|
5256
|
+
}
|
|
5257
|
+
};
|
|
5258
|
+
return Object.fromEntries(
|
|
5259
|
+
Object.entries(styles).filter(([_, value]) => value !== void 0)
|
|
5260
|
+
);
|
|
5261
|
+
});
|
|
5262
|
+
function onClick(index) {
|
|
5263
|
+
if (open().includes(index)) {
|
|
5264
|
+
setOpen(onlyOneAtATime() ? [] : open().filter((item) => item !== index));
|
|
5265
|
+
} else {
|
|
5266
|
+
setOpen(onlyOneAtATime() ? [index] : open().concat(index));
|
|
5267
|
+
}
|
|
5268
|
+
}
|
|
5269
|
+
return <div class="builder-accordion" style={accordionStyles()}><For5 each={props.items}>{(item, _index) => {
|
|
5270
|
+
const index = _index();
|
|
5271
|
+
return <>
|
|
5272
|
+
<div
|
|
5273
|
+
class={getAccordionTitleClassName(index)}
|
|
5274
|
+
style={{
|
|
5275
|
+
...accordionTitleStyles(),
|
|
5276
|
+
width: props.grid ? props.gridRowWidth : void 0,
|
|
5277
|
+
...{
|
|
5278
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
5279
|
+
}
|
|
5280
|
+
}}
|
|
5281
|
+
data-index={index}
|
|
5282
|
+
onClick={(event) => onClick(index)}
|
|
5283
|
+
><Blocks_default
|
|
5284
|
+
blocks={item.title}
|
|
5285
|
+
path={`items.${index}.title`}
|
|
5286
|
+
parent={props.builderBlock.id}
|
|
5287
|
+
context={props.builderContext}
|
|
5288
|
+
registeredComponents={props.builderComponents}
|
|
5289
|
+
linkComponent={props.builderLinkComponent}
|
|
5290
|
+
/></div>
|
|
5291
|
+
<Show8 when={open().includes(index)}><div
|
|
5292
|
+
class={getAccordionDetailClassName(index)}
|
|
5293
|
+
style={accordionDetailStyles()}
|
|
5294
|
+
><Blocks_default
|
|
5295
|
+
blocks={item.detail}
|
|
5296
|
+
path={`items.${index}.detail`}
|
|
5297
|
+
parent={props.builderBlock.id}
|
|
5298
|
+
context={props.builderContext}
|
|
5299
|
+
registeredComponents={props.builderComponents}
|
|
5300
|
+
linkComponent={props.builderLinkComponent}
|
|
5301
|
+
/></div></Show8>
|
|
5302
|
+
</>;
|
|
5303
|
+
}}</For5></div>;
|
|
5492
5304
|
}
|
|
5493
|
-
var
|
|
5305
|
+
var accordion_default = Accordion;
|
|
5494
5306
|
|
|
5495
|
-
// src/blocks/
|
|
5496
|
-
var
|
|
5497
|
-
name: "
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5307
|
+
// src/blocks/button/component-info.ts
|
|
5308
|
+
var componentInfo2 = {
|
|
5309
|
+
name: "Core:Button",
|
|
5310
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
5311
|
+
defaultStyles: {
|
|
5312
|
+
// TODO: make min width more intuitive and set one
|
|
5313
|
+
appearance: "none",
|
|
5314
|
+
paddingTop: "15px",
|
|
5315
|
+
paddingBottom: "15px",
|
|
5316
|
+
paddingLeft: "25px",
|
|
5317
|
+
paddingRight: "25px",
|
|
5318
|
+
backgroundColor: "#000000",
|
|
5319
|
+
color: "white",
|
|
5320
|
+
borderRadius: "4px",
|
|
5321
|
+
textAlign: "center",
|
|
5322
|
+
cursor: "pointer"
|
|
5323
|
+
},
|
|
5501
5324
|
inputs: [{
|
|
5502
|
-
name: "
|
|
5503
|
-
type: "
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
helperText: "Make this a data symbol that doesn't display any UI",
|
|
5507
|
-
type: "boolean",
|
|
5508
|
-
defaultValue: false,
|
|
5509
|
-
advanced: true,
|
|
5510
|
-
hideFromUI: true
|
|
5511
|
-
}, {
|
|
5512
|
-
name: "inheritState",
|
|
5513
|
-
helperText: "Inherit the parent component state and data",
|
|
5514
|
-
type: "boolean",
|
|
5515
|
-
defaultValue: false,
|
|
5516
|
-
advanced: true
|
|
5325
|
+
name: "text",
|
|
5326
|
+
type: "text",
|
|
5327
|
+
defaultValue: "Click me!",
|
|
5328
|
+
bubble: true
|
|
5517
5329
|
}, {
|
|
5518
|
-
name: "
|
|
5519
|
-
|
|
5330
|
+
name: "link",
|
|
5331
|
+
type: "url",
|
|
5332
|
+
bubble: true
|
|
5333
|
+
}, {
|
|
5334
|
+
name: "openLinkInNewTab",
|
|
5520
5335
|
type: "boolean",
|
|
5521
5336
|
defaultValue: false,
|
|
5522
|
-
|
|
5523
|
-
|
|
5524
|
-
|
|
5525
|
-
|
|
5526
|
-
hideFromUI: true,
|
|
5527
|
-
type: "boolean"
|
|
5528
|
-
}]
|
|
5337
|
+
friendlyName: "Open link in new tab"
|
|
5338
|
+
}],
|
|
5339
|
+
static: true,
|
|
5340
|
+
noWrap: true
|
|
5529
5341
|
};
|
|
5530
5342
|
|
|
5531
|
-
// src/blocks/
|
|
5532
|
-
var
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
paddingLeft: "20px",
|
|
5537
|
-
paddingRight: "20px",
|
|
5538
|
-
paddingTop: "10px",
|
|
5539
|
-
paddingBottom: "10px",
|
|
5540
|
-
minWidth: "100px",
|
|
5541
|
-
textAlign: "center",
|
|
5542
|
-
display: "flex",
|
|
5543
|
-
flexDirection: "column",
|
|
5544
|
-
cursor: "pointer",
|
|
5545
|
-
userSelect: "none"
|
|
5546
|
-
}
|
|
5547
|
-
},
|
|
5548
|
-
component: {
|
|
5549
|
-
name: "Text",
|
|
5550
|
-
options: {
|
|
5551
|
-
text: "New tab"
|
|
5552
|
-
}
|
|
5553
|
-
}
|
|
5554
|
-
};
|
|
5555
|
-
var defaultElement = {
|
|
5556
|
-
"@type": "@builder.io/sdk:Element",
|
|
5557
|
-
responsiveStyles: {
|
|
5558
|
-
large: {
|
|
5559
|
-
height: "200px",
|
|
5560
|
-
display: "flex",
|
|
5561
|
-
marginTop: "20px",
|
|
5562
|
-
flexDirection: "column"
|
|
5563
|
-
}
|
|
5564
|
-
},
|
|
5565
|
-
component: {
|
|
5566
|
-
name: "Text",
|
|
5567
|
-
options: {
|
|
5568
|
-
text: "New tab content "
|
|
5569
|
-
}
|
|
5570
|
-
}
|
|
5571
|
-
};
|
|
5572
|
-
var componentInfo8 = {
|
|
5573
|
-
name: "Builder: Tabs",
|
|
5343
|
+
// src/blocks/columns/component-info.ts
|
|
5344
|
+
var componentInfo3 = {
|
|
5345
|
+
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
5346
|
+
name: "Columns",
|
|
5347
|
+
isRSC: true,
|
|
5574
5348
|
inputs: [{
|
|
5575
|
-
name: "
|
|
5576
|
-
type: "
|
|
5349
|
+
name: "columns",
|
|
5350
|
+
type: "array",
|
|
5577
5351
|
broadcast: true,
|
|
5578
5352
|
subFields: [{
|
|
5579
|
-
name: "
|
|
5580
|
-
type: "
|
|
5353
|
+
name: "blocks",
|
|
5354
|
+
type: "array",
|
|
5581
5355
|
hideFromUI: true,
|
|
5582
|
-
defaultValue: [
|
|
5356
|
+
defaultValue: [{
|
|
5357
|
+
"@type": "@builder.io/sdk:Element",
|
|
5358
|
+
responsiveStyles: {
|
|
5359
|
+
large: {
|
|
5360
|
+
display: "flex",
|
|
5361
|
+
flexDirection: "column",
|
|
5362
|
+
alignItems: "stretch",
|
|
5363
|
+
flexShrink: "0",
|
|
5364
|
+
position: "relative",
|
|
5365
|
+
marginTop: "30px",
|
|
5366
|
+
textAlign: "center",
|
|
5367
|
+
lineHeight: "normal",
|
|
5368
|
+
height: "auto",
|
|
5369
|
+
minHeight: "20px",
|
|
5370
|
+
minWidth: "20px",
|
|
5371
|
+
overflow: "hidden"
|
|
5372
|
+
}
|
|
5373
|
+
},
|
|
5374
|
+
component: {
|
|
5375
|
+
name: "Image",
|
|
5376
|
+
options: {
|
|
5377
|
+
image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
|
|
5378
|
+
backgroundPosition: "center",
|
|
5379
|
+
backgroundSize: "cover",
|
|
5380
|
+
aspectRatio: 0.7004048582995948
|
|
5381
|
+
}
|
|
5382
|
+
}
|
|
5383
|
+
}, {
|
|
5384
|
+
"@type": "@builder.io/sdk:Element",
|
|
5385
|
+
responsiveStyles: {
|
|
5386
|
+
large: {
|
|
5387
|
+
display: "flex",
|
|
5388
|
+
flexDirection: "column",
|
|
5389
|
+
alignItems: "stretch",
|
|
5390
|
+
flexShrink: "0",
|
|
5391
|
+
position: "relative",
|
|
5392
|
+
marginTop: "30px",
|
|
5393
|
+
textAlign: "center",
|
|
5394
|
+
lineHeight: "normal",
|
|
5395
|
+
height: "auto"
|
|
5396
|
+
}
|
|
5397
|
+
},
|
|
5398
|
+
component: {
|
|
5399
|
+
name: "Text",
|
|
5400
|
+
options: {
|
|
5401
|
+
text: "<p>Enter some text...</p>"
|
|
5402
|
+
}
|
|
5403
|
+
}
|
|
5404
|
+
}]
|
|
5583
5405
|
}, {
|
|
5584
|
-
name: "
|
|
5585
|
-
type: "
|
|
5406
|
+
name: "width",
|
|
5407
|
+
type: "number",
|
|
5586
5408
|
hideFromUI: true,
|
|
5587
|
-
|
|
5409
|
+
helperText: "Width %, e.g. set to 50 to fill half of the space"
|
|
5410
|
+
}, {
|
|
5411
|
+
name: "link",
|
|
5412
|
+
type: "url",
|
|
5413
|
+
helperText: "Optionally set a url that clicking this column will link to"
|
|
5588
5414
|
}],
|
|
5589
5415
|
defaultValue: [{
|
|
5590
|
-
|
|
5591
|
-
|
|
5416
|
+
blocks: [{
|
|
5417
|
+
"@type": "@builder.io/sdk:Element",
|
|
5418
|
+
responsiveStyles: {
|
|
5419
|
+
large: {
|
|
5420
|
+
display: "flex",
|
|
5421
|
+
flexDirection: "column",
|
|
5422
|
+
alignItems: "stretch",
|
|
5423
|
+
flexShrink: "0",
|
|
5424
|
+
position: "relative",
|
|
5425
|
+
marginTop: "30px",
|
|
5426
|
+
textAlign: "center",
|
|
5427
|
+
lineHeight: "normal",
|
|
5428
|
+
height: "auto",
|
|
5429
|
+
minHeight: "20px",
|
|
5430
|
+
minWidth: "20px",
|
|
5431
|
+
overflow: "hidden"
|
|
5432
|
+
}
|
|
5433
|
+
},
|
|
5592
5434
|
component: {
|
|
5593
|
-
name: "
|
|
5435
|
+
name: "Image",
|
|
5594
5436
|
options: {
|
|
5595
|
-
|
|
5437
|
+
image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
|
|
5438
|
+
backgroundPosition: "center",
|
|
5439
|
+
backgroundSize: "cover",
|
|
5440
|
+
aspectRatio: 0.7004048582995948
|
|
5596
5441
|
}
|
|
5597
5442
|
}
|
|
5598
|
-
}
|
|
5599
|
-
|
|
5600
|
-
|
|
5443
|
+
}, {
|
|
5444
|
+
"@type": "@builder.io/sdk:Element",
|
|
5445
|
+
responsiveStyles: {
|
|
5446
|
+
large: {
|
|
5447
|
+
display: "flex",
|
|
5448
|
+
flexDirection: "column",
|
|
5449
|
+
alignItems: "stretch",
|
|
5450
|
+
flexShrink: "0",
|
|
5451
|
+
position: "relative",
|
|
5452
|
+
marginTop: "30px",
|
|
5453
|
+
textAlign: "center",
|
|
5454
|
+
lineHeight: "normal",
|
|
5455
|
+
height: "auto"
|
|
5456
|
+
}
|
|
5457
|
+
},
|
|
5601
5458
|
component: {
|
|
5602
5459
|
name: "Text",
|
|
5603
5460
|
options: {
|
|
5604
|
-
text: "
|
|
5461
|
+
text: "<p>Enter some text...</p>"
|
|
5605
5462
|
}
|
|
5606
5463
|
}
|
|
5607
5464
|
}]
|
|
5608
5465
|
}, {
|
|
5609
|
-
|
|
5610
|
-
|
|
5466
|
+
blocks: [{
|
|
5467
|
+
"@type": "@builder.io/sdk:Element",
|
|
5468
|
+
responsiveStyles: {
|
|
5469
|
+
large: {
|
|
5470
|
+
display: "flex",
|
|
5471
|
+
flexDirection: "column",
|
|
5472
|
+
alignItems: "stretch",
|
|
5473
|
+
flexShrink: "0",
|
|
5474
|
+
position: "relative",
|
|
5475
|
+
marginTop: "30px",
|
|
5476
|
+
textAlign: "center",
|
|
5477
|
+
lineHeight: "normal",
|
|
5478
|
+
height: "auto",
|
|
5479
|
+
minHeight: "20px",
|
|
5480
|
+
minWidth: "20px",
|
|
5481
|
+
overflow: "hidden"
|
|
5482
|
+
}
|
|
5483
|
+
},
|
|
5611
5484
|
component: {
|
|
5612
|
-
name: "
|
|
5485
|
+
name: "Image",
|
|
5613
5486
|
options: {
|
|
5614
|
-
|
|
5487
|
+
image: "https://builder.io/api/v1/image/assets%2Fpwgjf0RoYWbdnJSbpBAjXNRMe9F2%2Ffb27a7c790324294af8be1c35fe30f4d",
|
|
5488
|
+
backgroundPosition: "center",
|
|
5489
|
+
backgroundSize: "cover",
|
|
5490
|
+
aspectRatio: 0.7004048582995948
|
|
5615
5491
|
}
|
|
5616
5492
|
}
|
|
5617
|
-
}
|
|
5618
|
-
|
|
5619
|
-
|
|
5493
|
+
}, {
|
|
5494
|
+
"@type": "@builder.io/sdk:Element",
|
|
5495
|
+
responsiveStyles: {
|
|
5496
|
+
large: {
|
|
5497
|
+
display: "flex",
|
|
5498
|
+
flexDirection: "column",
|
|
5499
|
+
alignItems: "stretch",
|
|
5500
|
+
flexShrink: "0",
|
|
5501
|
+
position: "relative",
|
|
5502
|
+
marginTop: "30px",
|
|
5503
|
+
textAlign: "center",
|
|
5504
|
+
lineHeight: "normal",
|
|
5505
|
+
height: "auto"
|
|
5506
|
+
}
|
|
5507
|
+
},
|
|
5620
5508
|
component: {
|
|
5621
5509
|
name: "Text",
|
|
5622
5510
|
options: {
|
|
5623
|
-
text: "
|
|
5511
|
+
text: "<p>Enter some text...</p>"
|
|
5624
5512
|
}
|
|
5625
5513
|
}
|
|
5626
5514
|
}]
|
|
5627
|
-
}]
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5515
|
+
}],
|
|
5516
|
+
onChange: (options) => {
|
|
5517
|
+
function clearWidths() {
|
|
5518
|
+
columns.forEach((col) => {
|
|
5519
|
+
col.delete("width");
|
|
5520
|
+
});
|
|
5521
|
+
}
|
|
5522
|
+
const columns = options.get("columns");
|
|
5523
|
+
if (Array.isArray(columns)) {
|
|
5524
|
+
const containsColumnWithWidth = !!columns.find((col) => col.get("width"));
|
|
5525
|
+
if (containsColumnWithWidth) {
|
|
5526
|
+
const containsColumnWithoutWidth = !!columns.find((col) => !col.get("width"));
|
|
5527
|
+
if (containsColumnWithoutWidth) {
|
|
5528
|
+
clearWidths();
|
|
5529
|
+
} else {
|
|
5530
|
+
const sumWidths = columns.reduce((memo, col) => {
|
|
5531
|
+
return memo + col.get("width");
|
|
5532
|
+
}, 0);
|
|
5533
|
+
const widthsDontAddUp = sumWidths !== 100;
|
|
5534
|
+
if (widthsDontAddUp) {
|
|
5535
|
+
clearWidths();
|
|
5536
|
+
}
|
|
5537
|
+
}
|
|
5538
|
+
}
|
|
5539
|
+
}
|
|
5634
5540
|
}
|
|
5635
5541
|
}, {
|
|
5636
|
-
name: "
|
|
5542
|
+
name: "space",
|
|
5637
5543
|
type: "number",
|
|
5638
|
-
|
|
5639
|
-
|
|
5544
|
+
defaultValue: 20,
|
|
5545
|
+
helperText: "Size of gap between columns",
|
|
5640
5546
|
advanced: true
|
|
5641
5547
|
}, {
|
|
5642
|
-
name: "
|
|
5548
|
+
name: "stackColumnsAt",
|
|
5549
|
+
type: "string",
|
|
5550
|
+
defaultValue: "tablet",
|
|
5551
|
+
helperText: "Convert horizontal columns to vertical at what device size",
|
|
5552
|
+
enum: ["tablet", "mobile", "never"],
|
|
5553
|
+
advanced: true
|
|
5554
|
+
}, {
|
|
5555
|
+
name: "reverseColumnsWhenStacked",
|
|
5643
5556
|
type: "boolean",
|
|
5644
|
-
helperText: "If on, clicking an open tab closes it so no tabs are active",
|
|
5645
5557
|
defaultValue: false,
|
|
5558
|
+
helperText: "When stacking columns for mobile devices, reverse the ordering",
|
|
5646
5559
|
advanced: true
|
|
5560
|
+
}]
|
|
5561
|
+
};
|
|
5562
|
+
|
|
5563
|
+
// src/blocks/fragment/component-info.ts
|
|
5564
|
+
var componentInfo4 = {
|
|
5565
|
+
name: "Fragment",
|
|
5566
|
+
static: true,
|
|
5567
|
+
hidden: true,
|
|
5568
|
+
canHaveChildren: true,
|
|
5569
|
+
noWrap: true
|
|
5570
|
+
};
|
|
5571
|
+
|
|
5572
|
+
// src/blocks/image/component-info.ts
|
|
5573
|
+
var componentInfo5 = {
|
|
5574
|
+
name: "Image",
|
|
5575
|
+
static: true,
|
|
5576
|
+
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
5577
|
+
defaultStyles: {
|
|
5578
|
+
position: "relative",
|
|
5579
|
+
minHeight: "20px",
|
|
5580
|
+
minWidth: "20px",
|
|
5581
|
+
overflow: "hidden"
|
|
5582
|
+
},
|
|
5583
|
+
canHaveChildren: true,
|
|
5584
|
+
inputs: [{
|
|
5585
|
+
name: "image",
|
|
5586
|
+
type: "file",
|
|
5587
|
+
bubble: true,
|
|
5588
|
+
allowedFileTypes: ["jpeg", "jpg", "png", "svg"],
|
|
5589
|
+
required: true,
|
|
5590
|
+
defaultValue: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F72c80f114dc149019051b6852a9e3b7a",
|
|
5591
|
+
onChange: (options) => {
|
|
5592
|
+
const DEFAULT_ASPECT_RATIO = 0.7041;
|
|
5593
|
+
options.delete("srcset");
|
|
5594
|
+
options.delete("noWebp");
|
|
5595
|
+
function loadImage(url, timeout = 6e4) {
|
|
5596
|
+
return new Promise((resolve, reject) => {
|
|
5597
|
+
const img = document.createElement("img");
|
|
5598
|
+
let loaded = false;
|
|
5599
|
+
img.onload = () => {
|
|
5600
|
+
loaded = true;
|
|
5601
|
+
resolve(img);
|
|
5602
|
+
};
|
|
5603
|
+
img.addEventListener("error", (event) => {
|
|
5604
|
+
console.warn("Image load failed", event.error);
|
|
5605
|
+
reject(event.error);
|
|
5606
|
+
});
|
|
5607
|
+
img.src = url;
|
|
5608
|
+
setTimeout(() => {
|
|
5609
|
+
if (!loaded) {
|
|
5610
|
+
reject(new Error("Image load timed out"));
|
|
5611
|
+
}
|
|
5612
|
+
}, timeout);
|
|
5613
|
+
});
|
|
5614
|
+
}
|
|
5615
|
+
function round2(num) {
|
|
5616
|
+
return Math.round(num * 1e3) / 1e3;
|
|
5617
|
+
}
|
|
5618
|
+
const value = options.get("image");
|
|
5619
|
+
const aspectRatio = options.get("aspectRatio");
|
|
5620
|
+
fetch(value).then((res) => res.blob()).then((blob) => {
|
|
5621
|
+
if (blob.type.includes("svg")) {
|
|
5622
|
+
options.set("noWebp", true);
|
|
5623
|
+
}
|
|
5624
|
+
});
|
|
5625
|
+
if (value && (!aspectRatio || aspectRatio === DEFAULT_ASPECT_RATIO)) {
|
|
5626
|
+
return loadImage(value).then((img) => {
|
|
5627
|
+
const possiblyUpdatedAspectRatio = options.get("aspectRatio");
|
|
5628
|
+
if (options.get("image") === value && (!possiblyUpdatedAspectRatio || possiblyUpdatedAspectRatio === DEFAULT_ASPECT_RATIO)) {
|
|
5629
|
+
if (img.width && img.height) {
|
|
5630
|
+
options.set("aspectRatio", round2(img.height / img.width));
|
|
5631
|
+
options.set("height", img.height);
|
|
5632
|
+
options.set("width", img.width);
|
|
5633
|
+
}
|
|
5634
|
+
}
|
|
5635
|
+
});
|
|
5636
|
+
}
|
|
5637
|
+
}
|
|
5647
5638
|
}, {
|
|
5648
|
-
name: "
|
|
5649
|
-
type: "
|
|
5650
|
-
|
|
5651
|
-
defaultValue: "flex-start",
|
|
5639
|
+
name: "backgroundSize",
|
|
5640
|
+
type: "text",
|
|
5641
|
+
defaultValue: "cover",
|
|
5652
5642
|
enum: [{
|
|
5653
|
-
label: "
|
|
5654
|
-
value: "
|
|
5655
|
-
|
|
5656
|
-
label: "Space between",
|
|
5657
|
-
value: "space-between"
|
|
5658
|
-
}, {
|
|
5659
|
-
label: "Space around",
|
|
5660
|
-
value: "space-around"
|
|
5661
|
-
}, {
|
|
5662
|
-
label: "Left",
|
|
5663
|
-
value: "flex-start"
|
|
5643
|
+
label: "contain",
|
|
5644
|
+
value: "contain",
|
|
5645
|
+
helperText: "The image should never get cropped"
|
|
5664
5646
|
}, {
|
|
5665
|
-
label: "
|
|
5666
|
-
value: "
|
|
5647
|
+
label: "cover",
|
|
5648
|
+
value: "cover",
|
|
5649
|
+
helperText: "The image should fill it's box, cropping when needed"
|
|
5667
5650
|
}]
|
|
5651
|
+
}, {
|
|
5652
|
+
name: "backgroundPosition",
|
|
5653
|
+
type: "text",
|
|
5654
|
+
defaultValue: "center",
|
|
5655
|
+
enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
|
|
5656
|
+
}, {
|
|
5657
|
+
name: "altText",
|
|
5658
|
+
type: "string",
|
|
5659
|
+
helperText: "Text to display when the user has images off"
|
|
5660
|
+
}, {
|
|
5661
|
+
name: "height",
|
|
5662
|
+
type: "number",
|
|
5663
|
+
hideFromUI: true
|
|
5664
|
+
}, {
|
|
5665
|
+
name: "width",
|
|
5666
|
+
type: "number",
|
|
5667
|
+
hideFromUI: true
|
|
5668
|
+
}, {
|
|
5669
|
+
name: "sizes",
|
|
5670
|
+
type: "string",
|
|
5671
|
+
hideFromUI: true
|
|
5672
|
+
}, {
|
|
5673
|
+
name: "srcset",
|
|
5674
|
+
type: "string",
|
|
5675
|
+
hideFromUI: true
|
|
5676
|
+
}, {
|
|
5677
|
+
name: "lazy",
|
|
5678
|
+
type: "boolean",
|
|
5679
|
+
defaultValue: true,
|
|
5680
|
+
hideFromUI: true
|
|
5681
|
+
}, {
|
|
5682
|
+
name: "fitContent",
|
|
5683
|
+
type: "boolean",
|
|
5684
|
+
helperText: "When child blocks are provided, fit to them instead of using the image's aspect ratio",
|
|
5685
|
+
defaultValue: true
|
|
5686
|
+
}, {
|
|
5687
|
+
name: "aspectRatio",
|
|
5688
|
+
type: "number",
|
|
5689
|
+
helperText: "This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",
|
|
5690
|
+
advanced: true,
|
|
5691
|
+
defaultValue: 0.7041
|
|
5668
5692
|
}]
|
|
5669
5693
|
};
|
|
5670
5694
|
|
|
5671
|
-
// src/blocks/
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
const [activeTab, setActiveTab] = createSignal9(
|
|
5675
|
-
props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
|
|
5676
|
-
);
|
|
5677
|
-
function activeTabContent(active) {
|
|
5678
|
-
return props.tabs && props.tabs[active].content;
|
|
5679
|
-
}
|
|
5680
|
-
function onClick(index) {
|
|
5681
|
-
if (index === activeTab() && props.collapsible) {
|
|
5682
|
-
setActiveTab(-1);
|
|
5683
|
-
} else {
|
|
5684
|
-
setActiveTab(index);
|
|
5685
|
-
}
|
|
5686
|
-
}
|
|
5687
|
-
return <div>
|
|
5688
|
-
<div
|
|
5689
|
-
class="builder-tabs-wrap"
|
|
5690
|
-
style={{
|
|
5691
|
-
display: "flex",
|
|
5692
|
-
"flex-direction": "row",
|
|
5693
|
-
"justify-content": props.tabHeaderLayout || "flex-start",
|
|
5694
|
-
overflow: "auto"
|
|
5695
|
-
}}
|
|
5696
|
-
><For5 each={props.tabs}>{(tab, _index) => {
|
|
5697
|
-
const index = _index();
|
|
5698
|
-
return <span
|
|
5699
|
-
class={`builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`}
|
|
5700
|
-
key={index}
|
|
5701
|
-
style={{
|
|
5702
|
-
...activeTab() === index ? props.activeTabStyle : {}
|
|
5703
|
-
}}
|
|
5704
|
-
onClick={(event) => onClick(index)}
|
|
5705
|
-
><Blocks_default
|
|
5706
|
-
parent={props.builderBlock.id}
|
|
5707
|
-
path={`component.options.tabs.${index}.label`}
|
|
5708
|
-
blocks={tab.label}
|
|
5709
|
-
context={props.builderContext}
|
|
5710
|
-
registeredComponents={props.builderComponents}
|
|
5711
|
-
linkComponent={props.builderLinkComponent}
|
|
5712
|
-
/></span>;
|
|
5713
|
-
}}</For5></div>
|
|
5714
|
-
<Show8 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
5715
|
-
parent={props.builderBlock.id}
|
|
5716
|
-
path={`component.options.tabs.${activeTab()}.content`}
|
|
5717
|
-
blocks={activeTabContent(activeTab())}
|
|
5718
|
-
context={props.builderContext}
|
|
5719
|
-
registeredComponents={props.builderComponents}
|
|
5720
|
-
linkComponent={props.builderLinkComponent}
|
|
5721
|
-
/></div></Show8>
|
|
5722
|
-
</div>;
|
|
5723
|
-
}
|
|
5724
|
-
var tabs_default = Tabs;
|
|
5725
|
-
|
|
5726
|
-
// src/blocks/text/component-info.ts
|
|
5727
|
-
var componentInfo9 = {
|
|
5728
|
-
name: "Text",
|
|
5695
|
+
// src/blocks/section/component-info.ts
|
|
5696
|
+
var componentInfo6 = {
|
|
5697
|
+
name: "Core:Section",
|
|
5729
5698
|
static: true,
|
|
5699
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
5700
|
+
inputs: [{
|
|
5701
|
+
name: "maxWidth",
|
|
5702
|
+
type: "number",
|
|
5703
|
+
defaultValue: 1200
|
|
5704
|
+
}, {
|
|
5705
|
+
name: "lazyLoad",
|
|
5706
|
+
type: "boolean",
|
|
5707
|
+
defaultValue: false,
|
|
5708
|
+
advanced: true,
|
|
5709
|
+
description: "Only render this section when in view"
|
|
5710
|
+
}],
|
|
5711
|
+
defaultStyles: {
|
|
5712
|
+
paddingLeft: "20px",
|
|
5713
|
+
paddingRight: "20px",
|
|
5714
|
+
paddingTop: "50px",
|
|
5715
|
+
paddingBottom: "50px",
|
|
5716
|
+
marginTop: "0px",
|
|
5717
|
+
width: "100vw",
|
|
5718
|
+
marginLeft: "calc(50% - 50vw)"
|
|
5719
|
+
},
|
|
5720
|
+
canHaveChildren: true,
|
|
5721
|
+
defaultChildren: [{
|
|
5722
|
+
"@type": "@builder.io/sdk:Element",
|
|
5723
|
+
responsiveStyles: {
|
|
5724
|
+
large: {
|
|
5725
|
+
textAlign: "center"
|
|
5726
|
+
}
|
|
5727
|
+
},
|
|
5728
|
+
component: {
|
|
5729
|
+
name: "Text",
|
|
5730
|
+
options: {
|
|
5731
|
+
text: "<p><b>I am a section! My content keeps from getting too wide, so that it's easy to read even on big screens.</b></p><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur</p>"
|
|
5732
|
+
}
|
|
5733
|
+
}
|
|
5734
|
+
}]
|
|
5735
|
+
};
|
|
5736
|
+
|
|
5737
|
+
// src/blocks/slot/component-info.ts
|
|
5738
|
+
var componentInfo7 = {
|
|
5739
|
+
name: "Slot",
|
|
5730
5740
|
isRSC: true,
|
|
5731
|
-
|
|
5741
|
+
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
5742
|
+
docsLink: "https://www.builder.io/c/docs/symbols-with-blocks",
|
|
5743
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F3aad6de36eae43b59b52c85190fdef56",
|
|
5744
|
+
// Maybe wrap this for canHaveChildren so bind children to this hm
|
|
5732
5745
|
inputs: [{
|
|
5733
|
-
name: "
|
|
5734
|
-
type: "
|
|
5746
|
+
name: "name",
|
|
5747
|
+
type: "string",
|
|
5735
5748
|
required: true,
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
defaultValue: "Enter some text..."
|
|
5739
|
-
}],
|
|
5740
|
-
defaultStyles: {
|
|
5741
|
-
lineHeight: "normal",
|
|
5742
|
-
height: "auto",
|
|
5743
|
-
textAlign: "center"
|
|
5744
|
-
}
|
|
5749
|
+
defaultValue: "children"
|
|
5750
|
+
}]
|
|
5745
5751
|
};
|
|
5746
5752
|
|
|
5747
|
-
// src/blocks/
|
|
5748
|
-
function
|
|
5753
|
+
// src/blocks/slot/slot.tsx
|
|
5754
|
+
function Slot(props) {
|
|
5749
5755
|
return <div
|
|
5750
|
-
class="builder-text"
|
|
5751
|
-
innerHTML={props.text?.toString() || ""}
|
|
5752
5756
|
style={{
|
|
5753
|
-
|
|
5757
|
+
"pointer-events": "auto"
|
|
5754
5758
|
}}
|
|
5755
|
-
|
|
5759
|
+
{...!props.builderContext.context?.symbolId && {
|
|
5760
|
+
"builder-slot": props.name
|
|
5761
|
+
}}
|
|
5762
|
+
><Blocks_default
|
|
5763
|
+
parent={props.builderContext.context?.symbolId}
|
|
5764
|
+
path={`symbol.data.${props.name}`}
|
|
5765
|
+
context={props.builderContext}
|
|
5766
|
+
blocks={props.builderContext.rootState?.[props.name]}
|
|
5767
|
+
/></div>;
|
|
5756
5768
|
}
|
|
5757
|
-
var
|
|
5758
|
-
|
|
5759
|
-
// src/blocks/accordion/accordion.tsx
|
|
5760
|
-
import { Show as Show9, For as For6, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
|
|
5769
|
+
var slot_default = Slot;
|
|
5761
5770
|
|
|
5762
|
-
// src/blocks/
|
|
5763
|
-
var
|
|
5764
|
-
|
|
5771
|
+
// src/blocks/symbol/component-info.ts
|
|
5772
|
+
var componentInfo8 = {
|
|
5773
|
+
name: "Symbol",
|
|
5774
|
+
noWrap: true,
|
|
5775
|
+
static: true,
|
|
5776
|
+
isRSC: true,
|
|
5777
|
+
inputs: [{
|
|
5778
|
+
name: "symbol",
|
|
5779
|
+
type: "uiSymbol"
|
|
5780
|
+
}, {
|
|
5781
|
+
name: "dataOnly",
|
|
5782
|
+
helperText: "Make this a data symbol that doesn't display any UI",
|
|
5783
|
+
type: "boolean",
|
|
5784
|
+
defaultValue: false,
|
|
5785
|
+
advanced: true,
|
|
5786
|
+
hideFromUI: true
|
|
5787
|
+
}, {
|
|
5788
|
+
name: "inheritState",
|
|
5789
|
+
helperText: "Inherit the parent component state and data",
|
|
5790
|
+
type: "boolean",
|
|
5791
|
+
defaultValue: false,
|
|
5792
|
+
advanced: true
|
|
5793
|
+
}, {
|
|
5794
|
+
name: "renderToLiquid",
|
|
5795
|
+
helperText: "Render this symbols contents to liquid. Turn off to fetch with javascript and use custom targeting",
|
|
5796
|
+
type: "boolean",
|
|
5797
|
+
defaultValue: false,
|
|
5798
|
+
advanced: true,
|
|
5799
|
+
hideFromUI: true
|
|
5800
|
+
}, {
|
|
5801
|
+
name: "useChildren",
|
|
5802
|
+
hideFromUI: true,
|
|
5803
|
+
type: "boolean"
|
|
5804
|
+
}]
|
|
5765
5805
|
};
|
|
5766
5806
|
|
|
5767
|
-
// src/blocks/
|
|
5768
|
-
|
|
5769
|
-
const [open, setOpen] = createSignal10([]);
|
|
5770
|
-
const onlyOneAtATime = createMemo10(() => {
|
|
5771
|
-
return Boolean(props.grid || props.oneAtATime);
|
|
5772
|
-
});
|
|
5773
|
-
const accordionStyles = createMemo10(() => {
|
|
5774
|
-
const styles = {
|
|
5775
|
-
display: "flex",
|
|
5776
|
-
alignItems: "stretch",
|
|
5777
|
-
flexDirection: "column",
|
|
5778
|
-
...props.grid && {
|
|
5779
|
-
flexDirection: "row",
|
|
5780
|
-
alignItems: "flex-start",
|
|
5781
|
-
flexWrap: "wrap"
|
|
5782
|
-
}
|
|
5783
|
-
};
|
|
5784
|
-
return Object.fromEntries(
|
|
5785
|
-
Object.entries(styles).map(([key, value]) => [
|
|
5786
|
-
camelToKebabCase(key),
|
|
5787
|
-
value
|
|
5788
|
-
])
|
|
5789
|
-
);
|
|
5790
|
-
});
|
|
5791
|
-
const accordionTitleStyles = createMemo10(() => {
|
|
5792
|
-
const shared = {
|
|
5793
|
-
display: "flex",
|
|
5794
|
-
flexDirection: "column"
|
|
5795
|
-
};
|
|
5796
|
-
const styles = Object.fromEntries(
|
|
5797
|
-
Object.entries({
|
|
5798
|
-
...shared,
|
|
5799
|
-
alignItems: "stretch",
|
|
5800
|
-
cursor: "pointer"
|
|
5801
|
-
}).map(([key, value]) => [camelToKebabCase(key), value])
|
|
5802
|
-
);
|
|
5803
|
-
return Object.fromEntries(
|
|
5804
|
-
Object.entries(styles).filter(([_, value]) => value !== void 0)
|
|
5805
|
-
);
|
|
5806
|
-
});
|
|
5807
|
-
function getAccordionTitleClassName(index) {
|
|
5808
|
-
return `builder-accordion-title builder-accordion-title-${open().includes(index) ? "open" : "closed"}`;
|
|
5809
|
-
}
|
|
5810
|
-
function getAccordionDetailClassName(index) {
|
|
5811
|
-
return `builder-accordion-detail builder-accordion-detail-${open().includes(index) ? "open" : "closed"}`;
|
|
5812
|
-
}
|
|
5813
|
-
const openGridItemOrder = createMemo10(() => {
|
|
5814
|
-
let itemOrder = null;
|
|
5815
|
-
const getOpenGridItemPosition = props.grid && open().length;
|
|
5816
|
-
if (getOpenGridItemPosition && document) {
|
|
5817
|
-
const openItemIndex = open()[0];
|
|
5818
|
-
const openItem = document.querySelector(
|
|
5819
|
-
`.builder-accordion-title[data-index="${openItemIndex}"]`
|
|
5820
|
-
);
|
|
5821
|
-
let subjectItem = openItem;
|
|
5822
|
-
itemOrder = openItemIndex;
|
|
5823
|
-
if (subjectItem) {
|
|
5824
|
-
let prevItemRect = subjectItem.getBoundingClientRect();
|
|
5825
|
-
while (subjectItem = subjectItem && subjectItem.nextElementSibling) {
|
|
5826
|
-
if (subjectItem) {
|
|
5827
|
-
if (subjectItem.classList.contains("builder-accordion-detail")) {
|
|
5828
|
-
continue;
|
|
5829
|
-
}
|
|
5830
|
-
const subjectItemRect = subjectItem.getBoundingClientRect();
|
|
5831
|
-
if (subjectItemRect.left > prevItemRect.left) {
|
|
5832
|
-
const index = parseInt(
|
|
5833
|
-
subjectItem.getAttribute("data-index") || "",
|
|
5834
|
-
10
|
|
5835
|
-
);
|
|
5836
|
-
if (!isNaN(index)) {
|
|
5837
|
-
prevItemRect = subjectItemRect;
|
|
5838
|
-
itemOrder = index;
|
|
5839
|
-
}
|
|
5840
|
-
} else {
|
|
5841
|
-
break;
|
|
5842
|
-
}
|
|
5843
|
-
}
|
|
5844
|
-
}
|
|
5845
|
-
}
|
|
5846
|
-
}
|
|
5847
|
-
if (typeof itemOrder === "number") {
|
|
5848
|
-
itemOrder = itemOrder + 1;
|
|
5849
|
-
}
|
|
5850
|
-
return itemOrder;
|
|
5851
|
-
});
|
|
5852
|
-
const accordionDetailStyles = createMemo10(() => {
|
|
5853
|
-
const styles = {
|
|
5854
|
-
...{
|
|
5855
|
-
order: typeof openGridItemOrder() === "number" ? openGridItemOrder() : void 0
|
|
5856
|
-
},
|
|
5857
|
-
...props.grid && {
|
|
5858
|
-
width: "100%"
|
|
5859
|
-
}
|
|
5860
|
-
};
|
|
5861
|
-
return Object.fromEntries(
|
|
5862
|
-
Object.entries(styles).filter(([_, value]) => value !== void 0)
|
|
5863
|
-
);
|
|
5864
|
-
});
|
|
5865
|
-
function onClick(index) {
|
|
5866
|
-
if (open().includes(index)) {
|
|
5867
|
-
setOpen(onlyOneAtATime() ? [] : open().filter((item) => item !== index));
|
|
5868
|
-
} else {
|
|
5869
|
-
setOpen(onlyOneAtATime() ? [index] : open().concat(index));
|
|
5870
|
-
}
|
|
5871
|
-
}
|
|
5872
|
-
return <div class="builder-accordion" style={accordionStyles()}><For6 each={props.items}>{(item, _index) => {
|
|
5873
|
-
const index = _index();
|
|
5874
|
-
return <>
|
|
5875
|
-
<div
|
|
5876
|
-
class={getAccordionTitleClassName(index)}
|
|
5877
|
-
style={{
|
|
5878
|
-
...accordionTitleStyles(),
|
|
5879
|
-
width: props.grid ? props.gridRowWidth : void 0,
|
|
5880
|
-
...{
|
|
5881
|
-
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
5882
|
-
}
|
|
5883
|
-
}}
|
|
5884
|
-
data-index={index}
|
|
5885
|
-
onClick={(event) => onClick(index)}
|
|
5886
|
-
><Blocks_default
|
|
5887
|
-
blocks={item.title}
|
|
5888
|
-
path={`items.${index}.title`}
|
|
5889
|
-
parent={props.builderBlock.id}
|
|
5890
|
-
context={props.builderContext}
|
|
5891
|
-
registeredComponents={props.builderComponents}
|
|
5892
|
-
linkComponent={props.builderLinkComponent}
|
|
5893
|
-
/></div>
|
|
5894
|
-
<Show9 when={open().includes(index)}><div
|
|
5895
|
-
class={getAccordionDetailClassName(index)}
|
|
5896
|
-
style={accordionDetailStyles()}
|
|
5897
|
-
><Blocks_default
|
|
5898
|
-
blocks={item.detail}
|
|
5899
|
-
path={`items.${index}.detail`}
|
|
5900
|
-
parent={props.builderBlock.id}
|
|
5901
|
-
context={props.builderContext}
|
|
5902
|
-
registeredComponents={props.builderComponents}
|
|
5903
|
-
linkComponent={props.builderLinkComponent}
|
|
5904
|
-
/></div></Show9>
|
|
5905
|
-
</>;
|
|
5906
|
-
}}</For6></div>;
|
|
5907
|
-
}
|
|
5908
|
-
var accordion_default = Accordion;
|
|
5909
|
-
|
|
5910
|
-
// src/blocks/accordion/component-info.ts
|
|
5911
|
-
var defaultTitle = {
|
|
5807
|
+
// src/blocks/tabs/component-info.ts
|
|
5808
|
+
var defaultTab = {
|
|
5912
5809
|
"@type": "@builder.io/sdk:Element",
|
|
5913
|
-
layerName: "Accordion item title",
|
|
5914
5810
|
responsiveStyles: {
|
|
5915
5811
|
large: {
|
|
5916
|
-
|
|
5917
|
-
|
|
5812
|
+
paddingLeft: "20px",
|
|
5813
|
+
paddingRight: "20px",
|
|
5814
|
+
paddingTop: "10px",
|
|
5815
|
+
paddingBottom: "10px",
|
|
5816
|
+
minWidth: "100px",
|
|
5817
|
+
textAlign: "center",
|
|
5918
5818
|
display: "flex",
|
|
5919
|
-
alignItems: "stretch",
|
|
5920
5819
|
flexDirection: "column",
|
|
5921
|
-
|
|
5820
|
+
cursor: "pointer",
|
|
5821
|
+
userSelect: "none"
|
|
5922
5822
|
}
|
|
5923
5823
|
},
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
textAlign: "left",
|
|
5929
|
-
display: "flex",
|
|
5930
|
-
flexDirection: "column"
|
|
5931
|
-
}
|
|
5932
|
-
},
|
|
5933
|
-
component: {
|
|
5934
|
-
name: "Text",
|
|
5935
|
-
options: {
|
|
5936
|
-
text: "I am an accordion title. Click me!"
|
|
5937
|
-
}
|
|
5824
|
+
component: {
|
|
5825
|
+
name: "Text",
|
|
5826
|
+
options: {
|
|
5827
|
+
text: "New tab"
|
|
5938
5828
|
}
|
|
5939
|
-
}
|
|
5829
|
+
}
|
|
5940
5830
|
};
|
|
5941
|
-
var
|
|
5831
|
+
var defaultElement = {
|
|
5942
5832
|
"@type": "@builder.io/sdk:Element",
|
|
5943
|
-
layerName: "Accordion item detail",
|
|
5944
5833
|
responsiveStyles: {
|
|
5945
5834
|
large: {
|
|
5946
|
-
|
|
5835
|
+
height: "200px",
|
|
5947
5836
|
display: "flex",
|
|
5948
|
-
|
|
5949
|
-
flexDirection: "column"
|
|
5950
|
-
marginTop: "10px",
|
|
5951
|
-
paddingBottom: "10px"
|
|
5837
|
+
marginTop: "20px",
|
|
5838
|
+
flexDirection: "column"
|
|
5952
5839
|
}
|
|
5953
5840
|
},
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
paddingTop: "50px",
|
|
5959
|
-
textAlign: "left",
|
|
5960
|
-
display: "flex",
|
|
5961
|
-
flexDirection: "column",
|
|
5962
|
-
paddingBottom: "50px"
|
|
5963
|
-
}
|
|
5964
|
-
},
|
|
5965
|
-
component: {
|
|
5966
|
-
name: "Text",
|
|
5967
|
-
options: {
|
|
5968
|
-
text: "I am an accordion detail, hello!"
|
|
5969
|
-
}
|
|
5841
|
+
component: {
|
|
5842
|
+
name: "Text",
|
|
5843
|
+
options: {
|
|
5844
|
+
text: "New tab content "
|
|
5970
5845
|
}
|
|
5971
|
-
}
|
|
5846
|
+
}
|
|
5972
5847
|
};
|
|
5973
|
-
var
|
|
5974
|
-
name: "Builder:
|
|
5975
|
-
canHaveChildren: true,
|
|
5976
|
-
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
5977
|
-
defaultStyles: {
|
|
5978
|
-
display: "flex",
|
|
5979
|
-
flexDirection: "column",
|
|
5980
|
-
alignItems: "stretch"
|
|
5981
|
-
},
|
|
5848
|
+
var componentInfo9 = {
|
|
5849
|
+
name: "Builder: Tabs",
|
|
5982
5850
|
inputs: [{
|
|
5983
|
-
name: "
|
|
5851
|
+
name: "tabs",
|
|
5984
5852
|
type: "list",
|
|
5985
5853
|
broadcast: true,
|
|
5986
5854
|
subFields: [{
|
|
5987
|
-
name: "
|
|
5855
|
+
name: "label",
|
|
5988
5856
|
type: "uiBlocks",
|
|
5989
5857
|
hideFromUI: true,
|
|
5990
|
-
defaultValue: [
|
|
5858
|
+
defaultValue: [defaultTab]
|
|
5991
5859
|
}, {
|
|
5992
|
-
name: "
|
|
5860
|
+
name: "content",
|
|
5993
5861
|
type: "uiBlocks",
|
|
5994
5862
|
hideFromUI: true,
|
|
5995
|
-
defaultValue: [
|
|
5863
|
+
defaultValue: [defaultElement]
|
|
5996
5864
|
}],
|
|
5997
5865
|
defaultValue: [{
|
|
5998
|
-
|
|
5999
|
-
|
|
5866
|
+
label: [{
|
|
5867
|
+
...defaultTab,
|
|
5868
|
+
component: {
|
|
5869
|
+
name: "Text",
|
|
5870
|
+
options: {
|
|
5871
|
+
text: "Tab 1"
|
|
5872
|
+
}
|
|
5873
|
+
}
|
|
5874
|
+
}],
|
|
5875
|
+
content: [{
|
|
5876
|
+
...defaultElement,
|
|
5877
|
+
component: {
|
|
5878
|
+
name: "Text",
|
|
5879
|
+
options: {
|
|
5880
|
+
text: "Tab 1 content"
|
|
5881
|
+
}
|
|
5882
|
+
}
|
|
5883
|
+
}]
|
|
6000
5884
|
}, {
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
5885
|
+
label: [{
|
|
5886
|
+
...defaultTab,
|
|
5887
|
+
component: {
|
|
5888
|
+
name: "Text",
|
|
5889
|
+
options: {
|
|
5890
|
+
text: "Tab 2"
|
|
5891
|
+
}
|
|
5892
|
+
}
|
|
5893
|
+
}],
|
|
5894
|
+
content: [{
|
|
5895
|
+
...defaultElement,
|
|
5896
|
+
component: {
|
|
5897
|
+
name: "Text",
|
|
5898
|
+
options: {
|
|
5899
|
+
text: "Tab 2 content"
|
|
5900
|
+
}
|
|
5901
|
+
}
|
|
5902
|
+
}]
|
|
5903
|
+
}]
|
|
6010
5904
|
}, {
|
|
6011
|
-
name: "
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
defaultValue:
|
|
5905
|
+
name: "activeTabStyle",
|
|
5906
|
+
type: "uiStyle",
|
|
5907
|
+
helperText: "CSS styles for the active tab",
|
|
5908
|
+
defaultValue: {
|
|
5909
|
+
backgroundColor: "rgba(0, 0, 0, 0.1)"
|
|
5910
|
+
}
|
|
6015
5911
|
}, {
|
|
6016
|
-
name: "
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
5912
|
+
name: "defaultActiveTab",
|
|
5913
|
+
type: "number",
|
|
5914
|
+
helperText: 'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',
|
|
5915
|
+
defaultValue: 1,
|
|
5916
|
+
advanced: true
|
|
6021
5917
|
}, {
|
|
6022
|
-
name: "
|
|
5918
|
+
name: "collapsible",
|
|
6023
5919
|
type: "boolean",
|
|
6024
|
-
helperText: "
|
|
6025
|
-
advanced: true,
|
|
5920
|
+
helperText: "If on, clicking an open tab closes it so no tabs are active",
|
|
6026
5921
|
defaultValue: false,
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
5922
|
+
advanced: true
|
|
5923
|
+
}, {
|
|
5924
|
+
name: "tabHeaderLayout",
|
|
5925
|
+
type: "enum",
|
|
5926
|
+
helperText: "Change the layout of the tab headers (uses justify-content)",
|
|
5927
|
+
defaultValue: "flex-start",
|
|
5928
|
+
enum: [{
|
|
5929
|
+
label: "Center",
|
|
5930
|
+
value: "center"
|
|
5931
|
+
}, {
|
|
5932
|
+
label: "Space between",
|
|
5933
|
+
value: "space-between"
|
|
5934
|
+
}, {
|
|
5935
|
+
label: "Space around",
|
|
5936
|
+
value: "space-around"
|
|
5937
|
+
}, {
|
|
5938
|
+
label: "Left",
|
|
5939
|
+
value: "flex-start"
|
|
5940
|
+
}, {
|
|
5941
|
+
label: "Right",
|
|
5942
|
+
value: "flex-end"
|
|
5943
|
+
}]
|
|
6032
5944
|
}]
|
|
6033
5945
|
};
|
|
6034
5946
|
|
|
5947
|
+
// src/blocks/tabs/tabs.tsx
|
|
5948
|
+
import { Show as Show9, For as For6, createSignal as createSignal10 } from "solid-js";
|
|
5949
|
+
function Tabs(props) {
|
|
5950
|
+
const [activeTab, setActiveTab] = createSignal10(
|
|
5951
|
+
props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
|
|
5952
|
+
);
|
|
5953
|
+
function activeTabContent(active) {
|
|
5954
|
+
return props.tabs && props.tabs[active].content;
|
|
5955
|
+
}
|
|
5956
|
+
function onClick(index) {
|
|
5957
|
+
if (index === activeTab() && props.collapsible) {
|
|
5958
|
+
setActiveTab(-1);
|
|
5959
|
+
} else {
|
|
5960
|
+
setActiveTab(index);
|
|
5961
|
+
}
|
|
5962
|
+
}
|
|
5963
|
+
return <div>
|
|
5964
|
+
<div
|
|
5965
|
+
class="builder-tabs-wrap"
|
|
5966
|
+
style={{
|
|
5967
|
+
display: "flex",
|
|
5968
|
+
"flex-direction": "row",
|
|
5969
|
+
"justify-content": props.tabHeaderLayout || "flex-start",
|
|
5970
|
+
overflow: "auto"
|
|
5971
|
+
}}
|
|
5972
|
+
><For6 each={props.tabs}>{(tab, _index) => {
|
|
5973
|
+
const index = _index();
|
|
5974
|
+
return <span
|
|
5975
|
+
class={`builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`}
|
|
5976
|
+
key={index}
|
|
5977
|
+
style={{
|
|
5978
|
+
...activeTab() === index ? props.activeTabStyle : {}
|
|
5979
|
+
}}
|
|
5980
|
+
onClick={(event) => onClick(index)}
|
|
5981
|
+
><Blocks_default
|
|
5982
|
+
parent={props.builderBlock.id}
|
|
5983
|
+
path={`component.options.tabs.${index}.label`}
|
|
5984
|
+
blocks={tab.label}
|
|
5985
|
+
context={props.builderContext}
|
|
5986
|
+
registeredComponents={props.builderComponents}
|
|
5987
|
+
linkComponent={props.builderLinkComponent}
|
|
5988
|
+
/></span>;
|
|
5989
|
+
}}</For6></div>
|
|
5990
|
+
<Show9 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
5991
|
+
parent={props.builderBlock.id}
|
|
5992
|
+
path={`component.options.tabs.${activeTab()}.content`}
|
|
5993
|
+
blocks={activeTabContent(activeTab())}
|
|
5994
|
+
context={props.builderContext}
|
|
5995
|
+
registeredComponents={props.builderComponents}
|
|
5996
|
+
linkComponent={props.builderLinkComponent}
|
|
5997
|
+
/></div></Show9>
|
|
5998
|
+
</div>;
|
|
5999
|
+
}
|
|
6000
|
+
var tabs_default = Tabs;
|
|
6001
|
+
|
|
6002
|
+
// src/blocks/text/component-info.ts
|
|
6003
|
+
var componentInfo10 = {
|
|
6004
|
+
name: "Text",
|
|
6005
|
+
static: true,
|
|
6006
|
+
isRSC: true,
|
|
6007
|
+
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
|
|
6008
|
+
inputs: [{
|
|
6009
|
+
name: "text",
|
|
6010
|
+
type: "html",
|
|
6011
|
+
required: true,
|
|
6012
|
+
autoFocus: true,
|
|
6013
|
+
bubble: true,
|
|
6014
|
+
defaultValue: "Enter some text..."
|
|
6015
|
+
}],
|
|
6016
|
+
defaultStyles: {
|
|
6017
|
+
lineHeight: "normal",
|
|
6018
|
+
height: "auto",
|
|
6019
|
+
textAlign: "center"
|
|
6020
|
+
}
|
|
6021
|
+
};
|
|
6022
|
+
|
|
6023
|
+
// src/blocks/text/text.tsx
|
|
6024
|
+
function Text(props) {
|
|
6025
|
+
return <div
|
|
6026
|
+
class="builder-text"
|
|
6027
|
+
innerHTML={props.text?.toString() || ""}
|
|
6028
|
+
style={{
|
|
6029
|
+
outline: "none"
|
|
6030
|
+
}}
|
|
6031
|
+
/>;
|
|
6032
|
+
}
|
|
6033
|
+
var text_default = Text;
|
|
6034
|
+
|
|
6035
6035
|
// src/blocks/custom-code/component-info.ts
|
|
6036
6036
|
var componentInfo11 = {
|
|
6037
6037
|
name: "Custom Code",
|
|
@@ -6472,13 +6472,11 @@ function FormComponent(props) {
|
|
|
6472
6472
|
return;
|
|
6473
6473
|
}
|
|
6474
6474
|
event.preventDefault();
|
|
6475
|
-
const el = event.currentTarget;
|
|
6475
|
+
const el = event.currentTarget || event.target;
|
|
6476
6476
|
const headers = props.customHeaders || {};
|
|
6477
6477
|
let body;
|
|
6478
6478
|
const formData = new FormData(el);
|
|
6479
|
-
const formPairs = Array.from(
|
|
6480
|
-
event.currentTarget.querySelectorAll("input,select,textarea")
|
|
6481
|
-
).filter((el2) => !!el2.name).map((el2) => {
|
|
6479
|
+
const formPairs = Array.from(el.querySelectorAll("input,select,textarea")).filter((el2) => !!el2.name).map((el2) => {
|
|
6482
6480
|
let value;
|
|
6483
6481
|
const key = el2.name;
|
|
6484
6482
|
if (el2 instanceof HTMLInputElement) {
|
|
@@ -6641,6 +6639,7 @@ function FormComponent(props) {
|
|
|
6641
6639
|
name={props.name}
|
|
6642
6640
|
onSubmit={(event) => onSubmit(event)}
|
|
6643
6641
|
{...{}}
|
|
6642
|
+
{...{}}
|
|
6644
6643
|
{...props.attributes}
|
|
6645
6644
|
>
|
|
6646
6645
|
<Show10 when={props.builderBlock && props.builderBlock.children}><For7 each={props.builderBlock?.children}>{(block, _index) => {
|
|
@@ -7079,34 +7078,34 @@ var getExtraComponents = () => [{
|
|
|
7079
7078
|
// src/constants/builder-registered-components.ts
|
|
7080
7079
|
var getDefaultRegisteredComponents = () => [{
|
|
7081
7080
|
component: button_default,
|
|
7082
|
-
...
|
|
7081
|
+
...componentInfo2
|
|
7083
7082
|
}, {
|
|
7084
7083
|
component: columns_default,
|
|
7085
|
-
...
|
|
7084
|
+
...componentInfo3
|
|
7086
7085
|
}, {
|
|
7087
7086
|
component: fragment_default,
|
|
7088
|
-
...
|
|
7087
|
+
...componentInfo4
|
|
7089
7088
|
}, {
|
|
7090
7089
|
component: image_default,
|
|
7091
|
-
...
|
|
7090
|
+
...componentInfo5
|
|
7092
7091
|
}, {
|
|
7093
7092
|
component: section_default,
|
|
7094
|
-
...
|
|
7093
|
+
...componentInfo6
|
|
7095
7094
|
}, {
|
|
7096
7095
|
component: slot_default,
|
|
7097
|
-
...
|
|
7096
|
+
...componentInfo7
|
|
7098
7097
|
}, {
|
|
7099
7098
|
component: symbol_default,
|
|
7100
|
-
...
|
|
7099
|
+
...componentInfo8
|
|
7101
7100
|
}, {
|
|
7102
7101
|
component: text_default,
|
|
7103
|
-
...
|
|
7102
|
+
...componentInfo10
|
|
7104
7103
|
}, ...TARGET === "rsc" ? [] : [{
|
|
7105
7104
|
component: tabs_default,
|
|
7106
|
-
...
|
|
7105
|
+
...componentInfo9
|
|
7107
7106
|
}, {
|
|
7108
7107
|
component: accordion_default,
|
|
7109
|
-
...
|
|
7108
|
+
...componentInfo
|
|
7110
7109
|
}], ...getExtraComponents()];
|
|
7111
7110
|
|
|
7112
7111
|
// src/functions/register-component.ts
|
|
@@ -7690,7 +7689,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7690
7689
|
}
|
|
7691
7690
|
|
|
7692
7691
|
// src/constants/sdk-version.ts
|
|
7693
|
-
var SDK_VERSION = "1.0.
|
|
7692
|
+
var SDK_VERSION = "1.0.30";
|
|
7694
7693
|
|
|
7695
7694
|
// src/functions/register.ts
|
|
7696
7695
|
var registry = {};
|
|
@@ -8171,7 +8170,7 @@ function EnableEditor(props) {
|
|
|
8171
8170
|
const searchParams = new URL(location.href).searchParams;
|
|
8172
8171
|
const searchParamPreviewModel = searchParams.get("builder.preview");
|
|
8173
8172
|
const searchParamPreviewId = searchParams.get(
|
|
8174
|
-
`builder.
|
|
8173
|
+
`builder.overrides.${searchParamPreviewModel}`
|
|
8175
8174
|
);
|
|
8176
8175
|
const previewApiKey = searchParams.get("apiKey") || searchParams.get("builder.space");
|
|
8177
8176
|
if (searchParamPreviewModel === props.model && previewApiKey === props.apiKey && (!props.content || searchParamPreviewId === props.content.id)) {
|