@builder.io/sdk-solid 1.0.22 → 1.0.24
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 +458 -179
- package/lib/browser/dev.jsx +463 -228
- package/lib/browser/index.js +458 -179
- package/lib/browser/index.jsx +463 -228
- package/lib/edge/dev.js +458 -179
- package/lib/edge/dev.jsx +463 -228
- package/lib/edge/index.js +458 -179
- package/lib/edge/index.jsx +463 -228
- package/lib/node/dev.js +458 -179
- package/lib/node/dev.jsx +463 -228
- package/lib/node/index.js +458 -179
- package/lib/node/index.jsx +463 -228
- package/package.json +1 -1
package/lib/edge/index.jsx
CHANGED
|
@@ -54,14 +54,15 @@ var getClassPropName = () => {
|
|
|
54
54
|
case "vue":
|
|
55
55
|
case "solid":
|
|
56
56
|
case "qwik":
|
|
57
|
+
case "angular":
|
|
57
58
|
return "class";
|
|
58
59
|
}
|
|
59
60
|
};
|
|
60
61
|
|
|
61
62
|
// src/blocks/button/button.tsx
|
|
62
63
|
function Button(props) {
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
function attrs() {
|
|
65
|
+
return {
|
|
65
66
|
...props.attributes,
|
|
66
67
|
[getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
|
|
67
68
|
...props.link ? {
|
|
@@ -71,7 +72,10 @@ function Button(props) {
|
|
|
71
72
|
} : {
|
|
72
73
|
role: "button"
|
|
73
74
|
}
|
|
74
|
-
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
return <Dynamic_renderer_default
|
|
78
|
+
attributes={attrs()}
|
|
75
79
|
TagName={props.link ? props.builderLinkComponent || "a" : "button"}
|
|
76
80
|
actionAttributes={{}}
|
|
77
81
|
>{props.text}</Dynamic_renderer_default>;
|
|
@@ -79,7 +83,7 @@ function Button(props) {
|
|
|
79
83
|
var button_default = Button;
|
|
80
84
|
|
|
81
85
|
// src/blocks/columns/columns.tsx
|
|
82
|
-
import { Show as Show6, For as For4, createSignal as
|
|
86
|
+
import { Show as Show6, For as For4, createSignal as createSignal7 } from "solid-js";
|
|
83
87
|
import { css as css2 } from "solid-styled-components";
|
|
84
88
|
|
|
85
89
|
// src/components/blocks/blocks.tsx
|
|
@@ -107,7 +111,7 @@ import { createContext as createContext2 } from "solid-js";
|
|
|
107
111
|
var components_context_default = createContext2({ registeredComponents: {} });
|
|
108
112
|
|
|
109
113
|
// src/components/block/block.tsx
|
|
110
|
-
import { Show as Show4, For as For2, onMount, createMemo as
|
|
114
|
+
import { Show as Show4, For as For2, onMount, createMemo as createMemo5 } from "solid-js";
|
|
111
115
|
|
|
112
116
|
// src/functions/get-block-component-options.ts
|
|
113
117
|
function getBlockComponentOptions(block) {
|
|
@@ -3519,7 +3523,6 @@ function evaluate({
|
|
|
3519
3523
|
enableCache
|
|
3520
3524
|
}) {
|
|
3521
3525
|
if (code === "") {
|
|
3522
|
-
logger.warn("Skipping evaluation of empty code block.");
|
|
3523
3526
|
return void 0;
|
|
3524
3527
|
}
|
|
3525
3528
|
const args = {
|
|
@@ -3850,6 +3853,7 @@ function mapStyleObjToStrIfNeeded(style) {
|
|
|
3850
3853
|
case "svelte":
|
|
3851
3854
|
case "vue":
|
|
3852
3855
|
case "solid":
|
|
3856
|
+
case "angular":
|
|
3853
3857
|
return convertStyleMapToCSSArray(style).join(" ");
|
|
3854
3858
|
case "qwik":
|
|
3855
3859
|
case "reactNative":
|
|
@@ -3922,6 +3926,12 @@ var getRepeatItemData = ({
|
|
|
3922
3926
|
}));
|
|
3923
3927
|
return repeatArray;
|
|
3924
3928
|
};
|
|
3929
|
+
var shouldPassLinkComponent = (blockName) => {
|
|
3930
|
+
return blockName && ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(blockName);
|
|
3931
|
+
};
|
|
3932
|
+
var shouldPassRegisteredComponents = (blockName) => {
|
|
3933
|
+
return blockName && ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(blockName);
|
|
3934
|
+
};
|
|
3925
3935
|
|
|
3926
3936
|
// src/components/block/components/block-styles.tsx
|
|
3927
3937
|
import { Show as Show2, createMemo } from "solid-js";
|
|
@@ -4165,15 +4175,15 @@ function BlockWrapper(props) {
|
|
|
4165
4175
|
var Block_wrapper_default = BlockWrapper;
|
|
4166
4176
|
|
|
4167
4177
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
4168
|
-
import { Show as Show3, For, createSignal as
|
|
4178
|
+
import { Show as Show3, For, createSignal as createSignal3 } from "solid-js";
|
|
4169
4179
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
4170
4180
|
|
|
4171
4181
|
// src/components/block/components/interactive-element.tsx
|
|
4182
|
+
import { createMemo as createMemo2 } from "solid-js";
|
|
4172
4183
|
import { Dynamic as Dynamic2 } from "solid-js/web";
|
|
4173
4184
|
function InteractiveElement(props) {
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
attributes={props.includeBlockProps ? {
|
|
4185
|
+
const attributes = createMemo2(() => {
|
|
4186
|
+
return props.includeBlockProps ? {
|
|
4177
4187
|
...getBlockProperties({
|
|
4178
4188
|
block: props.block,
|
|
4179
4189
|
context: props.context
|
|
@@ -4185,7 +4195,11 @@ function InteractiveElement(props) {
|
|
|
4185
4195
|
localState: props.context.localState,
|
|
4186
4196
|
context: props.context.context
|
|
4187
4197
|
})
|
|
4188
|
-
} : {}
|
|
4198
|
+
} : {};
|
|
4199
|
+
});
|
|
4200
|
+
return <Dynamic2
|
|
4201
|
+
{...props.wrapperProps}
|
|
4202
|
+
attributes={attributes()}
|
|
4189
4203
|
component={props.Wrapper}
|
|
4190
4204
|
>{props.children}</Dynamic2>;
|
|
4191
4205
|
}
|
|
@@ -4226,7 +4240,7 @@ var getWrapperProps = ({
|
|
|
4226
4240
|
|
|
4227
4241
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
4228
4242
|
function ComponentRef(props) {
|
|
4229
|
-
const [Wrapper, setWrapper] =
|
|
4243
|
+
const [Wrapper, setWrapper] = createSignal3(
|
|
4230
4244
|
props.isInteractive ? interactive_element_default : props.componentRef
|
|
4231
4245
|
);
|
|
4232
4246
|
return <Show3 when={props.componentRef}><Dynamic3
|
|
@@ -4255,9 +4269,9 @@ function ComponentRef(props) {
|
|
|
4255
4269
|
var Component_ref_default = ComponentRef;
|
|
4256
4270
|
|
|
4257
4271
|
// src/components/block/components/repeated-block.tsx
|
|
4258
|
-
import { createSignal as
|
|
4272
|
+
import { createSignal as createSignal4 } from "solid-js";
|
|
4259
4273
|
function RepeatedBlock(props) {
|
|
4260
|
-
const [store, setStore] =
|
|
4274
|
+
const [store, setStore] = createSignal4(props.repeatContext);
|
|
4261
4275
|
return <builder_context_default.Provider value={store()}><Block_default
|
|
4262
4276
|
block={props.block}
|
|
4263
4277
|
context={store()}
|
|
@@ -4269,20 +4283,20 @@ var Repeated_block_default = RepeatedBlock;
|
|
|
4269
4283
|
|
|
4270
4284
|
// src/components/block/block.tsx
|
|
4271
4285
|
function Block(props) {
|
|
4272
|
-
const blockComponent =
|
|
4286
|
+
const blockComponent = createMemo5(() => {
|
|
4273
4287
|
return getComponent({
|
|
4274
4288
|
block: props.block,
|
|
4275
4289
|
context: props.context,
|
|
4276
4290
|
registeredComponents: props.registeredComponents
|
|
4277
4291
|
});
|
|
4278
4292
|
});
|
|
4279
|
-
const repeatItem =
|
|
4293
|
+
const repeatItem = createMemo5(() => {
|
|
4280
4294
|
return getRepeatItemData({
|
|
4281
4295
|
block: props.block,
|
|
4282
4296
|
context: props.context
|
|
4283
4297
|
});
|
|
4284
4298
|
});
|
|
4285
|
-
const processedBlock =
|
|
4299
|
+
const processedBlock = createMemo5(() => {
|
|
4286
4300
|
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
4287
4301
|
block: props.block,
|
|
4288
4302
|
localState: props.context.localState,
|
|
@@ -4292,14 +4306,14 @@ function Block(props) {
|
|
|
4292
4306
|
shouldEvaluateBindings: true
|
|
4293
4307
|
});
|
|
4294
4308
|
});
|
|
4295
|
-
const Tag =
|
|
4309
|
+
const Tag = createMemo5(() => {
|
|
4296
4310
|
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
4297
4311
|
if (shouldUseLink) {
|
|
4298
4312
|
return props.linkComponent || "a";
|
|
4299
4313
|
}
|
|
4300
4314
|
return props.block.tagName || "div";
|
|
4301
4315
|
});
|
|
4302
|
-
const canShowBlock =
|
|
4316
|
+
const canShowBlock = createMemo5(() => {
|
|
4303
4317
|
if (props.block.repeat?.collection) {
|
|
4304
4318
|
if (repeatItem()?.length)
|
|
4305
4319
|
return true;
|
|
@@ -4309,21 +4323,21 @@ function Block(props) {
|
|
|
4309
4323
|
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
4310
4324
|
return shouldShow && !shouldHide;
|
|
4311
4325
|
});
|
|
4312
|
-
const childrenWithoutParentComponent =
|
|
4326
|
+
const childrenWithoutParentComponent = createMemo5(() => {
|
|
4313
4327
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
4314
4328
|
return shouldRenderChildrenOutsideRef ? processedBlock().children ?? [] : [];
|
|
4315
4329
|
});
|
|
4316
|
-
const componentRefProps =
|
|
4330
|
+
const componentRefProps = createMemo5(() => {
|
|
4317
4331
|
return {
|
|
4318
4332
|
blockChildren: processedBlock().children ?? [],
|
|
4319
4333
|
componentRef: blockComponent()?.component,
|
|
4320
4334
|
componentOptions: {
|
|
4321
4335
|
...getBlockComponentOptions(processedBlock()),
|
|
4322
4336
|
builderContext: props.context,
|
|
4323
|
-
...
|
|
4337
|
+
...shouldPassLinkComponent(blockComponent()?.name) ? {
|
|
4324
4338
|
builderLinkComponent: props.linkComponent
|
|
4325
4339
|
} : {},
|
|
4326
|
-
...
|
|
4340
|
+
...shouldPassRegisteredComponents(blockComponent()?.name) ? {
|
|
4327
4341
|
builderComponents: props.registeredComponents
|
|
4328
4342
|
} : {}
|
|
4329
4343
|
},
|
|
@@ -4407,11 +4421,11 @@ function Block(props) {
|
|
|
4407
4421
|
var Block_default = Block;
|
|
4408
4422
|
|
|
4409
4423
|
// src/components/blocks/blocks-wrapper.tsx
|
|
4410
|
-
import { createMemo as
|
|
4424
|
+
import { createMemo as createMemo6 } from "solid-js";
|
|
4411
4425
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
4412
4426
|
import { css } from "solid-styled-components";
|
|
4413
4427
|
function BlocksWrapper(props) {
|
|
4414
|
-
const className =
|
|
4428
|
+
const className = createMemo6(() => {
|
|
4415
4429
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
4416
4430
|
});
|
|
4417
4431
|
function onClick() {
|
|
@@ -4485,16 +4499,24 @@ function Blocks(props) {
|
|
|
4485
4499
|
}
|
|
4486
4500
|
var Blocks_default = Blocks;
|
|
4487
4501
|
|
|
4502
|
+
// src/blocks/columns/helpers.ts
|
|
4503
|
+
var getColumnsClass = (id2) => {
|
|
4504
|
+
return `builder-columns ${id2}-breakpoints`;
|
|
4505
|
+
};
|
|
4506
|
+
|
|
4488
4507
|
// src/blocks/columns/columns.tsx
|
|
4489
4508
|
function Columns(props) {
|
|
4490
|
-
const [gutterSize, setGutterSize] =
|
|
4509
|
+
const [gutterSize, setGutterSize] = createSignal7(
|
|
4491
4510
|
typeof props.space === "number" ? props.space || 0 : 20
|
|
4492
4511
|
);
|
|
4493
|
-
const [cols, setCols] =
|
|
4494
|
-
const [stackAt, setStackAt] =
|
|
4495
|
-
const [flexDir, setFlexDir] =
|
|
4512
|
+
const [cols, setCols] = createSignal7(props.columns || []);
|
|
4513
|
+
const [stackAt, setStackAt] = createSignal7(props.stackColumnsAt || "tablet");
|
|
4514
|
+
const [flexDir, setFlexDir] = createSignal7(
|
|
4496
4515
|
props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
4497
4516
|
);
|
|
4517
|
+
function getTagName(column) {
|
|
4518
|
+
return column.link ? props.builderLinkComponent || "a" : "div";
|
|
4519
|
+
}
|
|
4498
4520
|
function getWidth(index) {
|
|
4499
4521
|
return cols()[index]?.width || 100 / cols().length;
|
|
4500
4522
|
}
|
|
@@ -4514,7 +4536,7 @@ function Columns(props) {
|
|
|
4514
4536
|
}) {
|
|
4515
4537
|
return stackAt() === "never" ? desktopStyle : stackedStyle;
|
|
4516
4538
|
}
|
|
4517
|
-
|
|
4539
|
+
function columnsCssVars() {
|
|
4518
4540
|
return {
|
|
4519
4541
|
"--flex-dir": flexDir(),
|
|
4520
4542
|
"--flex-dir-tablet": getTabletStyle({
|
|
@@ -4522,7 +4544,7 @@ function Columns(props) {
|
|
|
4522
4544
|
desktopStyle: "row"
|
|
4523
4545
|
})
|
|
4524
4546
|
};
|
|
4525
|
-
}
|
|
4547
|
+
}
|
|
4526
4548
|
function columnCssVars(index) {
|
|
4527
4549
|
const gutter = index === 0 ? 0 : gutterSize();
|
|
4528
4550
|
const width = getColumnCssWidth(index);
|
|
@@ -4563,7 +4585,7 @@ function Columns(props) {
|
|
|
4563
4585
|
);
|
|
4564
4586
|
return breakpointSizes[size].max;
|
|
4565
4587
|
}
|
|
4566
|
-
|
|
4588
|
+
function columnsStyles() {
|
|
4567
4589
|
return `
|
|
4568
4590
|
@media (max-width: ${getWidthForBreakpointSize("medium")}px) {
|
|
4569
4591
|
.${props.builderBlock.id}-breakpoints {
|
|
@@ -4589,9 +4611,19 @@ function Columns(props) {
|
|
|
4589
4611
|
}
|
|
4590
4612
|
},
|
|
4591
4613
|
`;
|
|
4592
|
-
}
|
|
4614
|
+
}
|
|
4615
|
+
function getAttributes(column, index) {
|
|
4616
|
+
return {
|
|
4617
|
+
...{},
|
|
4618
|
+
...column.link ? {
|
|
4619
|
+
href: column.link
|
|
4620
|
+
} : {},
|
|
4621
|
+
[getClassPropName()]: "builder-column",
|
|
4622
|
+
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
4623
|
+
};
|
|
4624
|
+
}
|
|
4593
4625
|
return <div
|
|
4594
|
-
class={
|
|
4626
|
+
class={getColumnsClass(props.builderBlock?.id) + " " + css2({
|
|
4595
4627
|
display: "flex",
|
|
4596
4628
|
lineHeight: "normal"
|
|
4597
4629
|
})}
|
|
@@ -4606,16 +4638,9 @@ function Columns(props) {
|
|
|
4606
4638
|
const index = _index();
|
|
4607
4639
|
return <Dynamic_renderer_default
|
|
4608
4640
|
key={index}
|
|
4609
|
-
TagName={column
|
|
4641
|
+
TagName={getTagName(column)}
|
|
4610
4642
|
actionAttributes={{}}
|
|
4611
|
-
attributes={
|
|
4612
|
-
...{},
|
|
4613
|
-
...column.link ? {
|
|
4614
|
-
href: column.link
|
|
4615
|
-
} : {},
|
|
4616
|
-
[getClassPropName()]: "builder-column",
|
|
4617
|
-
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
4618
|
-
}}
|
|
4643
|
+
attributes={getAttributes(column, index)}
|
|
4619
4644
|
><Blocks_default
|
|
4620
4645
|
path={`component.options.columns.${index}.blocks`}
|
|
4621
4646
|
parent={props.builderBlock.id}
|
|
@@ -4639,7 +4664,7 @@ function FragmentComponent(props) {
|
|
|
4639
4664
|
var fragment_default = FragmentComponent;
|
|
4640
4665
|
|
|
4641
4666
|
// src/blocks/image/image.tsx
|
|
4642
|
-
import { Show as Show7, createMemo as
|
|
4667
|
+
import { Show as Show7, createMemo as createMemo8 } from "solid-js";
|
|
4643
4668
|
import { css as css3 } from "solid-styled-components";
|
|
4644
4669
|
|
|
4645
4670
|
// src/blocks/image/image.helpers.ts
|
|
@@ -4691,7 +4716,7 @@ function getSrcSet(url) {
|
|
|
4691
4716
|
|
|
4692
4717
|
// src/blocks/image/image.tsx
|
|
4693
4718
|
function Image(props) {
|
|
4694
|
-
const srcSetToUse =
|
|
4719
|
+
const srcSetToUse = createMemo8(() => {
|
|
4695
4720
|
const imageToUse = props.image || props.src;
|
|
4696
4721
|
const url = imageToUse;
|
|
4697
4722
|
if (!url || // We can auto add srcset for cdn.builder.io and shopify
|
|
@@ -4708,14 +4733,14 @@ function Image(props) {
|
|
|
4708
4733
|
}
|
|
4709
4734
|
return getSrcSet(url);
|
|
4710
4735
|
});
|
|
4711
|
-
const webpSrcSet =
|
|
4736
|
+
const webpSrcSet = createMemo8(() => {
|
|
4712
4737
|
if (srcSetToUse()?.match(/builder\.io/) && !props.noWebp) {
|
|
4713
4738
|
return srcSetToUse().replace(/\?/g, "?format=webp&");
|
|
4714
4739
|
} else {
|
|
4715
4740
|
return "";
|
|
4716
4741
|
}
|
|
4717
4742
|
});
|
|
4718
|
-
const aspectRatioCss =
|
|
4743
|
+
const aspectRatioCss = createMemo8(() => {
|
|
4719
4744
|
const aspectRatioStyles = {
|
|
4720
4745
|
position: "absolute",
|
|
4721
4746
|
height: "100%",
|
|
@@ -4760,7 +4785,7 @@ function Image(props) {
|
|
|
4760
4785
|
}}
|
|
4761
4786
|
/></Show7>
|
|
4762
4787
|
<Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
|
|
4763
|
-
<Show7 when={!props.fitContent && props.children}><div
|
|
4788
|
+
<Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div
|
|
4764
4789
|
class={css3({
|
|
4765
4790
|
display: "flex",
|
|
4766
4791
|
flexDirection: "column",
|
|
@@ -4798,10 +4823,10 @@ function SectionComponent(props) {
|
|
|
4798
4823
|
var section_default = SectionComponent;
|
|
4799
4824
|
|
|
4800
4825
|
// src/blocks/symbol/symbol.tsx
|
|
4801
|
-
import { onMount as onMount5, on as on3, createEffect as createEffect3, createMemo as
|
|
4826
|
+
import { onMount as onMount5, on as on3, createEffect as createEffect3, createMemo as createMemo18, createSignal as createSignal18 } from "solid-js";
|
|
4802
4827
|
|
|
4803
4828
|
// src/components/content-variants/content-variants.tsx
|
|
4804
|
-
import { Show as
|
|
4829
|
+
import { Show as Show13, For as For8, onMount as onMount4, createSignal as createSignal17, createMemo as createMemo17 } from "solid-js";
|
|
4805
4830
|
|
|
4806
4831
|
// src/helpers/url.ts
|
|
4807
4832
|
var getTopLevelDomain = (host) => {
|
|
@@ -4995,7 +5020,7 @@ var handleABTesting = async ({
|
|
|
4995
5020
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
4996
5021
|
|
|
4997
5022
|
// src/components/content/content.tsx
|
|
4998
|
-
import { Show as
|
|
5023
|
+
import { Show as Show12, createSignal as createSignal16 } from "solid-js";
|
|
4999
5024
|
|
|
5000
5025
|
// src/blocks/button/component-info.ts
|
|
5001
5026
|
var componentInfo = {
|
|
@@ -5496,8 +5521,203 @@ var componentInfo7 = {
|
|
|
5496
5521
|
}]
|
|
5497
5522
|
};
|
|
5498
5523
|
|
|
5499
|
-
// src/blocks/
|
|
5524
|
+
// src/blocks/tabs/component-info.ts
|
|
5525
|
+
var defaultTab = {
|
|
5526
|
+
"@type": "@builder.io/sdk:Element",
|
|
5527
|
+
responsiveStyles: {
|
|
5528
|
+
large: {
|
|
5529
|
+
paddingLeft: "20px",
|
|
5530
|
+
paddingRight: "20px",
|
|
5531
|
+
paddingTop: "10px",
|
|
5532
|
+
paddingBottom: "10px",
|
|
5533
|
+
minWidth: "100px",
|
|
5534
|
+
textAlign: "center",
|
|
5535
|
+
display: "flex",
|
|
5536
|
+
flexDirection: "column",
|
|
5537
|
+
cursor: "pointer",
|
|
5538
|
+
userSelect: "none"
|
|
5539
|
+
}
|
|
5540
|
+
},
|
|
5541
|
+
component: {
|
|
5542
|
+
name: "Text",
|
|
5543
|
+
options: {
|
|
5544
|
+
text: "New tab"
|
|
5545
|
+
}
|
|
5546
|
+
}
|
|
5547
|
+
};
|
|
5548
|
+
var defaultElement = {
|
|
5549
|
+
"@type": "@builder.io/sdk:Element",
|
|
5550
|
+
responsiveStyles: {
|
|
5551
|
+
large: {
|
|
5552
|
+
height: "200px",
|
|
5553
|
+
display: "flex",
|
|
5554
|
+
marginTop: "20px",
|
|
5555
|
+
flexDirection: "column"
|
|
5556
|
+
}
|
|
5557
|
+
},
|
|
5558
|
+
component: {
|
|
5559
|
+
name: "Text",
|
|
5560
|
+
options: {
|
|
5561
|
+
text: "New tab content "
|
|
5562
|
+
}
|
|
5563
|
+
}
|
|
5564
|
+
};
|
|
5500
5565
|
var componentInfo8 = {
|
|
5566
|
+
name: "Builder: Tabs",
|
|
5567
|
+
inputs: [{
|
|
5568
|
+
name: "tabs",
|
|
5569
|
+
type: "list",
|
|
5570
|
+
broadcast: true,
|
|
5571
|
+
subFields: [{
|
|
5572
|
+
name: "label",
|
|
5573
|
+
type: "uiBlocks",
|
|
5574
|
+
hideFromUI: true,
|
|
5575
|
+
defaultValue: [defaultTab]
|
|
5576
|
+
}, {
|
|
5577
|
+
name: "content",
|
|
5578
|
+
type: "uiBlocks",
|
|
5579
|
+
hideFromUI: true,
|
|
5580
|
+
defaultValue: [defaultElement]
|
|
5581
|
+
}],
|
|
5582
|
+
defaultValue: [{
|
|
5583
|
+
label: [{
|
|
5584
|
+
...defaultTab,
|
|
5585
|
+
component: {
|
|
5586
|
+
name: "Text",
|
|
5587
|
+
options: {
|
|
5588
|
+
text: "Tab 1"
|
|
5589
|
+
}
|
|
5590
|
+
}
|
|
5591
|
+
}],
|
|
5592
|
+
content: [{
|
|
5593
|
+
...defaultElement,
|
|
5594
|
+
component: {
|
|
5595
|
+
name: "Text",
|
|
5596
|
+
options: {
|
|
5597
|
+
text: "Tab 1 content"
|
|
5598
|
+
}
|
|
5599
|
+
}
|
|
5600
|
+
}]
|
|
5601
|
+
}, {
|
|
5602
|
+
label: [{
|
|
5603
|
+
...defaultTab,
|
|
5604
|
+
component: {
|
|
5605
|
+
name: "Text",
|
|
5606
|
+
options: {
|
|
5607
|
+
text: "Tab 2"
|
|
5608
|
+
}
|
|
5609
|
+
}
|
|
5610
|
+
}],
|
|
5611
|
+
content: [{
|
|
5612
|
+
...defaultElement,
|
|
5613
|
+
component: {
|
|
5614
|
+
name: "Text",
|
|
5615
|
+
options: {
|
|
5616
|
+
text: "Tab 2 content"
|
|
5617
|
+
}
|
|
5618
|
+
}
|
|
5619
|
+
}]
|
|
5620
|
+
}]
|
|
5621
|
+
}, {
|
|
5622
|
+
name: "activeTabStyle",
|
|
5623
|
+
type: "uiStyle",
|
|
5624
|
+
helperText: "CSS styles for the active tab",
|
|
5625
|
+
defaultValue: {
|
|
5626
|
+
backgroundColor: "rgba(0, 0, 0, 0.1)"
|
|
5627
|
+
}
|
|
5628
|
+
}, {
|
|
5629
|
+
name: "defaultActiveTab",
|
|
5630
|
+
type: "number",
|
|
5631
|
+
helperText: 'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',
|
|
5632
|
+
defaultValue: 1,
|
|
5633
|
+
advanced: true
|
|
5634
|
+
}, {
|
|
5635
|
+
name: "collapsible",
|
|
5636
|
+
type: "boolean",
|
|
5637
|
+
helperText: "If on, clicking an open tab closes it so no tabs are active",
|
|
5638
|
+
defaultValue: false,
|
|
5639
|
+
advanced: true
|
|
5640
|
+
}, {
|
|
5641
|
+
name: "tabHeaderLayout",
|
|
5642
|
+
type: "enum",
|
|
5643
|
+
helperText: "Change the layout of the tab headers (uses justify-content)",
|
|
5644
|
+
defaultValue: "flex-start",
|
|
5645
|
+
enum: [{
|
|
5646
|
+
label: "Center",
|
|
5647
|
+
value: "center"
|
|
5648
|
+
}, {
|
|
5649
|
+
label: "Space between",
|
|
5650
|
+
value: "space-between"
|
|
5651
|
+
}, {
|
|
5652
|
+
label: "Space around",
|
|
5653
|
+
value: "space-around"
|
|
5654
|
+
}, {
|
|
5655
|
+
label: "Left",
|
|
5656
|
+
value: "flex-start"
|
|
5657
|
+
}, {
|
|
5658
|
+
label: "Right",
|
|
5659
|
+
value: "flex-end"
|
|
5660
|
+
}]
|
|
5661
|
+
}]
|
|
5662
|
+
};
|
|
5663
|
+
|
|
5664
|
+
// src/blocks/tabs/tabs.tsx
|
|
5665
|
+
import { Show as Show8, For as For5, createSignal as createSignal9 } from "solid-js";
|
|
5666
|
+
function Tabs(props) {
|
|
5667
|
+
const [activeTab, setActiveTab] = createSignal9(
|
|
5668
|
+
props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
|
|
5669
|
+
);
|
|
5670
|
+
function activeTabContent(active) {
|
|
5671
|
+
return props.tabs && props.tabs[active].content;
|
|
5672
|
+
}
|
|
5673
|
+
function getActiveTabStyle(index) {
|
|
5674
|
+
return activeTab() === index ? props.activeTabStyle : {};
|
|
5675
|
+
}
|
|
5676
|
+
return <div>
|
|
5677
|
+
<div
|
|
5678
|
+
class="builder-tabs-wrap"
|
|
5679
|
+
style={{
|
|
5680
|
+
display: "flex",
|
|
5681
|
+
"flex-direction": "row",
|
|
5682
|
+
"justify-content": props.tabHeaderLayout || "flex-start",
|
|
5683
|
+
overflow: "auto"
|
|
5684
|
+
}}
|
|
5685
|
+
><For5 each={props.tabs}>{(tab, _index) => {
|
|
5686
|
+
const index = _index();
|
|
5687
|
+
return <span
|
|
5688
|
+
class={`builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`}
|
|
5689
|
+
key={index}
|
|
5690
|
+
style={getActiveTabStyle(index)}
|
|
5691
|
+
onClick={(event) => {
|
|
5692
|
+
if (index === activeTab() && props.collapsible) {
|
|
5693
|
+
setActiveTab(-1);
|
|
5694
|
+
} else {
|
|
5695
|
+
setActiveTab(index);
|
|
5696
|
+
}
|
|
5697
|
+
}}
|
|
5698
|
+
><Blocks_default
|
|
5699
|
+
parent={props.builderBlock.id}
|
|
5700
|
+
path={`component.options.tabs.${index}.label`}
|
|
5701
|
+
blocks={tab.label}
|
|
5702
|
+
context={props.builderContext}
|
|
5703
|
+
registeredComponents={props.builderComponents}
|
|
5704
|
+
linkComponent={props.builderLinkComponent}
|
|
5705
|
+
/></span>;
|
|
5706
|
+
}}</For5></div>
|
|
5707
|
+
<Show8 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
5708
|
+
parent={props.builderBlock.id}
|
|
5709
|
+
path={`component.options.tabs.${activeTab()}.content`}
|
|
5710
|
+
blocks={activeTabContent(activeTab())}
|
|
5711
|
+
context={props.builderContext}
|
|
5712
|
+
registeredComponents={props.builderComponents}
|
|
5713
|
+
linkComponent={props.builderLinkComponent}
|
|
5714
|
+
/></div></Show8>
|
|
5715
|
+
</div>;
|
|
5716
|
+
}
|
|
5717
|
+
var tabs_default = Tabs;
|
|
5718
|
+
|
|
5719
|
+
// src/blocks/text/component-info.ts
|
|
5720
|
+
var componentInfo9 = {
|
|
5501
5721
|
name: "Text",
|
|
5502
5722
|
static: true,
|
|
5503
5723
|
isRSC: true,
|
|
@@ -5530,7 +5750,7 @@ function Text(props) {
|
|
|
5530
5750
|
var text_default = Text;
|
|
5531
5751
|
|
|
5532
5752
|
// src/blocks/custom-code/component-info.ts
|
|
5533
|
-
var
|
|
5753
|
+
var componentInfo10 = {
|
|
5534
5754
|
name: "Custom Code",
|
|
5535
5755
|
static: true,
|
|
5536
5756
|
requiredPermissions: ["editCode"],
|
|
@@ -5555,10 +5775,10 @@ var componentInfo9 = {
|
|
|
5555
5775
|
};
|
|
5556
5776
|
|
|
5557
5777
|
// src/blocks/custom-code/custom-code.tsx
|
|
5558
|
-
import { onMount as onMount2, createSignal as
|
|
5778
|
+
import { onMount as onMount2, createSignal as createSignal10 } from "solid-js";
|
|
5559
5779
|
function CustomCode(props) {
|
|
5560
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
5561
|
-
const [scriptsRun, setScriptsRun] =
|
|
5780
|
+
const [scriptsInserted, setScriptsInserted] = createSignal10([]);
|
|
5781
|
+
const [scriptsRun, setScriptsRun] = createSignal10([]);
|
|
5562
5782
|
let elementRef;
|
|
5563
5783
|
onMount2(() => {
|
|
5564
5784
|
if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
|
|
@@ -5601,7 +5821,7 @@ function CustomCode(props) {
|
|
|
5601
5821
|
var custom_code_default = CustomCode;
|
|
5602
5822
|
|
|
5603
5823
|
// src/blocks/embed/component-info.ts
|
|
5604
|
-
var
|
|
5824
|
+
var componentInfo11 = {
|
|
5605
5825
|
name: "Embed",
|
|
5606
5826
|
static: true,
|
|
5607
5827
|
inputs: [{
|
|
@@ -5639,7 +5859,7 @@ var componentInfo10 = {
|
|
|
5639
5859
|
};
|
|
5640
5860
|
|
|
5641
5861
|
// src/blocks/embed/embed.tsx
|
|
5642
|
-
import { on, createEffect, createMemo as
|
|
5862
|
+
import { on, createEffect, createMemo as createMemo11, createSignal as createSignal11 } from "solid-js";
|
|
5643
5863
|
|
|
5644
5864
|
// src/blocks/embed/helpers.ts
|
|
5645
5865
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -5647,9 +5867,9 @@ var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
|
5647
5867
|
|
|
5648
5868
|
// src/blocks/embed/embed.tsx
|
|
5649
5869
|
function Embed(props) {
|
|
5650
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
5651
|
-
const [scriptsRun, setScriptsRun] =
|
|
5652
|
-
const [ranInitFn, setRanInitFn] =
|
|
5870
|
+
const [scriptsInserted, setScriptsInserted] = createSignal11([]);
|
|
5871
|
+
const [scriptsRun, setScriptsRun] = createSignal11([]);
|
|
5872
|
+
const [ranInitFn, setRanInitFn] = createSignal11(false);
|
|
5653
5873
|
function findAndRunScripts() {
|
|
5654
5874
|
if (!elem || !elem.getElementsByTagName)
|
|
5655
5875
|
return;
|
|
@@ -5672,8 +5892,8 @@ function Embed(props) {
|
|
|
5672
5892
|
}
|
|
5673
5893
|
}
|
|
5674
5894
|
let elem;
|
|
5675
|
-
const onUpdateFn_0_elem =
|
|
5676
|
-
const onUpdateFn_0_ranInitFn__ =
|
|
5895
|
+
const onUpdateFn_0_elem = createMemo11(() => elem);
|
|
5896
|
+
const onUpdateFn_0_ranInitFn__ = createMemo11(() => ranInitFn());
|
|
5677
5897
|
function onUpdateFn_0() {
|
|
5678
5898
|
if (elem && !ranInitFn()) {
|
|
5679
5899
|
setRanInitFn(true);
|
|
@@ -5688,7 +5908,7 @@ function Embed(props) {
|
|
|
5688
5908
|
var embed_default = Embed;
|
|
5689
5909
|
|
|
5690
5910
|
// src/blocks/form/form/component-info.ts
|
|
5691
|
-
var
|
|
5911
|
+
var componentInfo12 = {
|
|
5692
5912
|
name: "Form:Form",
|
|
5693
5913
|
// editableTags: ['builder-form-error']
|
|
5694
5914
|
defaults: {
|
|
@@ -5922,7 +6142,7 @@ var componentInfo11 = {
|
|
|
5922
6142
|
};
|
|
5923
6143
|
|
|
5924
6144
|
// src/blocks/form/form/form.tsx
|
|
5925
|
-
import { Show as
|
|
6145
|
+
import { Show as Show9, For as For6, createSignal as createSignal12 } from "solid-js";
|
|
5926
6146
|
import { css as css4 } from "solid-styled-components";
|
|
5927
6147
|
|
|
5928
6148
|
// src/functions/get-env.ts
|
|
@@ -5940,9 +6160,9 @@ var get = (obj, path, defaultValue) => {
|
|
|
5940
6160
|
|
|
5941
6161
|
// src/blocks/form/form/form.tsx
|
|
5942
6162
|
function FormComponent(props) {
|
|
5943
|
-
const [formState, setFormState] =
|
|
5944
|
-
const [responseData, setResponseData] =
|
|
5945
|
-
const [formErrorMessage, setFormErrorMessage] =
|
|
6163
|
+
const [formState, setFormState] = createSignal12("unsubmitted");
|
|
6164
|
+
const [responseData, setResponseData] = createSignal12(null);
|
|
6165
|
+
const [formErrorMessage, setFormErrorMessage] = createSignal12("");
|
|
5946
6166
|
function mergeNewRootState(newData) {
|
|
5947
6167
|
const combinedState = {
|
|
5948
6168
|
...props.builderContext.rootState,
|
|
@@ -6138,7 +6358,7 @@ function FormComponent(props) {
|
|
|
6138
6358
|
{...{}}
|
|
6139
6359
|
{...props.attributes}
|
|
6140
6360
|
>
|
|
6141
|
-
<
|
|
6361
|
+
<Show9 when={props.builderBlock && props.builderBlock.children}><For6 each={props.builderBlock?.children}>{(block, _index) => {
|
|
6142
6362
|
const idx = _index();
|
|
6143
6363
|
return <Block_default
|
|
6144
6364
|
key={`form-block-${idx}`}
|
|
@@ -6147,35 +6367,35 @@ function FormComponent(props) {
|
|
|
6147
6367
|
registeredComponents={props.builderComponents}
|
|
6148
6368
|
linkComponent={props.builderLinkComponent}
|
|
6149
6369
|
/>;
|
|
6150
|
-
}}</
|
|
6151
|
-
<
|
|
6370
|
+
}}</For6></Show9>
|
|
6371
|
+
<Show9 when={submissionState() === "error"}><Blocks_default
|
|
6152
6372
|
path="errorMessage"
|
|
6153
6373
|
blocks={props.errorMessage}
|
|
6154
6374
|
context={props.builderContext}
|
|
6155
|
-
/></
|
|
6156
|
-
<
|
|
6375
|
+
/></Show9>
|
|
6376
|
+
<Show9 when={submissionState() === "sending"}><Blocks_default
|
|
6157
6377
|
path="sendingMessage"
|
|
6158
6378
|
blocks={props.sendingMessage}
|
|
6159
6379
|
context={props.builderContext}
|
|
6160
|
-
/></
|
|
6161
|
-
<
|
|
6380
|
+
/></Show9>
|
|
6381
|
+
<Show9 when={submissionState() === "error" && responseData()}><pre
|
|
6162
6382
|
class={"builder-form-error-text " + css4({
|
|
6163
6383
|
padding: "10px",
|
|
6164
6384
|
color: "red",
|
|
6165
6385
|
textAlign: "center"
|
|
6166
6386
|
})}
|
|
6167
|
-
>{JSON.stringify(responseData(), null, 2)}</pre></
|
|
6168
|
-
<
|
|
6387
|
+
>{JSON.stringify(responseData(), null, 2)}</pre></Show9>
|
|
6388
|
+
<Show9 when={submissionState() === "success"}><Blocks_default
|
|
6169
6389
|
path="successMessage"
|
|
6170
6390
|
blocks={props.successMessage}
|
|
6171
6391
|
context={props.builderContext}
|
|
6172
|
-
/></
|
|
6392
|
+
/></Show9>
|
|
6173
6393
|
</form>;
|
|
6174
6394
|
}
|
|
6175
6395
|
var form_default = FormComponent;
|
|
6176
6396
|
|
|
6177
6397
|
// src/blocks/form/input/component-info.ts
|
|
6178
|
-
var
|
|
6398
|
+
var componentInfo13 = {
|
|
6179
6399
|
name: "Form:Input",
|
|
6180
6400
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
6181
6401
|
inputs: [
|
|
@@ -6245,7 +6465,7 @@ function FormInputComponent(props) {
|
|
|
6245
6465
|
var input_default = FormInputComponent;
|
|
6246
6466
|
|
|
6247
6467
|
// src/blocks/form/select/component-info.ts
|
|
6248
|
-
var
|
|
6468
|
+
var componentInfo14 = {
|
|
6249
6469
|
name: "Form:Select",
|
|
6250
6470
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
6251
6471
|
defaultStyles: {
|
|
@@ -6290,7 +6510,7 @@ var componentInfo13 = {
|
|
|
6290
6510
|
};
|
|
6291
6511
|
|
|
6292
6512
|
// src/blocks/form/select/select.tsx
|
|
6293
|
-
import { For as
|
|
6513
|
+
import { For as For7 } from "solid-js";
|
|
6294
6514
|
function SelectComponent(props) {
|
|
6295
6515
|
return <select
|
|
6296
6516
|
{...{}}
|
|
@@ -6299,15 +6519,15 @@ function SelectComponent(props) {
|
|
|
6299
6519
|
key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
|
|
6300
6520
|
defaultValue={props.defaultValue}
|
|
6301
6521
|
name={props.name}
|
|
6302
|
-
><
|
|
6522
|
+
><For7 each={props.options}>{(option, _index) => {
|
|
6303
6523
|
const index = _index();
|
|
6304
6524
|
return <option key={`${option.name}-${index}`} value={option.value}>{option.name || option.value}</option>;
|
|
6305
|
-
}}</
|
|
6525
|
+
}}</For7></select>;
|
|
6306
6526
|
}
|
|
6307
6527
|
var select_default = SelectComponent;
|
|
6308
6528
|
|
|
6309
6529
|
// src/blocks/form/submit-button/component-info.ts
|
|
6310
|
-
var
|
|
6530
|
+
var componentInfo15 = {
|
|
6311
6531
|
name: "Form:SubmitButton",
|
|
6312
6532
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
6313
6533
|
defaultStyles: {
|
|
@@ -6341,7 +6561,7 @@ function SubmitButton(props) {
|
|
|
6341
6561
|
var submit_button_default = SubmitButton;
|
|
6342
6562
|
|
|
6343
6563
|
// src/blocks/img/component-info.ts
|
|
6344
|
-
var
|
|
6564
|
+
var componentInfo16 = {
|
|
6345
6565
|
// friendlyName?
|
|
6346
6566
|
name: "Raw:Img",
|
|
6347
6567
|
hideFromInsertMenu: true,
|
|
@@ -6374,7 +6594,7 @@ function ImgComponent(props) {
|
|
|
6374
6594
|
var img_default = ImgComponent;
|
|
6375
6595
|
|
|
6376
6596
|
// src/blocks/video/component-info.ts
|
|
6377
|
-
var
|
|
6597
|
+
var componentInfo17 = {
|
|
6378
6598
|
name: "Video",
|
|
6379
6599
|
canHaveChildren: true,
|
|
6380
6600
|
defaultStyles: {
|
|
@@ -6458,9 +6678,9 @@ var componentInfo16 = {
|
|
|
6458
6678
|
};
|
|
6459
6679
|
|
|
6460
6680
|
// src/blocks/video/video.tsx
|
|
6461
|
-
import { Show as
|
|
6681
|
+
import { Show as Show10, createMemo as createMemo13 } from "solid-js";
|
|
6462
6682
|
function Video(props) {
|
|
6463
|
-
const videoProps =
|
|
6683
|
+
const videoProps = createMemo13(() => {
|
|
6464
6684
|
return {
|
|
6465
6685
|
...props.autoPlay === true ? {
|
|
6466
6686
|
autoPlay: true
|
|
@@ -6479,7 +6699,7 @@ function Video(props) {
|
|
|
6479
6699
|
} : {}
|
|
6480
6700
|
};
|
|
6481
6701
|
});
|
|
6482
|
-
const spreadProps =
|
|
6702
|
+
const spreadProps = createMemo13(() => {
|
|
6483
6703
|
return {
|
|
6484
6704
|
...videoProps()
|
|
6485
6705
|
};
|
|
@@ -6509,8 +6729,8 @@ function Video(props) {
|
|
|
6509
6729
|
}}
|
|
6510
6730
|
src={props.video || "no-src"}
|
|
6511
6731
|
poster={props.posterImage}
|
|
6512
|
-
><
|
|
6513
|
-
<
|
|
6732
|
+
><Show10 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show10></video>
|
|
6733
|
+
<Show10
|
|
6514
6734
|
when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
|
|
6515
6735
|
><div
|
|
6516
6736
|
style={{
|
|
@@ -6519,15 +6739,15 @@ function Video(props) {
|
|
|
6519
6739
|
"pointer-events": "none",
|
|
6520
6740
|
"font-size": "0px"
|
|
6521
6741
|
}}
|
|
6522
|
-
/></
|
|
6523
|
-
<
|
|
6742
|
+
/></Show10>
|
|
6743
|
+
<Show10 when={props.builderBlock?.children?.length && props.fitContent}><div
|
|
6524
6744
|
style={{
|
|
6525
6745
|
display: "flex",
|
|
6526
6746
|
"flex-direction": "column",
|
|
6527
6747
|
"align-items": "stretch"
|
|
6528
6748
|
}}
|
|
6529
|
-
>{props.children}</div></
|
|
6530
|
-
<
|
|
6749
|
+
>{props.children}</div></Show10>
|
|
6750
|
+
<Show10 when={props.builderBlock?.children?.length && !props.fitContent}><div
|
|
6531
6751
|
style={{
|
|
6532
6752
|
"pointer-events": "none",
|
|
6533
6753
|
display: "flex",
|
|
@@ -6539,7 +6759,7 @@ function Video(props) {
|
|
|
6539
6759
|
width: "100%",
|
|
6540
6760
|
height: "100%"
|
|
6541
6761
|
}}
|
|
6542
|
-
>{props.children}</div></
|
|
6762
|
+
>{props.children}</div></Show10>
|
|
6543
6763
|
</div>;
|
|
6544
6764
|
}
|
|
6545
6765
|
var video_default = Video;
|
|
@@ -6547,28 +6767,28 @@ var video_default = Video;
|
|
|
6547
6767
|
// src/constants/extra-components.ts
|
|
6548
6768
|
var getExtraComponents = () => [{
|
|
6549
6769
|
component: custom_code_default,
|
|
6550
|
-
...
|
|
6770
|
+
...componentInfo10
|
|
6551
6771
|
}, {
|
|
6552
6772
|
component: embed_default,
|
|
6553
|
-
...
|
|
6773
|
+
...componentInfo11
|
|
6554
6774
|
}, ...TARGET === "rsc" ? [] : [{
|
|
6555
6775
|
component: form_default,
|
|
6556
|
-
...
|
|
6776
|
+
...componentInfo12
|
|
6557
6777
|
}, {
|
|
6558
6778
|
component: input_default,
|
|
6559
|
-
...
|
|
6779
|
+
...componentInfo13
|
|
6560
6780
|
}, {
|
|
6561
6781
|
component: submit_button_default,
|
|
6562
|
-
...
|
|
6782
|
+
...componentInfo15
|
|
6563
6783
|
}, {
|
|
6564
6784
|
component: select_default,
|
|
6565
|
-
...
|
|
6785
|
+
...componentInfo14
|
|
6566
6786
|
}], {
|
|
6567
6787
|
component: img_default,
|
|
6568
|
-
...
|
|
6788
|
+
...componentInfo16
|
|
6569
6789
|
}, {
|
|
6570
6790
|
component: video_default,
|
|
6571
|
-
...
|
|
6791
|
+
...componentInfo17
|
|
6572
6792
|
}];
|
|
6573
6793
|
|
|
6574
6794
|
// src/constants/builder-registered-components.ts
|
|
@@ -6595,8 +6815,11 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
6595
6815
|
...componentInfo7
|
|
6596
6816
|
}, {
|
|
6597
6817
|
component: text_default,
|
|
6818
|
+
...componentInfo9
|
|
6819
|
+
}, ...TARGET === "rsc" ? [] : [{
|
|
6820
|
+
component: tabs_default,
|
|
6598
6821
|
...componentInfo8
|
|
6599
|
-
}, ...getExtraComponents()];
|
|
6822
|
+
}], ...getExtraComponents()];
|
|
6600
6823
|
|
|
6601
6824
|
// src/functions/register-component.ts
|
|
6602
6825
|
var createRegisterComponentMessage = (info) => ({
|
|
@@ -6674,12 +6897,12 @@ var Inlined_script_default = InlinedScript;
|
|
|
6674
6897
|
|
|
6675
6898
|
// src/components/content/components/enable-editor.tsx
|
|
6676
6899
|
import {
|
|
6677
|
-
Show as
|
|
6900
|
+
Show as Show11,
|
|
6678
6901
|
onMount as onMount3,
|
|
6679
6902
|
on as on2,
|
|
6680
6903
|
createEffect as createEffect2,
|
|
6681
|
-
createMemo as
|
|
6682
|
-
createSignal as
|
|
6904
|
+
createMemo as createMemo14,
|
|
6905
|
+
createSignal as createSignal14
|
|
6683
6906
|
} from "solid-js";
|
|
6684
6907
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
6685
6908
|
|
|
@@ -7162,7 +7385,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7162
7385
|
}
|
|
7163
7386
|
|
|
7164
7387
|
// src/constants/sdk-version.ts
|
|
7165
|
-
var SDK_VERSION = "1.0.
|
|
7388
|
+
var SDK_VERSION = "1.0.24";
|
|
7166
7389
|
|
|
7167
7390
|
// src/functions/register.ts
|
|
7168
7391
|
var registry = {};
|
|
@@ -7358,14 +7581,93 @@ var subscribeToEditor = (model, callback, options) => {
|
|
|
7358
7581
|
};
|
|
7359
7582
|
};
|
|
7360
7583
|
|
|
7584
|
+
// src/components/content/components/styles.helpers.ts
|
|
7585
|
+
var getCssFromFont = (font) => {
|
|
7586
|
+
const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
|
|
7587
|
+
const name = family.split(",")[0];
|
|
7588
|
+
const url = font.fileUrl ?? font?.files?.regular;
|
|
7589
|
+
let str = "";
|
|
7590
|
+
if (url && family && name) {
|
|
7591
|
+
str += `
|
|
7592
|
+
@font-face {
|
|
7593
|
+
font-family: "${family}";
|
|
7594
|
+
src: local("${name}"), url('${url}') format('woff2');
|
|
7595
|
+
font-display: fallback;
|
|
7596
|
+
font-weight: 400;
|
|
7597
|
+
}
|
|
7598
|
+
`.trim();
|
|
7599
|
+
}
|
|
7600
|
+
if (font.files) {
|
|
7601
|
+
for (const weight in font.files) {
|
|
7602
|
+
const isNumber = String(Number(weight)) === weight;
|
|
7603
|
+
if (!isNumber) {
|
|
7604
|
+
continue;
|
|
7605
|
+
}
|
|
7606
|
+
const weightUrl = font.files[weight];
|
|
7607
|
+
if (weightUrl && weightUrl !== url) {
|
|
7608
|
+
str += `
|
|
7609
|
+
@font-face {
|
|
7610
|
+
font-family: "${family}";
|
|
7611
|
+
src: url('${weightUrl}') format('woff2');
|
|
7612
|
+
font-display: fallback;
|
|
7613
|
+
font-weight: ${weight};
|
|
7614
|
+
}
|
|
7615
|
+
`.trim();
|
|
7616
|
+
}
|
|
7617
|
+
}
|
|
7618
|
+
}
|
|
7619
|
+
return str;
|
|
7620
|
+
};
|
|
7621
|
+
var getFontCss = ({
|
|
7622
|
+
customFonts
|
|
7623
|
+
}) => {
|
|
7624
|
+
return customFonts?.map((font) => getCssFromFont(font))?.join(" ") || "";
|
|
7625
|
+
};
|
|
7626
|
+
var getCss = ({
|
|
7627
|
+
cssCode,
|
|
7628
|
+
contentId
|
|
7629
|
+
}) => {
|
|
7630
|
+
if (!cssCode) {
|
|
7631
|
+
return "";
|
|
7632
|
+
}
|
|
7633
|
+
if (!contentId) {
|
|
7634
|
+
return cssCode;
|
|
7635
|
+
}
|
|
7636
|
+
return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
|
|
7637
|
+
};
|
|
7638
|
+
var DEFAULT_STYLES = `
|
|
7639
|
+
.builder-button {
|
|
7640
|
+
all: unset;
|
|
7641
|
+
}
|
|
7642
|
+
|
|
7643
|
+
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
7644
|
+
margin: 0;
|
|
7645
|
+
}
|
|
7646
|
+
.builder-text > p, .builder-text > .builder-paragraph {
|
|
7647
|
+
color: inherit;
|
|
7648
|
+
line-height: inherit;
|
|
7649
|
+
letter-spacing: inherit;
|
|
7650
|
+
font-weight: inherit;
|
|
7651
|
+
font-size: inherit;
|
|
7652
|
+
text-align: inherit;
|
|
7653
|
+
font-family: inherit;
|
|
7654
|
+
}
|
|
7655
|
+
`;
|
|
7656
|
+
var getDefaultStyles = (isNested) => {
|
|
7657
|
+
return !isNested ? DEFAULT_STYLES : "";
|
|
7658
|
+
};
|
|
7659
|
+
var getWrapperClassName = (variationId) => {
|
|
7660
|
+
return `variant-${variationId}`;
|
|
7661
|
+
};
|
|
7662
|
+
|
|
7361
7663
|
// src/components/content/components/enable-editor.tsx
|
|
7362
7664
|
function EnableEditor(props) {
|
|
7363
|
-
const [ContentWrapper, setContentWrapper] =
|
|
7665
|
+
const [ContentWrapper, setContentWrapper] = createSignal14(
|
|
7364
7666
|
props.contentWrapper || "div"
|
|
7365
7667
|
);
|
|
7366
|
-
const [httpReqsData, setHttpReqsData] =
|
|
7367
|
-
const [httpReqsPending, setHttpReqsPending] =
|
|
7368
|
-
const [clicked, setClicked] =
|
|
7668
|
+
const [httpReqsData, setHttpReqsData] = createSignal14({});
|
|
7669
|
+
const [httpReqsPending, setHttpReqsPending] = createSignal14({});
|
|
7670
|
+
const [clicked, setClicked] = createSignal14(false);
|
|
7369
7671
|
function mergeNewRootState(newData) {
|
|
7370
7672
|
const combinedState = {
|
|
7371
7673
|
...props.builderContextSignal.rootState,
|
|
@@ -7399,6 +7701,12 @@ function EnableEditor(props) {
|
|
|
7399
7701
|
content: newContentValue
|
|
7400
7702
|
}));
|
|
7401
7703
|
}
|
|
7704
|
+
const showContentProps = createMemo14(() => {
|
|
7705
|
+
return props.showContent ? {} : {
|
|
7706
|
+
hidden: true,
|
|
7707
|
+
"aria-hidden": true
|
|
7708
|
+
};
|
|
7709
|
+
});
|
|
7402
7710
|
function processMessage(event) {
|
|
7403
7711
|
return createEditorListener({
|
|
7404
7712
|
model: props.model,
|
|
@@ -7583,14 +7891,14 @@ function EnableEditor(props) {
|
|
|
7583
7891
|
runHttpRequests();
|
|
7584
7892
|
emitStateUpdate();
|
|
7585
7893
|
});
|
|
7586
|
-
const onUpdateFn_0_props_content =
|
|
7894
|
+
const onUpdateFn_0_props_content = createMemo14(() => props.content);
|
|
7587
7895
|
function onUpdateFn_0() {
|
|
7588
7896
|
if (props.content) {
|
|
7589
7897
|
mergeNewContent(props.content);
|
|
7590
7898
|
}
|
|
7591
7899
|
}
|
|
7592
7900
|
createEffect2(on2(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
7593
|
-
const onUpdateFn_1_props_builderContextSignal_content__data__jsCode =
|
|
7901
|
+
const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo14(() => props.builderContextSignal.content?.data?.jsCode);
|
|
7594
7902
|
function onUpdateFn_1() {
|
|
7595
7903
|
evaluateJsCode();
|
|
7596
7904
|
}
|
|
@@ -7600,7 +7908,7 @@ function EnableEditor(props) {
|
|
|
7600
7908
|
onUpdateFn_1
|
|
7601
7909
|
)
|
|
7602
7910
|
);
|
|
7603
|
-
const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests =
|
|
7911
|
+
const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo14(() => props.builderContextSignal.content?.data?.httpRequests);
|
|
7604
7912
|
function onUpdateFn_2() {
|
|
7605
7913
|
runHttpRequests();
|
|
7606
7914
|
}
|
|
@@ -7612,7 +7920,7 @@ function EnableEditor(props) {
|
|
|
7612
7920
|
onUpdateFn_2
|
|
7613
7921
|
)
|
|
7614
7922
|
);
|
|
7615
|
-
const onUpdateFn_3_props_builderContextSignal_rootState =
|
|
7923
|
+
const onUpdateFn_3_props_builderContextSignal_rootState = createMemo14(
|
|
7616
7924
|
() => props.builderContextSignal.rootState
|
|
7617
7925
|
);
|
|
7618
7926
|
function onUpdateFn_3() {
|
|
@@ -7624,14 +7932,14 @@ function EnableEditor(props) {
|
|
|
7624
7932
|
onUpdateFn_3
|
|
7625
7933
|
)
|
|
7626
7934
|
);
|
|
7627
|
-
const onUpdateFn_4_props_data =
|
|
7935
|
+
const onUpdateFn_4_props_data = createMemo14(() => props.data);
|
|
7628
7936
|
function onUpdateFn_4() {
|
|
7629
7937
|
if (props.data) {
|
|
7630
7938
|
mergeNewRootState(props.data);
|
|
7631
7939
|
}
|
|
7632
7940
|
}
|
|
7633
7941
|
createEffect2(on2(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
|
|
7634
|
-
const onUpdateFn_5_props_locale =
|
|
7942
|
+
const onUpdateFn_5_props_locale = createMemo14(() => props.locale);
|
|
7635
7943
|
function onUpdateFn_5() {
|
|
7636
7944
|
if (props.locale) {
|
|
7637
7945
|
mergeNewRootState({
|
|
@@ -7640,106 +7948,27 @@ function EnableEditor(props) {
|
|
|
7640
7948
|
}
|
|
7641
7949
|
}
|
|
7642
7950
|
createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
|
|
7643
|
-
return <builder_context_default.Provider value={props.builderContextSignal}><
|
|
7644
|
-
class={
|
|
7951
|
+
return <builder_context_default.Provider value={props.builderContextSignal}><Show11 when={props.builderContextSignal.content}><Dynamic5
|
|
7952
|
+
class={getWrapperClassName(
|
|
7953
|
+
props.content?.testVariationId || props.content?.id
|
|
7954
|
+
)}
|
|
7645
7955
|
{...{}}
|
|
7646
7956
|
ref={elementRef}
|
|
7647
7957
|
onClick={(event) => onClick(event)}
|
|
7648
7958
|
builder-content-id={props.builderContextSignal.content?.id}
|
|
7649
7959
|
builder-model={props.model}
|
|
7650
7960
|
{...{}}
|
|
7651
|
-
{...
|
|
7652
|
-
hidden: true,
|
|
7653
|
-
"aria-hidden": true
|
|
7654
|
-
}}
|
|
7961
|
+
{...showContentProps()}
|
|
7655
7962
|
{...props.contentWrapperProps}
|
|
7656
7963
|
component={ContentWrapper()}
|
|
7657
|
-
>{props.children}</Dynamic5></
|
|
7964
|
+
>{props.children}</Dynamic5></Show11></builder_context_default.Provider>;
|
|
7658
7965
|
}
|
|
7659
7966
|
var Enable_editor_default = EnableEditor;
|
|
7660
7967
|
|
|
7661
7968
|
// src/components/content/components/styles.tsx
|
|
7662
|
-
import { createSignal as
|
|
7663
|
-
|
|
7664
|
-
// src/components/content/components/styles.helpers.ts
|
|
7665
|
-
var getCssFromFont = (font) => {
|
|
7666
|
-
const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
|
|
7667
|
-
const name = family.split(",")[0];
|
|
7668
|
-
const url = font.fileUrl ?? font?.files?.regular;
|
|
7669
|
-
let str = "";
|
|
7670
|
-
if (url && family && name) {
|
|
7671
|
-
str += `
|
|
7672
|
-
@font-face {
|
|
7673
|
-
font-family: "${family}";
|
|
7674
|
-
src: local("${name}"), url('${url}') format('woff2');
|
|
7675
|
-
font-display: fallback;
|
|
7676
|
-
font-weight: 400;
|
|
7677
|
-
}
|
|
7678
|
-
`.trim();
|
|
7679
|
-
}
|
|
7680
|
-
if (font.files) {
|
|
7681
|
-
for (const weight in font.files) {
|
|
7682
|
-
const isNumber = String(Number(weight)) === weight;
|
|
7683
|
-
if (!isNumber) {
|
|
7684
|
-
continue;
|
|
7685
|
-
}
|
|
7686
|
-
const weightUrl = font.files[weight];
|
|
7687
|
-
if (weightUrl && weightUrl !== url) {
|
|
7688
|
-
str += `
|
|
7689
|
-
@font-face {
|
|
7690
|
-
font-family: "${family}";
|
|
7691
|
-
src: url('${weightUrl}') format('woff2');
|
|
7692
|
-
font-display: fallback;
|
|
7693
|
-
font-weight: ${weight};
|
|
7694
|
-
}
|
|
7695
|
-
`.trim();
|
|
7696
|
-
}
|
|
7697
|
-
}
|
|
7698
|
-
}
|
|
7699
|
-
return str;
|
|
7700
|
-
};
|
|
7701
|
-
var getFontCss = ({
|
|
7702
|
-
customFonts
|
|
7703
|
-
}) => {
|
|
7704
|
-
return customFonts?.map((font) => getCssFromFont(font))?.join(" ") || "";
|
|
7705
|
-
};
|
|
7706
|
-
var getCss = ({
|
|
7707
|
-
cssCode,
|
|
7708
|
-
contentId
|
|
7709
|
-
}) => {
|
|
7710
|
-
if (!cssCode) {
|
|
7711
|
-
return "";
|
|
7712
|
-
}
|
|
7713
|
-
if (!contentId) {
|
|
7714
|
-
return cssCode;
|
|
7715
|
-
}
|
|
7716
|
-
return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
|
|
7717
|
-
};
|
|
7718
|
-
var DEFAULT_STYLES = `
|
|
7719
|
-
.builder-button {
|
|
7720
|
-
all: unset;
|
|
7721
|
-
}
|
|
7722
|
-
|
|
7723
|
-
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
7724
|
-
margin: 0;
|
|
7725
|
-
}
|
|
7726
|
-
.builder-text > p, .builder-text > .builder-paragraph {
|
|
7727
|
-
color: inherit;
|
|
7728
|
-
line-height: inherit;
|
|
7729
|
-
letter-spacing: inherit;
|
|
7730
|
-
font-weight: inherit;
|
|
7731
|
-
font-size: inherit;
|
|
7732
|
-
text-align: inherit;
|
|
7733
|
-
font-family: inherit;
|
|
7734
|
-
}
|
|
7735
|
-
`;
|
|
7736
|
-
var getDefaultStyles = (isNested) => {
|
|
7737
|
-
return !isNested ? DEFAULT_STYLES : "";
|
|
7738
|
-
};
|
|
7739
|
-
|
|
7740
|
-
// src/components/content/components/styles.tsx
|
|
7969
|
+
import { createSignal as createSignal15 } from "solid-js";
|
|
7741
7970
|
function ContentStyles(props) {
|
|
7742
|
-
const [injectedStyles, setInjectedStyles] =
|
|
7971
|
+
const [injectedStyles, setInjectedStyles] = createSignal15(
|
|
7743
7972
|
`
|
|
7744
7973
|
${getCss({
|
|
7745
7974
|
cssCode: props.cssCode,
|
|
@@ -7796,7 +8025,7 @@ var getContentInitialValue = ({
|
|
|
7796
8025
|
|
|
7797
8026
|
// src/components/content/content.tsx
|
|
7798
8027
|
function ContentComponent(props) {
|
|
7799
|
-
const [scriptStr, setScriptStr] =
|
|
8028
|
+
const [scriptStr, setScriptStr] = createSignal16(
|
|
7800
8029
|
getUpdateVariantVisibilityScript({
|
|
7801
8030
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
7802
8031
|
variationId: props.content?.testVariationId,
|
|
@@ -7804,7 +8033,7 @@ function ContentComponent(props) {
|
|
|
7804
8033
|
contentId: props.content?.id
|
|
7805
8034
|
})
|
|
7806
8035
|
);
|
|
7807
|
-
const [registeredComponents, setRegisteredComponents] =
|
|
8036
|
+
const [registeredComponents, setRegisteredComponents] = createSignal16(
|
|
7808
8037
|
[
|
|
7809
8038
|
...getDefaultRegisteredComponents(),
|
|
7810
8039
|
...props.customComponents || []
|
|
@@ -7819,7 +8048,7 @@ function ContentComponent(props) {
|
|
|
7819
8048
|
{}
|
|
7820
8049
|
)
|
|
7821
8050
|
);
|
|
7822
|
-
const [builderContextSignal, setBuilderContextSignal] =
|
|
8051
|
+
const [builderContextSignal, setBuilderContextSignal] = createSignal16({
|
|
7823
8052
|
content: getContentInitialValue({
|
|
7824
8053
|
content: props.content,
|
|
7825
8054
|
data: props.data
|
|
@@ -7877,16 +8106,16 @@ function ContentComponent(props) {
|
|
|
7877
8106
|
setBuilderContextSignal
|
|
7878
8107
|
}}
|
|
7879
8108
|
>
|
|
7880
|
-
<
|
|
8109
|
+
<Show12 when={props.isSsrAbTest}><Inlined_script_default
|
|
7881
8110
|
id="builderio-variant-visibility"
|
|
7882
8111
|
scriptStr={scriptStr()}
|
|
7883
|
-
/></
|
|
7884
|
-
<
|
|
8112
|
+
/></Show12>
|
|
8113
|
+
<Show12 when={TARGET !== "reactNative"}><Styles_default
|
|
7885
8114
|
isNestedRender={props.isNestedRender}
|
|
7886
8115
|
contentId={builderContextSignal().content?.id}
|
|
7887
8116
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
7888
8117
|
customFonts={builderContextSignal().content?.data?.customFonts}
|
|
7889
|
-
/></
|
|
8118
|
+
/></Show12>
|
|
7890
8119
|
<Blocks_default
|
|
7891
8120
|
blocks={builderContextSignal().content?.data?.blocks}
|
|
7892
8121
|
context={builderContextSignal()}
|
|
@@ -7899,13 +8128,13 @@ var Content_default = ContentComponent;
|
|
|
7899
8128
|
|
|
7900
8129
|
// src/components/content-variants/content-variants.tsx
|
|
7901
8130
|
function ContentVariants(props) {
|
|
7902
|
-
const [shouldRenderVariants, setShouldRenderVariants] =
|
|
8131
|
+
const [shouldRenderVariants, setShouldRenderVariants] = createSignal17(
|
|
7903
8132
|
checkShouldRenderVariants({
|
|
7904
8133
|
canTrack: getDefaultCanTrack(props.canTrack),
|
|
7905
8134
|
content: props.content
|
|
7906
8135
|
})
|
|
7907
8136
|
);
|
|
7908
|
-
const updateCookieAndStylesScriptStr =
|
|
8137
|
+
const updateCookieAndStylesScriptStr = createMemo17(() => {
|
|
7909
8138
|
return getUpdateCookieAndStylesScript(
|
|
7910
8139
|
getVariants(props.content).map((value) => ({
|
|
7911
8140
|
id: value.testVariationId,
|
|
@@ -7914,10 +8143,10 @@ function ContentVariants(props) {
|
|
|
7914
8143
|
props.content?.id || ""
|
|
7915
8144
|
);
|
|
7916
8145
|
});
|
|
7917
|
-
const hideVariantsStyleString =
|
|
8146
|
+
const hideVariantsStyleString = createMemo17(() => {
|
|
7918
8147
|
return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
|
|
7919
8148
|
});
|
|
7920
|
-
const defaultContent =
|
|
8149
|
+
const defaultContent = createMemo17(() => {
|
|
7921
8150
|
return shouldRenderVariants() ? {
|
|
7922
8151
|
...props.content,
|
|
7923
8152
|
testVariationId: props.content?.id
|
|
@@ -7930,11 +8159,11 @@ function ContentVariants(props) {
|
|
|
7930
8159
|
setShouldRenderVariants(false);
|
|
7931
8160
|
});
|
|
7932
8161
|
return <>
|
|
7933
|
-
<
|
|
8162
|
+
<Show13 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
7934
8163
|
id="builderio-init-variants-fns"
|
|
7935
8164
|
scriptStr={getInitVariantsFnsScriptString()}
|
|
7936
|
-
/></
|
|
7937
|
-
<
|
|
8165
|
+
/></Show13>
|
|
8166
|
+
<Show13 when={shouldRenderVariants()}>
|
|
7938
8167
|
<Inlined_styles_default
|
|
7939
8168
|
id="builderio-variants"
|
|
7940
8169
|
styles={hideVariantsStyleString()}
|
|
@@ -7943,7 +8172,7 @@ function ContentVariants(props) {
|
|
|
7943
8172
|
id="builderio-variants-visibility"
|
|
7944
8173
|
scriptStr={updateCookieAndStylesScriptStr()}
|
|
7945
8174
|
/>
|
|
7946
|
-
<
|
|
8175
|
+
<For8 each={getVariants(props.content)}>{(variant, _index) => {
|
|
7947
8176
|
const index = _index();
|
|
7948
8177
|
return <Content_default
|
|
7949
8178
|
isNestedRender={props.isNestedRender}
|
|
@@ -7967,8 +8196,8 @@ function ContentVariants(props) {
|
|
|
7967
8196
|
contentWrapperProps={props.contentWrapperProps}
|
|
7968
8197
|
trustedHosts={props.trustedHosts}
|
|
7969
8198
|
/>;
|
|
7970
|
-
}}</
|
|
7971
|
-
</
|
|
8199
|
+
}}</For8>
|
|
8200
|
+
</Show13>
|
|
7972
8201
|
<Content_default
|
|
7973
8202
|
isNestedRender={props.isNestedRender}
|
|
7974
8203
|
{...{}}
|
|
@@ -8021,8 +8250,14 @@ var fetchSymbolContent = async ({
|
|
|
8021
8250
|
|
|
8022
8251
|
// src/blocks/symbol/symbol.tsx
|
|
8023
8252
|
function Symbol2(props) {
|
|
8024
|
-
const [contentToUse, setContentToUse] =
|
|
8025
|
-
const
|
|
8253
|
+
const [contentToUse, setContentToUse] = createSignal18(props.symbol?.content);
|
|
8254
|
+
const blocksWrapper = createMemo18(() => {
|
|
8255
|
+
return "div";
|
|
8256
|
+
});
|
|
8257
|
+
const contentWrapper = createMemo18(() => {
|
|
8258
|
+
return "div";
|
|
8259
|
+
});
|
|
8260
|
+
const className = createMemo18(() => {
|
|
8026
8261
|
return [
|
|
8027
8262
|
...[props.attributes[getClassPropName()]],
|
|
8028
8263
|
"builder-symbol",
|
|
@@ -8044,7 +8279,7 @@ function Symbol2(props) {
|
|
|
8044
8279
|
}
|
|
8045
8280
|
onMount5(() => {
|
|
8046
8281
|
});
|
|
8047
|
-
const onUpdateFn_0_props_symbol =
|
|
8282
|
+
const onUpdateFn_0_props_symbol = createMemo18(() => props.symbol);
|
|
8048
8283
|
function onUpdateFn_0() {
|
|
8049
8284
|
setContent();
|
|
8050
8285
|
}
|
|
@@ -8066,8 +8301,8 @@ function Symbol2(props) {
|
|
|
8066
8301
|
model={props.symbol?.model}
|
|
8067
8302
|
content={contentToUse()}
|
|
8068
8303
|
linkComponent={props.builderLinkComponent}
|
|
8069
|
-
blocksWrapper=
|
|
8070
|
-
contentWrapper=
|
|
8304
|
+
blocksWrapper={blocksWrapper()}
|
|
8305
|
+
contentWrapper={contentWrapper()}
|
|
8071
8306
|
/></div>;
|
|
8072
8307
|
}
|
|
8073
8308
|
var symbol_default = Symbol2;
|