@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/dev.js
CHANGED
|
@@ -3636,6 +3636,9 @@ function getProcessedBlock({
|
|
|
3636
3636
|
}
|
|
3637
3637
|
}
|
|
3638
3638
|
|
|
3639
|
+
// src/functions/camel-to-kebab-case.ts
|
|
3640
|
+
var camelToKebabCase = (str) => str ? str.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase() : "";
|
|
3641
|
+
|
|
3639
3642
|
// src/components/block/animator.ts
|
|
3640
3643
|
function throttle(func, wait, options = {}) {
|
|
3641
3644
|
let context;
|
|
@@ -3686,7 +3689,6 @@ function assign(target, ..._args) {
|
|
|
3686
3689
|
}
|
|
3687
3690
|
return to;
|
|
3688
3691
|
}
|
|
3689
|
-
var camelCaseToKebabCase = (str) => str ? str.replace(/([A-Z])/g, (g) => `-${g[0].toLowerCase()}`) : "";
|
|
3690
3692
|
function bindAnimations(animations) {
|
|
3691
3693
|
for (const animation of animations) {
|
|
3692
3694
|
switch (animation.trigger) {
|
|
@@ -3739,7 +3741,7 @@ function triggerAnimation(animation) {
|
|
|
3739
3741
|
element.style.transitionDelay = "0";
|
|
3740
3742
|
assign(element.style, animation.steps[0].styles);
|
|
3741
3743
|
setTimeout(() => {
|
|
3742
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
3744
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
3743
3745
|
if (animation.delay) {
|
|
3744
3746
|
element.style.transitionDelay = animation.delay + "s";
|
|
3745
3747
|
}
|
|
@@ -3799,7 +3801,7 @@ function bindScrollInViewAnimation(animation) {
|
|
|
3799
3801
|
}
|
|
3800
3802
|
attachDefaultState();
|
|
3801
3803
|
setTimeout(() => {
|
|
3802
|
-
element.style.transition = `all ${animation.duration}s ${
|
|
3804
|
+
element.style.transition = `all ${animation.duration}s ${camelToKebabCase(animation.easing)}`;
|
|
3803
3805
|
if (animation.delay) {
|
|
3804
3806
|
element.style.transitionDelay = animation.delay + "s";
|
|
3805
3807
|
}
|
|
@@ -3812,9 +3814,6 @@ function bindScrollInViewAnimation(animation) {
|
|
|
3812
3814
|
});
|
|
3813
3815
|
}
|
|
3814
3816
|
|
|
3815
|
-
// src/functions/camel-to-kebab-case.ts
|
|
3816
|
-
var camelToKebabCase = (string) => string.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g, "$1-$2").toLowerCase();
|
|
3817
|
-
|
|
3818
3817
|
// src/helpers/css.ts
|
|
3819
3818
|
var convertStyleMapToCSSArray = (style) => {
|
|
3820
3819
|
const cssProps = Object.entries(style).map(([key, value]) => {
|
|
@@ -3944,10 +3943,10 @@ var getRepeatItemData = ({
|
|
|
3944
3943
|
return repeatArray;
|
|
3945
3944
|
};
|
|
3946
3945
|
var shouldPassLinkComponent = (block) => {
|
|
3947
|
-
return block && (block.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(block.name));
|
|
3946
|
+
return block && (block.isRSC || ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(block.name));
|
|
3948
3947
|
};
|
|
3949
3948
|
var shouldPassRegisteredComponents = (block) => {
|
|
3950
|
-
return block && (block.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(block.name));
|
|
3949
|
+
return block && (block.isRSC || ["Symbol", "Columns", "Form:Form", "Builder: Tabs", "Builder:Accordion"].includes(block.name));
|
|
3951
3950
|
};
|
|
3952
3951
|
|
|
3953
3952
|
// src/constants/device-sizes.ts
|
|
@@ -4076,7 +4075,7 @@ function BlockStyles(props) {
|
|
|
4076
4075
|
className: `${className}:hover`,
|
|
4077
4076
|
styles: {
|
|
4078
4077
|
...hoverStyles,
|
|
4079
|
-
transition: `all ${hoverAnimation.duration}s ${
|
|
4078
|
+
transition: `all ${hoverAnimation.duration}s ${camelToKebabCase(hoverAnimation.easing)}`,
|
|
4080
4079
|
transitionDelay: hoverAnimation.delay ? `${hoverAnimation.delay}s` : "0s"
|
|
4081
4080
|
}
|
|
4082
4081
|
}) || "";
|
|
@@ -5283,8 +5282,320 @@ var handleABTesting = async ({
|
|
|
5283
5282
|
// src/helpers/canTrack.ts
|
|
5284
5283
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
5285
5284
|
|
|
5286
|
-
// src/blocks/
|
|
5285
|
+
// src/blocks/accordion/component-info.ts
|
|
5286
|
+
var defaultTitle = {
|
|
5287
|
+
"@type": "@builder.io/sdk:Element",
|
|
5288
|
+
layerName: "Accordion item title",
|
|
5289
|
+
responsiveStyles: {
|
|
5290
|
+
large: {
|
|
5291
|
+
marginTop: "10px",
|
|
5292
|
+
position: "relative",
|
|
5293
|
+
display: "flex",
|
|
5294
|
+
alignItems: "stretch",
|
|
5295
|
+
flexDirection: "column",
|
|
5296
|
+
paddingBottom: "10px"
|
|
5297
|
+
}
|
|
5298
|
+
},
|
|
5299
|
+
children: [{
|
|
5300
|
+
"@type": "@builder.io/sdk:Element",
|
|
5301
|
+
responsiveStyles: {
|
|
5302
|
+
large: {
|
|
5303
|
+
textAlign: "left",
|
|
5304
|
+
display: "flex",
|
|
5305
|
+
flexDirection: "column"
|
|
5306
|
+
}
|
|
5307
|
+
},
|
|
5308
|
+
component: {
|
|
5309
|
+
name: "Text",
|
|
5310
|
+
options: {
|
|
5311
|
+
text: "I am an accordion title. Click me!"
|
|
5312
|
+
}
|
|
5313
|
+
}
|
|
5314
|
+
}]
|
|
5315
|
+
};
|
|
5316
|
+
var defaultDetail = {
|
|
5317
|
+
"@type": "@builder.io/sdk:Element",
|
|
5318
|
+
layerName: "Accordion item detail",
|
|
5319
|
+
responsiveStyles: {
|
|
5320
|
+
large: {
|
|
5321
|
+
position: "relative",
|
|
5322
|
+
display: "flex",
|
|
5323
|
+
alignItems: "stretch",
|
|
5324
|
+
flexDirection: "column",
|
|
5325
|
+
marginTop: "10px",
|
|
5326
|
+
paddingBottom: "10px"
|
|
5327
|
+
}
|
|
5328
|
+
},
|
|
5329
|
+
children: [{
|
|
5330
|
+
"@type": "@builder.io/sdk:Element",
|
|
5331
|
+
responsiveStyles: {
|
|
5332
|
+
large: {
|
|
5333
|
+
paddingTop: "50px",
|
|
5334
|
+
textAlign: "left",
|
|
5335
|
+
display: "flex",
|
|
5336
|
+
flexDirection: "column",
|
|
5337
|
+
paddingBottom: "50px"
|
|
5338
|
+
}
|
|
5339
|
+
},
|
|
5340
|
+
component: {
|
|
5341
|
+
name: "Text",
|
|
5342
|
+
options: {
|
|
5343
|
+
text: "I am an accordion detail, hello!"
|
|
5344
|
+
}
|
|
5345
|
+
}
|
|
5346
|
+
}]
|
|
5347
|
+
};
|
|
5287
5348
|
var componentInfo = {
|
|
5349
|
+
name: "Builder:Accordion",
|
|
5350
|
+
canHaveChildren: true,
|
|
5351
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FagZ9n5CUKRfbL9t6CaJOyVSK4Es2%2Ffab6c1fd3fe542408cbdec078bca7f35",
|
|
5352
|
+
defaultStyles: {
|
|
5353
|
+
display: "flex",
|
|
5354
|
+
flexDirection: "column",
|
|
5355
|
+
alignItems: "stretch"
|
|
5356
|
+
},
|
|
5357
|
+
inputs: [{
|
|
5358
|
+
name: "items",
|
|
5359
|
+
type: "list",
|
|
5360
|
+
broadcast: true,
|
|
5361
|
+
subFields: [{
|
|
5362
|
+
name: "title",
|
|
5363
|
+
type: "uiBlocks",
|
|
5364
|
+
hideFromUI: true,
|
|
5365
|
+
defaultValue: [defaultTitle]
|
|
5366
|
+
}, {
|
|
5367
|
+
name: "detail",
|
|
5368
|
+
type: "uiBlocks",
|
|
5369
|
+
hideFromUI: true,
|
|
5370
|
+
defaultValue: [defaultDetail]
|
|
5371
|
+
}],
|
|
5372
|
+
defaultValue: [{
|
|
5373
|
+
title: [defaultTitle],
|
|
5374
|
+
detail: [defaultDetail]
|
|
5375
|
+
}, {
|
|
5376
|
+
title: [defaultTitle],
|
|
5377
|
+
detail: [defaultDetail]
|
|
5378
|
+
}],
|
|
5379
|
+
showIf: (options) => !options.get("useChildrenForItems")
|
|
5380
|
+
}, {
|
|
5381
|
+
name: "oneAtATime",
|
|
5382
|
+
helperText: "Only allow opening one at a time (collapse all others when new item openned)",
|
|
5383
|
+
type: "boolean",
|
|
5384
|
+
defaultValue: false
|
|
5385
|
+
}, {
|
|
5386
|
+
name: "grid",
|
|
5387
|
+
helperText: "Display as a grid",
|
|
5388
|
+
type: "boolean",
|
|
5389
|
+
defaultValue: false
|
|
5390
|
+
}, {
|
|
5391
|
+
name: "gridRowWidth",
|
|
5392
|
+
helperText: "Display as a grid",
|
|
5393
|
+
type: "string",
|
|
5394
|
+
showIf: (options) => options.get("grid"),
|
|
5395
|
+
defaultValue: "25%"
|
|
5396
|
+
}, {
|
|
5397
|
+
name: "useChildrenForItems",
|
|
5398
|
+
type: "boolean",
|
|
5399
|
+
helperText: "Use child elements for each slide, instead of the array. Useful for dynamically repeating items",
|
|
5400
|
+
advanced: true,
|
|
5401
|
+
defaultValue: false,
|
|
5402
|
+
onChange: (options) => {
|
|
5403
|
+
if (options.get("useChildrenForItems") === true) {
|
|
5404
|
+
options.set("items", []);
|
|
5405
|
+
}
|
|
5406
|
+
}
|
|
5407
|
+
}]
|
|
5408
|
+
};
|
|
5409
|
+
|
|
5410
|
+
// src/blocks/accordion/helpers.ts
|
|
5411
|
+
var convertOrderNumberToString = (order) => {
|
|
5412
|
+
return order.toString();
|
|
5413
|
+
};
|
|
5414
|
+
|
|
5415
|
+
// src/blocks/accordion/accordion.tsx
|
|
5416
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<div class=builder-accordion>`);
|
|
5417
|
+
var _tmpl$23 = /* @__PURE__ */ template(`<div>`);
|
|
5418
|
+
function Accordion(props) {
|
|
5419
|
+
const [open, setOpen] = createSignal([]);
|
|
5420
|
+
const onlyOneAtATime = createMemo(() => {
|
|
5421
|
+
return Boolean(props.grid || props.oneAtATime);
|
|
5422
|
+
});
|
|
5423
|
+
const accordionStyles = createMemo(() => {
|
|
5424
|
+
const styles = {
|
|
5425
|
+
display: "flex",
|
|
5426
|
+
alignItems: "stretch",
|
|
5427
|
+
flexDirection: "column",
|
|
5428
|
+
...props.grid && {
|
|
5429
|
+
flexDirection: "row",
|
|
5430
|
+
alignItems: "flex-start",
|
|
5431
|
+
flexWrap: "wrap"
|
|
5432
|
+
}
|
|
5433
|
+
};
|
|
5434
|
+
return Object.fromEntries(Object.entries(styles).map(([key, value]) => [camelToKebabCase(key), value]));
|
|
5435
|
+
});
|
|
5436
|
+
const accordionTitleStyles = createMemo(() => {
|
|
5437
|
+
const shared = {
|
|
5438
|
+
display: "flex",
|
|
5439
|
+
flexDirection: "column"
|
|
5440
|
+
};
|
|
5441
|
+
const styles = Object.fromEntries(Object.entries({
|
|
5442
|
+
...shared,
|
|
5443
|
+
alignItems: "stretch",
|
|
5444
|
+
cursor: "pointer"
|
|
5445
|
+
}).map(([key, value]) => [camelToKebabCase(key), value]));
|
|
5446
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
5447
|
+
});
|
|
5448
|
+
function getAccordionTitleClassName(index) {
|
|
5449
|
+
return `builder-accordion-title builder-accordion-title-${open().includes(index) ? "open" : "closed"}`;
|
|
5450
|
+
}
|
|
5451
|
+
function getAccordionDetailClassName(index) {
|
|
5452
|
+
return `builder-accordion-detail builder-accordion-detail-${open().includes(index) ? "open" : "closed"}`;
|
|
5453
|
+
}
|
|
5454
|
+
const openGridItemOrder = createMemo(() => {
|
|
5455
|
+
let itemOrder = null;
|
|
5456
|
+
const getOpenGridItemPosition = props.grid && open().length;
|
|
5457
|
+
if (getOpenGridItemPosition && document) {
|
|
5458
|
+
const openItemIndex = open()[0];
|
|
5459
|
+
const openItem = document.querySelector(`.builder-accordion-title[data-index="${openItemIndex}"]`);
|
|
5460
|
+
let subjectItem = openItem;
|
|
5461
|
+
itemOrder = openItemIndex;
|
|
5462
|
+
if (subjectItem) {
|
|
5463
|
+
let prevItemRect = subjectItem.getBoundingClientRect();
|
|
5464
|
+
while (subjectItem = subjectItem && subjectItem.nextElementSibling) {
|
|
5465
|
+
if (subjectItem) {
|
|
5466
|
+
if (subjectItem.classList.contains("builder-accordion-detail")) {
|
|
5467
|
+
continue;
|
|
5468
|
+
}
|
|
5469
|
+
const subjectItemRect = subjectItem.getBoundingClientRect();
|
|
5470
|
+
if (subjectItemRect.left > prevItemRect.left) {
|
|
5471
|
+
const index = parseInt(subjectItem.getAttribute("data-index") || "", 10);
|
|
5472
|
+
if (!isNaN(index)) {
|
|
5473
|
+
prevItemRect = subjectItemRect;
|
|
5474
|
+
itemOrder = index;
|
|
5475
|
+
}
|
|
5476
|
+
} else {
|
|
5477
|
+
break;
|
|
5478
|
+
}
|
|
5479
|
+
}
|
|
5480
|
+
}
|
|
5481
|
+
}
|
|
5482
|
+
}
|
|
5483
|
+
if (typeof itemOrder === "number") {
|
|
5484
|
+
itemOrder = itemOrder + 1;
|
|
5485
|
+
}
|
|
5486
|
+
return itemOrder;
|
|
5487
|
+
});
|
|
5488
|
+
const accordionDetailStyles = createMemo(() => {
|
|
5489
|
+
const styles = {
|
|
5490
|
+
...{
|
|
5491
|
+
order: typeof openGridItemOrder() === "number" ? openGridItemOrder() : void 0
|
|
5492
|
+
},
|
|
5493
|
+
...props.grid && {
|
|
5494
|
+
width: "100%"
|
|
5495
|
+
}
|
|
5496
|
+
};
|
|
5497
|
+
return Object.fromEntries(Object.entries(styles).filter(([_, value]) => value !== void 0));
|
|
5498
|
+
});
|
|
5499
|
+
function onClick(index) {
|
|
5500
|
+
if (open().includes(index)) {
|
|
5501
|
+
setOpen(onlyOneAtATime() ? [] : open().filter((item) => item !== index));
|
|
5502
|
+
} else {
|
|
5503
|
+
setOpen(onlyOneAtATime() ? [index] : open().concat(index));
|
|
5504
|
+
}
|
|
5505
|
+
}
|
|
5506
|
+
return (() => {
|
|
5507
|
+
const _el$ = _tmpl$6();
|
|
5508
|
+
insert(_el$, createComponent(For, {
|
|
5509
|
+
get each() {
|
|
5510
|
+
return props.items;
|
|
5511
|
+
},
|
|
5512
|
+
children: (item, _index) => {
|
|
5513
|
+
const index = _index();
|
|
5514
|
+
return [(() => {
|
|
5515
|
+
const _el$2 = _tmpl$23();
|
|
5516
|
+
_el$2.$$click = (event) => onClick(index);
|
|
5517
|
+
setAttribute(_el$2, "data-index", index);
|
|
5518
|
+
insert(_el$2, createComponent(blocks_default, {
|
|
5519
|
+
get blocks() {
|
|
5520
|
+
return item.title;
|
|
5521
|
+
},
|
|
5522
|
+
path: `items.${index}.title`,
|
|
5523
|
+
get parent() {
|
|
5524
|
+
return props.builderBlock.id;
|
|
5525
|
+
},
|
|
5526
|
+
get context() {
|
|
5527
|
+
return props.builderContext;
|
|
5528
|
+
},
|
|
5529
|
+
get registeredComponents() {
|
|
5530
|
+
return props.builderComponents;
|
|
5531
|
+
},
|
|
5532
|
+
get linkComponent() {
|
|
5533
|
+
return props.builderLinkComponent;
|
|
5534
|
+
}
|
|
5535
|
+
}));
|
|
5536
|
+
effect((_p$) => {
|
|
5537
|
+
const _v$ = getAccordionTitleClassName(index), _v$2 = {
|
|
5538
|
+
...accordionTitleStyles(),
|
|
5539
|
+
width: props.grid ? props.gridRowWidth : void 0,
|
|
5540
|
+
...{
|
|
5541
|
+
order: openGridItemOrder() !== null ? convertOrderNumberToString(index) : convertOrderNumberToString(index + 1)
|
|
5542
|
+
}
|
|
5543
|
+
};
|
|
5544
|
+
_v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
|
|
5545
|
+
_p$._v$2 = style(_el$2, _v$2, _p$._v$2);
|
|
5546
|
+
return _p$;
|
|
5547
|
+
}, {
|
|
5548
|
+
_v$: void 0,
|
|
5549
|
+
_v$2: void 0
|
|
5550
|
+
});
|
|
5551
|
+
return _el$2;
|
|
5552
|
+
})(), createComponent(Show, {
|
|
5553
|
+
get when() {
|
|
5554
|
+
return open().includes(index);
|
|
5555
|
+
},
|
|
5556
|
+
get children() {
|
|
5557
|
+
const _el$3 = _tmpl$23();
|
|
5558
|
+
insert(_el$3, createComponent(blocks_default, {
|
|
5559
|
+
get blocks() {
|
|
5560
|
+
return item.detail;
|
|
5561
|
+
},
|
|
5562
|
+
path: `items.${index}.detail`,
|
|
5563
|
+
get parent() {
|
|
5564
|
+
return props.builderBlock.id;
|
|
5565
|
+
},
|
|
5566
|
+
get context() {
|
|
5567
|
+
return props.builderContext;
|
|
5568
|
+
},
|
|
5569
|
+
get registeredComponents() {
|
|
5570
|
+
return props.builderComponents;
|
|
5571
|
+
},
|
|
5572
|
+
get linkComponent() {
|
|
5573
|
+
return props.builderLinkComponent;
|
|
5574
|
+
}
|
|
5575
|
+
}));
|
|
5576
|
+
effect((_p$) => {
|
|
5577
|
+
const _v$3 = getAccordionDetailClassName(index), _v$4 = accordionDetailStyles();
|
|
5578
|
+
_v$3 !== _p$._v$3 && className(_el$3, _p$._v$3 = _v$3);
|
|
5579
|
+
_p$._v$4 = style(_el$3, _v$4, _p$._v$4);
|
|
5580
|
+
return _p$;
|
|
5581
|
+
}, {
|
|
5582
|
+
_v$3: void 0,
|
|
5583
|
+
_v$4: void 0
|
|
5584
|
+
});
|
|
5585
|
+
return _el$3;
|
|
5586
|
+
}
|
|
5587
|
+
})];
|
|
5588
|
+
}
|
|
5589
|
+
}));
|
|
5590
|
+
effect((_$p) => style(_el$, accordionStyles(), _$p));
|
|
5591
|
+
return _el$;
|
|
5592
|
+
})();
|
|
5593
|
+
}
|
|
5594
|
+
var accordion_default = Accordion;
|
|
5595
|
+
delegateEvents(["click"]);
|
|
5596
|
+
|
|
5597
|
+
// src/blocks/button/component-info.ts
|
|
5598
|
+
var componentInfo2 = {
|
|
5288
5599
|
name: "Core:Button",
|
|
5289
5600
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
5290
5601
|
defaultStyles: {
|
|
@@ -5320,7 +5631,7 @@ var componentInfo = {
|
|
|
5320
5631
|
};
|
|
5321
5632
|
|
|
5322
5633
|
// src/blocks/columns/component-info.ts
|
|
5323
|
-
var
|
|
5634
|
+
var componentInfo3 = {
|
|
5324
5635
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
5325
5636
|
name: "Columns",
|
|
5326
5637
|
isRSC: true,
|
|
@@ -5540,7 +5851,7 @@ var componentInfo2 = {
|
|
|
5540
5851
|
};
|
|
5541
5852
|
|
|
5542
5853
|
// src/blocks/fragment/component-info.ts
|
|
5543
|
-
var
|
|
5854
|
+
var componentInfo4 = {
|
|
5544
5855
|
name: "Fragment",
|
|
5545
5856
|
static: true,
|
|
5546
5857
|
hidden: true,
|
|
@@ -5549,7 +5860,7 @@ var componentInfo3 = {
|
|
|
5549
5860
|
};
|
|
5550
5861
|
|
|
5551
5862
|
// src/blocks/image/component-info.ts
|
|
5552
|
-
var
|
|
5863
|
+
var componentInfo5 = {
|
|
5553
5864
|
name: "Image",
|
|
5554
5865
|
static: true,
|
|
5555
5866
|
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",
|
|
@@ -5672,7 +5983,7 @@ var componentInfo4 = {
|
|
|
5672
5983
|
};
|
|
5673
5984
|
|
|
5674
5985
|
// src/blocks/section/component-info.ts
|
|
5675
|
-
var
|
|
5986
|
+
var componentInfo6 = {
|
|
5676
5987
|
name: "Core:Section",
|
|
5677
5988
|
static: true,
|
|
5678
5989
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -5714,7 +6025,7 @@ var componentInfo5 = {
|
|
|
5714
6025
|
};
|
|
5715
6026
|
|
|
5716
6027
|
// src/blocks/slot/component-info.ts
|
|
5717
|
-
var
|
|
6028
|
+
var componentInfo7 = {
|
|
5718
6029
|
name: "Slot",
|
|
5719
6030
|
isRSC: true,
|
|
5720
6031
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -5728,10 +6039,10 @@ var componentInfo6 = {
|
|
|
5728
6039
|
defaultValue: "children"
|
|
5729
6040
|
}]
|
|
5730
6041
|
};
|
|
5731
|
-
var _tmpl$
|
|
6042
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div>`);
|
|
5732
6043
|
function Slot(props) {
|
|
5733
6044
|
return (() => {
|
|
5734
|
-
const _el$ = _tmpl$
|
|
6045
|
+
const _el$ = _tmpl$7();
|
|
5735
6046
|
_el$.style.setProperty("pointer-events", "auto");
|
|
5736
6047
|
spread(_el$, mergeProps(() => !props.builderContext.context?.symbolId && {
|
|
5737
6048
|
"builder-slot": props.name
|
|
@@ -5756,7 +6067,7 @@ function Slot(props) {
|
|
|
5756
6067
|
var slot_default = Slot;
|
|
5757
6068
|
|
|
5758
6069
|
// src/blocks/symbol/component-info.ts
|
|
5759
|
-
var
|
|
6070
|
+
var componentInfo8 = {
|
|
5760
6071
|
name: "Symbol",
|
|
5761
6072
|
noWrap: true,
|
|
5762
6073
|
static: true,
|
|
@@ -5832,7 +6143,7 @@ var defaultElement = {
|
|
|
5832
6143
|
}
|
|
5833
6144
|
}
|
|
5834
6145
|
};
|
|
5835
|
-
var
|
|
6146
|
+
var componentInfo9 = {
|
|
5836
6147
|
name: "Builder: Tabs",
|
|
5837
6148
|
inputs: [{
|
|
5838
6149
|
name: "tabs",
|
|
@@ -5930,19 +6241,23 @@ var componentInfo8 = {
|
|
|
5930
6241
|
}]
|
|
5931
6242
|
}]
|
|
5932
6243
|
};
|
|
5933
|
-
var _tmpl$
|
|
5934
|
-
var _tmpl$
|
|
6244
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<div>`);
|
|
6245
|
+
var _tmpl$24 = /* @__PURE__ */ template(`<div><div class=builder-tabs-wrap>`);
|
|
5935
6246
|
var _tmpl$33 = /* @__PURE__ */ template(`<span>`);
|
|
5936
6247
|
function Tabs(props) {
|
|
5937
6248
|
const [activeTab, setActiveTab] = createSignal(props.defaultActiveTab ? props.defaultActiveTab - 1 : 0);
|
|
5938
6249
|
function activeTabContent(active) {
|
|
5939
6250
|
return props.tabs && props.tabs[active].content;
|
|
5940
6251
|
}
|
|
5941
|
-
function
|
|
5942
|
-
|
|
6252
|
+
function onClick(index) {
|
|
6253
|
+
if (index === activeTab() && props.collapsible) {
|
|
6254
|
+
setActiveTab(-1);
|
|
6255
|
+
} else {
|
|
6256
|
+
setActiveTab(index);
|
|
6257
|
+
}
|
|
5943
6258
|
}
|
|
5944
6259
|
return (() => {
|
|
5945
|
-
const _el$ = _tmpl$
|
|
6260
|
+
const _el$ = _tmpl$24(), _el$2 = _el$.firstChild;
|
|
5946
6261
|
_el$2.style.setProperty("display", "flex");
|
|
5947
6262
|
_el$2.style.setProperty("flex-direction", "row");
|
|
5948
6263
|
_el$2.style.setProperty("overflow", "auto");
|
|
@@ -5954,13 +6269,7 @@ function Tabs(props) {
|
|
|
5954
6269
|
const index = _index();
|
|
5955
6270
|
return (() => {
|
|
5956
6271
|
const _el$4 = _tmpl$33();
|
|
5957
|
-
_el$4.$$click = (event) =>
|
|
5958
|
-
if (index === activeTab() && props.collapsible) {
|
|
5959
|
-
setActiveTab(-1);
|
|
5960
|
-
} else {
|
|
5961
|
-
setActiveTab(index);
|
|
5962
|
-
}
|
|
5963
|
-
};
|
|
6272
|
+
_el$4.$$click = (event) => onClick(index);
|
|
5964
6273
|
setAttribute(_el$4, "key", index);
|
|
5965
6274
|
insert(_el$4, createComponent(blocks_default, {
|
|
5966
6275
|
get parent() {
|
|
@@ -5981,7 +6290,9 @@ function Tabs(props) {
|
|
|
5981
6290
|
}
|
|
5982
6291
|
}));
|
|
5983
6292
|
effect((_p$) => {
|
|
5984
|
-
const _v$ = `builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`, _v$2 =
|
|
6293
|
+
const _v$ = `builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`, _v$2 = {
|
|
6294
|
+
...activeTab() === index ? props.activeTabStyle : {}
|
|
6295
|
+
};
|
|
5985
6296
|
_v$ !== _p$._v$ && className(_el$4, _p$._v$ = _v$);
|
|
5986
6297
|
_p$._v$2 = style(_el$4, _v$2, _p$._v$2);
|
|
5987
6298
|
return _p$;
|
|
@@ -5998,7 +6309,7 @@ function Tabs(props) {
|
|
|
5998
6309
|
return activeTabContent(activeTab());
|
|
5999
6310
|
},
|
|
6000
6311
|
get children() {
|
|
6001
|
-
const _el$3 = _tmpl$
|
|
6312
|
+
const _el$3 = _tmpl$8();
|
|
6002
6313
|
insert(_el$3, createComponent(blocks_default, {
|
|
6003
6314
|
get parent() {
|
|
6004
6315
|
return props.builderBlock.id;
|
|
@@ -6030,7 +6341,7 @@ var tabs_default = Tabs;
|
|
|
6030
6341
|
delegateEvents(["click"]);
|
|
6031
6342
|
|
|
6032
6343
|
// src/blocks/text/component-info.ts
|
|
6033
|
-
var
|
|
6344
|
+
var componentInfo10 = {
|
|
6034
6345
|
name: "Text",
|
|
6035
6346
|
static: true,
|
|
6036
6347
|
isRSC: true,
|
|
@@ -6049,10 +6360,10 @@ var componentInfo9 = {
|
|
|
6049
6360
|
textAlign: "center"
|
|
6050
6361
|
}
|
|
6051
6362
|
};
|
|
6052
|
-
var _tmpl$
|
|
6363
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div class=builder-text>`);
|
|
6053
6364
|
function Text(props) {
|
|
6054
6365
|
return (() => {
|
|
6055
|
-
const _el$ = _tmpl$
|
|
6366
|
+
const _el$ = _tmpl$9();
|
|
6056
6367
|
_el$.style.setProperty("outline", "none");
|
|
6057
6368
|
effect(() => _el$.innerHTML = props.text?.toString() || "");
|
|
6058
6369
|
return _el$;
|
|
@@ -6061,7 +6372,7 @@ function Text(props) {
|
|
|
6061
6372
|
var text_default = Text;
|
|
6062
6373
|
|
|
6063
6374
|
// src/blocks/custom-code/component-info.ts
|
|
6064
|
-
var
|
|
6375
|
+
var componentInfo11 = {
|
|
6065
6376
|
name: "Custom Code",
|
|
6066
6377
|
static: true,
|
|
6067
6378
|
requiredPermissions: ["editCode"],
|
|
@@ -6084,7 +6395,7 @@ var componentInfo10 = {
|
|
|
6084
6395
|
advanced: true
|
|
6085
6396
|
}]
|
|
6086
6397
|
};
|
|
6087
|
-
var _tmpl$
|
|
6398
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div>`);
|
|
6088
6399
|
function CustomCode(props) {
|
|
6089
6400
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
6090
6401
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -6119,7 +6430,7 @@ function CustomCode(props) {
|
|
|
6119
6430
|
}
|
|
6120
6431
|
});
|
|
6121
6432
|
return (() => {
|
|
6122
|
-
const _el$ = _tmpl$
|
|
6433
|
+
const _el$ = _tmpl$10();
|
|
6123
6434
|
const _ref$ = elementRef;
|
|
6124
6435
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elementRef = _el$;
|
|
6125
6436
|
effect((_p$) => {
|
|
@@ -6137,7 +6448,7 @@ function CustomCode(props) {
|
|
|
6137
6448
|
var custom_code_default = CustomCode;
|
|
6138
6449
|
|
|
6139
6450
|
// src/blocks/embed/component-info.ts
|
|
6140
|
-
var
|
|
6451
|
+
var componentInfo12 = {
|
|
6141
6452
|
name: "Embed",
|
|
6142
6453
|
static: true,
|
|
6143
6454
|
inputs: [{
|
|
@@ -6179,7 +6490,7 @@ var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "applicati
|
|
|
6179
6490
|
var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
6180
6491
|
|
|
6181
6492
|
// src/blocks/embed/embed.tsx
|
|
6182
|
-
var _tmpl$
|
|
6493
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div class=builder-embed>`);
|
|
6183
6494
|
function Embed(props) {
|
|
6184
6495
|
const [scriptsInserted, setScriptsInserted] = createSignal([]);
|
|
6185
6496
|
const [scriptsRun, setScriptsRun] = createSignal([]);
|
|
@@ -6217,7 +6528,7 @@ function Embed(props) {
|
|
|
6217
6528
|
}
|
|
6218
6529
|
createEffect(on(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0));
|
|
6219
6530
|
return (() => {
|
|
6220
|
-
const _el$ = _tmpl$
|
|
6531
|
+
const _el$ = _tmpl$11();
|
|
6221
6532
|
const _ref$ = elem;
|
|
6222
6533
|
typeof _ref$ === "function" ? use(_ref$, _el$) : elem = _el$;
|
|
6223
6534
|
effect(() => _el$.innerHTML = props.content);
|
|
@@ -6227,7 +6538,7 @@ function Embed(props) {
|
|
|
6227
6538
|
var embed_default = Embed;
|
|
6228
6539
|
|
|
6229
6540
|
// src/blocks/form/form/component-info.ts
|
|
6230
|
-
var
|
|
6541
|
+
var componentInfo13 = {
|
|
6231
6542
|
name: "Form:Form",
|
|
6232
6543
|
// editableTags: ['builder-form-error']
|
|
6233
6544
|
defaults: {
|
|
@@ -6474,8 +6785,8 @@ var get = (obj, path, defaultValue) => {
|
|
|
6474
6785
|
};
|
|
6475
6786
|
|
|
6476
6787
|
// src/blocks/form/form/form.tsx
|
|
6477
|
-
var _tmpl$
|
|
6478
|
-
var _tmpl$
|
|
6788
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<pre>`);
|
|
6789
|
+
var _tmpl$25 = /* @__PURE__ */ template(`<form>`);
|
|
6479
6790
|
function FormComponent(props) {
|
|
6480
6791
|
const [formState, setFormState] = createSignal("unsubmitted");
|
|
6481
6792
|
const [responseData, setResponseData] = createSignal(null);
|
|
@@ -6504,11 +6815,11 @@ function FormComponent(props) {
|
|
|
6504
6815
|
return;
|
|
6505
6816
|
}
|
|
6506
6817
|
event.preventDefault();
|
|
6507
|
-
const el = event.currentTarget;
|
|
6818
|
+
const el = event.currentTarget || event.target;
|
|
6508
6819
|
const headers = props.customHeaders || {};
|
|
6509
6820
|
let body;
|
|
6510
6821
|
const formData = new FormData(el);
|
|
6511
|
-
const formPairs = Array.from(
|
|
6822
|
+
const formPairs = Array.from(el.querySelectorAll("input,select,textarea")).filter((el2) => !!el2.name).map((el2) => {
|
|
6512
6823
|
let value;
|
|
6513
6824
|
const key = el2.name;
|
|
6514
6825
|
if (el2 instanceof HTMLInputElement) {
|
|
@@ -6661,7 +6972,7 @@ function FormComponent(props) {
|
|
|
6661
6972
|
}
|
|
6662
6973
|
let formRef;
|
|
6663
6974
|
return (() => {
|
|
6664
|
-
const _el$ = _tmpl$
|
|
6975
|
+
const _el$ = _tmpl$25();
|
|
6665
6976
|
_el$.addEventListener("submit", (event) => onSubmit(event));
|
|
6666
6977
|
const _ref$ = formRef;
|
|
6667
6978
|
typeof _ref$ === "function" ? use(_ref$, _el$) : formRef = _el$;
|
|
@@ -6678,7 +6989,7 @@ function FormComponent(props) {
|
|
|
6678
6989
|
get name() {
|
|
6679
6990
|
return props.name;
|
|
6680
6991
|
}
|
|
6681
|
-
}, {}, () => props.attributes), false, true);
|
|
6992
|
+
}, {}, {}, () => props.attributes), false, true);
|
|
6682
6993
|
insert(_el$, createComponent(Show, {
|
|
6683
6994
|
get when() {
|
|
6684
6995
|
return props.builderBlock && props.builderBlock.children;
|
|
@@ -6744,7 +7055,7 @@ function FormComponent(props) {
|
|
|
6744
7055
|
return memo(() => submissionState() === "error")() && responseData();
|
|
6745
7056
|
},
|
|
6746
7057
|
get children() {
|
|
6747
|
-
const _el$2 = _tmpl$
|
|
7058
|
+
const _el$2 = _tmpl$12();
|
|
6748
7059
|
insert(_el$2, () => JSON.stringify(responseData(), null, 2));
|
|
6749
7060
|
effect(() => className(_el$2, "builder-form-error-text " + css({
|
|
6750
7061
|
padding: "10px",
|
|
@@ -6776,7 +7087,7 @@ function FormComponent(props) {
|
|
|
6776
7087
|
var form_default = FormComponent;
|
|
6777
7088
|
|
|
6778
7089
|
// src/blocks/form/input/component-info.ts
|
|
6779
|
-
var
|
|
7090
|
+
var componentInfo14 = {
|
|
6780
7091
|
name: "Form:Input",
|
|
6781
7092
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
6782
7093
|
inputs: [
|
|
@@ -6828,10 +7139,10 @@ var componentInfo13 = {
|
|
|
6828
7139
|
borderColor: "#ccc"
|
|
6829
7140
|
}
|
|
6830
7141
|
};
|
|
6831
|
-
var _tmpl$
|
|
7142
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<input>`);
|
|
6832
7143
|
function FormInputComponent(props) {
|
|
6833
7144
|
return (() => {
|
|
6834
|
-
const _el$ = _tmpl$
|
|
7145
|
+
const _el$ = _tmpl$13();
|
|
6835
7146
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
6836
7147
|
get key() {
|
|
6837
7148
|
return isEditing() && props.defaultValue ? props.defaultValue : "default-key";
|
|
@@ -6861,7 +7172,7 @@ function FormInputComponent(props) {
|
|
|
6861
7172
|
var input_default = FormInputComponent;
|
|
6862
7173
|
|
|
6863
7174
|
// src/blocks/form/select/component-info.ts
|
|
6864
|
-
var
|
|
7175
|
+
var componentInfo15 = {
|
|
6865
7176
|
name: "Form:Select",
|
|
6866
7177
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
6867
7178
|
defaultStyles: {
|
|
@@ -6904,11 +7215,11 @@ var componentInfo14 = {
|
|
|
6904
7215
|
static: true,
|
|
6905
7216
|
noWrap: true
|
|
6906
7217
|
};
|
|
6907
|
-
var _tmpl$
|
|
6908
|
-
var _tmpl$
|
|
7218
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<select>`);
|
|
7219
|
+
var _tmpl$26 = /* @__PURE__ */ template(`<option>`);
|
|
6909
7220
|
function SelectComponent(props) {
|
|
6910
7221
|
return (() => {
|
|
6911
|
-
const _el$ = _tmpl$
|
|
7222
|
+
const _el$ = _tmpl$14();
|
|
6912
7223
|
spread(_el$, mergeProps({}, () => props.attributes, {
|
|
6913
7224
|
get value() {
|
|
6914
7225
|
return props.value;
|
|
@@ -6930,7 +7241,7 @@ function SelectComponent(props) {
|
|
|
6930
7241
|
children: (option, _index) => {
|
|
6931
7242
|
const index = _index();
|
|
6932
7243
|
return (() => {
|
|
6933
|
-
const _el$2 = _tmpl$
|
|
7244
|
+
const _el$2 = _tmpl$26();
|
|
6934
7245
|
insert(_el$2, () => option.name || option.value);
|
|
6935
7246
|
effect(() => setAttribute(_el$2, "key", `${option.name}-${index}`));
|
|
6936
7247
|
effect(() => _el$2.value = option.value);
|
|
@@ -6944,7 +7255,7 @@ function SelectComponent(props) {
|
|
|
6944
7255
|
var select_default = SelectComponent;
|
|
6945
7256
|
|
|
6946
7257
|
// src/blocks/form/submit-button/component-info.ts
|
|
6947
|
-
var
|
|
7258
|
+
var componentInfo16 = {
|
|
6948
7259
|
name: "Form:SubmitButton",
|
|
6949
7260
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
6950
7261
|
defaultStyles: {
|
|
@@ -6970,10 +7281,10 @@ var componentInfo15 = {
|
|
|
6970
7281
|
// TODO: defaultChildren
|
|
6971
7282
|
// canHaveChildren: true,
|
|
6972
7283
|
};
|
|
6973
|
-
var _tmpl$
|
|
7284
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<button type=submit>`);
|
|
6974
7285
|
function SubmitButton(props) {
|
|
6975
7286
|
return (() => {
|
|
6976
|
-
const _el$ = _tmpl$
|
|
7287
|
+
const _el$ = _tmpl$15();
|
|
6977
7288
|
spread(_el$, mergeProps({}, () => props.attributes), false, true);
|
|
6978
7289
|
insert(_el$, () => props.text);
|
|
6979
7290
|
return _el$;
|
|
@@ -6982,7 +7293,7 @@ function SubmitButton(props) {
|
|
|
6982
7293
|
var submit_button_default = SubmitButton;
|
|
6983
7294
|
|
|
6984
7295
|
// src/blocks/img/component-info.ts
|
|
6985
|
-
var
|
|
7296
|
+
var componentInfo17 = {
|
|
6986
7297
|
// friendlyName?
|
|
6987
7298
|
name: "Raw:Img",
|
|
6988
7299
|
hideFromInsertMenu: true,
|
|
@@ -6997,10 +7308,10 @@ var componentInfo16 = {
|
|
|
6997
7308
|
noWrap: true,
|
|
6998
7309
|
static: true
|
|
6999
7310
|
};
|
|
7000
|
-
var _tmpl$
|
|
7311
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<img>`);
|
|
7001
7312
|
function ImgComponent(props) {
|
|
7002
7313
|
return (() => {
|
|
7003
|
-
const _el$ = _tmpl$
|
|
7314
|
+
const _el$ = _tmpl$16();
|
|
7004
7315
|
spread(_el$, mergeProps({
|
|
7005
7316
|
get style() {
|
|
7006
7317
|
return {
|
|
@@ -7024,7 +7335,7 @@ function ImgComponent(props) {
|
|
|
7024
7335
|
var img_default = ImgComponent;
|
|
7025
7336
|
|
|
7026
7337
|
// src/blocks/video/component-info.ts
|
|
7027
|
-
var
|
|
7338
|
+
var componentInfo18 = {
|
|
7028
7339
|
name: "Video",
|
|
7029
7340
|
canHaveChildren: true,
|
|
7030
7341
|
defaultStyles: {
|
|
@@ -7106,8 +7417,8 @@ var componentInfo17 = {
|
|
|
7106
7417
|
advanced: true
|
|
7107
7418
|
}]
|
|
7108
7419
|
};
|
|
7109
|
-
var _tmpl$
|
|
7110
|
-
var _tmpl$
|
|
7420
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<source type=video/mp4>`);
|
|
7421
|
+
var _tmpl$27 = /* @__PURE__ */ template(`<div>`);
|
|
7111
7422
|
var _tmpl$34 = /* @__PURE__ */ template(`<div><video class=builder-video>`);
|
|
7112
7423
|
function Video(props) {
|
|
7113
7424
|
const videoProps = createMemo(() => {
|
|
@@ -7169,7 +7480,7 @@ function Video(props) {
|
|
|
7169
7480
|
return !props.lazyLoad;
|
|
7170
7481
|
},
|
|
7171
7482
|
get children() {
|
|
7172
|
-
const _el$3 = _tmpl$
|
|
7483
|
+
const _el$3 = _tmpl$17();
|
|
7173
7484
|
effect(() => setAttribute(_el$3, "src", props.video));
|
|
7174
7485
|
return _el$3;
|
|
7175
7486
|
}
|
|
@@ -7179,7 +7490,7 @@ function Video(props) {
|
|
|
7179
7490
|
return props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length);
|
|
7180
7491
|
},
|
|
7181
7492
|
get children() {
|
|
7182
|
-
const _el$4 = _tmpl$
|
|
7493
|
+
const _el$4 = _tmpl$27();
|
|
7183
7494
|
_el$4.style.setProperty("width", "100%");
|
|
7184
7495
|
_el$4.style.setProperty("pointer-events", "none");
|
|
7185
7496
|
_el$4.style.setProperty("font-size", "0px");
|
|
@@ -7192,7 +7503,7 @@ function Video(props) {
|
|
|
7192
7503
|
return props.builderBlock?.children?.length && props.fitContent;
|
|
7193
7504
|
},
|
|
7194
7505
|
get children() {
|
|
7195
|
-
const _el$5 = _tmpl$
|
|
7506
|
+
const _el$5 = _tmpl$27();
|
|
7196
7507
|
_el$5.style.setProperty("display", "flex");
|
|
7197
7508
|
_el$5.style.setProperty("flex-direction", "column");
|
|
7198
7509
|
_el$5.style.setProperty("align-items", "stretch");
|
|
@@ -7205,7 +7516,7 @@ function Video(props) {
|
|
|
7205
7516
|
return props.builderBlock?.children?.length && !props.fitContent;
|
|
7206
7517
|
},
|
|
7207
7518
|
get children() {
|
|
7208
|
-
const _el$6 = _tmpl$
|
|
7519
|
+
const _el$6 = _tmpl$27();
|
|
7209
7520
|
_el$6.style.setProperty("pointer-events", "none");
|
|
7210
7521
|
_el$6.style.setProperty("display", "flex");
|
|
7211
7522
|
_el$6.style.setProperty("flex-direction", "column");
|
|
@@ -7227,58 +7538,61 @@ var video_default = Video;
|
|
|
7227
7538
|
// src/constants/extra-components.ts
|
|
7228
7539
|
var getExtraComponents = () => [{
|
|
7229
7540
|
component: custom_code_default,
|
|
7230
|
-
...
|
|
7541
|
+
...componentInfo11
|
|
7231
7542
|
}, {
|
|
7232
7543
|
component: embed_default,
|
|
7233
|
-
...
|
|
7544
|
+
...componentInfo12
|
|
7234
7545
|
}, ...TARGET === "rsc" ? [] : [{
|
|
7235
7546
|
component: form_default,
|
|
7236
|
-
...
|
|
7547
|
+
...componentInfo13
|
|
7237
7548
|
}, {
|
|
7238
7549
|
component: input_default,
|
|
7239
|
-
...
|
|
7550
|
+
...componentInfo14
|
|
7240
7551
|
}, {
|
|
7241
7552
|
component: submit_button_default,
|
|
7242
|
-
...
|
|
7553
|
+
...componentInfo16
|
|
7243
7554
|
}, {
|
|
7244
7555
|
component: select_default,
|
|
7245
|
-
...
|
|
7556
|
+
...componentInfo15
|
|
7246
7557
|
}], {
|
|
7247
7558
|
component: img_default,
|
|
7248
|
-
...
|
|
7559
|
+
...componentInfo17
|
|
7249
7560
|
}, {
|
|
7250
7561
|
component: video_default,
|
|
7251
|
-
...
|
|
7562
|
+
...componentInfo18
|
|
7252
7563
|
}];
|
|
7253
7564
|
|
|
7254
7565
|
// src/constants/builder-registered-components.ts
|
|
7255
7566
|
var getDefaultRegisteredComponents = () => [{
|
|
7256
7567
|
component: button_default,
|
|
7257
|
-
...
|
|
7568
|
+
...componentInfo2
|
|
7258
7569
|
}, {
|
|
7259
7570
|
component: columns_default,
|
|
7260
|
-
...
|
|
7571
|
+
...componentInfo3
|
|
7261
7572
|
}, {
|
|
7262
7573
|
component: fragment_default,
|
|
7263
|
-
...
|
|
7574
|
+
...componentInfo4
|
|
7264
7575
|
}, {
|
|
7265
7576
|
component: image_default,
|
|
7266
|
-
...
|
|
7577
|
+
...componentInfo5
|
|
7267
7578
|
}, {
|
|
7268
7579
|
component: section_default,
|
|
7269
|
-
...
|
|
7580
|
+
...componentInfo6
|
|
7270
7581
|
}, {
|
|
7271
7582
|
component: slot_default,
|
|
7272
|
-
...
|
|
7583
|
+
...componentInfo7
|
|
7273
7584
|
}, {
|
|
7274
7585
|
component: symbol_default,
|
|
7275
|
-
...
|
|
7586
|
+
...componentInfo8
|
|
7276
7587
|
}, {
|
|
7277
7588
|
component: text_default,
|
|
7278
|
-
...
|
|
7589
|
+
...componentInfo10
|
|
7279
7590
|
}, ...TARGET === "rsc" ? [] : [{
|
|
7280
7591
|
component: tabs_default,
|
|
7281
|
-
...
|
|
7592
|
+
...componentInfo9
|
|
7593
|
+
}, {
|
|
7594
|
+
component: accordion_default,
|
|
7595
|
+
...componentInfo
|
|
7282
7596
|
}], ...getExtraComponents()];
|
|
7283
7597
|
|
|
7284
7598
|
// src/functions/register-component.ts
|
|
@@ -7348,10 +7662,10 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
7348
7662
|
}) => `window.${UPDATE_VARIANT_VISIBILITY_SCRIPT_FN_NAME}(
|
|
7349
7663
|
"${variationId}", "${contentId}", ${isHydrationTarget}
|
|
7350
7664
|
)`;
|
|
7351
|
-
var _tmpl$
|
|
7665
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<script>`);
|
|
7352
7666
|
function InlinedScript(props) {
|
|
7353
7667
|
return (() => {
|
|
7354
|
-
const _el$ = _tmpl$
|
|
7668
|
+
const _el$ = _tmpl$18();
|
|
7355
7669
|
effect((_p$) => {
|
|
7356
7670
|
const _v$ = props.scriptStr, _v$2 = props.id;
|
|
7357
7671
|
_v$ !== _p$._v$ && (_el$.innerHTML = _p$._v$ = _v$);
|
|
@@ -7862,7 +8176,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7862
8176
|
}
|
|
7863
8177
|
|
|
7864
8178
|
// src/constants/sdk-version.ts
|
|
7865
|
-
var SDK_VERSION = "1.0.
|
|
8179
|
+
var SDK_VERSION = "1.0.29";
|
|
7866
8180
|
|
|
7867
8181
|
// src/functions/register.ts
|
|
7868
8182
|
var registry = {};
|
|
@@ -8328,7 +8642,7 @@ function EnableEditor(props) {
|
|
|
8328
8642
|
if (isPreviewing() && !isEditing()) {
|
|
8329
8643
|
const searchParams = new URL(location.href).searchParams;
|
|
8330
8644
|
const searchParamPreviewModel = searchParams.get("builder.preview");
|
|
8331
|
-
const searchParamPreviewId = searchParams.get(`builder.
|
|
8645
|
+
const searchParamPreviewId = searchParams.get(`builder.overrides.${searchParamPreviewModel}`);
|
|
8332
8646
|
const previewApiKey = searchParams.get("apiKey") || searchParams.get("builder.space");
|
|
8333
8647
|
if (searchParamPreviewModel === props.model && previewApiKey === props.apiKey && (!props.content || searchParamPreviewId === props.content.id)) {
|
|
8334
8648
|
fetchOneEntry({
|
|
@@ -8346,7 +8660,7 @@ function EnableEditor(props) {
|
|
|
8346
8660
|
});
|
|
8347
8661
|
onMount(() => {
|
|
8348
8662
|
if (!props.apiKey) {
|
|
8349
|
-
logger.error("No API key provided to `
|
|
8663
|
+
logger.error("No API key provided to `Content` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
|
|
8350
8664
|
}
|
|
8351
8665
|
evaluateJsCode();
|
|
8352
8666
|
runHttpRequests();
|
|
@@ -8848,7 +9162,7 @@ var fetchSymbolContent = async ({
|
|
|
8848
9162
|
};
|
|
8849
9163
|
|
|
8850
9164
|
// src/blocks/symbol/symbol.tsx
|
|
8851
|
-
var _tmpl$
|
|
9165
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<div>`);
|
|
8852
9166
|
function Symbol2(props) {
|
|
8853
9167
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
8854
9168
|
const blocksWrapper = createMemo(() => {
|
|
@@ -8880,7 +9194,7 @@ function Symbol2(props) {
|
|
|
8880
9194
|
}
|
|
8881
9195
|
createEffect(on(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
8882
9196
|
return (() => {
|
|
8883
|
-
const _el$ = _tmpl$
|
|
9197
|
+
const _el$ = _tmpl$19();
|
|
8884
9198
|
spread(_el$, mergeProps({
|
|
8885
9199
|
get ["class"]() {
|
|
8886
9200
|
return className();
|