@builder.io/sdk-solid 1.0.27 → 1.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/lib/browser/dev.js +409 -95
- package/lib/browser/dev.jsx +421 -144
- package/lib/browser/index.js +409 -95
- package/lib/browser/index.jsx +421 -144
- package/lib/edge/dev.js +409 -95
- package/lib/edge/dev.jsx +421 -144
- package/lib/edge/index.js +409 -95
- package/lib/edge/index.jsx +421 -144
- package/lib/node/dev.js +409 -95
- package/lib/node/dev.jsx +421 -144
- package/lib/node/index.js +409 -95
- package/lib/node/index.jsx +421 -144
- package/package.json +3 -3
package/lib/edge/index.js
CHANGED
|
@@ -3634,6 +3634,9 @@ function getProcessedBlock({
|
|
|
3634
3634
|
}
|
|
3635
3635
|
}
|
|
3636
3636
|
|
|
3637
|
+
// src/functions/camel-to-kebab-case.ts
|
|
3638
|
+
var camelToKebabCase = (str) => str ? str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
3639
|
+
|
|
3637
3640
|
// src/components/block/animator.ts
|
|
3638
3641
|
function throttle(func, wait, options = {}) {
|
|
3639
3642
|
let context;
|
|
@@ -3684,7 +3687,6 @@ function assign(target, ..._args) {
|
|
|
3684
3687
|
}
|
|
3685
3688
|
return to;
|
|
3686
3689
|
}
|
|
3687
|
-
var camelCaseToKebabCase = (str) => str ? str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`) : "";
|
|
3688
3690
|
function bindAnimations(animations) {
|
|
3689
3691
|
for (const animation of animations) {
|
|
3690
3692
|
switch (animation.trigger) {
|
|
@@ -3736,7 +3738,7 @@ function triggerAnimation(animation) {
|
|
|
3736
3738
|
element.style.transitionDelay = "0";
|
|
3737
3739
|
assign(element.style, animation.steps[0].styles);
|
|
3738
3740
|
setTimeout(() => {
|
|
3739
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
3741
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
3740
3742
|
if (animation.delay) {
|
|
3741
3743
|
element.style.transitionDelay = animation.delay + "s";
|
|
3742
3744
|
}
|
|
@@ -3796,7 +3798,7 @@ function bindScrollInViewAnimation(animation) {
|
|
|
3796
3798
|
}
|
|
3797
3799
|
attachDefaultState();
|
|
3798
3800
|
setTimeout(() => {
|
|
3799
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
3801
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
3800
3802
|
if (animation.delay) {
|
|
3801
3803
|
element.style.transitionDelay = animation.delay + "s";
|
|
3802
3804
|
}
|
|
@@ -3809,9 +3811,6 @@ function bindScrollInViewAnimation(animation) {
|
|
|
3809
3811
|
});
|
|
3810
3812
|
}
|
|
3811
3813
|
|
|
3812
|
-
// src/functions/camel-to-kebab-case.ts
|
|
3813
|
-
var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
|
|
3814
|
-
|
|
3815
3814
|
// src/helpers/css.ts
|
|
3816
3815
|
var convertStyleMapToCSSArray = (style) => {
|
|
3817
3816
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
@@ -3938,10 +3937,10 @@ var getRepeatItemData = ({
|
|
|
3938
3937
|
return repeatArray;
|
|
3939
3938
|
};
|
|
3940
3939
|
var shouldPassLinkComponent = (block) => {
|
|
3941
|
-
return block && (block.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(block.name));
|
|
3940
|
+
return block && (block.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(block.name));
|
|
3942
3941
|
};
|
|
3943
3942
|
var shouldPassRegisteredComponents = (block) => {
|
|
3944
|
-
return block && (block.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(block.name));
|
|
3943
|
+
return block && (block.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(block.name));
|
|
3945
3944
|
};
|
|
3946
3945
|
|
|
3947
3946
|
// src/constants/device-sizes.ts
|
|
@@ -4070,7 +4069,7 @@ function BlockStyles(props) {
|
|
|
4070
4069
|
className: `${className}:hover`,
|
|
4071
4070
|
styles: {
|
|
4072
4071
|
...hoverStyles,
|
|
4073
|
-
transition: `all ${hoverAnimation.duration}s ${
|
|
4072
|
+
transition: `all ${hoverAnimation.duration}s ${camelToKebabCase(hoverAnimation.easing)}`,
|
|
4074
4073
|
transitionDelay: hoverAnimation.delay ? `${hoverAnimation.delay}s` : "0s"
|
|
4075
4074
|
}
|
|
4076
4075
|
}) || "";
|
|
@@ -5276,8 +5275,320 @@ var handleABTesting = async ({
|
|
|
5276
5275
|
// src/helpers/canTrack.ts
|
|
5277
5276
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
5278
5277
|
|
|
5279
|
-
// src/blocks/
|
|
5278
|
+
// src/blocks/accordion/component-info.ts
|
|
5279
|
+
var defaultTitle = {
|
|
5280
|
+
"@type": "@builder.io/sdk:Element",
|
|
5281
|
+
layerName: "Accordion item title",
|
|
5282
|
+
responsiveStyles: {
|
|
5283
|
+
large: {
|
|
5284
|
+
marginTop: "10px",
|
|
5285
|
+
position: "relative",
|
|
5286
|
+
display: "flex",
|
|
5287
|
+
alignItems: "stretch",
|
|
5288
|
+
flexDirection: "column",
|
|
5289
|
+
paddingBottom: "10px"
|
|
5290
|
+
}
|
|
5291
|
+
},
|
|
5292
|
+
children: [{
|
|
5293
|
+
"@type": "@builder.io/sdk:Element",
|
|
5294
|
+
responsiveStyles: {
|
|
5295
|
+
large: {
|
|
5296
|
+
textAlign: "left",
|
|
5297
|
+
display: "flex",
|
|
5298
|
+
flexDirection: "column"
|
|
5299
|
+
}
|
|
5300
|
+
},
|
|
5301
|
+
component: {
|
|
5302
|
+
name: "Text",
|
|
5303
|
+
options: {
|
|
5304
|
+
text: "I am an accordion title. Click me!"
|
|
5305
|
+
}
|
|
5306
|
+
}
|
|
5307
|
+
}]
|
|
5308
|
+
};
|
|
5309
|
+
var defaultDetail = {
|
|
5310
|
+
"@type": "@builder.io/sdk:Element",
|
|
5311
|
+
layerName: "Accordion item detail",
|
|
5312
|
+
responsiveStyles: {
|
|
5313
|
+
large: {
|
|
5314
|
+
position: "relative",
|
|
5315
|
+
display: "flex",
|
|
5316
|
+
alignItems: "stretch",
|
|
5317
|
+
flexDirection: "column",
|
|
5318
|
+
marginTop: "10px",
|
|
5319
|
+
paddingBottom: "10px"
|
|
5320
|
+
}
|
|
5321
|
+
},
|
|
5322
|
+
children: [{
|
|
5323
|
+
"@type": "@builder.io/sdk:Element",
|
|
5324
|
+
responsiveStyles: {
|
|
5325
|
+
large: {
|
|
5326
|
+
paddingTop: "50px",
|
|
5327
|
+
textAlign: "left",
|
|
5328
|
+
display: "flex",
|
|
5329
|
+
flexDirection: "column",
|
|
5330
|
+
paddingBottom: "50px"
|
|
5331
|
+
}
|
|
5332
|
+
},
|
|
5333
|
+
component: {
|
|
5334
|
+
name: "Text",
|
|
5335
|
+
options: {
|
|
5336
|
+
text: "I am an accordion detail, hello!"
|
|
5337
|
+
}
|
|
5338
|
+
}
|
|
5339
|
+
}]
|
|
5340
|
+
};
|
|
5280
5341
|
var componentInfo = {
|
|
5342
|
+
name: "Builder:Accordion",
|
|
5343
|
+
canHaveChildren: true,
|
|
5344
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
5345
|
+
defaultStyles: {
|
|
5346
|
+
display: "flex",
|
|
5347
|
+
flexDirection: "column",
|
|
5348
|
+
alignItems: "stretch"
|
|
5349
|
+
},
|
|
5350
|
+
inputs: [{
|
|
5351
|
+
name: "items",
|
|
5352
|
+
type: "list",
|
|
5353
|
+
broadcast: true,
|
|
5354
|
+
subFields: [{
|
|
5355
|
+
name: "title",
|
|
5356
|
+
type: "uiBlocks",
|
|
5357
|
+
hideFromUI: true,
|
|
5358
|
+
defaultValue: [defaultTitle]
|
|
5359
|
+
}, {
|
|
5360
|
+
name: "detail",
|
|
5361
|
+
type: "uiBlocks",
|
|
5362
|
+
hideFromUI: true,
|
|
5363
|
+
defaultValue: [defaultDetail]
|
|
5364
|
+
}],
|
|
5365
|
+
defaultValue: [{
|
|
5366
|
+
title: [defaultTitle],
|
|
5367
|
+
detail: [defaultDetail]
|
|
5368
|
+
}, {
|
|
5369
|
+
title: [defaultTitle],
|
|
5370
|
+
detail: [defaultDetail]
|
|
5371
|
+
}],
|
|
5372
|
+
showIf: (options) => !options.get("useChildrenForItems")
|
|
5373
|
+
}, {
|
|
5374
|
+
name: "oneAtATime",
|
|
5375
|
+
helperText: "Only allow opening one at a time (collapse all others when new item openned)",
|
|
5376
|
+
type: "boolean",
|
|
5377
|
+
defaultValue: false
|
|
5378
|
+
}, {
|
|
5379
|
+
name: "grid",
|
|
5380
|
+
helperText: "Display as a grid",
|
|
5381
|
+
type: "boolean",
|
|
5382
|
+
defaultValue: false
|
|
5383
|
+
}, {
|
|
5384
|
+
name: "gridRowWidth",
|
|
5385
|
+
helperText: "Display as a grid",
|
|
5386
|
+
type: "string",
|
|
5387
|
+
showIf: (options) => options.get("grid"),
|
|
5388
|
+
defaultValue: "25%"
|
|
5389
|
+
}, {
|
|
5390
|
+
name: "useChildrenForItems",
|
|
5391
|
+
type: "boolean",
|
|
5392
|
+
helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
|
|
5393
|
+
advanced: true,
|
|
5394
|
+
defaultValue: false,
|
|
5395
|
+
onChange: (options) => {
|
|
5396
|
+
if (options.get("useChildrenForItems") === true) {
|
|
5397
|
+
options.set("items", []);
|
|
5398
|
+
}
|
|
5399
|
+
}
|
|
5400
|
+
}]
|
|
5401
|
+
};
|
|
5402
|
+
|
|
5403
|
+
// src/blocks/accordion/helpers.ts
|
|
5404
|
+
var convertOrderNumberToString = (order) => {
|
|
5405
|
+
return order.toString();
|
|
5406
|
+
};
|
|
5407
|
+
|
|
5408
|
+
// src/blocks/accordion/accordion.tsx
|
|
5409
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
|
|
5410
|
+
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
5411
|
+
function Accordion(props) {
|
|
5412
|
+
const [open, setOpen] = createSignal([]);
|
|
5413
|
+
const onlyOneAtATime = createMemo(() => {
|
|
5414
|
+
return Boolean(props.grid || props.oneAtATime);
|
|
5415
|
+
});
|
|
5416
|
+
const accordionStyles = createMemo(() => {
|
|
5417
|
+
const styles = {
|
|
5418
|
+
display: "flex",
|
|
5419
|
+
alignItems: "stretch",
|
|
5420
|
+
flexDirection: "column",
|
|
5421
|
+
...props.grid && {
|
|
5422
|
+
flexDirection: "row",
|
|
5423
|
+
alignItems: "flex-start",
|
|
5424
|
+
flexWrap: "wrap"
|
|
5425
|
+
}
|
|
5426
|
+
};
|
|
5427
|
+
return Object.fromEntries(Object.entries(styles).map(([key, value]) => [camelToKebabCase(key), value]));
|
|
5428
|
+
});
|
|
5429
|
+
const accordionTitleStyles = createMemo(() => {
|
|
5430
|
+
const shared = {
|
|
5431
|
+
display: "flex",
|
|
5432
|
+
flexDirection: "column"
|
|
5433
|
+
};
|
|
5434
|
+
const styles = Object.fromEntries(Object.entries({
|
|
5435
|
+
...shared,
|
|
5436
|
+
alignItems: "stretch",
|
|
5437
|
+
cursor: "pointer"
|
|
5438
|
+
}).map(([key, value]) => [camelToKebabCase(key), value]));
|
|
5439
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
5440
|
+
});
|
|
5441
|
+
function getAccordionTitleClassName(index) {
|
|
5442
|
+
return `builder-accordion-title builder-accordion-title-${open().includes(index) ? "open" : "closed"}`;
|
|
5443
|
+
}
|
|
5444
|
+
function getAccordionDetailClassName(index) {
|
|
5445
|
+
return `builder-accordion-detail builder-accordion-detail-${open().includes(index) ? "open" : "closed"}`;
|
|
5446
|
+
}
|
|
5447
|
+
const openGridItemOrder = createMemo(() => {
|
|
5448
|
+
let itemOrder = null;
|
|
5449
|
+
const getOpenGridItemPosition = props.grid && open().length;
|
|
5450
|
+
if (getOpenGridItemPosition && document) {
|
|
5451
|
+
const openItemIndex = open()[0];
|
|
5452
|
+
const openItem = document.querySelector(`.builder-accordion-title[data-index="${openItemIndex}"]`);
|
|
5453
|
+
let subjectItem = openItem;
|
|
5454
|
+
itemOrder = openItemIndex;
|
|
5455
|
+
if (subjectItem) {
|
|
5456
|
+
let prevItemRect = subjectItem.getBoundingClientRect();
|
|
5457
|
+
while (subjectItem = subjectItem && subjectItem.nextElementSibling) {
|
|
5458
|
+
if (subjectItem) {
|
|
5459
|
+
if (subjectItem.classList.contains("builder-accordion-detail")) {
|
|
5460
|
+
continue;
|
|
5461
|
+
}
|
|
5462
|
+
const subjectItemRect = subjectItem.getBoundingClientRect();
|
|
5463
|
+
if (subjectItemRect.left > prevItemRect.left) {
|
|
5464
|
+
const index = parseInt(subjectItem.getAttribute("data-index") || "", 10);
|
|
5465
|
+
if (!isNaN(index)) {
|
|
5466
|
+
prevItemRect = subjectItemRect;
|
|
5467
|
+
itemOrder = index;
|
|
5468
|
+
}
|
|
5469
|
+
} else {
|
|
5470
|
+
break;
|
|
5471
|
+
}
|
|
5472
|
+
}
|
|
5473
|
+
}
|
|
5474
|
+
}
|
|
5475
|
+
}
|
|
5476
|
+
if (typeof itemOrder === "number") {
|
|
5477
|
+
itemOrder = itemOrder + 1;
|
|
5478
|
+
}
|
|
5479
|
+
return itemOrder;
|
|
5480
|
+
});
|
|
5481
|
+
const accordionDetailStyles = createMemo(() => {
|
|
5482
|
+
const styles = {
|
|
5483
|
+
...{
|
|
5484
|
+
order: typeof openGridItemOrder() === "number" ? openGridItemOrder() : void 0
|
|
5485
|
+
},
|
|
5486
|
+
...props.grid && {
|
|
5487
|
+
width: "100%"
|
|
5488
|
+
}
|
|
5489
|
+
};
|
|
5490
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
5491
|
+
});
|
|
5492
|
+
function onClick(index) {
|
|
5493
|
+
if (open().includes(index)) {
|
|
5494
|
+
setOpen(onlyOneAtATime() ? [] : open().filter((item) => item !== index));
|
|
5495
|
+
} else {
|
|
5496
|
+
setOpen(onlyOneAtATime() ? [index] : open().concat(index));
|
|
5497
|
+
}
|
|
5498
|
+
}
|
|
5499
|
+
return (() => {
|
|
5500
|
+
const _el$ = _tmpl$6();
|
|
5501
|
+
insert(_el$, createComponent(For, {
|
|
5502
|
+
get each() {
|
|
5503
|
+
return props.items;
|
|
5504
|
+
},
|
|
5505
|
+
children: (item, _index) => {
|
|
5506
|
+
const index = _index();
|
|
5507
|
+
return [(() => {
|
|
5508
|
+
const _el$2 = _tmpl$23();
|
|
5509
|
+
_el$2.$$click = (event) => onClick(index);
|
|
5510
|
+
setAttribute(_el$2, "data-index", index);
|
|
5511
|
+
insert(_el$2, createComponent(blocks_default, {
|
|
5512
|
+
get blocks() {
|
|
5513
|
+
return item.title;
|
|
5514
|
+
},
|
|
5515
|
+
path: `items.${index}.title`,
|
|
5516
|
+
get parent() {
|
|
5517
|
+
return props.builderBlock.id;
|
|
5518
|
+
},
|
|
5519
|
+
get context() {
|
|
5520
|
+
return props.builderContext;
|
|
5521
|
+
},
|
|
5522
|
+
get registeredComponents() {
|
|
5523
|
+
return props.builderComponents;
|
|
5524
|
+
},
|
|
5525
|
+
get linkComponent() {
|
|
5526
|
+
return props.builderLinkComponent;
|
|
5527
|
+
}
|
|
5528
|
+
}));
|
|
5529
|
+
effect((_p$) => {
|
|
5530
|
+
const _v$ = getAccordionTitleClassName(index), _v$2 = {
|
|
5531
|
+
...accordionTitleStyles(),
|
|
5532
|
+
width: props.grid ? props.gridRowWidth : void 0,
|
|
5533
|
+
...{
|
|
5534
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
5535
|
+
}
|
|
5536
|
+
};
|
|
5537
|
+
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
5538
|
+
_p$._v$2 = style(_el$2, _v$2, _p$._v$2);
|
|
5539
|
+
return _p$;
|
|
5540
|
+
}, {
|
|
5541
|
+
_v$: void 0,
|
|
5542
|
+
_v$2: void 0
|
|
5543
|
+
});
|
|
5544
|
+
return _el$2;
|
|
5545
|
+
})(), createComponent(Show, {
|
|
5546
|
+
get when() {
|
|
5547
|
+
return open().includes(index);
|
|
5548
|
+
},
|
|
5549
|
+
get children() {
|
|
5550
|
+
const _el$3 = _tmpl$23();
|
|
5551
|
+
insert(_el$3, createComponent(blocks_default, {
|
|
5552
|
+
get blocks() {
|
|
5553
|
+
return item.detail;
|
|
5554
|
+
},
|
|
5555
|
+
path: `items.${index}.detail`,
|
|
5556
|
+
get parent() {
|
|
5557
|
+
return props.builderBlock.id;
|
|
5558
|
+
},
|
|
5559
|
+
get context() {
|
|
5560
|
+
return props.builderContext;
|
|
5561
|
+
},
|
|
5562
|
+
get registeredComponents() {
|
|
5563
|
+
return props.builderComponents;
|
|
5564
|
+
},
|
|
5565
|
+
get linkComponent() {
|
|
5566
|
+
return props.builderLinkComponent;
|
|
5567
|
+
}
|
|
5568
|
+
}));
|
|
5569
|
+
effect((_p$) => {
|
|
5570
|
+
const _v$3 = getAccordionDetailClassName(index), _v$4 = accordionDetailStyles();
|
|
5571
|
+
_v$3 !== _p$._v$3 && className(_el$3, _p$._v$3 = _v$3);
|
|
5572
|
+
_p$._v$4 = style(_el$3, _v$4, _p$._v$4);
|
|
5573
|
+
return _p$;
|
|
5574
|
+
}, {
|
|
5575
|
+
_v$3: void 0,
|
|
5576
|
+
_v$4: void 0
|
|
5577
|
+
});
|
|
5578
|
+
return _el$3;
|
|
5579
|
+
}
|
|
5580
|
+
})];
|
|
5581
|
+
}
|
|
5582
|
+
}));
|
|
5583
|
+
effect((_$p) => style(_el$, accordionStyles(), _$p));
|
|
5584
|
+
return _el$;
|
|
5585
|
+
})();
|
|
5586
|
+
}
|
|
5587
|
+
var accordion_default = Accordion;
|
|
5588
|
+
delegateEvents(["click"]);
|
|
5589
|
+
|
|
5590
|
+
// src/blocks/button/component-info.ts
|
|
5591
|
+
var componentInfo2 = {
|
|
5281
5592
|
name: "Core:Button",
|
|
5282
5593
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
5283
5594
|
defaultStyles: {
|
|
@@ -5313,7 +5624,7 @@ var componentInfo = {
|
|
|
5313
5624
|
};
|
|
5314
5625
|
|
|
5315
5626
|
// src/blocks/columns/component-info.ts
|
|
5316
|
-
var
|
|
5627
|
+
var componentInfo3 = {
|
|
5317
5628
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
5318
5629
|
name: "Columns",
|
|
5319
5630
|
isRSC: true,
|
|
@@ -5533,7 +5844,7 @@ var componentInfo2 = {
|
|
|
5533
5844
|
};
|
|
5534
5845
|
|
|
5535
5846
|
// src/blocks/fragment/component-info.ts
|
|
5536
|
-
var
|
|
5847
|
+
var componentInfo4 = {
|
|
5537
5848
|
name: "Fragment",
|
|
5538
5849
|
static: true,
|
|
5539
5850
|
hidden: true,
|
|
@@ -5542,7 +5853,7 @@ var componentInfo3 = {
|
|
|
5542
5853
|
};
|
|
5543
5854
|
|
|
5544
5855
|
// src/blocks/image/component-info.ts
|
|
5545
|
-
var
|
|
5856
|
+
var componentInfo5 = {
|
|
5546
5857
|
name: "Image",
|
|
5547
5858
|
static: true,
|
|
5548
5859
|
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",
|
|
@@ -5664,7 +5975,7 @@ var componentInfo4 = {
|
|
|
5664
5975
|
};
|
|
5665
5976
|
|
|
5666
5977
|
// src/blocks/section/component-info.ts
|
|
5667
|
-
var
|
|
5978
|
+
var componentInfo6 = {
|
|
5668
5979
|
name: "Core:Section",
|
|
5669
5980
|
static: true,
|
|
5670
5981
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -5706,7 +6017,7 @@ var componentInfo5 = {
|
|
|
5706
6017
|
};
|
|
5707
6018
|
|
|
5708
6019
|
// src/blocks/slot/component-info.ts
|
|
5709
|
-
var
|
|
6020
|
+
var componentInfo7 = {
|
|
5710
6021
|
name: "Slot",
|
|
5711
6022
|
isRSC: true,
|
|
5712
6023
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -5720,10 +6031,10 @@ var componentInfo6 = {
|
|
|
5720
6031
|
defaultValue: "children"
|
|
5721
6032
|
}]
|
|
5722
6033
|
};
|
|
5723
|
-
var _tmpl$
|
|
6034
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div>`);
|
|
5724
6035
|
function Slot(props) {
|
|
5725
6036
|
return (() => {
|
|
5726
|
-
const _el$ = _tmpl$
|
|
6037
|
+
const _el$ = _tmpl$7();
|
|
5727
6038
|
_el$.style.setProperty("pointer-events", "auto");
|
|
5728
6039
|
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
5729
6040
|
"builder-slot": props.name
|
|
@@ -5748,7 +6059,7 @@ function Slot(props) {
|
|
|
5748
6059
|
var slot_default = Slot;
|
|
5749
6060
|
|
|
5750
6061
|
// src/blocks/symbol/component-info.ts
|
|
5751
|
-
var
|
|
6062
|
+
var componentInfo8 = {
|
|
5752
6063
|
name: "Symbol",
|
|
5753
6064
|
noWrap: true,
|
|
5754
6065
|
static: true,
|
|
@@ -5824,7 +6135,7 @@ var defaultElement = {
|
|
|
5824
6135
|
}
|
|
5825
6136
|
}
|
|
5826
6137
|
};
|
|
5827
|
-
var
|
|
6138
|
+
var componentInfo9 = {
|
|
5828
6139
|
name: "Builder: Tabs",
|
|
5829
6140
|
inputs: [{
|
|
5830
6141
|
name: "tabs",
|
|
@@ -5922,19 +6233,23 @@ var componentInfo8 = {
|
|
|
5922
6233
|
}]
|
|
5923
6234
|
}]
|
|
5924
6235
|
};
|
|
5925
|
-
var _tmpl$
|
|
5926
|
-
var _tmpl$
|
|
6236
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
|
|
6237
|
+
var _tmpl$24 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
|
|
5927
6238
|
var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
|
|
5928
6239
|
function Tabs(props) {
|
|
5929
6240
|
const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
|
|
5930
6241
|
function activeTabContent(active) {
|
|
5931
6242
|
return props.tabs && props.tabs[active].content;
|
|
5932
6243
|
}
|
|
5933
|
-
function
|
|
5934
|
-
|
|
6244
|
+
function onClick(index) {
|
|
6245
|
+
if (index === activeTab() && props.collapsible) {
|
|
6246
|
+
setActiveTab(-1);
|
|
6247
|
+
} else {
|
|
6248
|
+
setActiveTab(index);
|
|
6249
|
+
}
|
|
5935
6250
|
}
|
|
5936
6251
|
return (() => {
|
|
5937
|
-
const _el$ = _tmpl$
|
|
6252
|
+
const _el$ = _tmpl$24(), _el$2 = _el$.firstChild;
|
|
5938
6253
|
_el$2.style.setProperty("display", "flex");
|
|
5939
6254
|
_el$2.style.setProperty("flex-direction", "row");
|
|
5940
6255
|
_el$2.style.setProperty("overflow", "auto");
|
|
@@ -5946,13 +6261,7 @@ function Tabs(props) {
|
|
|
5946
6261
|
const index = _index();
|
|
5947
6262
|
return (() => {
|
|
5948
6263
|
const _el$4 = _tmpl$33();
|
|
5949
|
-
_el$4.$$click = (event) =>
|
|
5950
|
-
if (index === activeTab() && props.collapsible) {
|
|
5951
|
-
setActiveTab(-1);
|
|
5952
|
-
} else {
|
|
5953
|
-
setActiveTab(index);
|
|
5954
|
-
}
|
|
5955
|
-
};
|
|
6264
|
+
_el$4.$$click = (event) => onClick(index);
|
|
5956
6265
|
setAttribute(_el$4, "key", index);
|
|
5957
6266
|
insert(_el$4, createComponent(blocks_default, {
|
|
5958
6267
|
get parent() {
|
|
@@ -5973,7 +6282,9 @@ function Tabs(props) {
|
|
|
5973
6282
|
}
|
|
5974
6283
|
}));
|
|
5975
6284
|
effect((_p$) => {
|
|
5976
|
-
const _v$ = `builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`, _v$2 =
|
|
6285
|
+
const _v$ = `builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`, _v$2 = {
|
|
6286
|
+
...activeTab() === index ? props.activeTabStyle : {}
|
|
6287
|
+
};
|
|
5977
6288
|
_v$ !== _p$._v$ && className(_el$4, _p$._v$ = _v$);
|
|
5978
6289
|
_p$._v$2 = style(_el$4, _v$2, _p$._v$2);
|
|
5979
6290
|
return _p$;
|
|
@@ -5990,7 +6301,7 @@ function Tabs(props) {
|
|
|
5990
6301
|
return activeTabContent(activeTab());
|
|
5991
6302
|
},
|
|
5992
6303
|
get children() {
|
|
5993
|
-
const _el$3 = _tmpl$
|
|
6304
|
+
const _el$3 = _tmpl$8();
|
|
5994
6305
|
insert(_el$3, createComponent(blocks_default, {
|
|
5995
6306
|
get parent() {
|
|
5996
6307
|
return props.builderBlock.id;
|
|
@@ -6022,7 +6333,7 @@ var tabs_default = Tabs;
|
|
|
6022
6333
|
delegateEvents(["click"]);
|
|
6023
6334
|
|
|
6024
6335
|
// src/blocks/text/component-info.ts
|
|
6025
|
-
var
|
|
6336
|
+
var componentInfo10 = {
|
|
6026
6337
|
name: "Text",
|
|
6027
6338
|
static: true,
|
|
6028
6339
|
isRSC: true,
|
|
@@ -6041,10 +6352,10 @@ var componentInfo9 = {
|
|
|
6041
6352
|
textAlign: "center"
|
|
6042
6353
|
}
|
|
6043
6354
|
};
|
|
6044
|
-
var _tmpl$
|
|
6355
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
6045
6356
|
function Text(props) {
|
|
6046
6357
|
return (() => {
|
|
6047
|
-
const _el$ = _tmpl$
|
|
6358
|
+
const _el$ = _tmpl$9();
|
|
6048
6359
|
_el$.style.setProperty("outline", "none");
|
|
6049
6360
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
6050
6361
|
return _el$;
|
|
@@ -6053,7 +6364,7 @@ function Text(props) {
|
|
|
6053
6364
|
var text_default = Text;
|
|
6054
6365
|
|
|
6055
6366
|
// src/blocks/custom-code/component-info.ts
|
|
6056
|
-
var
|
|
6367
|
+
var componentInfo11 = {
|
|
6057
6368
|
name: "Custom Code",
|
|
6058
6369
|
static: true,
|
|
6059
6370
|
requiredPermissions: ["editCode"],
|
|
@@ -6076,7 +6387,7 @@ var componentInfo10 = {
|
|
|
6076
6387
|
advanced: true
|
|
6077
6388
|
}]
|
|
6078
6389
|
};
|
|
6079
|
-
var _tmpl$
|
|
6390
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div>`);
|
|
6080
6391
|
function CustomCode(props) {
|
|
6081
6392
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
6082
6393
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -6110,7 +6421,7 @@ function CustomCode(props) {
|
|
|
6110
6421
|
}
|
|
6111
6422
|
});
|
|
6112
6423
|
return (() => {
|
|
6113
|
-
const _el$ = _tmpl$
|
|
6424
|
+
const _el$ = _tmpl$10();
|
|
6114
6425
|
const _ref$ = elementRef;
|
|
6115
6426
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
|
|
6116
6427
|
effect((_p$) => {
|
|
@@ -6128,7 +6439,7 @@ function CustomCode(props) {
|
|
|
6128
6439
|
var custom_code_default = CustomCode;
|
|
6129
6440
|
|
|
6130
6441
|
// src/blocks/embed/component-info.ts
|
|
6131
|
-
var
|
|
6442
|
+
var componentInfo12 = {
|
|
6132
6443
|
name: "Embed",
|
|
6133
6444
|
static: true,
|
|
6134
6445
|
inputs: [{
|
|
@@ -6170,7 +6481,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
|
|
|
6170
6481
|
var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
6171
6482
|
|
|
6172
6483
|
// src/blocks/embed/embed.tsx
|
|
6173
|
-
var _tmpl$
|
|
6484
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div class=builder-embed>`);
|
|
6174
6485
|
function Embed(props) {
|
|
6175
6486
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
6176
6487
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -6207,7 +6518,7 @@ function Embed(props) {
|
|
|
6207
6518
|
}
|
|
6208
6519
|
createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
|
|
6209
6520
|
return (() => {
|
|
6210
|
-
const _el$ = _tmpl$
|
|
6521
|
+
const _el$ = _tmpl$11();
|
|
6211
6522
|
const _ref$ = elem;
|
|
6212
6523
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
|
|
6213
6524
|
effect(() => _el$.innerHTML = props.content);
|
|
@@ -6217,7 +6528,7 @@ function Embed(props) {
|
|
|
6217
6528
|
var embed_default = Embed;
|
|
6218
6529
|
|
|
6219
6530
|
// src/blocks/form/form/component-info.ts
|
|
6220
|
-
var
|
|
6531
|
+
var componentInfo13 = {
|
|
6221
6532
|
name: "Form:Form",
|
|
6222
6533
|
// editableTags: ['builder-form-error']
|
|
6223
6534
|
defaults: {
|
|
@@ -6464,8 +6775,8 @@ var get = (obj, path, defaultValue) => {
|
|
|
6464
6775
|
};
|
|
6465
6776
|
|
|
6466
6777
|
// src/blocks/form/form/form.tsx
|
|
6467
|
-
var _tmpl$
|
|
6468
|
-
var _tmpl$
|
|
6778
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<pre>`);
|
|
6779
|
+
var _tmpl$25 = /* @__PURE__ */ template(`<form>`);
|
|
6469
6780
|
function FormComponent(props) {
|
|
6470
6781
|
const [formState, setFormState] = createSignal("unsubmitted");
|
|
6471
6782
|
const [responseData, setResponseData] = createSignal(null);
|
|
@@ -6494,11 +6805,11 @@ function FormComponent(props) {
|
|
|
6494
6805
|
return;
|
|
6495
6806
|
}
|
|
6496
6807
|
event.preventDefault();
|
|
6497
|
-
const el = event.currentTarget;
|
|
6808
|
+
const el = event.currentTarget || event.target;
|
|
6498
6809
|
const headers = props.customHeaders || {};
|
|
6499
6810
|
let body;
|
|
6500
6811
|
const formData = new FormData(el);
|
|
6501
|
-
const formPairs = Array.from(
|
|
6812
|
+
const formPairs = Array.from(el.querySelectorAll("input,select,textarea")).filter((el2) => !!el2.name).map((el2) => {
|
|
6502
6813
|
let value;
|
|
6503
6814
|
const key = el2.name;
|
|
6504
6815
|
if (el2 instanceof HTMLInputElement) {
|
|
@@ -6651,7 +6962,7 @@ function FormComponent(props) {
|
|
|
6651
6962
|
}
|
|
6652
6963
|
let formRef;
|
|
6653
6964
|
return (() => {
|
|
6654
|
-
const _el$ = _tmpl$
|
|
6965
|
+
const _el$ = _tmpl$25();
|
|
6655
6966
|
_el$.addEventListener("submit", (event) => onSubmit(event));
|
|
6656
6967
|
const _ref$ = formRef;
|
|
6657
6968
|
typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
|
|
@@ -6668,7 +6979,7 @@ function FormComponent(props) {
|
|
|
6668
6979
|
get name() {
|
|
6669
6980
|
return props.name;
|
|
6670
6981
|
}
|
|
6671
|
-
}, {}, () => props.attributes), false, true);
|
|
6982
|
+
}, {}, {}, () => props.attributes), false, true);
|
|
6672
6983
|
insert(_el$, createComponent(Show, {
|
|
6673
6984
|
get when() {
|
|
6674
6985
|
return props.builderBlock && props.builderBlock.children;
|
|
@@ -6734,7 +7045,7 @@ function FormComponent(props) {
|
|
|
6734
7045
|
return memo(() => submissionState() === "error")() && responseData();
|
|
6735
7046
|
},
|
|
6736
7047
|
get children() {
|
|
6737
|
-
const _el$2 = _tmpl$
|
|
7048
|
+
const _el$2 = _tmpl$12();
|
|
6738
7049
|
insert(_el$2, () => JSON.stringify(responseData(), null, 2));
|
|
6739
7050
|
effect(() => className(_el$2, "builder-form-error-text " + css({
|
|
6740
7051
|
padding: "10px",
|
|
@@ -6766,7 +7077,7 @@ function FormComponent(props) {
|
|
|
6766
7077
|
var form_default = FormComponent;
|
|
6767
7078
|
|
|
6768
7079
|
// src/blocks/form/input/component-info.ts
|
|
6769
|
-
var
|
|
7080
|
+
var componentInfo14 = {
|
|
6770
7081
|
name: "Form:Input",
|
|
6771
7082
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
6772
7083
|
inputs: [
|
|
@@ -6818,10 +7129,10 @@ var componentInfo13 = {
|
|
|
6818
7129
|
borderColor: "#ccc"
|
|
6819
7130
|
}
|
|
6820
7131
|
};
|
|
6821
|
-
var _tmpl$
|
|
7132
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<input>`);
|
|
6822
7133
|
function FormInputComponent(props) {
|
|
6823
7134
|
return (() => {
|
|
6824
|
-
const _el$ = _tmpl$
|
|
7135
|
+
const _el$ = _tmpl$13();
|
|
6825
7136
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
6826
7137
|
get key() {
|
|
6827
7138
|
return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
|
|
@@ -6851,7 +7162,7 @@ function FormInputComponent(props) {
|
|
|
6851
7162
|
var input_default = FormInputComponent;
|
|
6852
7163
|
|
|
6853
7164
|
// src/blocks/form/select/component-info.ts
|
|
6854
|
-
var
|
|
7165
|
+
var componentInfo15 = {
|
|
6855
7166
|
name: "Form:Select",
|
|
6856
7167
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
6857
7168
|
defaultStyles: {
|
|
@@ -6894,11 +7205,11 @@ var componentInfo14 = {
|
|
|
6894
7205
|
static: true,
|
|
6895
7206
|
noWrap: true
|
|
6896
7207
|
};
|
|
6897
|
-
var _tmpl$
|
|
6898
|
-
var _tmpl$
|
|
7208
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<select>`);
|
|
7209
|
+
var _tmpl$26 = /* @__PURE__ */ template(`<option>`);
|
|
6899
7210
|
function SelectComponent(props) {
|
|
6900
7211
|
return (() => {
|
|
6901
|
-
const _el$ = _tmpl$
|
|
7212
|
+
const _el$ = _tmpl$14();
|
|
6902
7213
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
6903
7214
|
get value() {
|
|
6904
7215
|
return props.value;
|
|
@@ -6920,7 +7231,7 @@ function SelectComponent(props) {
|
|
|
6920
7231
|
children: (option, _index) => {
|
|
6921
7232
|
const index = _index();
|
|
6922
7233
|
return (() => {
|
|
6923
|
-
const _el$2 = _tmpl$
|
|
7234
|
+
const _el$2 = _tmpl$26();
|
|
6924
7235
|
insert(_el$2, () => option.name || option.value);
|
|
6925
7236
|
effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
|
|
6926
7237
|
effect(() => _el$2.value = option.value);
|
|
@@ -6934,7 +7245,7 @@ function SelectComponent(props) {
|
|
|
6934
7245
|
var select_default = SelectComponent;
|
|
6935
7246
|
|
|
6936
7247
|
// src/blocks/form/submit-button/component-info.ts
|
|
6937
|
-
var
|
|
7248
|
+
var componentInfo16 = {
|
|
6938
7249
|
name: "Form:SubmitButton",
|
|
6939
7250
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
6940
7251
|
defaultStyles: {
|
|
@@ -6960,10 +7271,10 @@ var componentInfo15 = {
|
|
|
6960
7271
|
// TODO: defaultChildren
|
|
6961
7272
|
// canHaveChildren: true,
|
|
6962
7273
|
};
|
|
6963
|
-
var _tmpl$
|
|
7274
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<button type=submit>`);
|
|
6964
7275
|
function SubmitButton(props) {
|
|
6965
7276
|
return (() => {
|
|
6966
|
-
const _el$ = _tmpl$
|
|
7277
|
+
const _el$ = _tmpl$15();
|
|
6967
7278
|
spread(_el$, mergeProps({}, () => props.attributes), false, true);
|
|
6968
7279
|
insert(_el$, () => props.text);
|
|
6969
7280
|
return _el$;
|
|
@@ -6972,7 +7283,7 @@ function SubmitButton(props) {
|
|
|
6972
7283
|
var submit_button_default = SubmitButton;
|
|
6973
7284
|
|
|
6974
7285
|
// src/blocks/img/component-info.ts
|
|
6975
|
-
var
|
|
7286
|
+
var componentInfo17 = {
|
|
6976
7287
|
// friendlyName?
|
|
6977
7288
|
name: "Raw:Img",
|
|
6978
7289
|
hideFromInsertMenu: true,
|
|
@@ -6987,10 +7298,10 @@ var componentInfo16 = {
|
|
|
6987
7298
|
noWrap: true,
|
|
6988
7299
|
static: true
|
|
6989
7300
|
};
|
|
6990
|
-
var _tmpl$
|
|
7301
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<img>`);
|
|
6991
7302
|
function ImgComponent(props) {
|
|
6992
7303
|
return (() => {
|
|
6993
|
-
const _el$ = _tmpl$
|
|
7304
|
+
const _el$ = _tmpl$16();
|
|
6994
7305
|
spread(_el$, mergeProps({
|
|
6995
7306
|
get style() {
|
|
6996
7307
|
return {
|
|
@@ -7014,7 +7325,7 @@ function ImgComponent(props) {
|
|
|
7014
7325
|
var img_default = ImgComponent;
|
|
7015
7326
|
|
|
7016
7327
|
// src/blocks/video/component-info.ts
|
|
7017
|
-
var
|
|
7328
|
+
var componentInfo18 = {
|
|
7018
7329
|
name: "Video",
|
|
7019
7330
|
canHaveChildren: true,
|
|
7020
7331
|
defaultStyles: {
|
|
@@ -7096,8 +7407,8 @@ var componentInfo17 = {
|
|
|
7096
7407
|
advanced: true
|
|
7097
7408
|
}]
|
|
7098
7409
|
};
|
|
7099
|
-
var _tmpl$
|
|
7100
|
-
var _tmpl$
|
|
7410
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
7411
|
+
var _tmpl$27 = /* @__PURE__ */ template(`<div>`);
|
|
7101
7412
|
var _tmpl$34 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
7102
7413
|
function Video(props) {
|
|
7103
7414
|
const videoProps = createMemo(() => {
|
|
@@ -7159,7 +7470,7 @@ function Video(props) {
|
|
|
7159
7470
|
return !props.lazyLoad;
|
|
7160
7471
|
},
|
|
7161
7472
|
get children() {
|
|
7162
|
-
const _el$3 = _tmpl$
|
|
7473
|
+
const _el$3 = _tmpl$17();
|
|
7163
7474
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
7164
7475
|
return _el$3;
|
|
7165
7476
|
}
|
|
@@ -7169,7 +7480,7 @@ function Video(props) {
|
|
|
7169
7480
|
return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
|
|
7170
7481
|
},
|
|
7171
7482
|
get children() {
|
|
7172
|
-
const _el$4 = _tmpl$
|
|
7483
|
+
const _el$4 = _tmpl$27();
|
|
7173
7484
|
_el$4.style.setProperty("width", "100%");
|
|
7174
7485
|
_el$4.style.setProperty("pointer-events", "none");
|
|
7175
7486
|
_el$4.style.setProperty("font-size", "0px");
|
|
@@ -7182,7 +7493,7 @@ function Video(props) {
|
|
|
7182
7493
|
return props.builderBlock?.children?.length && props.fitContent;
|
|
7183
7494
|
},
|
|
7184
7495
|
get children() {
|
|
7185
|
-
const _el$5 = _tmpl$
|
|
7496
|
+
const _el$5 = _tmpl$27();
|
|
7186
7497
|
_el$5.style.setProperty("display", "flex");
|
|
7187
7498
|
_el$5.style.setProperty("flex-direction", "column");
|
|
7188
7499
|
_el$5.style.setProperty("align-items", "stretch");
|
|
@@ -7195,7 +7506,7 @@ function Video(props) {
|
|
|
7195
7506
|
return props.builderBlock?.children?.length && !props.fitContent;
|
|
7196
7507
|
},
|
|
7197
7508
|
get children() {
|
|
7198
|
-
const _el$6 = _tmpl$
|
|
7509
|
+
const _el$6 = _tmpl$27();
|
|
7199
7510
|
_el$6.style.setProperty("pointer-events", "none");
|
|
7200
7511
|
_el$6.style.setProperty("display", "flex");
|
|
7201
7512
|
_el$6.style.setProperty("flex-direction", "column");
|
|
@@ -7217,58 +7528,61 @@ var video_default = Video;
|
|
|
7217
7528
|
// src/constants/extra-components.ts
|
|
7218
7529
|
var getExtraComponents = () => [{
|
|
7219
7530
|
component: custom_code_default,
|
|
7220
|
-
...
|
|
7531
|
+
...componentInfo11
|
|
7221
7532
|
}, {
|
|
7222
7533
|
component: embed_default,
|
|
7223
|
-
...
|
|
7534
|
+
...componentInfo12
|
|
7224
7535
|
}, ...TARGET === "rsc" ? [] : [{
|
|
7225
7536
|
component: form_default,
|
|
7226
|
-
...
|
|
7537
|
+
...componentInfo13
|
|
7227
7538
|
}, {
|
|
7228
7539
|
component: input_default,
|
|
7229
|
-
...
|
|
7540
|
+
...componentInfo14
|
|
7230
7541
|
}, {
|
|
7231
7542
|
component: submit_button_default,
|
|
7232
|
-
...
|
|
7543
|
+
...componentInfo16
|
|
7233
7544
|
}, {
|
|
7234
7545
|
component: select_default,
|
|
7235
|
-
...
|
|
7546
|
+
...componentInfo15
|
|
7236
7547
|
}], {
|
|
7237
7548
|
component: img_default,
|
|
7238
|
-
...
|
|
7549
|
+
...componentInfo17
|
|
7239
7550
|
}, {
|
|
7240
7551
|
component: video_default,
|
|
7241
|
-
...
|
|
7552
|
+
...componentInfo18
|
|
7242
7553
|
}];
|
|
7243
7554
|
|
|
7244
7555
|
// src/constants/builder-registered-components.ts
|
|
7245
7556
|
var getDefaultRegisteredComponents = () => [{
|
|
7246
7557
|
component: button_default,
|
|
7247
|
-
...
|
|
7558
|
+
...componentInfo2
|
|
7248
7559
|
}, {
|
|
7249
7560
|
component: columns_default,
|
|
7250
|
-
...
|
|
7561
|
+
...componentInfo3
|
|
7251
7562
|
}, {
|
|
7252
7563
|
component: fragment_default,
|
|
7253
|
-
...
|
|
7564
|
+
...componentInfo4
|
|
7254
7565
|
}, {
|
|
7255
7566
|
component: image_default,
|
|
7256
|
-
...
|
|
7567
|
+
...componentInfo5
|
|
7257
7568
|
}, {
|
|
7258
7569
|
component: section_default,
|
|
7259
|
-
...
|
|
7570
|
+
...componentInfo6
|
|
7260
7571
|
}, {
|
|
7261
7572
|
component: slot_default,
|
|
7262
|
-
...
|
|
7573
|
+
...componentInfo7
|
|
7263
7574
|
}, {
|
|
7264
7575
|
component: symbol_default,
|
|
7265
|
-
...
|
|
7576
|
+
...componentInfo8
|
|
7266
7577
|
}, {
|
|
7267
7578
|
component: text_default,
|
|
7268
|
-
...
|
|
7579
|
+
...componentInfo10
|
|
7269
7580
|
}, ...TARGET === "rsc" ? [] : [{
|
|
7270
7581
|
component: tabs_default,
|
|
7271
|
-
...
|
|
7582
|
+
...componentInfo9
|
|
7583
|
+
}, {
|
|
7584
|
+
component: accordion_default,
|
|
7585
|
+
...componentInfo
|
|
7272
7586
|
}], ...getExtraComponents()];
|
|
7273
7587
|
|
|
7274
7588
|
// src/functions/register-component.ts
|
|
@@ -7338,10 +7652,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
7338
7652
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
7339
7653
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
7340
7654
|
)`;
|
|
7341
|
-
var _tmpl$
|
|
7655
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<script>`);
|
|
7342
7656
|
function InlinedScript(props) {
|
|
7343
7657
|
return (() => {
|
|
7344
|
-
const _el$ = _tmpl$
|
|
7658
|
+
const _el$ = _tmpl$18();
|
|
7345
7659
|
effect((_p$) => {
|
|
7346
7660
|
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
7347
7661
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -7847,7 +8161,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7847
8161
|
}
|
|
7848
8162
|
|
|
7849
8163
|
// src/constants/sdk-version.ts
|
|
7850
|
-
var SDK_VERSION = "1.0.
|
|
8164
|
+
var SDK_VERSION = "1.0.29";
|
|
7851
8165
|
|
|
7852
8166
|
// src/functions/register.ts
|
|
7853
8167
|
var registry = {};
|
|
@@ -8311,7 +8625,7 @@ function EnableEditor(props) {
|
|
|
8311
8625
|
if (isPreviewing() && !isEditing()) {
|
|
8312
8626
|
const searchParams = new URL(location.href).searchParams;
|
|
8313
8627
|
const searchParamPreviewModel = searchParams.get("builder.preview");
|
|
8314
|
-
const searchParamPreviewId = searchParams.get(`builder.
|
|
8628
|
+
const searchParamPreviewId = searchParams.get(`builder.overrides.${searchParamPreviewModel}`);
|
|
8315
8629
|
const previewApiKey = searchParams.get("apiKey") || searchParams.get("builder.space");
|
|
8316
8630
|
if (searchParamPreviewModel === props.model && previewApiKey === props.apiKey && (!props.content || searchParamPreviewId === props.content.id)) {
|
|
8317
8631
|
fetchOneEntry({
|
|
@@ -8329,7 +8643,7 @@ function EnableEditor(props) {
|
|
|
8329
8643
|
});
|
|
8330
8644
|
onMount(() => {
|
|
8331
8645
|
if (!props.apiKey) {
|
|
8332
|
-
logger.error("No API key provided to `
|
|
8646
|
+
logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
|
|
8333
8647
|
}
|
|
8334
8648
|
evaluateJsCode();
|
|
8335
8649
|
runHttpRequests();
|
|
@@ -8831,7 +9145,7 @@ var fetchSymbolContent = async ({
|
|
|
8831
9145
|
};
|
|
8832
9146
|
|
|
8833
9147
|
// src/blocks/symbol/symbol.tsx
|
|
8834
|
-
var _tmpl$
|
|
9148
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<div>`);
|
|
8835
9149
|
function Symbol2(props) {
|
|
8836
9150
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
8837
9151
|
const blocksWrapper = createMemo(() => {
|
|
@@ -8863,7 +9177,7 @@ function Symbol2(props) {
|
|
|
8863
9177
|
}
|
|
8864
9178
|
createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
8865
9179
|
return (() => {
|
|
8866
|
-
const _el$ = _tmpl$
|
|
9180
|
+
const _el$ = _tmpl$19();
|
|
8867
9181
|
spread(_el$, mergeProps({
|
|
8868
9182
|
get ["class"]() {
|
|
8869
9183
|
return className();
|