@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/dev.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) {
|
|
@@ -3521,7 +3525,6 @@ function evaluate({
|
|
|
3521
3525
|
enableCache
|
|
3522
3526
|
}) {
|
|
3523
3527
|
if (code === "") {
|
|
3524
|
-
logger.warn("Skipping evaluation of empty code block.");
|
|
3525
3528
|
return void 0;
|
|
3526
3529
|
}
|
|
3527
3530
|
const args = {
|
|
@@ -3853,6 +3856,7 @@ function mapStyleObjToStrIfNeeded(style) {
|
|
|
3853
3856
|
case "svelte":
|
|
3854
3857
|
case "vue":
|
|
3855
3858
|
case "solid":
|
|
3859
|
+
case "angular":
|
|
3856
3860
|
return convertStyleMapToCSSArray(style).join(" ");
|
|
3857
3861
|
case "qwik":
|
|
3858
3862
|
case "reactNative":
|
|
@@ -3928,6 +3932,12 @@ var getRepeatItemData = ({
|
|
|
3928
3932
|
}));
|
|
3929
3933
|
return repeatArray;
|
|
3930
3934
|
};
|
|
3935
|
+
var shouldPassLinkComponent = (blockName) => {
|
|
3936
|
+
return blockName && ["Core:Button", "Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(blockName);
|
|
3937
|
+
};
|
|
3938
|
+
var shouldPassRegisteredComponents = (blockName) => {
|
|
3939
|
+
return blockName && ["Symbol", "Columns", "Form:Form", "Builder: Tabs"].includes(blockName);
|
|
3940
|
+
};
|
|
3931
3941
|
|
|
3932
3942
|
// src/components/block/components/block-styles.tsx
|
|
3933
3943
|
import { Show as Show2, createMemo } from "solid-js";
|
|
@@ -4171,15 +4181,15 @@ function BlockWrapper(props) {
|
|
|
4171
4181
|
var Block_wrapper_default = BlockWrapper;
|
|
4172
4182
|
|
|
4173
4183
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
4174
|
-
import { Show as Show3, For, createSignal as
|
|
4184
|
+
import { Show as Show3, For, createSignal as createSignal3 } from "solid-js";
|
|
4175
4185
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
4176
4186
|
|
|
4177
4187
|
// src/components/block/components/interactive-element.tsx
|
|
4188
|
+
import { createMemo as createMemo2 } from "solid-js";
|
|
4178
4189
|
import { Dynamic as Dynamic2 } from "solid-js/web";
|
|
4179
4190
|
function InteractiveElement(props) {
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
-
attributes={props.includeBlockProps ? {
|
|
4191
|
+
const attributes = createMemo2(() => {
|
|
4192
|
+
return props.includeBlockProps ? {
|
|
4183
4193
|
...getBlockProperties({
|
|
4184
4194
|
block: props.block,
|
|
4185
4195
|
context: props.context
|
|
@@ -4191,7 +4201,11 @@ function InteractiveElement(props) {
|
|
|
4191
4201
|
localState: props.context.localState,
|
|
4192
4202
|
context: props.context.context
|
|
4193
4203
|
})
|
|
4194
|
-
} : {}
|
|
4204
|
+
} : {};
|
|
4205
|
+
});
|
|
4206
|
+
return <Dynamic2
|
|
4207
|
+
{...props.wrapperProps}
|
|
4208
|
+
attributes={attributes()}
|
|
4195
4209
|
component={props.Wrapper}
|
|
4196
4210
|
>{props.children}</Dynamic2>;
|
|
4197
4211
|
}
|
|
@@ -4232,7 +4246,7 @@ var getWrapperProps = ({
|
|
|
4232
4246
|
|
|
4233
4247
|
// src/components/block/components/component-ref/component-ref.tsx
|
|
4234
4248
|
function ComponentRef(props) {
|
|
4235
|
-
const [Wrapper, setWrapper] =
|
|
4249
|
+
const [Wrapper, setWrapper] = createSignal3(
|
|
4236
4250
|
props.isInteractive ? interactive_element_default : props.componentRef
|
|
4237
4251
|
);
|
|
4238
4252
|
return <Show3 when={props.componentRef}><Dynamic3
|
|
@@ -4261,9 +4275,9 @@ function ComponentRef(props) {
|
|
|
4261
4275
|
var Component_ref_default = ComponentRef;
|
|
4262
4276
|
|
|
4263
4277
|
// src/components/block/components/repeated-block.tsx
|
|
4264
|
-
import { createSignal as
|
|
4278
|
+
import { createSignal as createSignal4 } from "solid-js";
|
|
4265
4279
|
function RepeatedBlock(props) {
|
|
4266
|
-
const [store, setStore] =
|
|
4280
|
+
const [store, setStore] = createSignal4(props.repeatContext);
|
|
4267
4281
|
return <builder_context_default.Provider value={store()}><Block_default
|
|
4268
4282
|
block={props.block}
|
|
4269
4283
|
context={store()}
|
|
@@ -4275,20 +4289,20 @@ var Repeated_block_default = RepeatedBlock;
|
|
|
4275
4289
|
|
|
4276
4290
|
// src/components/block/block.tsx
|
|
4277
4291
|
function Block(props) {
|
|
4278
|
-
const blockComponent =
|
|
4292
|
+
const blockComponent = createMemo5(() => {
|
|
4279
4293
|
return getComponent({
|
|
4280
4294
|
block: props.block,
|
|
4281
4295
|
context: props.context,
|
|
4282
4296
|
registeredComponents: props.registeredComponents
|
|
4283
4297
|
});
|
|
4284
4298
|
});
|
|
4285
|
-
const repeatItem =
|
|
4299
|
+
const repeatItem = createMemo5(() => {
|
|
4286
4300
|
return getRepeatItemData({
|
|
4287
4301
|
block: props.block,
|
|
4288
4302
|
context: props.context
|
|
4289
4303
|
});
|
|
4290
4304
|
});
|
|
4291
|
-
const processedBlock =
|
|
4305
|
+
const processedBlock = createMemo5(() => {
|
|
4292
4306
|
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
4293
4307
|
block: props.block,
|
|
4294
4308
|
localState: props.context.localState,
|
|
@@ -4298,14 +4312,14 @@ function Block(props) {
|
|
|
4298
4312
|
shouldEvaluateBindings: true
|
|
4299
4313
|
});
|
|
4300
4314
|
});
|
|
4301
|
-
const Tag =
|
|
4315
|
+
const Tag = createMemo5(() => {
|
|
4302
4316
|
const shouldUseLink = props.block.tagName === "a" || processedBlock().properties?.href || processedBlock().href;
|
|
4303
4317
|
if (shouldUseLink) {
|
|
4304
4318
|
return props.linkComponent || "a";
|
|
4305
4319
|
}
|
|
4306
4320
|
return props.block.tagName || "div";
|
|
4307
4321
|
});
|
|
4308
|
-
const canShowBlock =
|
|
4322
|
+
const canShowBlock = createMemo5(() => {
|
|
4309
4323
|
if (props.block.repeat?.collection) {
|
|
4310
4324
|
if (repeatItem()?.length)
|
|
4311
4325
|
return true;
|
|
@@ -4315,21 +4329,21 @@ function Block(props) {
|
|
|
4315
4329
|
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
4316
4330
|
return shouldShow && !shouldHide;
|
|
4317
4331
|
});
|
|
4318
|
-
const childrenWithoutParentComponent =
|
|
4332
|
+
const childrenWithoutParentComponent = createMemo5(() => {
|
|
4319
4333
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
4320
4334
|
return shouldRenderChildrenOutsideRef ? processedBlock().children ?? [] : [];
|
|
4321
4335
|
});
|
|
4322
|
-
const componentRefProps =
|
|
4336
|
+
const componentRefProps = createMemo5(() => {
|
|
4323
4337
|
return {
|
|
4324
4338
|
blockChildren: processedBlock().children ?? [],
|
|
4325
4339
|
componentRef: blockComponent()?.component,
|
|
4326
4340
|
componentOptions: {
|
|
4327
4341
|
...getBlockComponentOptions(processedBlock()),
|
|
4328
4342
|
builderContext: props.context,
|
|
4329
|
-
...
|
|
4343
|
+
...shouldPassLinkComponent(blockComponent()?.name) ? {
|
|
4330
4344
|
builderLinkComponent: props.linkComponent
|
|
4331
4345
|
} : {},
|
|
4332
|
-
...
|
|
4346
|
+
...shouldPassRegisteredComponents(blockComponent()?.name) ? {
|
|
4333
4347
|
builderComponents: props.registeredComponents
|
|
4334
4348
|
} : {}
|
|
4335
4349
|
},
|
|
@@ -4413,11 +4427,11 @@ function Block(props) {
|
|
|
4413
4427
|
var Block_default = Block;
|
|
4414
4428
|
|
|
4415
4429
|
// src/components/blocks/blocks-wrapper.tsx
|
|
4416
|
-
import { createMemo as
|
|
4430
|
+
import { createMemo as createMemo6 } from "solid-js";
|
|
4417
4431
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
4418
4432
|
import { css } from "solid-styled-components";
|
|
4419
4433
|
function BlocksWrapper(props) {
|
|
4420
|
-
const className =
|
|
4434
|
+
const className = createMemo6(() => {
|
|
4421
4435
|
return "builder-blocks" + (!props.blocks?.length ? " no-blocks" : "");
|
|
4422
4436
|
});
|
|
4423
4437
|
function onClick() {
|
|
@@ -4491,16 +4505,24 @@ function Blocks(props) {
|
|
|
4491
4505
|
}
|
|
4492
4506
|
var Blocks_default = Blocks;
|
|
4493
4507
|
|
|
4508
|
+
// src/blocks/columns/helpers.ts
|
|
4509
|
+
var getColumnsClass = (id2) => {
|
|
4510
|
+
return `builder-columns ${id2}-breakpoints`;
|
|
4511
|
+
};
|
|
4512
|
+
|
|
4494
4513
|
// src/blocks/columns/columns.tsx
|
|
4495
4514
|
function Columns(props) {
|
|
4496
|
-
const [gutterSize, setGutterSize] =
|
|
4515
|
+
const [gutterSize, setGutterSize] = createSignal7(
|
|
4497
4516
|
typeof props.space === "number" ? props.space || 0 : 20
|
|
4498
4517
|
);
|
|
4499
|
-
const [cols, setCols] =
|
|
4500
|
-
const [stackAt, setStackAt] =
|
|
4501
|
-
const [flexDir, setFlexDir] =
|
|
4518
|
+
const [cols, setCols] = createSignal7(props.columns || []);
|
|
4519
|
+
const [stackAt, setStackAt] = createSignal7(props.stackColumnsAt || "tablet");
|
|
4520
|
+
const [flexDir, setFlexDir] = createSignal7(
|
|
4502
4521
|
props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column"
|
|
4503
4522
|
);
|
|
4523
|
+
function getTagName(column) {
|
|
4524
|
+
return column.link ? props.builderLinkComponent || "a" : "div";
|
|
4525
|
+
}
|
|
4504
4526
|
function getWidth(index) {
|
|
4505
4527
|
return cols()[index]?.width || 100 / cols().length;
|
|
4506
4528
|
}
|
|
@@ -4520,7 +4542,7 @@ function Columns(props) {
|
|
|
4520
4542
|
}) {
|
|
4521
4543
|
return stackAt() === "never" ? desktopStyle : stackedStyle;
|
|
4522
4544
|
}
|
|
4523
|
-
|
|
4545
|
+
function columnsCssVars() {
|
|
4524
4546
|
return {
|
|
4525
4547
|
"--flex-dir": flexDir(),
|
|
4526
4548
|
"--flex-dir-tablet": getTabletStyle({
|
|
@@ -4528,7 +4550,7 @@ function Columns(props) {
|
|
|
4528
4550
|
desktopStyle: "row"
|
|
4529
4551
|
})
|
|
4530
4552
|
};
|
|
4531
|
-
}
|
|
4553
|
+
}
|
|
4532
4554
|
function columnCssVars(index) {
|
|
4533
4555
|
const gutter = index === 0 ? 0 : gutterSize();
|
|
4534
4556
|
const width = getColumnCssWidth(index);
|
|
@@ -4569,7 +4591,7 @@ function Columns(props) {
|
|
|
4569
4591
|
);
|
|
4570
4592
|
return breakpointSizes[size].max;
|
|
4571
4593
|
}
|
|
4572
|
-
|
|
4594
|
+
function columnsStyles() {
|
|
4573
4595
|
return `
|
|
4574
4596
|
@media (max-width: ${getWidthForBreakpointSize("medium")}px) {
|
|
4575
4597
|
.${props.builderBlock.id}-breakpoints {
|
|
@@ -4595,9 +4617,19 @@ function Columns(props) {
|
|
|
4595
4617
|
}
|
|
4596
4618
|
},
|
|
4597
4619
|
`;
|
|
4598
|
-
}
|
|
4620
|
+
}
|
|
4621
|
+
function getAttributes(column, index) {
|
|
4622
|
+
return {
|
|
4623
|
+
...{},
|
|
4624
|
+
...column.link ? {
|
|
4625
|
+
href: column.link
|
|
4626
|
+
} : {},
|
|
4627
|
+
[getClassPropName()]: "builder-column",
|
|
4628
|
+
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
4629
|
+
};
|
|
4630
|
+
}
|
|
4599
4631
|
return <div
|
|
4600
|
-
class={
|
|
4632
|
+
class={getColumnsClass(props.builderBlock?.id) + " " + css2({
|
|
4601
4633
|
display: "flex",
|
|
4602
4634
|
lineHeight: "normal"
|
|
4603
4635
|
})}
|
|
@@ -4612,16 +4644,9 @@ function Columns(props) {
|
|
|
4612
4644
|
const index = _index();
|
|
4613
4645
|
return <Dynamic_renderer_default
|
|
4614
4646
|
key={index}
|
|
4615
|
-
TagName={column
|
|
4647
|
+
TagName={getTagName(column)}
|
|
4616
4648
|
actionAttributes={{}}
|
|
4617
|
-
attributes={
|
|
4618
|
-
...{},
|
|
4619
|
-
...column.link ? {
|
|
4620
|
-
href: column.link
|
|
4621
|
-
} : {},
|
|
4622
|
-
[getClassPropName()]: "builder-column",
|
|
4623
|
-
style: mapStyleObjToStrIfNeeded(columnCssVars(index))
|
|
4624
|
-
}}
|
|
4649
|
+
attributes={getAttributes(column, index)}
|
|
4625
4650
|
><Blocks_default
|
|
4626
4651
|
path={`component.options.columns.${index}.blocks`}
|
|
4627
4652
|
parent={props.builderBlock.id}
|
|
@@ -4645,7 +4670,7 @@ function FragmentComponent(props) {
|
|
|
4645
4670
|
var fragment_default = FragmentComponent;
|
|
4646
4671
|
|
|
4647
4672
|
// src/blocks/image/image.tsx
|
|
4648
|
-
import { Show as Show7, createMemo as
|
|
4673
|
+
import { Show as Show7, createMemo as createMemo8 } from "solid-js";
|
|
4649
4674
|
import { css as css3 } from "solid-styled-components";
|
|
4650
4675
|
|
|
4651
4676
|
// src/blocks/image/image.helpers.ts
|
|
@@ -4697,7 +4722,7 @@ function getSrcSet(url) {
|
|
|
4697
4722
|
|
|
4698
4723
|
// src/blocks/image/image.tsx
|
|
4699
4724
|
function Image(props) {
|
|
4700
|
-
const srcSetToUse =
|
|
4725
|
+
const srcSetToUse = createMemo8(() => {
|
|
4701
4726
|
const imageToUse = props.image || props.src;
|
|
4702
4727
|
const url = imageToUse;
|
|
4703
4728
|
if (!url || // We can auto add srcset for cdn.builder.io and shopify
|
|
@@ -4715,14 +4740,14 @@ function Image(props) {
|
|
|
4715
4740
|
}
|
|
4716
4741
|
return getSrcSet(url);
|
|
4717
4742
|
});
|
|
4718
|
-
const webpSrcSet =
|
|
4743
|
+
const webpSrcSet = createMemo8(() => {
|
|
4719
4744
|
if (srcSetToUse()?.match(/builder\.io/) && !props.noWebp) {
|
|
4720
4745
|
return srcSetToUse().replace(/\?/g, "?format=webp&");
|
|
4721
4746
|
} else {
|
|
4722
4747
|
return "";
|
|
4723
4748
|
}
|
|
4724
4749
|
});
|
|
4725
|
-
const aspectRatioCss =
|
|
4750
|
+
const aspectRatioCss = createMemo8(() => {
|
|
4726
4751
|
const aspectRatioStyles = {
|
|
4727
4752
|
position: "absolute",
|
|
4728
4753
|
height: "100%",
|
|
@@ -4767,7 +4792,7 @@ function Image(props) {
|
|
|
4767
4792
|
}}
|
|
4768
4793
|
/></Show7>
|
|
4769
4794
|
<Show7 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show7>
|
|
4770
|
-
<Show7 when={!props.fitContent && props.children}><div
|
|
4795
|
+
<Show7 when={!props.fitContent && props.builderBlock?.children?.length}><div
|
|
4771
4796
|
class={css3({
|
|
4772
4797
|
display: "flex",
|
|
4773
4798
|
flexDirection: "column",
|
|
@@ -4805,10 +4830,10 @@ function SectionComponent(props) {
|
|
|
4805
4830
|
var section_default = SectionComponent;
|
|
4806
4831
|
|
|
4807
4832
|
// src/blocks/symbol/symbol.tsx
|
|
4808
|
-
import { onMount as onMount5, on as on3, createEffect as createEffect3, createMemo as
|
|
4833
|
+
import { onMount as onMount5, on as on3, createEffect as createEffect3, createMemo as createMemo18, createSignal as createSignal18 } from "solid-js";
|
|
4809
4834
|
|
|
4810
4835
|
// src/components/content-variants/content-variants.tsx
|
|
4811
|
-
import { Show as
|
|
4836
|
+
import { Show as Show13, For as For8, onMount as onMount4, createSignal as createSignal17, createMemo as createMemo17 } from "solid-js";
|
|
4812
4837
|
|
|
4813
4838
|
// src/helpers/url.ts
|
|
4814
4839
|
var getTopLevelDomain = (host) => {
|
|
@@ -5002,7 +5027,7 @@ var handleABTesting = async ({
|
|
|
5002
5027
|
var getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
5003
5028
|
|
|
5004
5029
|
// src/components/content/content.tsx
|
|
5005
|
-
import { Show as
|
|
5030
|
+
import { Show as Show12, createSignal as createSignal16 } from "solid-js";
|
|
5006
5031
|
|
|
5007
5032
|
// src/blocks/button/component-info.ts
|
|
5008
5033
|
var componentInfo = {
|
|
@@ -5504,8 +5529,203 @@ var componentInfo7 = {
|
|
|
5504
5529
|
}]
|
|
5505
5530
|
};
|
|
5506
5531
|
|
|
5507
|
-
// src/blocks/
|
|
5532
|
+
// src/blocks/tabs/component-info.ts
|
|
5533
|
+
var defaultTab = {
|
|
5534
|
+
"@type": "@builder.io/sdk:Element",
|
|
5535
|
+
responsiveStyles: {
|
|
5536
|
+
large: {
|
|
5537
|
+
paddingLeft: "20px",
|
|
5538
|
+
paddingRight: "20px",
|
|
5539
|
+
paddingTop: "10px",
|
|
5540
|
+
paddingBottom: "10px",
|
|
5541
|
+
minWidth: "100px",
|
|
5542
|
+
textAlign: "center",
|
|
5543
|
+
display: "flex",
|
|
5544
|
+
flexDirection: "column",
|
|
5545
|
+
cursor: "pointer",
|
|
5546
|
+
userSelect: "none"
|
|
5547
|
+
}
|
|
5548
|
+
},
|
|
5549
|
+
component: {
|
|
5550
|
+
name: "Text",
|
|
5551
|
+
options: {
|
|
5552
|
+
text: "New tab"
|
|
5553
|
+
}
|
|
5554
|
+
}
|
|
5555
|
+
};
|
|
5556
|
+
var defaultElement = {
|
|
5557
|
+
"@type": "@builder.io/sdk:Element",
|
|
5558
|
+
responsiveStyles: {
|
|
5559
|
+
large: {
|
|
5560
|
+
height: "200px",
|
|
5561
|
+
display: "flex",
|
|
5562
|
+
marginTop: "20px",
|
|
5563
|
+
flexDirection: "column"
|
|
5564
|
+
}
|
|
5565
|
+
},
|
|
5566
|
+
component: {
|
|
5567
|
+
name: "Text",
|
|
5568
|
+
options: {
|
|
5569
|
+
text: "New tab content "
|
|
5570
|
+
}
|
|
5571
|
+
}
|
|
5572
|
+
};
|
|
5508
5573
|
var componentInfo8 = {
|
|
5574
|
+
name: "Builder: Tabs",
|
|
5575
|
+
inputs: [{
|
|
5576
|
+
name: "tabs",
|
|
5577
|
+
type: "list",
|
|
5578
|
+
broadcast: true,
|
|
5579
|
+
subFields: [{
|
|
5580
|
+
name: "label",
|
|
5581
|
+
type: "uiBlocks",
|
|
5582
|
+
hideFromUI: true,
|
|
5583
|
+
defaultValue: [defaultTab]
|
|
5584
|
+
}, {
|
|
5585
|
+
name: "content",
|
|
5586
|
+
type: "uiBlocks",
|
|
5587
|
+
hideFromUI: true,
|
|
5588
|
+
defaultValue: [defaultElement]
|
|
5589
|
+
}],
|
|
5590
|
+
defaultValue: [{
|
|
5591
|
+
label: [{
|
|
5592
|
+
...defaultTab,
|
|
5593
|
+
component: {
|
|
5594
|
+
name: "Text",
|
|
5595
|
+
options: {
|
|
5596
|
+
text: "Tab 1"
|
|
5597
|
+
}
|
|
5598
|
+
}
|
|
5599
|
+
}],
|
|
5600
|
+
content: [{
|
|
5601
|
+
...defaultElement,
|
|
5602
|
+
component: {
|
|
5603
|
+
name: "Text",
|
|
5604
|
+
options: {
|
|
5605
|
+
text: "Tab 1 content"
|
|
5606
|
+
}
|
|
5607
|
+
}
|
|
5608
|
+
}]
|
|
5609
|
+
}, {
|
|
5610
|
+
label: [{
|
|
5611
|
+
...defaultTab,
|
|
5612
|
+
component: {
|
|
5613
|
+
name: "Text",
|
|
5614
|
+
options: {
|
|
5615
|
+
text: "Tab 2"
|
|
5616
|
+
}
|
|
5617
|
+
}
|
|
5618
|
+
}],
|
|
5619
|
+
content: [{
|
|
5620
|
+
...defaultElement,
|
|
5621
|
+
component: {
|
|
5622
|
+
name: "Text",
|
|
5623
|
+
options: {
|
|
5624
|
+
text: "Tab 2 content"
|
|
5625
|
+
}
|
|
5626
|
+
}
|
|
5627
|
+
}]
|
|
5628
|
+
}]
|
|
5629
|
+
}, {
|
|
5630
|
+
name: "activeTabStyle",
|
|
5631
|
+
type: "uiStyle",
|
|
5632
|
+
helperText: "CSS styles for the active tab",
|
|
5633
|
+
defaultValue: {
|
|
5634
|
+
backgroundColor: "rgba(0, 0, 0, 0.1)"
|
|
5635
|
+
}
|
|
5636
|
+
}, {
|
|
5637
|
+
name: "defaultActiveTab",
|
|
5638
|
+
type: "number",
|
|
5639
|
+
helperText: 'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',
|
|
5640
|
+
defaultValue: 1,
|
|
5641
|
+
advanced: true
|
|
5642
|
+
}, {
|
|
5643
|
+
name: "collapsible",
|
|
5644
|
+
type: "boolean",
|
|
5645
|
+
helperText: "If on, clicking an open tab closes it so no tabs are active",
|
|
5646
|
+
defaultValue: false,
|
|
5647
|
+
advanced: true
|
|
5648
|
+
}, {
|
|
5649
|
+
name: "tabHeaderLayout",
|
|
5650
|
+
type: "enum",
|
|
5651
|
+
helperText: "Change the layout of the tab headers (uses justify-content)",
|
|
5652
|
+
defaultValue: "flex-start",
|
|
5653
|
+
enum: [{
|
|
5654
|
+
label: "Center",
|
|
5655
|
+
value: "center"
|
|
5656
|
+
}, {
|
|
5657
|
+
label: "Space between",
|
|
5658
|
+
value: "space-between"
|
|
5659
|
+
}, {
|
|
5660
|
+
label: "Space around",
|
|
5661
|
+
value: "space-around"
|
|
5662
|
+
}, {
|
|
5663
|
+
label: "Left",
|
|
5664
|
+
value: "flex-start"
|
|
5665
|
+
}, {
|
|
5666
|
+
label: "Right",
|
|
5667
|
+
value: "flex-end"
|
|
5668
|
+
}]
|
|
5669
|
+
}]
|
|
5670
|
+
};
|
|
5671
|
+
|
|
5672
|
+
// src/blocks/tabs/tabs.tsx
|
|
5673
|
+
import { Show as Show8, For as For5, createSignal as createSignal9 } from "solid-js";
|
|
5674
|
+
function Tabs(props) {
|
|
5675
|
+
const [activeTab, setActiveTab] = createSignal9(
|
|
5676
|
+
props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
|
|
5677
|
+
);
|
|
5678
|
+
function activeTabContent(active) {
|
|
5679
|
+
return props.tabs && props.tabs[active].content;
|
|
5680
|
+
}
|
|
5681
|
+
function getActiveTabStyle(index) {
|
|
5682
|
+
return activeTab() === index ? props.activeTabStyle : {};
|
|
5683
|
+
}
|
|
5684
|
+
return <div>
|
|
5685
|
+
<div
|
|
5686
|
+
class="builder-tabs-wrap"
|
|
5687
|
+
style={{
|
|
5688
|
+
display: "flex",
|
|
5689
|
+
"flex-direction": "row",
|
|
5690
|
+
"justify-content": props.tabHeaderLayout || "flex-start",
|
|
5691
|
+
overflow: "auto"
|
|
5692
|
+
}}
|
|
5693
|
+
><For5 each={props.tabs}>{(tab, _index) => {
|
|
5694
|
+
const index = _index();
|
|
5695
|
+
return <span
|
|
5696
|
+
class={`builder-tab-wrap ${activeTab() === index ? "builder-tab-active" : ""}`}
|
|
5697
|
+
key={index}
|
|
5698
|
+
style={getActiveTabStyle(index)}
|
|
5699
|
+
onClick={(event) => {
|
|
5700
|
+
if (index === activeTab() && props.collapsible) {
|
|
5701
|
+
setActiveTab(-1);
|
|
5702
|
+
} else {
|
|
5703
|
+
setActiveTab(index);
|
|
5704
|
+
}
|
|
5705
|
+
}}
|
|
5706
|
+
><Blocks_default
|
|
5707
|
+
parent={props.builderBlock.id}
|
|
5708
|
+
path={`component.options.tabs.${index}.label`}
|
|
5709
|
+
blocks={tab.label}
|
|
5710
|
+
context={props.builderContext}
|
|
5711
|
+
registeredComponents={props.builderComponents}
|
|
5712
|
+
linkComponent={props.builderLinkComponent}
|
|
5713
|
+
/></span>;
|
|
5714
|
+
}}</For5></div>
|
|
5715
|
+
<Show8 when={activeTabContent(activeTab())}><div><Blocks_default
|
|
5716
|
+
parent={props.builderBlock.id}
|
|
5717
|
+
path={`component.options.tabs.${activeTab()}.content`}
|
|
5718
|
+
blocks={activeTabContent(activeTab())}
|
|
5719
|
+
context={props.builderContext}
|
|
5720
|
+
registeredComponents={props.builderComponents}
|
|
5721
|
+
linkComponent={props.builderLinkComponent}
|
|
5722
|
+
/></div></Show8>
|
|
5723
|
+
</div>;
|
|
5724
|
+
}
|
|
5725
|
+
var tabs_default = Tabs;
|
|
5726
|
+
|
|
5727
|
+
// src/blocks/text/component-info.ts
|
|
5728
|
+
var componentInfo9 = {
|
|
5509
5729
|
name: "Text",
|
|
5510
5730
|
static: true,
|
|
5511
5731
|
isRSC: true,
|
|
@@ -5538,7 +5758,7 @@ function Text(props) {
|
|
|
5538
5758
|
var text_default = Text;
|
|
5539
5759
|
|
|
5540
5760
|
// src/blocks/custom-code/component-info.ts
|
|
5541
|
-
var
|
|
5761
|
+
var componentInfo10 = {
|
|
5542
5762
|
name: "Custom Code",
|
|
5543
5763
|
static: true,
|
|
5544
5764
|
requiredPermissions: ["editCode"],
|
|
@@ -5563,10 +5783,10 @@ var componentInfo9 = {
|
|
|
5563
5783
|
};
|
|
5564
5784
|
|
|
5565
5785
|
// src/blocks/custom-code/custom-code.tsx
|
|
5566
|
-
import { onMount as onMount2, createSignal as
|
|
5786
|
+
import { onMount as onMount2, createSignal as createSignal10 } from "solid-js";
|
|
5567
5787
|
function CustomCode(props) {
|
|
5568
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
5569
|
-
const [scriptsRun, setScriptsRun] =
|
|
5788
|
+
const [scriptsInserted, setScriptsInserted] = createSignal10([]);
|
|
5789
|
+
const [scriptsRun, setScriptsRun] = createSignal10([]);
|
|
5570
5790
|
let elementRef;
|
|
5571
5791
|
onMount2(() => {
|
|
5572
5792
|
if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
|
|
@@ -5610,7 +5830,7 @@ function CustomCode(props) {
|
|
|
5610
5830
|
var custom_code_default = CustomCode;
|
|
5611
5831
|
|
|
5612
5832
|
// src/blocks/embed/component-info.ts
|
|
5613
|
-
var
|
|
5833
|
+
var componentInfo11 = {
|
|
5614
5834
|
name: "Embed",
|
|
5615
5835
|
static: true,
|
|
5616
5836
|
inputs: [{
|
|
@@ -5648,7 +5868,7 @@ var componentInfo10 = {
|
|
|
5648
5868
|
};
|
|
5649
5869
|
|
|
5650
5870
|
// src/blocks/embed/embed.tsx
|
|
5651
|
-
import { on, createEffect, createMemo as
|
|
5871
|
+
import { on, createEffect, createMemo as createMemo11, createSignal as createSignal11 } from "solid-js";
|
|
5652
5872
|
|
|
5653
5873
|
// src/blocks/embed/helpers.ts
|
|
5654
5874
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -5656,9 +5876,9 @@ var isJsScript = (script) => SCRIPT_MIME_TYPES.includes(script.type);
|
|
|
5656
5876
|
|
|
5657
5877
|
// src/blocks/embed/embed.tsx
|
|
5658
5878
|
function Embed(props) {
|
|
5659
|
-
const [scriptsInserted, setScriptsInserted] =
|
|
5660
|
-
const [scriptsRun, setScriptsRun] =
|
|
5661
|
-
const [ranInitFn, setRanInitFn] =
|
|
5879
|
+
const [scriptsInserted, setScriptsInserted] = createSignal11([]);
|
|
5880
|
+
const [scriptsRun, setScriptsRun] = createSignal11([]);
|
|
5881
|
+
const [ranInitFn, setRanInitFn] = createSignal11(false);
|
|
5662
5882
|
function findAndRunScripts() {
|
|
5663
5883
|
if (!elem || !elem.getElementsByTagName)
|
|
5664
5884
|
return;
|
|
@@ -5682,8 +5902,8 @@ function Embed(props) {
|
|
|
5682
5902
|
}
|
|
5683
5903
|
}
|
|
5684
5904
|
let elem;
|
|
5685
|
-
const onUpdateFn_0_elem =
|
|
5686
|
-
const onUpdateFn_0_ranInitFn__ =
|
|
5905
|
+
const onUpdateFn_0_elem = createMemo11(() => elem);
|
|
5906
|
+
const onUpdateFn_0_ranInitFn__ = createMemo11(() => ranInitFn());
|
|
5687
5907
|
function onUpdateFn_0() {
|
|
5688
5908
|
if (elem && !ranInitFn()) {
|
|
5689
5909
|
setRanInitFn(true);
|
|
@@ -5698,7 +5918,7 @@ function Embed(props) {
|
|
|
5698
5918
|
var embed_default = Embed;
|
|
5699
5919
|
|
|
5700
5920
|
// src/blocks/form/form/component-info.ts
|
|
5701
|
-
var
|
|
5921
|
+
var componentInfo12 = {
|
|
5702
5922
|
name: "Form:Form",
|
|
5703
5923
|
// editableTags: ['builder-form-error']
|
|
5704
5924
|
defaults: {
|
|
@@ -5932,7 +6152,7 @@ var componentInfo11 = {
|
|
|
5932
6152
|
};
|
|
5933
6153
|
|
|
5934
6154
|
// src/blocks/form/form/form.tsx
|
|
5935
|
-
import { Show as
|
|
6155
|
+
import { Show as Show9, For as For6, createSignal as createSignal12 } from "solid-js";
|
|
5936
6156
|
import { css as css4 } from "solid-styled-components";
|
|
5937
6157
|
|
|
5938
6158
|
// src/functions/get-env.ts
|
|
@@ -5950,9 +6170,9 @@ var get = (obj, path, defaultValue) => {
|
|
|
5950
6170
|
|
|
5951
6171
|
// src/blocks/form/form/form.tsx
|
|
5952
6172
|
function FormComponent(props) {
|
|
5953
|
-
const [formState, setFormState] =
|
|
5954
|
-
const [responseData, setResponseData] =
|
|
5955
|
-
const [formErrorMessage, setFormErrorMessage] =
|
|
6173
|
+
const [formState, setFormState] = createSignal12("unsubmitted");
|
|
6174
|
+
const [responseData, setResponseData] = createSignal12(null);
|
|
6175
|
+
const [formErrorMessage, setFormErrorMessage] = createSignal12("");
|
|
5956
6176
|
function mergeNewRootState(newData) {
|
|
5957
6177
|
const combinedState = {
|
|
5958
6178
|
...props.builderContext.rootState,
|
|
@@ -6148,7 +6368,7 @@ function FormComponent(props) {
|
|
|
6148
6368
|
{...{}}
|
|
6149
6369
|
{...props.attributes}
|
|
6150
6370
|
>
|
|
6151
|
-
<
|
|
6371
|
+
<Show9 when={props.builderBlock && props.builderBlock.children}><For6 each={props.builderBlock?.children}>{(block, _index) => {
|
|
6152
6372
|
const idx = _index();
|
|
6153
6373
|
return <Block_default
|
|
6154
6374
|
key={`form-block-${idx}`}
|
|
@@ -6157,35 +6377,35 @@ function FormComponent(props) {
|
|
|
6157
6377
|
registeredComponents={props.builderComponents}
|
|
6158
6378
|
linkComponent={props.builderLinkComponent}
|
|
6159
6379
|
/>;
|
|
6160
|
-
}}</
|
|
6161
|
-
<
|
|
6380
|
+
}}</For6></Show9>
|
|
6381
|
+
<Show9 when={submissionState() === "error"}><Blocks_default
|
|
6162
6382
|
path="errorMessage"
|
|
6163
6383
|
blocks={props.errorMessage}
|
|
6164
6384
|
context={props.builderContext}
|
|
6165
|
-
/></
|
|
6166
|
-
<
|
|
6385
|
+
/></Show9>
|
|
6386
|
+
<Show9 when={submissionState() === "sending"}><Blocks_default
|
|
6167
6387
|
path="sendingMessage"
|
|
6168
6388
|
blocks={props.sendingMessage}
|
|
6169
6389
|
context={props.builderContext}
|
|
6170
|
-
/></
|
|
6171
|
-
<
|
|
6390
|
+
/></Show9>
|
|
6391
|
+
<Show9 when={submissionState() === "error" && responseData()}><pre
|
|
6172
6392
|
class={"builder-form-error-text " + css4({
|
|
6173
6393
|
padding: "10px",
|
|
6174
6394
|
color: "red",
|
|
6175
6395
|
textAlign: "center"
|
|
6176
6396
|
})}
|
|
6177
|
-
>{JSON.stringify(responseData(), null, 2)}</pre></
|
|
6178
|
-
<
|
|
6397
|
+
>{JSON.stringify(responseData(), null, 2)}</pre></Show9>
|
|
6398
|
+
<Show9 when={submissionState() === "success"}><Blocks_default
|
|
6179
6399
|
path="successMessage"
|
|
6180
6400
|
blocks={props.successMessage}
|
|
6181
6401
|
context={props.builderContext}
|
|
6182
|
-
/></
|
|
6402
|
+
/></Show9>
|
|
6183
6403
|
</form>;
|
|
6184
6404
|
}
|
|
6185
6405
|
var form_default = FormComponent;
|
|
6186
6406
|
|
|
6187
6407
|
// src/blocks/form/input/component-info.ts
|
|
6188
|
-
var
|
|
6408
|
+
var componentInfo13 = {
|
|
6189
6409
|
name: "Form:Input",
|
|
6190
6410
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
6191
6411
|
inputs: [
|
|
@@ -6255,7 +6475,7 @@ function FormInputComponent(props) {
|
|
|
6255
6475
|
var input_default = FormInputComponent;
|
|
6256
6476
|
|
|
6257
6477
|
// src/blocks/form/select/component-info.ts
|
|
6258
|
-
var
|
|
6478
|
+
var componentInfo14 = {
|
|
6259
6479
|
name: "Form:Select",
|
|
6260
6480
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
6261
6481
|
defaultStyles: {
|
|
@@ -6300,7 +6520,7 @@ var componentInfo13 = {
|
|
|
6300
6520
|
};
|
|
6301
6521
|
|
|
6302
6522
|
// src/blocks/form/select/select.tsx
|
|
6303
|
-
import { For as
|
|
6523
|
+
import { For as For7 } from "solid-js";
|
|
6304
6524
|
function SelectComponent(props) {
|
|
6305
6525
|
return <select
|
|
6306
6526
|
{...{}}
|
|
@@ -6309,15 +6529,15 @@ function SelectComponent(props) {
|
|
|
6309
6529
|
key={isEditing() && props.defaultValue ? props.defaultValue : "default-key"}
|
|
6310
6530
|
defaultValue={props.defaultValue}
|
|
6311
6531
|
name={props.name}
|
|
6312
|
-
><
|
|
6532
|
+
><For7 each={props.options}>{(option, _index) => {
|
|
6313
6533
|
const index = _index();
|
|
6314
6534
|
return <option key={`${option.name}-${index}`} value={option.value}>{option.name || option.value}</option>;
|
|
6315
|
-
}}</
|
|
6535
|
+
}}</For7></select>;
|
|
6316
6536
|
}
|
|
6317
6537
|
var select_default = SelectComponent;
|
|
6318
6538
|
|
|
6319
6539
|
// src/blocks/form/submit-button/component-info.ts
|
|
6320
|
-
var
|
|
6540
|
+
var componentInfo15 = {
|
|
6321
6541
|
name: "Form:SubmitButton",
|
|
6322
6542
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
6323
6543
|
defaultStyles: {
|
|
@@ -6351,7 +6571,7 @@ function SubmitButton(props) {
|
|
|
6351
6571
|
var submit_button_default = SubmitButton;
|
|
6352
6572
|
|
|
6353
6573
|
// src/blocks/img/component-info.ts
|
|
6354
|
-
var
|
|
6574
|
+
var componentInfo16 = {
|
|
6355
6575
|
// friendlyName?
|
|
6356
6576
|
name: "Raw:Img",
|
|
6357
6577
|
hideFromInsertMenu: true,
|
|
@@ -6384,7 +6604,7 @@ function ImgComponent(props) {
|
|
|
6384
6604
|
var img_default = ImgComponent;
|
|
6385
6605
|
|
|
6386
6606
|
// src/blocks/video/component-info.ts
|
|
6387
|
-
var
|
|
6607
|
+
var componentInfo17 = {
|
|
6388
6608
|
name: "Video",
|
|
6389
6609
|
canHaveChildren: true,
|
|
6390
6610
|
defaultStyles: {
|
|
@@ -6468,9 +6688,9 @@ var componentInfo16 = {
|
|
|
6468
6688
|
};
|
|
6469
6689
|
|
|
6470
6690
|
// src/blocks/video/video.tsx
|
|
6471
|
-
import { Show as
|
|
6691
|
+
import { Show as Show10, createMemo as createMemo13 } from "solid-js";
|
|
6472
6692
|
function Video(props) {
|
|
6473
|
-
const videoProps =
|
|
6693
|
+
const videoProps = createMemo13(() => {
|
|
6474
6694
|
return {
|
|
6475
6695
|
...props.autoPlay === true ? {
|
|
6476
6696
|
autoPlay: true
|
|
@@ -6489,7 +6709,7 @@ function Video(props) {
|
|
|
6489
6709
|
} : {}
|
|
6490
6710
|
};
|
|
6491
6711
|
});
|
|
6492
|
-
const spreadProps =
|
|
6712
|
+
const spreadProps = createMemo13(() => {
|
|
6493
6713
|
return {
|
|
6494
6714
|
...videoProps()
|
|
6495
6715
|
};
|
|
@@ -6519,8 +6739,8 @@ function Video(props) {
|
|
|
6519
6739
|
}}
|
|
6520
6740
|
src={props.video || "no-src"}
|
|
6521
6741
|
poster={props.posterImage}
|
|
6522
|
-
><
|
|
6523
|
-
<
|
|
6742
|
+
><Show10 when={!props.lazyLoad}><source type="video/mp4" src={props.video} /></Show10></video>
|
|
6743
|
+
<Show10
|
|
6524
6744
|
when={props.aspectRatio && !(props.fitContent && props.builderBlock?.children?.length)}
|
|
6525
6745
|
><div
|
|
6526
6746
|
style={{
|
|
@@ -6529,15 +6749,15 @@ function Video(props) {
|
|
|
6529
6749
|
"pointer-events": "none",
|
|
6530
6750
|
"font-size": "0px"
|
|
6531
6751
|
}}
|
|
6532
|
-
/></
|
|
6533
|
-
<
|
|
6752
|
+
/></Show10>
|
|
6753
|
+
<Show10 when={props.builderBlock?.children?.length && props.fitContent}><div
|
|
6534
6754
|
style={{
|
|
6535
6755
|
display: "flex",
|
|
6536
6756
|
"flex-direction": "column",
|
|
6537
6757
|
"align-items": "stretch"
|
|
6538
6758
|
}}
|
|
6539
|
-
>{props.children}</div></
|
|
6540
|
-
<
|
|
6759
|
+
>{props.children}</div></Show10>
|
|
6760
|
+
<Show10 when={props.builderBlock?.children?.length && !props.fitContent}><div
|
|
6541
6761
|
style={{
|
|
6542
6762
|
"pointer-events": "none",
|
|
6543
6763
|
display: "flex",
|
|
@@ -6549,7 +6769,7 @@ function Video(props) {
|
|
|
6549
6769
|
width: "100%",
|
|
6550
6770
|
height: "100%"
|
|
6551
6771
|
}}
|
|
6552
|
-
>{props.children}</div></
|
|
6772
|
+
>{props.children}</div></Show10>
|
|
6553
6773
|
</div>;
|
|
6554
6774
|
}
|
|
6555
6775
|
var video_default = Video;
|
|
@@ -6557,28 +6777,28 @@ var video_default = Video;
|
|
|
6557
6777
|
// src/constants/extra-components.ts
|
|
6558
6778
|
var getExtraComponents = () => [{
|
|
6559
6779
|
component: custom_code_default,
|
|
6560
|
-
...
|
|
6780
|
+
...componentInfo10
|
|
6561
6781
|
}, {
|
|
6562
6782
|
component: embed_default,
|
|
6563
|
-
...
|
|
6783
|
+
...componentInfo11
|
|
6564
6784
|
}, ...TARGET === "rsc" ? [] : [{
|
|
6565
6785
|
component: form_default,
|
|
6566
|
-
...
|
|
6786
|
+
...componentInfo12
|
|
6567
6787
|
}, {
|
|
6568
6788
|
component: input_default,
|
|
6569
|
-
...
|
|
6789
|
+
...componentInfo13
|
|
6570
6790
|
}, {
|
|
6571
6791
|
component: submit_button_default,
|
|
6572
|
-
...
|
|
6792
|
+
...componentInfo15
|
|
6573
6793
|
}, {
|
|
6574
6794
|
component: select_default,
|
|
6575
|
-
...
|
|
6795
|
+
...componentInfo14
|
|
6576
6796
|
}], {
|
|
6577
6797
|
component: img_default,
|
|
6578
|
-
...
|
|
6798
|
+
...componentInfo16
|
|
6579
6799
|
}, {
|
|
6580
6800
|
component: video_default,
|
|
6581
|
-
...
|
|
6801
|
+
...componentInfo17
|
|
6582
6802
|
}];
|
|
6583
6803
|
|
|
6584
6804
|
// src/constants/builder-registered-components.ts
|
|
@@ -6605,8 +6825,11 @@ var getDefaultRegisteredComponents = () => [{
|
|
|
6605
6825
|
...componentInfo7
|
|
6606
6826
|
}, {
|
|
6607
6827
|
component: text_default,
|
|
6828
|
+
...componentInfo9
|
|
6829
|
+
}, ...TARGET === "rsc" ? [] : [{
|
|
6830
|
+
component: tabs_default,
|
|
6608
6831
|
...componentInfo8
|
|
6609
|
-
}, ...getExtraComponents()];
|
|
6832
|
+
}], ...getExtraComponents()];
|
|
6610
6833
|
|
|
6611
6834
|
// src/functions/register-component.ts
|
|
6612
6835
|
var createRegisterComponentMessage = (info) => ({
|
|
@@ -6684,12 +6907,12 @@ var Inlined_script_default = InlinedScript;
|
|
|
6684
6907
|
|
|
6685
6908
|
// src/components/content/components/enable-editor.tsx
|
|
6686
6909
|
import {
|
|
6687
|
-
Show as
|
|
6910
|
+
Show as Show11,
|
|
6688
6911
|
onMount as onMount3,
|
|
6689
6912
|
on as on2,
|
|
6690
6913
|
createEffect as createEffect2,
|
|
6691
|
-
createMemo as
|
|
6692
|
-
createSignal as
|
|
6914
|
+
createMemo as createMemo14,
|
|
6915
|
+
createSignal as createSignal14
|
|
6693
6916
|
} from "solid-js";
|
|
6694
6917
|
import { Dynamic as Dynamic5 } from "solid-js/web";
|
|
6695
6918
|
|
|
@@ -7177,7 +7400,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7177
7400
|
}
|
|
7178
7401
|
|
|
7179
7402
|
// src/constants/sdk-version.ts
|
|
7180
|
-
var SDK_VERSION = "1.0.
|
|
7403
|
+
var SDK_VERSION = "1.0.24";
|
|
7181
7404
|
|
|
7182
7405
|
// src/functions/register.ts
|
|
7183
7406
|
var registry = {};
|
|
@@ -7374,14 +7597,93 @@ var subscribeToEditor = (model, callback, options) => {
|
|
|
7374
7597
|
};
|
|
7375
7598
|
};
|
|
7376
7599
|
|
|
7600
|
+
// src/components/content/components/styles.helpers.ts
|
|
7601
|
+
var getCssFromFont = (font) => {
|
|
7602
|
+
const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
|
|
7603
|
+
const name = family.split(",")[0];
|
|
7604
|
+
const url = font.fileUrl ?? font?.files?.regular;
|
|
7605
|
+
let str = "";
|
|
7606
|
+
if (url && family && name) {
|
|
7607
|
+
str += `
|
|
7608
|
+
@font-face {
|
|
7609
|
+
font-family: "${family}";
|
|
7610
|
+
src: local("${name}"), url('${url}') format('woff2');
|
|
7611
|
+
font-display: fallback;
|
|
7612
|
+
font-weight: 400;
|
|
7613
|
+
}
|
|
7614
|
+
`.trim();
|
|
7615
|
+
}
|
|
7616
|
+
if (font.files) {
|
|
7617
|
+
for (const weight in font.files) {
|
|
7618
|
+
const isNumber = String(Number(weight)) === weight;
|
|
7619
|
+
if (!isNumber) {
|
|
7620
|
+
continue;
|
|
7621
|
+
}
|
|
7622
|
+
const weightUrl = font.files[weight];
|
|
7623
|
+
if (weightUrl && weightUrl !== url) {
|
|
7624
|
+
str += `
|
|
7625
|
+
@font-face {
|
|
7626
|
+
font-family: "${family}";
|
|
7627
|
+
src: url('${weightUrl}') format('woff2');
|
|
7628
|
+
font-display: fallback;
|
|
7629
|
+
font-weight: ${weight};
|
|
7630
|
+
}
|
|
7631
|
+
`.trim();
|
|
7632
|
+
}
|
|
7633
|
+
}
|
|
7634
|
+
}
|
|
7635
|
+
return str;
|
|
7636
|
+
};
|
|
7637
|
+
var getFontCss = ({
|
|
7638
|
+
customFonts
|
|
7639
|
+
}) => {
|
|
7640
|
+
return customFonts?.map((font) => getCssFromFont(font))?.join(" ") || "";
|
|
7641
|
+
};
|
|
7642
|
+
var getCss = ({
|
|
7643
|
+
cssCode,
|
|
7644
|
+
contentId
|
|
7645
|
+
}) => {
|
|
7646
|
+
if (!cssCode) {
|
|
7647
|
+
return "";
|
|
7648
|
+
}
|
|
7649
|
+
if (!contentId) {
|
|
7650
|
+
return cssCode;
|
|
7651
|
+
}
|
|
7652
|
+
return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
|
|
7653
|
+
};
|
|
7654
|
+
var DEFAULT_STYLES = `
|
|
7655
|
+
.builder-button {
|
|
7656
|
+
all: unset;
|
|
7657
|
+
}
|
|
7658
|
+
|
|
7659
|
+
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
7660
|
+
margin: 0;
|
|
7661
|
+
}
|
|
7662
|
+
.builder-text > p, .builder-text > .builder-paragraph {
|
|
7663
|
+
color: inherit;
|
|
7664
|
+
line-height: inherit;
|
|
7665
|
+
letter-spacing: inherit;
|
|
7666
|
+
font-weight: inherit;
|
|
7667
|
+
font-size: inherit;
|
|
7668
|
+
text-align: inherit;
|
|
7669
|
+
font-family: inherit;
|
|
7670
|
+
}
|
|
7671
|
+
`;
|
|
7672
|
+
var getDefaultStyles = (isNested) => {
|
|
7673
|
+
return !isNested ? DEFAULT_STYLES : "";
|
|
7674
|
+
};
|
|
7675
|
+
var getWrapperClassName = (variationId) => {
|
|
7676
|
+
return `variant-${variationId}`;
|
|
7677
|
+
};
|
|
7678
|
+
|
|
7377
7679
|
// src/components/content/components/enable-editor.tsx
|
|
7378
7680
|
function EnableEditor(props) {
|
|
7379
|
-
const [ContentWrapper, setContentWrapper] =
|
|
7681
|
+
const [ContentWrapper, setContentWrapper] = createSignal14(
|
|
7380
7682
|
props.contentWrapper || "div"
|
|
7381
7683
|
);
|
|
7382
|
-
const [httpReqsData, setHttpReqsData] =
|
|
7383
|
-
const [httpReqsPending, setHttpReqsPending] =
|
|
7384
|
-
const [clicked, setClicked] =
|
|
7684
|
+
const [httpReqsData, setHttpReqsData] = createSignal14({});
|
|
7685
|
+
const [httpReqsPending, setHttpReqsPending] = createSignal14({});
|
|
7686
|
+
const [clicked, setClicked] = createSignal14(false);
|
|
7385
7687
|
function mergeNewRootState(newData) {
|
|
7386
7688
|
const combinedState = {
|
|
7387
7689
|
...props.builderContextSignal.rootState,
|
|
@@ -7415,6 +7717,12 @@ function EnableEditor(props) {
|
|
|
7415
7717
|
content: newContentValue
|
|
7416
7718
|
}));
|
|
7417
7719
|
}
|
|
7720
|
+
const showContentProps = createMemo14(() => {
|
|
7721
|
+
return props.showContent ? {} : {
|
|
7722
|
+
hidden: true,
|
|
7723
|
+
"aria-hidden": true
|
|
7724
|
+
};
|
|
7725
|
+
});
|
|
7418
7726
|
function processMessage(event) {
|
|
7419
7727
|
return createEditorListener({
|
|
7420
7728
|
model: props.model,
|
|
@@ -7600,14 +7908,14 @@ function EnableEditor(props) {
|
|
|
7600
7908
|
runHttpRequests();
|
|
7601
7909
|
emitStateUpdate();
|
|
7602
7910
|
});
|
|
7603
|
-
const onUpdateFn_0_props_content =
|
|
7911
|
+
const onUpdateFn_0_props_content = createMemo14(() => props.content);
|
|
7604
7912
|
function onUpdateFn_0() {
|
|
7605
7913
|
if (props.content) {
|
|
7606
7914
|
mergeNewContent(props.content);
|
|
7607
7915
|
}
|
|
7608
7916
|
}
|
|
7609
7917
|
createEffect2(on2(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
7610
|
-
const onUpdateFn_1_props_builderContextSignal_content__data__jsCode =
|
|
7918
|
+
const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo14(() => props.builderContextSignal.content?.data?.jsCode);
|
|
7611
7919
|
function onUpdateFn_1() {
|
|
7612
7920
|
evaluateJsCode();
|
|
7613
7921
|
}
|
|
@@ -7617,7 +7925,7 @@ function EnableEditor(props) {
|
|
|
7617
7925
|
onUpdateFn_1
|
|
7618
7926
|
)
|
|
7619
7927
|
);
|
|
7620
|
-
const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests =
|
|
7928
|
+
const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo14(() => props.builderContextSignal.content?.data?.httpRequests);
|
|
7621
7929
|
function onUpdateFn_2() {
|
|
7622
7930
|
runHttpRequests();
|
|
7623
7931
|
}
|
|
@@ -7629,7 +7937,7 @@ function EnableEditor(props) {
|
|
|
7629
7937
|
onUpdateFn_2
|
|
7630
7938
|
)
|
|
7631
7939
|
);
|
|
7632
|
-
const onUpdateFn_3_props_builderContextSignal_rootState =
|
|
7940
|
+
const onUpdateFn_3_props_builderContextSignal_rootState = createMemo14(
|
|
7633
7941
|
() => props.builderContextSignal.rootState
|
|
7634
7942
|
);
|
|
7635
7943
|
function onUpdateFn_3() {
|
|
@@ -7641,14 +7949,14 @@ function EnableEditor(props) {
|
|
|
7641
7949
|
onUpdateFn_3
|
|
7642
7950
|
)
|
|
7643
7951
|
);
|
|
7644
|
-
const onUpdateFn_4_props_data =
|
|
7952
|
+
const onUpdateFn_4_props_data = createMemo14(() => props.data);
|
|
7645
7953
|
function onUpdateFn_4() {
|
|
7646
7954
|
if (props.data) {
|
|
7647
7955
|
mergeNewRootState(props.data);
|
|
7648
7956
|
}
|
|
7649
7957
|
}
|
|
7650
7958
|
createEffect2(on2(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
|
|
7651
|
-
const onUpdateFn_5_props_locale =
|
|
7959
|
+
const onUpdateFn_5_props_locale = createMemo14(() => props.locale);
|
|
7652
7960
|
function onUpdateFn_5() {
|
|
7653
7961
|
if (props.locale) {
|
|
7654
7962
|
mergeNewRootState({
|
|
@@ -7657,106 +7965,27 @@ function EnableEditor(props) {
|
|
|
7657
7965
|
}
|
|
7658
7966
|
}
|
|
7659
7967
|
createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
|
|
7660
|
-
return <builder_context_default.Provider value={props.builderContextSignal}><
|
|
7661
|
-
class={
|
|
7968
|
+
return <builder_context_default.Provider value={props.builderContextSignal}><Show11 when={props.builderContextSignal.content}><Dynamic5
|
|
7969
|
+
class={getWrapperClassName(
|
|
7970
|
+
props.content?.testVariationId || props.content?.id
|
|
7971
|
+
)}
|
|
7662
7972
|
{...{}}
|
|
7663
7973
|
ref={elementRef}
|
|
7664
7974
|
onClick={(event) => onClick(event)}
|
|
7665
7975
|
builder-content-id={props.builderContextSignal.content?.id}
|
|
7666
7976
|
builder-model={props.model}
|
|
7667
7977
|
{...{}}
|
|
7668
|
-
{...
|
|
7669
|
-
hidden: true,
|
|
7670
|
-
"aria-hidden": true
|
|
7671
|
-
}}
|
|
7978
|
+
{...showContentProps()}
|
|
7672
7979
|
{...props.contentWrapperProps}
|
|
7673
7980
|
component={ContentWrapper()}
|
|
7674
|
-
>{props.children}</Dynamic5></
|
|
7981
|
+
>{props.children}</Dynamic5></Show11></builder_context_default.Provider>;
|
|
7675
7982
|
}
|
|
7676
7983
|
var Enable_editor_default = EnableEditor;
|
|
7677
7984
|
|
|
7678
7985
|
// src/components/content/components/styles.tsx
|
|
7679
|
-
import { createSignal as
|
|
7680
|
-
|
|
7681
|
-
// src/components/content/components/styles.helpers.ts
|
|
7682
|
-
var getCssFromFont = (font) => {
|
|
7683
|
-
const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
|
|
7684
|
-
const name = family.split(",")[0];
|
|
7685
|
-
const url = font.fileUrl ?? font?.files?.regular;
|
|
7686
|
-
let str = "";
|
|
7687
|
-
if (url && family && name) {
|
|
7688
|
-
str += `
|
|
7689
|
-
@font-face {
|
|
7690
|
-
font-family: "${family}";
|
|
7691
|
-
src: local("${name}"), url('${url}') format('woff2');
|
|
7692
|
-
font-display: fallback;
|
|
7693
|
-
font-weight: 400;
|
|
7694
|
-
}
|
|
7695
|
-
`.trim();
|
|
7696
|
-
}
|
|
7697
|
-
if (font.files) {
|
|
7698
|
-
for (const weight in font.files) {
|
|
7699
|
-
const isNumber = String(Number(weight)) === weight;
|
|
7700
|
-
if (!isNumber) {
|
|
7701
|
-
continue;
|
|
7702
|
-
}
|
|
7703
|
-
const weightUrl = font.files[weight];
|
|
7704
|
-
if (weightUrl && weightUrl !== url) {
|
|
7705
|
-
str += `
|
|
7706
|
-
@font-face {
|
|
7707
|
-
font-family: "${family}";
|
|
7708
|
-
src: url('${weightUrl}') format('woff2');
|
|
7709
|
-
font-display: fallback;
|
|
7710
|
-
font-weight: ${weight};
|
|
7711
|
-
}
|
|
7712
|
-
`.trim();
|
|
7713
|
-
}
|
|
7714
|
-
}
|
|
7715
|
-
}
|
|
7716
|
-
return str;
|
|
7717
|
-
};
|
|
7718
|
-
var getFontCss = ({
|
|
7719
|
-
customFonts
|
|
7720
|
-
}) => {
|
|
7721
|
-
return customFonts?.map((font) => getCssFromFont(font))?.join(" ") || "";
|
|
7722
|
-
};
|
|
7723
|
-
var getCss = ({
|
|
7724
|
-
cssCode,
|
|
7725
|
-
contentId
|
|
7726
|
-
}) => {
|
|
7727
|
-
if (!cssCode) {
|
|
7728
|
-
return "";
|
|
7729
|
-
}
|
|
7730
|
-
if (!contentId) {
|
|
7731
|
-
return cssCode;
|
|
7732
|
-
}
|
|
7733
|
-
return cssCode?.replace(/&/g, `div[builder-content-id="${contentId}"]`) || "";
|
|
7734
|
-
};
|
|
7735
|
-
var DEFAULT_STYLES = `
|
|
7736
|
-
.builder-button {
|
|
7737
|
-
all: unset;
|
|
7738
|
-
}
|
|
7739
|
-
|
|
7740
|
-
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
7741
|
-
margin: 0;
|
|
7742
|
-
}
|
|
7743
|
-
.builder-text > p, .builder-text > .builder-paragraph {
|
|
7744
|
-
color: inherit;
|
|
7745
|
-
line-height: inherit;
|
|
7746
|
-
letter-spacing: inherit;
|
|
7747
|
-
font-weight: inherit;
|
|
7748
|
-
font-size: inherit;
|
|
7749
|
-
text-align: inherit;
|
|
7750
|
-
font-family: inherit;
|
|
7751
|
-
}
|
|
7752
|
-
`;
|
|
7753
|
-
var getDefaultStyles = (isNested) => {
|
|
7754
|
-
return !isNested ? DEFAULT_STYLES : "";
|
|
7755
|
-
};
|
|
7756
|
-
|
|
7757
|
-
// src/components/content/components/styles.tsx
|
|
7986
|
+
import { createSignal as createSignal15 } from "solid-js";
|
|
7758
7987
|
function ContentStyles(props) {
|
|
7759
|
-
const [injectedStyles, setInjectedStyles] =
|
|
7988
|
+
const [injectedStyles, setInjectedStyles] = createSignal15(
|
|
7760
7989
|
`
|
|
7761
7990
|
${getCss({
|
|
7762
7991
|
cssCode: props.cssCode,
|
|
@@ -7813,7 +8042,7 @@ var getContentInitialValue = ({
|
|
|
7813
8042
|
|
|
7814
8043
|
// src/components/content/content.tsx
|
|
7815
8044
|
function ContentComponent(props) {
|
|
7816
|
-
const [scriptStr, setScriptStr] =
|
|
8045
|
+
const [scriptStr, setScriptStr] = createSignal16(
|
|
7817
8046
|
getUpdateVariantVisibilityScript({
|
|
7818
8047
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-non-null-asserted-optional-chain
|
|
7819
8048
|
variationId: props.content?.testVariationId,
|
|
@@ -7821,7 +8050,7 @@ function ContentComponent(props) {
|
|
|
7821
8050
|
contentId: props.content?.id
|
|
7822
8051
|
})
|
|
7823
8052
|
);
|
|
7824
|
-
const [registeredComponents, setRegisteredComponents] =
|
|
8053
|
+
const [registeredComponents, setRegisteredComponents] = createSignal16(
|
|
7825
8054
|
[
|
|
7826
8055
|
...getDefaultRegisteredComponents(),
|
|
7827
8056
|
...props.customComponents || []
|
|
@@ -7836,7 +8065,7 @@ function ContentComponent(props) {
|
|
|
7836
8065
|
{}
|
|
7837
8066
|
)
|
|
7838
8067
|
);
|
|
7839
|
-
const [builderContextSignal, setBuilderContextSignal] =
|
|
8068
|
+
const [builderContextSignal, setBuilderContextSignal] = createSignal16({
|
|
7840
8069
|
content: getContentInitialValue({
|
|
7841
8070
|
content: props.content,
|
|
7842
8071
|
data: props.data
|
|
@@ -7894,16 +8123,16 @@ function ContentComponent(props) {
|
|
|
7894
8123
|
setBuilderContextSignal
|
|
7895
8124
|
}}
|
|
7896
8125
|
>
|
|
7897
|
-
<
|
|
8126
|
+
<Show12 when={props.isSsrAbTest}><Inlined_script_default
|
|
7898
8127
|
id="builderio-variant-visibility"
|
|
7899
8128
|
scriptStr={scriptStr()}
|
|
7900
|
-
/></
|
|
7901
|
-
<
|
|
8129
|
+
/></Show12>
|
|
8130
|
+
<Show12 when={TARGET !== "reactNative"}><Styles_default
|
|
7902
8131
|
isNestedRender={props.isNestedRender}
|
|
7903
8132
|
contentId={builderContextSignal().content?.id}
|
|
7904
8133
|
cssCode={builderContextSignal().content?.data?.cssCode}
|
|
7905
8134
|
customFonts={builderContextSignal().content?.data?.customFonts}
|
|
7906
|
-
/></
|
|
8135
|
+
/></Show12>
|
|
7907
8136
|
<Blocks_default
|
|
7908
8137
|
blocks={builderContextSignal().content?.data?.blocks}
|
|
7909
8138
|
context={builderContextSignal()}
|
|
@@ -7916,13 +8145,13 @@ var Content_default = ContentComponent;
|
|
|
7916
8145
|
|
|
7917
8146
|
// src/components/content-variants/content-variants.tsx
|
|
7918
8147
|
function ContentVariants(props) {
|
|
7919
|
-
const [shouldRenderVariants, setShouldRenderVariants] =
|
|
8148
|
+
const [shouldRenderVariants, setShouldRenderVariants] = createSignal17(
|
|
7920
8149
|
checkShouldRenderVariants({
|
|
7921
8150
|
canTrack: getDefaultCanTrack(props.canTrack),
|
|
7922
8151
|
content: props.content
|
|
7923
8152
|
})
|
|
7924
8153
|
);
|
|
7925
|
-
const updateCookieAndStylesScriptStr =
|
|
8154
|
+
const updateCookieAndStylesScriptStr = createMemo17(() => {
|
|
7926
8155
|
return getUpdateCookieAndStylesScript(
|
|
7927
8156
|
getVariants(props.content).map((value) => ({
|
|
7928
8157
|
id: value.testVariationId,
|
|
@@ -7931,10 +8160,10 @@ function ContentVariants(props) {
|
|
|
7931
8160
|
props.content?.id || ""
|
|
7932
8161
|
);
|
|
7933
8162
|
});
|
|
7934
|
-
const hideVariantsStyleString =
|
|
8163
|
+
const hideVariantsStyleString = createMemo17(() => {
|
|
7935
8164
|
return getVariants(props.content).map((value) => `.variant-${value.testVariationId} { display: none; } `).join("");
|
|
7936
8165
|
});
|
|
7937
|
-
const defaultContent =
|
|
8166
|
+
const defaultContent = createMemo17(() => {
|
|
7938
8167
|
return shouldRenderVariants() ? {
|
|
7939
8168
|
...props.content,
|
|
7940
8169
|
testVariationId: props.content?.id
|
|
@@ -7947,11 +8176,11 @@ function ContentVariants(props) {
|
|
|
7947
8176
|
setShouldRenderVariants(false);
|
|
7948
8177
|
});
|
|
7949
8178
|
return <>
|
|
7950
|
-
<
|
|
8179
|
+
<Show13 when={!props.isNestedRender && TARGET !== "reactNative"}><Inlined_script_default
|
|
7951
8180
|
id="builderio-init-variants-fns"
|
|
7952
8181
|
scriptStr={getInitVariantsFnsScriptString()}
|
|
7953
|
-
/></
|
|
7954
|
-
<
|
|
8182
|
+
/></Show13>
|
|
8183
|
+
<Show13 when={shouldRenderVariants()}>
|
|
7955
8184
|
<Inlined_styles_default
|
|
7956
8185
|
id="builderio-variants"
|
|
7957
8186
|
styles={hideVariantsStyleString()}
|
|
@@ -7960,7 +8189,7 @@ function ContentVariants(props) {
|
|
|
7960
8189
|
id="builderio-variants-visibility"
|
|
7961
8190
|
scriptStr={updateCookieAndStylesScriptStr()}
|
|
7962
8191
|
/>
|
|
7963
|
-
<
|
|
8192
|
+
<For8 each={getVariants(props.content)}>{(variant, _index) => {
|
|
7964
8193
|
const index = _index();
|
|
7965
8194
|
return <Content_default
|
|
7966
8195
|
isNestedRender={props.isNestedRender}
|
|
@@ -7984,8 +8213,8 @@ function ContentVariants(props) {
|
|
|
7984
8213
|
contentWrapperProps={props.contentWrapperProps}
|
|
7985
8214
|
trustedHosts={props.trustedHosts}
|
|
7986
8215
|
/>;
|
|
7987
|
-
}}</
|
|
7988
|
-
</
|
|
8216
|
+
}}</For8>
|
|
8217
|
+
</Show13>
|
|
7989
8218
|
<Content_default
|
|
7990
8219
|
isNestedRender={props.isNestedRender}
|
|
7991
8220
|
{...{}}
|
|
@@ -8038,8 +8267,14 @@ var fetchSymbolContent = async ({
|
|
|
8038
8267
|
|
|
8039
8268
|
// src/blocks/symbol/symbol.tsx
|
|
8040
8269
|
function Symbol2(props) {
|
|
8041
|
-
const [contentToUse, setContentToUse] =
|
|
8042
|
-
const
|
|
8270
|
+
const [contentToUse, setContentToUse] = createSignal18(props.symbol?.content);
|
|
8271
|
+
const blocksWrapper = createMemo18(() => {
|
|
8272
|
+
return "div";
|
|
8273
|
+
});
|
|
8274
|
+
const contentWrapper = createMemo18(() => {
|
|
8275
|
+
return "div";
|
|
8276
|
+
});
|
|
8277
|
+
const className = createMemo18(() => {
|
|
8043
8278
|
return [
|
|
8044
8279
|
...[props.attributes[getClassPropName()]],
|
|
8045
8280
|
"builder-symbol",
|
|
@@ -8061,7 +8296,7 @@ function Symbol2(props) {
|
|
|
8061
8296
|
}
|
|
8062
8297
|
onMount5(() => {
|
|
8063
8298
|
});
|
|
8064
|
-
const onUpdateFn_0_props_symbol =
|
|
8299
|
+
const onUpdateFn_0_props_symbol = createMemo18(() => props.symbol);
|
|
8065
8300
|
function onUpdateFn_0() {
|
|
8066
8301
|
setContent();
|
|
8067
8302
|
}
|
|
@@ -8083,8 +8318,8 @@ function Symbol2(props) {
|
|
|
8083
8318
|
model={props.symbol?.model}
|
|
8084
8319
|
content={contentToUse()}
|
|
8085
8320
|
linkComponent={props.builderLinkComponent}
|
|
8086
|
-
blocksWrapper=
|
|
8087
|
-
contentWrapper=
|
|
8321
|
+
blocksWrapper={blocksWrapper()}
|
|
8322
|
+
contentWrapper={contentWrapper()}
|
|
8088
8323
|
/></div>;
|
|
8089
8324
|
}
|
|
8090
8325
|
var symbol_default = Symbol2;
|