@builder.io/sdk-qwik 0.14.17 → 0.14.18
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/README.md +11 -157
- package/lib/browser/index.qwik.cjs +584 -243
- package/lib/browser/index.qwik.mjs +584 -243
- package/lib/edge/index.qwik.cjs +584 -243
- package/lib/edge/index.qwik.mjs +584 -243
- package/lib/node/index.qwik.cjs +584 -243
- package/lib/node/index.qwik.mjs +584 -243
- package/package.json +1 -1
- package/types/src/blocks/button/button.d.ts +1 -0
- package/types/src/blocks/columns/columns.d.ts +8 -1
- package/types/src/blocks/columns/columns.types.d.ts +1 -1
- package/types/src/blocks/columns/helpers.d.ts +1 -0
- package/types/src/blocks/symbol/symbol.d.ts +1 -1
- package/types/src/blocks/tabs/component-info.d.ts +2 -0
- package/types/src/blocks/tabs/index.d.ts +1 -0
- package/types/src/blocks/tabs/tabs.d.ts +5 -0
- package/types/src/blocks/tabs/tabs.types.d.ts +13 -0
- package/types/src/blocks/text/text.types.d.ts +2 -1
- package/types/src/components/block/block.helpers.d.ts +2 -0
- package/types/src/components/blocks/blocks-wrapper.d.ts +2 -2
- package/types/src/components/content/components/enable-editor.d.ts +7 -7
- package/types/src/components/content/components/styles.helpers.d.ts +1 -0
- package/types/src/components/dynamic-div.d.ts +14 -0
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/types/targets.d.ts +1 -1
package/lib/edge/index.qwik.cjs
CHANGED
|
@@ -51,22 +51,26 @@ const getClassPropName = () => {
|
|
|
51
51
|
case "vue":
|
|
52
52
|
case "solid":
|
|
53
53
|
case "qwik":
|
|
54
|
+
case "angular":
|
|
54
55
|
return "class";
|
|
55
56
|
}
|
|
56
57
|
};
|
|
58
|
+
const attrs = function attrs2(props, state) {
|
|
59
|
+
return {
|
|
60
|
+
...props.attributes,
|
|
61
|
+
[getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
|
|
62
|
+
...props.link ? {
|
|
63
|
+
href: props.link,
|
|
64
|
+
target: props.openLinkInNewTab ? "_blank" : void 0,
|
|
65
|
+
role: "link"
|
|
66
|
+
} : {
|
|
67
|
+
role: "button"
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
};
|
|
57
71
|
const Button = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
58
72
|
return /* @__PURE__ */ qwik._jsxC(DynamicRenderer, {
|
|
59
|
-
attributes:
|
|
60
|
-
...props.attributes,
|
|
61
|
-
[getClassPropName()]: `${props.link ? "" : "builder-button"} ${props.attributes[getClassPropName()] || ""}`,
|
|
62
|
-
...props.link ? {
|
|
63
|
-
href: props.link,
|
|
64
|
-
target: props.openLinkInNewTab ? "_blank" : void 0,
|
|
65
|
-
role: "link"
|
|
66
|
-
} : {
|
|
67
|
-
role: "button"
|
|
68
|
-
}
|
|
69
|
-
},
|
|
73
|
+
attributes: attrs(props),
|
|
70
74
|
get TagName() {
|
|
71
75
|
return props.link ? props.builderLinkComponent || "a" : "button";
|
|
72
76
|
},
|
|
@@ -3797,6 +3801,7 @@ function mapStyleObjToStrIfNeeded(style) {
|
|
|
3797
3801
|
case "svelte":
|
|
3798
3802
|
case "vue":
|
|
3799
3803
|
case "solid":
|
|
3804
|
+
case "angular":
|
|
3800
3805
|
return convertStyleMapToCSSArray(style).join(" ");
|
|
3801
3806
|
case "qwik":
|
|
3802
3807
|
case "reactNative":
|
|
@@ -3857,6 +3862,23 @@ const getRepeatItemData = ({ block, context }) => {
|
|
|
3857
3862
|
}));
|
|
3858
3863
|
return repeatArray;
|
|
3859
3864
|
};
|
|
3865
|
+
const shouldPassLinkComponent = (blockName) => {
|
|
3866
|
+
return blockName && [
|
|
3867
|
+
"Core:Button",
|
|
3868
|
+
"Symbol",
|
|
3869
|
+
"Columns",
|
|
3870
|
+
"Form:Form",
|
|
3871
|
+
"Builder: Tabs"
|
|
3872
|
+
].includes(blockName);
|
|
3873
|
+
};
|
|
3874
|
+
const shouldPassRegisteredComponents = (blockName) => {
|
|
3875
|
+
return blockName && [
|
|
3876
|
+
"Symbol",
|
|
3877
|
+
"Columns",
|
|
3878
|
+
"Form:Form",
|
|
3879
|
+
"Builder: Tabs"
|
|
3880
|
+
].includes(blockName);
|
|
3881
|
+
};
|
|
3860
3882
|
const SIZES = {
|
|
3861
3883
|
small: {
|
|
3862
3884
|
min: 320,
|
|
@@ -4100,22 +4122,35 @@ const BlockWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
4100
4122
|
}, 1, "87_1");
|
|
4101
4123
|
}, "BlockWrapper_component_kOI0j0aW8Nw"));
|
|
4102
4124
|
const InteractiveElement = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4125
|
+
const attributes = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
4126
|
+
const [props2] = qwik.useLexicalScope();
|
|
4127
|
+
return props2.includeBlockProps ? {
|
|
4106
4128
|
...getBlockProperties({
|
|
4107
|
-
block:
|
|
4108
|
-
context:
|
|
4129
|
+
block: props2.block,
|
|
4130
|
+
context: props2.context
|
|
4109
4131
|
}),
|
|
4110
4132
|
...getBlockActions({
|
|
4111
|
-
block:
|
|
4112
|
-
rootState:
|
|
4113
|
-
rootSetState:
|
|
4114
|
-
localState:
|
|
4115
|
-
context:
|
|
4133
|
+
block: props2.block,
|
|
4134
|
+
rootState: props2.context.rootState,
|
|
4135
|
+
rootSetState: props2.context.rootSetState,
|
|
4136
|
+
localState: props2.context.localState,
|
|
4137
|
+
context: props2.context.context
|
|
4116
4138
|
})
|
|
4117
|
-
} : {}
|
|
4118
|
-
|
|
4139
|
+
} : {};
|
|
4140
|
+
}, "InteractiveElement_component_attributes_useComputed_0kUhl8Qa4CE", [
|
|
4141
|
+
props
|
|
4142
|
+
]));
|
|
4143
|
+
return /* @__PURE__ */ qwik._jsxC(props.Wrapper, {
|
|
4144
|
+
...props.wrapperProps,
|
|
4145
|
+
get attributes() {
|
|
4146
|
+
return attributes.value;
|
|
4147
|
+
},
|
|
4148
|
+
children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "q0_0"),
|
|
4149
|
+
[qwik._IMMUTABLE]: {
|
|
4150
|
+
attributes: qwik._fnSignal((p0) => p0.value, [
|
|
4151
|
+
attributes
|
|
4152
|
+
], "p0.value")
|
|
4153
|
+
}
|
|
4119
4154
|
}, 0, "q0_1");
|
|
4120
4155
|
}, "InteractiveElement_component_0UqfJpjhn0g"));
|
|
4121
4156
|
const getWrapperProps = ({ componentOptions, builderBlock, context, componentRef, includeBlockProps, isInteractive, contextValue }) => {
|
|
@@ -4293,7 +4328,7 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
4293
4328
|
repeatItem
|
|
4294
4329
|
]));
|
|
4295
4330
|
const componentRefProps = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
4296
|
-
var _a2, _b, _c, _d, _e
|
|
4331
|
+
var _a2, _b, _c, _d, _e;
|
|
4297
4332
|
const [blockComponent2, processedBlock2, props2] = qwik.useLexicalScope();
|
|
4298
4333
|
return {
|
|
4299
4334
|
blockChildren: processedBlock2.value.children ?? [],
|
|
@@ -4301,10 +4336,10 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
4301
4336
|
componentOptions: {
|
|
4302
4337
|
...getBlockComponentOptions(processedBlock2.value),
|
|
4303
4338
|
builderContext: props2.context,
|
|
4304
|
-
...((_b = blockComponent2.value) == null ? void 0 : _b.name)
|
|
4339
|
+
...shouldPassLinkComponent((_b = blockComponent2.value) == null ? void 0 : _b.name) ? {
|
|
4305
4340
|
builderLinkComponent: props2.linkComponent
|
|
4306
4341
|
} : {},
|
|
4307
|
-
...((
|
|
4342
|
+
...shouldPassRegisteredComponents((_c = blockComponent2.value) == null ? void 0 : _c.name) ? {
|
|
4308
4343
|
builderComponents: props2.registeredComponents
|
|
4309
4344
|
} : {}
|
|
4310
4345
|
},
|
|
@@ -4312,8 +4347,8 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
4312
4347
|
linkComponent: props2.linkComponent,
|
|
4313
4348
|
registeredComponents: props2.registeredComponents,
|
|
4314
4349
|
builderBlock: processedBlock2.value,
|
|
4315
|
-
includeBlockProps: ((
|
|
4316
|
-
isInteractive: !((
|
|
4350
|
+
includeBlockProps: ((_d = blockComponent2.value) == null ? void 0 : _d.noWrap) === true,
|
|
4351
|
+
isInteractive: !((_e = blockComponent2.value) == null ? void 0 : _e.isRSC)
|
|
4317
4352
|
};
|
|
4318
4353
|
}, "Block_component_componentRefProps_useComputed_Ikbl8VO04ho", [
|
|
4319
4354
|
blockComponent,
|
|
@@ -4550,7 +4585,7 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
4550
4585
|
}, 1, "jN_4") : null
|
|
4551
4586
|
}, 1, "jN_5");
|
|
4552
4587
|
}, "Block_component_nnPv0RY0U0k"));
|
|
4553
|
-
const onClick$1 = function onClick2(props, state) {
|
|
4588
|
+
const onClick$1 = function onClick2(props, state, className) {
|
|
4554
4589
|
var _a, _b;
|
|
4555
4590
|
if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
|
|
4556
4591
|
(_b = window.parent) == null ? void 0 : _b.postMessage({
|
|
@@ -4561,7 +4596,7 @@ const onClick$1 = function onClick2(props, state) {
|
|
|
4561
4596
|
}
|
|
4562
4597
|
}, "*");
|
|
4563
4598
|
};
|
|
4564
|
-
const onMouseEnter = function onMouseEnter2(props, state) {
|
|
4599
|
+
const onMouseEnter = function onMouseEnter2(props, state, className) {
|
|
4565
4600
|
var _a, _b;
|
|
4566
4601
|
if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
|
|
4567
4602
|
(_b = window.parent) == null ? void 0 : _b.postMessage({
|
|
@@ -4596,23 +4631,26 @@ const BlocksWrapper = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inl
|
|
|
4596
4631
|
return props.styleProp;
|
|
4597
4632
|
},
|
|
4598
4633
|
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
4599
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
4634
|
+
const [className2, props2, state2] = qwik.useLexicalScope();
|
|
4600
4635
|
return onClick$1(props2);
|
|
4601
4636
|
}, "BlocksWrapper_component_onClick_ufezvOupQrM", [
|
|
4637
|
+
className,
|
|
4602
4638
|
props,
|
|
4603
4639
|
state
|
|
4604
4640
|
]),
|
|
4605
4641
|
onKeyPress$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
4606
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
4642
|
+
const [className2, props2, state2] = qwik.useLexicalScope();
|
|
4607
4643
|
return onClick$1(props2);
|
|
4608
4644
|
}, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
|
|
4645
|
+
className,
|
|
4609
4646
|
props,
|
|
4610
4647
|
state
|
|
4611
4648
|
]),
|
|
4612
4649
|
onMouseEnter$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
4613
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
4650
|
+
const [className2, props2, state2] = qwik.useLexicalScope();
|
|
4614
4651
|
return onMouseEnter(props2);
|
|
4615
4652
|
}, "BlocksWrapper_component_onMouseEnter_j4FJjnLtraQ", [
|
|
4653
|
+
className,
|
|
4616
4654
|
props,
|
|
4617
4655
|
state
|
|
4618
4656
|
]),
|
|
@@ -4725,6 +4763,12 @@ const Blocks = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl
|
|
|
4725
4763
|
function deoptSignal(value) {
|
|
4726
4764
|
return value;
|
|
4727
4765
|
}
|
|
4766
|
+
const getColumnsClass = (id2) => {
|
|
4767
|
+
return `builder-columns ${id2}-breakpoints`;
|
|
4768
|
+
};
|
|
4769
|
+
const getTagName = function getTagName2(props, state, column) {
|
|
4770
|
+
return column.link ? props.builderLinkComponent || "a" : "div";
|
|
4771
|
+
};
|
|
4728
4772
|
const getWidth = function getWidth2(props, state, index) {
|
|
4729
4773
|
var _a;
|
|
4730
4774
|
return ((_a = state.cols[index]) == null ? void 0 : _a.width) || 100 / state.cols.length;
|
|
@@ -4739,6 +4783,15 @@ const getTabletStyle = function getTabletStyle2(props, state, { stackedStyle, de
|
|
|
4739
4783
|
const getMobileStyle = function getMobileStyle2(props, state, { stackedStyle, desktopStyle }) {
|
|
4740
4784
|
return state.stackAt === "never" ? desktopStyle : stackedStyle;
|
|
4741
4785
|
};
|
|
4786
|
+
const columnsCssVars = function columnsCssVars2(props, state) {
|
|
4787
|
+
return {
|
|
4788
|
+
"--flex-dir": state.flexDir,
|
|
4789
|
+
"--flex-dir-tablet": getTabletStyle(props, state, {
|
|
4790
|
+
stackedStyle: state.flexDir,
|
|
4791
|
+
desktopStyle: "row"
|
|
4792
|
+
})
|
|
4793
|
+
};
|
|
4794
|
+
};
|
|
4742
4795
|
const columnCssVars = function columnCssVars2(props, state, index) {
|
|
4743
4796
|
const gutter = index === 0 ? 0 : state.gutterSize;
|
|
4744
4797
|
const width = getColumnCssWidth(props, state, index);
|
|
@@ -4778,90 +4831,68 @@ const getWidthForBreakpointSize = function getWidthForBreakpointSize2(props, sta
|
|
|
4778
4831
|
const breakpointSizes = getSizesForBreakpoints(((_b = (_a = props.builderContext.content) == null ? void 0 : _a.meta) == null ? void 0 : _b.breakpoints) || {});
|
|
4779
4832
|
return breakpointSizes[size].max;
|
|
4780
4833
|
};
|
|
4781
|
-
const
|
|
4782
|
-
|
|
4783
|
-
|
|
4784
|
-
|
|
4785
|
-
flexDir: props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
4786
|
-
gutterSize: typeof props.space === "number" ? props.space || 0 : 20,
|
|
4787
|
-
stackAt: props.stackColumnsAt || "tablet"
|
|
4788
|
-
});
|
|
4789
|
-
qwik.useStylesScopedQrl(/* @__PURE__ */ qwik.inlinedQrl(STYLES$2, "Columns_component_useStylesScoped_s7JLZz7MCCQ"));
|
|
4790
|
-
const columnsCssVars = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
4791
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
4792
|
-
return {
|
|
4793
|
-
"--flex-dir": state2.flexDir,
|
|
4794
|
-
"--flex-dir-tablet": getTabletStyle(props2, state2, {
|
|
4795
|
-
stackedStyle: state2.flexDir,
|
|
4796
|
-
desktopStyle: "row"
|
|
4797
|
-
})
|
|
4798
|
-
};
|
|
4799
|
-
}, "Columns_component_columnsCssVars_useComputed_adFEq2RWT9s", [
|
|
4800
|
-
props,
|
|
4801
|
-
state
|
|
4802
|
-
]));
|
|
4803
|
-
const columnsStyles = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
4804
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
4805
|
-
return `
|
|
4806
|
-
@media (max-width: ${getWidthForBreakpointSize(props2, state2, "medium")}px) {
|
|
4807
|
-
.${props2.builderBlock.id}-breakpoints {
|
|
4834
|
+
const columnsStyles = function columnsStyles2(props, state) {
|
|
4835
|
+
return `
|
|
4836
|
+
@media (max-width: ${getWidthForBreakpointSize(props, state, "medium")}px) {
|
|
4837
|
+
.${props.builderBlock.id}-breakpoints {
|
|
4808
4838
|
flex-direction: var(--flex-dir-tablet);
|
|
4809
4839
|
align-items: stretch;
|
|
4810
4840
|
}
|
|
4811
4841
|
|
|
4812
|
-
.${
|
|
4842
|
+
.${props.builderBlock.id}-breakpoints > .builder-column {
|
|
4813
4843
|
width: var(--column-width-tablet) !important;
|
|
4814
4844
|
margin-left: var(--column-margin-left-tablet) !important;
|
|
4815
4845
|
}
|
|
4816
4846
|
}
|
|
4817
4847
|
|
|
4818
|
-
@media (max-width: ${getWidthForBreakpointSize(
|
|
4819
|
-
.${
|
|
4848
|
+
@media (max-width: ${getWidthForBreakpointSize(props, state, "small")}px) {
|
|
4849
|
+
.${props.builderBlock.id}-breakpoints {
|
|
4820
4850
|
flex-direction: var(--flex-dir);
|
|
4821
4851
|
align-items: stretch;
|
|
4822
4852
|
}
|
|
4823
4853
|
|
|
4824
|
-
.${
|
|
4854
|
+
.${props.builderBlock.id}-breakpoints > .builder-column {
|
|
4825
4855
|
width: var(--column-width-mobile) !important;
|
|
4826
4856
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
4827
4857
|
}
|
|
4828
4858
|
},
|
|
4829
4859
|
`;
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4860
|
+
};
|
|
4861
|
+
const getAttributes = function getAttributes2(props, state, column, index) {
|
|
4862
|
+
return {
|
|
4863
|
+
...column.link ? {
|
|
4864
|
+
href: column.link
|
|
4865
|
+
} : {},
|
|
4866
|
+
[getClassPropName()]: "builder-column",
|
|
4867
|
+
style: mapStyleObjToStrIfNeeded(columnCssVars(props, state, index))
|
|
4868
|
+
};
|
|
4869
|
+
};
|
|
4870
|
+
const Columns = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
4871
|
+
var _a;
|
|
4872
|
+
qwik._jsxBranch();
|
|
4873
|
+
const state = qwik.useStore({
|
|
4874
|
+
cols: props.columns || [],
|
|
4875
|
+
flexDir: props.stackColumnsAt === "never" ? "row" : props.reverseColumnsWhenStacked ? "column-reverse" : "column",
|
|
4876
|
+
gutterSize: typeof props.space === "number" ? props.space || 0 : 20,
|
|
4877
|
+
stackAt: props.stackColumnsAt || "tablet"
|
|
4878
|
+
});
|
|
4879
|
+
qwik.useStylesScopedQrl(/* @__PURE__ */ qwik.inlinedQrl(STYLES$2, "Columns_component_useStylesScoped_s7JLZz7MCCQ"));
|
|
4880
|
+
return /* @__PURE__ */ qwik._jsxQ("div", {
|
|
4881
|
+
class: getColumnsClass((_a = props.builderBlock) == null ? void 0 : _a.id) + " div-Columns",
|
|
4882
|
+
style: columnsCssVars(props, state)
|
|
4883
|
+
}, null, [
|
|
4842
4884
|
/* @__PURE__ */ qwik._jsxC(InlinedStyles, {
|
|
4843
4885
|
id: "builderio-columns",
|
|
4844
|
-
|
|
4845
|
-
return columnsStyles.value;
|
|
4846
|
-
},
|
|
4886
|
+
styles: columnsStyles(props, state),
|
|
4847
4887
|
[qwik._IMMUTABLE]: {
|
|
4848
|
-
id: qwik._IMMUTABLE
|
|
4849
|
-
styles: qwik._fnSignal((p0) => p0.value, [
|
|
4850
|
-
columnsStyles
|
|
4851
|
-
], "p0.value")
|
|
4888
|
+
id: qwik._IMMUTABLE
|
|
4852
4889
|
}
|
|
4853
4890
|
}, 3, "c0_0"),
|
|
4854
4891
|
(props.columns || []).map((column, index) => {
|
|
4855
4892
|
return /* @__PURE__ */ qwik._jsxC(DynamicRenderer, {
|
|
4856
|
-
TagName:
|
|
4893
|
+
TagName: getTagName(props, state, column),
|
|
4857
4894
|
actionAttributes: {},
|
|
4858
|
-
attributes:
|
|
4859
|
-
...column.link ? {
|
|
4860
|
-
href: column.link
|
|
4861
|
-
} : {},
|
|
4862
|
-
[getClassPropName()]: "builder-column",
|
|
4863
|
-
style: mapStyleObjToStrIfNeeded(columnCssVars(props, state, index))
|
|
4864
|
-
},
|
|
4895
|
+
attributes: getAttributes(props, state, column, index),
|
|
4865
4896
|
children: /* @__PURE__ */ qwik._jsxC(Blocks, {
|
|
4866
4897
|
path: `component.options.columns.${index}.blocks`,
|
|
4867
4898
|
get parent() {
|
|
@@ -4969,7 +5000,7 @@ function getSrcSet(url) {
|
|
|
4969
5000
|
return url;
|
|
4970
5001
|
}
|
|
4971
5002
|
const Image = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
4972
|
-
var _a, _b, _c, _d;
|
|
5003
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4973
5004
|
qwik._jsxBranch();
|
|
4974
5005
|
qwik.useStylesScopedQrl(/* @__PURE__ */ qwik.inlinedQrl(STYLES$1, "Image_component_useStylesScoped_fBMYiVf9fuU"));
|
|
4975
5006
|
const srcSetToUse = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
@@ -5065,7 +5096,7 @@ const Image = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
5065
5096
|
], '{paddingTop:p0.aspectRatio*100+"%"}')
|
|
5066
5097
|
}, null, 3, "0A_1") : null,
|
|
5067
5098
|
((_d = (_c = props.builderBlock) == null ? void 0 : _c.children) == null ? void 0 : _d.length) && props.fitContent ? /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "0A_2") : null,
|
|
5068
|
-
!props.fitContent && props.children ? /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
5099
|
+
!props.fitContent && ((_f = (_e = props.builderBlock) == null ? void 0 : _e.children) == null ? void 0 : _f.length) ? /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
5069
5100
|
class: "div-Image-2"
|
|
5070
5101
|
}, /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "0A_3"), 1, "0A_4") : null
|
|
5071
5102
|
]
|
|
@@ -5284,7 +5315,7 @@ const handleABTesting = async ({ item, canTrack }) => {
|
|
|
5284
5315
|
};
|
|
5285
5316
|
};
|
|
5286
5317
|
const getDefaultCanTrack = (canTrack) => checkIsDefined(canTrack) ? canTrack : true;
|
|
5287
|
-
const componentInfo$
|
|
5318
|
+
const componentInfo$g = {
|
|
5288
5319
|
name: "Core:Button",
|
|
5289
5320
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
5290
5321
|
defaultStyles: {
|
|
@@ -5322,7 +5353,7 @@ const componentInfo$f = {
|
|
|
5322
5353
|
static: true,
|
|
5323
5354
|
noWrap: true
|
|
5324
5355
|
};
|
|
5325
|
-
const componentInfo$
|
|
5356
|
+
const componentInfo$f = {
|
|
5326
5357
|
// TODO: ways to statically preprocess JSON for references, functions, etc
|
|
5327
5358
|
name: "Columns",
|
|
5328
5359
|
isRSC: true,
|
|
@@ -5564,14 +5595,14 @@ const componentInfo$e = {
|
|
|
5564
5595
|
}
|
|
5565
5596
|
]
|
|
5566
5597
|
};
|
|
5567
|
-
const componentInfo$
|
|
5598
|
+
const componentInfo$e = {
|
|
5568
5599
|
name: "Fragment",
|
|
5569
5600
|
static: true,
|
|
5570
5601
|
hidden: true,
|
|
5571
5602
|
canHaveChildren: true,
|
|
5572
5603
|
noWrap: true
|
|
5573
5604
|
};
|
|
5574
|
-
const componentInfo$
|
|
5605
|
+
const componentInfo$d = {
|
|
5575
5606
|
name: "Image",
|
|
5576
5607
|
static: true,
|
|
5577
5608
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -5719,7 +5750,7 @@ const componentInfo$c = {
|
|
|
5719
5750
|
}
|
|
5720
5751
|
]
|
|
5721
5752
|
};
|
|
5722
|
-
const componentInfo$
|
|
5753
|
+
const componentInfo$c = {
|
|
5723
5754
|
name: "Core:Section",
|
|
5724
5755
|
static: true,
|
|
5725
5756
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -5764,7 +5795,7 @@ const componentInfo$b = {
|
|
|
5764
5795
|
}
|
|
5765
5796
|
]
|
|
5766
5797
|
};
|
|
5767
|
-
const componentInfo$
|
|
5798
|
+
const componentInfo$b = {
|
|
5768
5799
|
name: "Slot",
|
|
5769
5800
|
isRSC: true,
|
|
5770
5801
|
description: "Allow child blocks to be inserted into this content when used as a Symbol",
|
|
@@ -5819,7 +5850,7 @@ const Slot = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
5819
5850
|
}
|
|
5820
5851
|
}, 0, "B1_1");
|
|
5821
5852
|
}, "Slot_component_WWgWgfV0bb0"));
|
|
5822
|
-
const componentInfo$
|
|
5853
|
+
const componentInfo$a = {
|
|
5823
5854
|
name: "Symbol",
|
|
5824
5855
|
noWrap: true,
|
|
5825
5856
|
static: true,
|
|
@@ -5859,6 +5890,282 @@ const componentInfo$9 = {
|
|
|
5859
5890
|
}
|
|
5860
5891
|
]
|
|
5861
5892
|
};
|
|
5893
|
+
const defaultTab = {
|
|
5894
|
+
"@type": "@builder.io/sdk:Element",
|
|
5895
|
+
responsiveStyles: {
|
|
5896
|
+
large: {
|
|
5897
|
+
paddingLeft: "20px",
|
|
5898
|
+
paddingRight: "20px",
|
|
5899
|
+
paddingTop: "10px",
|
|
5900
|
+
paddingBottom: "10px",
|
|
5901
|
+
minWidth: "100px",
|
|
5902
|
+
textAlign: "center",
|
|
5903
|
+
display: "flex",
|
|
5904
|
+
flexDirection: "column",
|
|
5905
|
+
cursor: "pointer",
|
|
5906
|
+
userSelect: "none"
|
|
5907
|
+
}
|
|
5908
|
+
},
|
|
5909
|
+
component: {
|
|
5910
|
+
name: "Text",
|
|
5911
|
+
options: {
|
|
5912
|
+
text: "New tab"
|
|
5913
|
+
}
|
|
5914
|
+
}
|
|
5915
|
+
};
|
|
5916
|
+
const defaultElement = {
|
|
5917
|
+
"@type": "@builder.io/sdk:Element",
|
|
5918
|
+
responsiveStyles: {
|
|
5919
|
+
large: {
|
|
5920
|
+
height: "200px",
|
|
5921
|
+
display: "flex",
|
|
5922
|
+
marginTop: "20px",
|
|
5923
|
+
flexDirection: "column"
|
|
5924
|
+
}
|
|
5925
|
+
},
|
|
5926
|
+
component: {
|
|
5927
|
+
name: "Text",
|
|
5928
|
+
options: {
|
|
5929
|
+
text: "New tab content "
|
|
5930
|
+
}
|
|
5931
|
+
}
|
|
5932
|
+
};
|
|
5933
|
+
const componentInfo$9 = {
|
|
5934
|
+
name: "Builder: Tabs",
|
|
5935
|
+
inputs: [
|
|
5936
|
+
{
|
|
5937
|
+
name: "tabs",
|
|
5938
|
+
type: "list",
|
|
5939
|
+
broadcast: true,
|
|
5940
|
+
subFields: [
|
|
5941
|
+
{
|
|
5942
|
+
name: "label",
|
|
5943
|
+
type: "uiBlocks",
|
|
5944
|
+
hideFromUI: true,
|
|
5945
|
+
defaultValue: [
|
|
5946
|
+
defaultTab
|
|
5947
|
+
]
|
|
5948
|
+
},
|
|
5949
|
+
{
|
|
5950
|
+
name: "content",
|
|
5951
|
+
type: "uiBlocks",
|
|
5952
|
+
hideFromUI: true,
|
|
5953
|
+
defaultValue: [
|
|
5954
|
+
defaultElement
|
|
5955
|
+
]
|
|
5956
|
+
}
|
|
5957
|
+
],
|
|
5958
|
+
defaultValue: [
|
|
5959
|
+
{
|
|
5960
|
+
label: [
|
|
5961
|
+
{
|
|
5962
|
+
...defaultTab,
|
|
5963
|
+
component: {
|
|
5964
|
+
name: "Text",
|
|
5965
|
+
options: {
|
|
5966
|
+
text: "Tab 1"
|
|
5967
|
+
}
|
|
5968
|
+
}
|
|
5969
|
+
}
|
|
5970
|
+
],
|
|
5971
|
+
content: [
|
|
5972
|
+
{
|
|
5973
|
+
...defaultElement,
|
|
5974
|
+
component: {
|
|
5975
|
+
name: "Text",
|
|
5976
|
+
options: {
|
|
5977
|
+
text: "Tab 1 content"
|
|
5978
|
+
}
|
|
5979
|
+
}
|
|
5980
|
+
}
|
|
5981
|
+
]
|
|
5982
|
+
},
|
|
5983
|
+
{
|
|
5984
|
+
label: [
|
|
5985
|
+
{
|
|
5986
|
+
...defaultTab,
|
|
5987
|
+
component: {
|
|
5988
|
+
name: "Text",
|
|
5989
|
+
options: {
|
|
5990
|
+
text: "Tab 2"
|
|
5991
|
+
}
|
|
5992
|
+
}
|
|
5993
|
+
}
|
|
5994
|
+
],
|
|
5995
|
+
content: [
|
|
5996
|
+
{
|
|
5997
|
+
...defaultElement,
|
|
5998
|
+
component: {
|
|
5999
|
+
name: "Text",
|
|
6000
|
+
options: {
|
|
6001
|
+
text: "Tab 2 content"
|
|
6002
|
+
}
|
|
6003
|
+
}
|
|
6004
|
+
}
|
|
6005
|
+
]
|
|
6006
|
+
}
|
|
6007
|
+
]
|
|
6008
|
+
},
|
|
6009
|
+
{
|
|
6010
|
+
name: "activeTabStyle",
|
|
6011
|
+
type: "uiStyle",
|
|
6012
|
+
helperText: "CSS styles for the active tab",
|
|
6013
|
+
defaultValue: {
|
|
6014
|
+
backgroundColor: "rgba(0, 0, 0, 0.1)"
|
|
6015
|
+
}
|
|
6016
|
+
},
|
|
6017
|
+
{
|
|
6018
|
+
name: "defaultActiveTab",
|
|
6019
|
+
type: "number",
|
|
6020
|
+
helperText: 'Default tab to open to. Set to "1" for the first tab, "2" for the second, or choose "0" for none',
|
|
6021
|
+
defaultValue: 1,
|
|
6022
|
+
advanced: true
|
|
6023
|
+
},
|
|
6024
|
+
{
|
|
6025
|
+
name: "collapsible",
|
|
6026
|
+
type: "boolean",
|
|
6027
|
+
helperText: "If on, clicking an open tab closes it so no tabs are active",
|
|
6028
|
+
defaultValue: false,
|
|
6029
|
+
advanced: true
|
|
6030
|
+
},
|
|
6031
|
+
{
|
|
6032
|
+
name: "tabHeaderLayout",
|
|
6033
|
+
type: "enum",
|
|
6034
|
+
helperText: "Change the layout of the tab headers (uses justify-content)",
|
|
6035
|
+
defaultValue: "flex-start",
|
|
6036
|
+
enum: [
|
|
6037
|
+
{
|
|
6038
|
+
label: "Center",
|
|
6039
|
+
value: "center"
|
|
6040
|
+
},
|
|
6041
|
+
{
|
|
6042
|
+
label: "Space between",
|
|
6043
|
+
value: "space-between"
|
|
6044
|
+
},
|
|
6045
|
+
{
|
|
6046
|
+
label: "Space around",
|
|
6047
|
+
value: "space-around"
|
|
6048
|
+
},
|
|
6049
|
+
{
|
|
6050
|
+
label: "Left",
|
|
6051
|
+
value: "flex-start"
|
|
6052
|
+
},
|
|
6053
|
+
{
|
|
6054
|
+
label: "Right",
|
|
6055
|
+
value: "flex-end"
|
|
6056
|
+
}
|
|
6057
|
+
]
|
|
6058
|
+
}
|
|
6059
|
+
]
|
|
6060
|
+
};
|
|
6061
|
+
const activeTabContent = function activeTabContent2(props, state, active) {
|
|
6062
|
+
return props.tabs && props.tabs[active].content;
|
|
6063
|
+
};
|
|
6064
|
+
const getActiveTabStyle = function getActiveTabStyle2(props, state, index) {
|
|
6065
|
+
return state.activeTab === index ? props.activeTabStyle : {};
|
|
6066
|
+
};
|
|
6067
|
+
const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
6068
|
+
qwik._jsxBranch();
|
|
6069
|
+
const state = qwik.useStore({
|
|
6070
|
+
activeTab: props.defaultActiveTab ? props.defaultActiveTab - 1 : 0
|
|
6071
|
+
});
|
|
6072
|
+
return /* @__PURE__ */ qwik._jsxQ("div", null, null, [
|
|
6073
|
+
/* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
6074
|
+
class: "builder-tabs-wrap",
|
|
6075
|
+
style: qwik._fnSignal((p0) => ({
|
|
6076
|
+
display: "flex",
|
|
6077
|
+
flexDirection: "row",
|
|
6078
|
+
justifyContent: p0.tabHeaderLayout || "flex-start",
|
|
6079
|
+
overflow: "auto"
|
|
6080
|
+
}), [
|
|
6081
|
+
props
|
|
6082
|
+
], '{display:"flex",flexDirection:"row",justifyContent:p0.tabHeaderLayout||"flex-start",overflow:"auto"}')
|
|
6083
|
+
}, (props.tabs || []).map((tab, index) => {
|
|
6084
|
+
return /* @__PURE__ */ qwik._jsxQ("span", {
|
|
6085
|
+
class: `builder-tab-wrap ${state.activeTab === index ? "builder-tab-active" : ""}`,
|
|
6086
|
+
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
6087
|
+
const [index2, props2, state2] = qwik.useLexicalScope();
|
|
6088
|
+
if (index2 === state2.activeTab && props2.collapsible)
|
|
6089
|
+
state2.activeTab = -1;
|
|
6090
|
+
else
|
|
6091
|
+
state2.activeTab = index2;
|
|
6092
|
+
}, "Tabs_component_div_div_span_onClick_hSTBabAHGks", [
|
|
6093
|
+
index,
|
|
6094
|
+
props,
|
|
6095
|
+
state
|
|
6096
|
+
]),
|
|
6097
|
+
style: getActiveTabStyle(props, state, index)
|
|
6098
|
+
}, null, /* @__PURE__ */ qwik._jsxC(Blocks, {
|
|
6099
|
+
get parent() {
|
|
6100
|
+
return props.builderBlock.id;
|
|
6101
|
+
},
|
|
6102
|
+
path: `component.options.tabs.${index}.label`,
|
|
6103
|
+
get blocks() {
|
|
6104
|
+
return tab.label;
|
|
6105
|
+
},
|
|
6106
|
+
get context() {
|
|
6107
|
+
return props.builderContext;
|
|
6108
|
+
},
|
|
6109
|
+
get registeredComponents() {
|
|
6110
|
+
return props.builderComponents;
|
|
6111
|
+
},
|
|
6112
|
+
get linkComponent() {
|
|
6113
|
+
return props.builderLinkComponent;
|
|
6114
|
+
},
|
|
6115
|
+
[qwik._IMMUTABLE]: {
|
|
6116
|
+
blocks: qwik._wrapProp(tab, "label"),
|
|
6117
|
+
context: qwik._fnSignal((p0) => p0.builderContext, [
|
|
6118
|
+
props
|
|
6119
|
+
], "p0.builderContext"),
|
|
6120
|
+
linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
|
|
6121
|
+
props
|
|
6122
|
+
], "p0.builderLinkComponent"),
|
|
6123
|
+
parent: qwik._fnSignal((p0) => p0.builderBlock.id, [
|
|
6124
|
+
props
|
|
6125
|
+
], "p0.builderBlock.id"),
|
|
6126
|
+
registeredComponents: qwik._fnSignal((p0) => p0.builderComponents, [
|
|
6127
|
+
props
|
|
6128
|
+
], "p0.builderComponents")
|
|
6129
|
+
}
|
|
6130
|
+
}, 3, "6k_0"), 0, index);
|
|
6131
|
+
}), 1, null),
|
|
6132
|
+
activeTabContent(props, state, state.activeTab) ? /* @__PURE__ */ qwik._jsxQ("div", null, null, /* @__PURE__ */ qwik._jsxC(Blocks, {
|
|
6133
|
+
get parent() {
|
|
6134
|
+
return props.builderBlock.id;
|
|
6135
|
+
},
|
|
6136
|
+
get path() {
|
|
6137
|
+
return `component.options.tabs.${state.activeTab}.content`;
|
|
6138
|
+
},
|
|
6139
|
+
blocks: activeTabContent(props, state, state.activeTab),
|
|
6140
|
+
get context() {
|
|
6141
|
+
return props.builderContext;
|
|
6142
|
+
},
|
|
6143
|
+
get registeredComponents() {
|
|
6144
|
+
return props.builderComponents;
|
|
6145
|
+
},
|
|
6146
|
+
get linkComponent() {
|
|
6147
|
+
return props.builderLinkComponent;
|
|
6148
|
+
},
|
|
6149
|
+
[qwik._IMMUTABLE]: {
|
|
6150
|
+
context: qwik._fnSignal((p0) => p0.builderContext, [
|
|
6151
|
+
props
|
|
6152
|
+
], "p0.builderContext"),
|
|
6153
|
+
linkComponent: qwik._fnSignal((p0) => p0.builderLinkComponent, [
|
|
6154
|
+
props
|
|
6155
|
+
], "p0.builderLinkComponent"),
|
|
6156
|
+
parent: qwik._fnSignal((p0) => p0.builderBlock.id, [
|
|
6157
|
+
props
|
|
6158
|
+
], "p0.builderBlock.id"),
|
|
6159
|
+
path: qwik._fnSignal((p0) => `component.options.tabs.${p0.activeTab}.content`, [
|
|
6160
|
+
state
|
|
6161
|
+
], "`component.options.tabs.${p0.activeTab}.content`"),
|
|
6162
|
+
registeredComponents: qwik._fnSignal((p0) => p0.builderComponents, [
|
|
6163
|
+
props
|
|
6164
|
+
], "p0.builderComponents")
|
|
6165
|
+
}
|
|
6166
|
+
}, 3, "6k_1"), 1, "6k_2") : null
|
|
6167
|
+
], 1, "6k_3");
|
|
6168
|
+
}, "Tabs_component_MhWcxXy0lMY"));
|
|
5862
6169
|
const componentInfo$8 = {
|
|
5863
6170
|
name: "Text",
|
|
5864
6171
|
static: true,
|
|
@@ -7138,36 +7445,42 @@ const getExtraComponents = () => [
|
|
|
7138
7445
|
const getDefaultRegisteredComponents = () => [
|
|
7139
7446
|
{
|
|
7140
7447
|
component: Button,
|
|
7141
|
-
...componentInfo$
|
|
7448
|
+
...componentInfo$g
|
|
7142
7449
|
},
|
|
7143
7450
|
{
|
|
7144
7451
|
component: Columns,
|
|
7145
|
-
...componentInfo$
|
|
7452
|
+
...componentInfo$f
|
|
7146
7453
|
},
|
|
7147
7454
|
{
|
|
7148
7455
|
component: FragmentComponent,
|
|
7149
|
-
...componentInfo$
|
|
7456
|
+
...componentInfo$e
|
|
7150
7457
|
},
|
|
7151
7458
|
{
|
|
7152
7459
|
component: Image,
|
|
7153
|
-
...componentInfo$
|
|
7460
|
+
...componentInfo$d
|
|
7154
7461
|
},
|
|
7155
7462
|
{
|
|
7156
7463
|
component: SectionComponent,
|
|
7157
|
-
...componentInfo$
|
|
7464
|
+
...componentInfo$c
|
|
7158
7465
|
},
|
|
7159
7466
|
{
|
|
7160
7467
|
component: Slot,
|
|
7161
|
-
...componentInfo$
|
|
7468
|
+
...componentInfo$b
|
|
7162
7469
|
},
|
|
7163
7470
|
{
|
|
7164
7471
|
component: Symbol$1,
|
|
7165
|
-
...componentInfo$
|
|
7472
|
+
...componentInfo$a
|
|
7166
7473
|
},
|
|
7167
7474
|
{
|
|
7168
7475
|
component: Text,
|
|
7169
7476
|
...componentInfo$8
|
|
7170
7477
|
},
|
|
7478
|
+
...[
|
|
7479
|
+
{
|
|
7480
|
+
component: Tabs,
|
|
7481
|
+
...componentInfo$9
|
|
7482
|
+
}
|
|
7483
|
+
],
|
|
7171
7484
|
...getExtraComponents()
|
|
7172
7485
|
];
|
|
7173
7486
|
const createRegisterComponentMessage = (info) => ({
|
|
@@ -7613,7 +7926,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7613
7926
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
7614
7927
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
7615
7928
|
}
|
|
7616
|
-
const SDK_VERSION = "0.14.
|
|
7929
|
+
const SDK_VERSION = "0.14.18";
|
|
7617
7930
|
const registry = {};
|
|
7618
7931
|
function register(type, info) {
|
|
7619
7932
|
let typeList = registry[type];
|
|
@@ -7796,7 +8109,75 @@ const subscribeToEditor = (model, callback, options) => {
|
|
|
7796
8109
|
window.removeEventListener("message", listener);
|
|
7797
8110
|
};
|
|
7798
8111
|
};
|
|
7799
|
-
const
|
|
8112
|
+
const getCssFromFont = (font) => {
|
|
8113
|
+
var _a;
|
|
8114
|
+
const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
|
|
8115
|
+
const name = family.split(",")[0];
|
|
8116
|
+
const url = font.fileUrl ?? ((_a = font == null ? void 0 : font.files) == null ? void 0 : _a.regular);
|
|
8117
|
+
let str = "";
|
|
8118
|
+
if (url && family && name)
|
|
8119
|
+
str += `
|
|
8120
|
+
@font-face {
|
|
8121
|
+
font-family: "${family}";
|
|
8122
|
+
src: local("${name}"), url('${url}') format('woff2');
|
|
8123
|
+
font-display: fallback;
|
|
8124
|
+
font-weight: 400;
|
|
8125
|
+
}
|
|
8126
|
+
`.trim();
|
|
8127
|
+
if (font.files)
|
|
8128
|
+
for (const weight in font.files) {
|
|
8129
|
+
const isNumber = String(Number(weight)) === weight;
|
|
8130
|
+
if (!isNumber)
|
|
8131
|
+
continue;
|
|
8132
|
+
const weightUrl = font.files[weight];
|
|
8133
|
+
if (weightUrl && weightUrl !== url)
|
|
8134
|
+
str += `
|
|
8135
|
+
@font-face {
|
|
8136
|
+
font-family: "${family}";
|
|
8137
|
+
src: url('${weightUrl}') format('woff2');
|
|
8138
|
+
font-display: fallback;
|
|
8139
|
+
font-weight: ${weight};
|
|
8140
|
+
}
|
|
8141
|
+
`.trim();
|
|
8142
|
+
}
|
|
8143
|
+
return str;
|
|
8144
|
+
};
|
|
8145
|
+
const getFontCss = ({ customFonts }) => {
|
|
8146
|
+
var _a;
|
|
8147
|
+
return ((_a = customFonts == null ? void 0 : customFonts.map((font) => getCssFromFont(font))) == null ? void 0 : _a.join(" ")) || "";
|
|
8148
|
+
};
|
|
8149
|
+
const getCss = ({ cssCode, contentId }) => {
|
|
8150
|
+
if (!cssCode)
|
|
8151
|
+
return "";
|
|
8152
|
+
if (!contentId)
|
|
8153
|
+
return cssCode;
|
|
8154
|
+
return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
|
|
8155
|
+
};
|
|
8156
|
+
const DEFAULT_STYLES = `
|
|
8157
|
+
.builder-button {
|
|
8158
|
+
all: unset;
|
|
8159
|
+
}
|
|
8160
|
+
|
|
8161
|
+
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
8162
|
+
margin: 0;
|
|
8163
|
+
}
|
|
8164
|
+
.builder-text > p, .builder-text > .builder-paragraph {
|
|
8165
|
+
color: inherit;
|
|
8166
|
+
line-height: inherit;
|
|
8167
|
+
letter-spacing: inherit;
|
|
8168
|
+
font-weight: inherit;
|
|
8169
|
+
font-size: inherit;
|
|
8170
|
+
text-align: inherit;
|
|
8171
|
+
font-family: inherit;
|
|
8172
|
+
}
|
|
8173
|
+
`;
|
|
8174
|
+
const getDefaultStyles = (isNested) => {
|
|
8175
|
+
return !isNested ? DEFAULT_STYLES : "";
|
|
8176
|
+
};
|
|
8177
|
+
const getWrapperClassName = (variationId) => {
|
|
8178
|
+
return `variant-${variationId}`;
|
|
8179
|
+
};
|
|
8180
|
+
const mergeNewRootState = function mergeNewRootState22(props, state, showContentProps, elementRef, newData) {
|
|
7800
8181
|
var _a, _b;
|
|
7801
8182
|
const combinedState = {
|
|
7802
8183
|
...props.builderContextSignal.rootState,
|
|
@@ -7807,7 +8188,7 @@ const mergeNewRootState = function mergeNewRootState22(props, state, elementRef,
|
|
|
7807
8188
|
else
|
|
7808
8189
|
props.builderContextSignal.rootState = combinedState;
|
|
7809
8190
|
};
|
|
7810
|
-
const mergeNewContent = function mergeNewContent2(props, state, elementRef, newContent) {
|
|
8191
|
+
const mergeNewContent = function mergeNewContent2(props, state, showContentProps, elementRef, newContent) {
|
|
7811
8192
|
var _a, _b, _c, _d, _e;
|
|
7812
8193
|
const newContentValue = {
|
|
7813
8194
|
...props.builderContextSignal.content,
|
|
@@ -7824,7 +8205,7 @@ const mergeNewContent = function mergeNewContent2(props, state, elementRef, newC
|
|
|
7824
8205
|
};
|
|
7825
8206
|
props.builderContextSignal.content = newContentValue;
|
|
7826
8207
|
};
|
|
7827
|
-
const processMessage = function processMessage2(props, state, elementRef, event) {
|
|
8208
|
+
const processMessage = function processMessage2(props, state, showContentProps, elementRef, event) {
|
|
7828
8209
|
return createEditorListener({
|
|
7829
8210
|
model: props.model,
|
|
7830
8211
|
trustedHosts: props.trustedHosts,
|
|
@@ -7835,7 +8216,7 @@ const processMessage = function processMessage2(props, state, elementRef, event)
|
|
|
7835
8216
|
if (!contentId || contentId !== ((_a = props.builderContextSignal.content) == null ? void 0 : _a.id))
|
|
7836
8217
|
return;
|
|
7837
8218
|
if (breakpoints)
|
|
7838
|
-
mergeNewContent(props, state, elementRef, {
|
|
8219
|
+
mergeNewContent(props, state, showContentProps, elementRef, {
|
|
7839
8220
|
meta: {
|
|
7840
8221
|
breakpoints
|
|
7841
8222
|
}
|
|
@@ -7845,12 +8226,12 @@ const processMessage = function processMessage2(props, state, elementRef, event)
|
|
|
7845
8226
|
triggerAnimation(animation);
|
|
7846
8227
|
},
|
|
7847
8228
|
contentUpdate: (newContent) => {
|
|
7848
|
-
mergeNewContent(props, state, elementRef, newContent);
|
|
8229
|
+
mergeNewContent(props, state, showContentProps, elementRef, newContent);
|
|
7849
8230
|
}
|
|
7850
8231
|
}
|
|
7851
8232
|
})(event);
|
|
7852
8233
|
};
|
|
7853
|
-
const evaluateJsCode = function evaluateJsCode2(props, state, elementRef) {
|
|
8234
|
+
const evaluateJsCode = function evaluateJsCode2(props, state, showContentProps, elementRef) {
|
|
7854
8235
|
var _a, _b;
|
|
7855
8236
|
const jsCode = (_b = (_a = props.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.jsCode;
|
|
7856
8237
|
if (jsCode)
|
|
@@ -7866,7 +8247,7 @@ const evaluateJsCode = function evaluateJsCode2(props, state, elementRef) {
|
|
|
7866
8247
|
enableCache: false
|
|
7867
8248
|
});
|
|
7868
8249
|
};
|
|
7869
|
-
const onClick = function onClick22(props, state, elementRef, event) {
|
|
8250
|
+
const onClick = function onClick22(props, state, showContentProps, elementRef, event) {
|
|
7870
8251
|
var _a, _b;
|
|
7871
8252
|
if (props.builderContextSignal.content) {
|
|
7872
8253
|
const variationId = (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
|
|
@@ -7884,7 +8265,7 @@ const onClick = function onClick22(props, state, elementRef, event) {
|
|
|
7884
8265
|
if (!state.clicked)
|
|
7885
8266
|
state.clicked = true;
|
|
7886
8267
|
};
|
|
7887
|
-
const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
|
|
8268
|
+
const runHttpRequests = function runHttpRequests2(props, state, showContentProps, elementRef) {
|
|
7888
8269
|
var _a, _b;
|
|
7889
8270
|
const requests = ((_b = (_a = props.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.httpRequests) ?? {};
|
|
7890
8271
|
Object.entries(requests).forEach(([key, url]) => {
|
|
@@ -7904,7 +8285,7 @@ const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
|
|
|
7904
8285
|
enableCache: true
|
|
7905
8286
|
})));
|
|
7906
8287
|
fetch$1(evaluatedUrl).then((response) => response.json()).then((json) => {
|
|
7907
|
-
mergeNewRootState(props, state, elementRef, {
|
|
8288
|
+
mergeNewRootState(props, state, showContentProps, elementRef, {
|
|
7908
8289
|
[key]: json
|
|
7909
8290
|
});
|
|
7910
8291
|
state.httpReqsData[key] = true;
|
|
@@ -7915,7 +8296,7 @@ const runHttpRequests = function runHttpRequests2(props, state, elementRef) {
|
|
|
7915
8296
|
});
|
|
7916
8297
|
});
|
|
7917
8298
|
};
|
|
7918
|
-
const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
|
|
8299
|
+
const emitStateUpdate = function emitStateUpdate2(props, state, showContentProps, elementRef) {
|
|
7919
8300
|
if (isEditing())
|
|
7920
8301
|
window.dispatchEvent(new CustomEvent("builder:component:stateChange", {
|
|
7921
8302
|
detail: {
|
|
@@ -7927,7 +8308,17 @@ const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
|
|
|
7927
8308
|
}));
|
|
7928
8309
|
};
|
|
7929
8310
|
const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
8311
|
+
var _a, _b;
|
|
7930
8312
|
qwik._jsxBranch();
|
|
8313
|
+
const showContentProps = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
8314
|
+
const [props2] = qwik.useLexicalScope();
|
|
8315
|
+
return props2.showContent ? {} : {
|
|
8316
|
+
hidden: true,
|
|
8317
|
+
"aria-hidden": true
|
|
8318
|
+
};
|
|
8319
|
+
}, "EnableEditor_component_showContentProps_useComputed_aHr3V0Y8sNs", [
|
|
8320
|
+
props
|
|
8321
|
+
]));
|
|
7931
8322
|
const elementRef = qwik.useSignal();
|
|
7932
8323
|
const state = qwik.useStore({
|
|
7933
8324
|
ContentWrapper: props.contentWrapper || "div",
|
|
@@ -7938,8 +8329,8 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
7938
8329
|
deep: true
|
|
7939
8330
|
});
|
|
7940
8331
|
qwik.useOn("initeditingbldr", /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
|
|
7941
|
-
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
7942
|
-
window.addEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
|
|
8332
|
+
const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
|
|
8333
|
+
window.addEventListener("message", processMessage.bind(null, props2, state2, showContentProps2, elementRef2));
|
|
7943
8334
|
registerInsertMenu();
|
|
7944
8335
|
setupBrowserForEditing({
|
|
7945
8336
|
...props2.locale ? {
|
|
@@ -7953,18 +8344,19 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
7953
8344
|
} : {}
|
|
7954
8345
|
});
|
|
7955
8346
|
Object.values(props2.builderContextSignal.componentInfos).forEach((registeredComponent) => {
|
|
7956
|
-
var
|
|
8347
|
+
var _a2;
|
|
7957
8348
|
const message = createRegisterComponentMessage(registeredComponent);
|
|
7958
|
-
(
|
|
8349
|
+
(_a2 = window.parent) == null ? void 0 : _a2.postMessage(message, "*");
|
|
7959
8350
|
});
|
|
7960
|
-
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
|
|
8351
|
+
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, showContentProps2, elementRef2));
|
|
7961
8352
|
}, "EnableEditor_component_useOn_Qs8c0yql2i0", [
|
|
7962
8353
|
elementRef,
|
|
7963
8354
|
props,
|
|
8355
|
+
showContentProps,
|
|
7964
8356
|
state
|
|
7965
8357
|
]));
|
|
7966
8358
|
qwik.useOn("initpreviewingbldr", /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
|
|
7967
|
-
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8359
|
+
const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
|
|
7968
8360
|
const searchParams = new URL(location.href).searchParams;
|
|
7969
8361
|
const searchParamPreviewModel = searchParams.get("builder.preview");
|
|
7970
8362
|
const searchParamPreviewId = searchParams.get(`builder.preview.${searchParamPreviewModel}`);
|
|
@@ -7976,23 +8368,24 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
7976
8368
|
apiVersion: props2.builderContextSignal.apiVersion
|
|
7977
8369
|
}).then((content) => {
|
|
7978
8370
|
if (content)
|
|
7979
|
-
mergeNewContent(props2, state2, elementRef2, content);
|
|
8371
|
+
mergeNewContent(props2, state2, showContentProps2, elementRef2, content);
|
|
7980
8372
|
});
|
|
7981
8373
|
}, "EnableEditor_component_useOn_1_F94YipmknvI", [
|
|
7982
8374
|
elementRef,
|
|
7983
8375
|
props,
|
|
8376
|
+
showContentProps,
|
|
7984
8377
|
state
|
|
7985
8378
|
]));
|
|
7986
8379
|
qwik.useOn("qvisible", /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
|
|
7987
|
-
var
|
|
8380
|
+
var _a2, _b2, _c, _d;
|
|
7988
8381
|
if (isBrowser()) {
|
|
7989
8382
|
if (isEditing()) {
|
|
7990
8383
|
if (element)
|
|
7991
8384
|
element.dispatchEvent(new CustomEvent("initeditingbldr"));
|
|
7992
8385
|
}
|
|
7993
|
-
const shouldTrackImpression = ((
|
|
8386
|
+
const shouldTrackImpression = ((_a2 = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a2.value) === "true";
|
|
7994
8387
|
if (shouldTrackImpression) {
|
|
7995
|
-
const variationId = (
|
|
8388
|
+
const variationId = (_b2 = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b2.value;
|
|
7996
8389
|
const contentId = (_c = element.attributes.getNamedItem("contentId")) == null ? void 0 : _c.value;
|
|
7997
8390
|
const apiKeyProp = (_d = element.attributes.getNamedItem("apiKey")) == null ? void 0 : _d.value;
|
|
7998
8391
|
_track({
|
|
@@ -8011,80 +8404,87 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
8011
8404
|
}, "EnableEditor_component_useOn_2_FyR0YPSlJlw"));
|
|
8012
8405
|
qwik.useContextProvider(builderContext, props.builderContextSignal);
|
|
8013
8406
|
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
8014
|
-
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8407
|
+
const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
|
|
8015
8408
|
if (!props2.apiKey)
|
|
8016
8409
|
logger.error("No API key provided to `RenderContent` component. This can cause issues. Please provide an API key using the `apiKey` prop.");
|
|
8017
8410
|
evaluateJsCode(props2);
|
|
8018
|
-
runHttpRequests(props2, state2, elementRef2);
|
|
8411
|
+
runHttpRequests(props2, state2, showContentProps2, elementRef2);
|
|
8019
8412
|
emitStateUpdate(props2);
|
|
8020
8413
|
}, "EnableEditor_component_useTask_Nb2VI04qp0M", [
|
|
8021
8414
|
elementRef,
|
|
8022
8415
|
props,
|
|
8416
|
+
showContentProps,
|
|
8023
8417
|
state
|
|
8024
8418
|
]));
|
|
8025
8419
|
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
8026
|
-
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8420
|
+
const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
|
|
8027
8421
|
track2(() => props2.content);
|
|
8028
8422
|
if (props2.content)
|
|
8029
|
-
mergeNewContent(props2, state2, elementRef2, props2.content);
|
|
8423
|
+
mergeNewContent(props2, state2, showContentProps2, elementRef2, props2.content);
|
|
8030
8424
|
}, "EnableEditor_component_useTask_1_m0y1Z9vk4eQ", [
|
|
8031
8425
|
elementRef,
|
|
8032
8426
|
props,
|
|
8427
|
+
showContentProps,
|
|
8033
8428
|
state
|
|
8034
8429
|
]));
|
|
8035
8430
|
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
8036
|
-
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8431
|
+
const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
|
|
8037
8432
|
track2(() => {
|
|
8038
|
-
var
|
|
8039
|
-
return (
|
|
8433
|
+
var _a2, _b2;
|
|
8434
|
+
return (_b2 = (_a2 = props2.builderContextSignal.content) == null ? void 0 : _a2.data) == null ? void 0 : _b2.jsCode;
|
|
8040
8435
|
});
|
|
8041
8436
|
evaluateJsCode(props2);
|
|
8042
8437
|
}, "EnableEditor_component_useTask_2_xVyv0tDqZLs", [
|
|
8043
8438
|
elementRef,
|
|
8044
8439
|
props,
|
|
8440
|
+
showContentProps,
|
|
8045
8441
|
state
|
|
8046
8442
|
]));
|
|
8047
8443
|
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
8048
|
-
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8444
|
+
const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
|
|
8049
8445
|
track2(() => {
|
|
8050
|
-
var
|
|
8051
|
-
return (
|
|
8446
|
+
var _a2, _b2;
|
|
8447
|
+
return (_b2 = (_a2 = props2.builderContextSignal.content) == null ? void 0 : _a2.data) == null ? void 0 : _b2.httpRequests;
|
|
8052
8448
|
});
|
|
8053
|
-
runHttpRequests(props2, state2, elementRef2);
|
|
8449
|
+
runHttpRequests(props2, state2, showContentProps2, elementRef2);
|
|
8054
8450
|
}, "EnableEditor_component_useTask_3_bQ0e5LHZwWE", [
|
|
8055
8451
|
elementRef,
|
|
8056
8452
|
props,
|
|
8453
|
+
showContentProps,
|
|
8057
8454
|
state
|
|
8058
8455
|
]));
|
|
8059
8456
|
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
8060
|
-
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8457
|
+
const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
|
|
8061
8458
|
track2(() => props2.builderContextSignal.rootState);
|
|
8062
8459
|
emitStateUpdate(props2);
|
|
8063
8460
|
}, "EnableEditor_component_useTask_4_moHYZG8uNVU", [
|
|
8064
8461
|
elementRef,
|
|
8065
8462
|
props,
|
|
8463
|
+
showContentProps,
|
|
8066
8464
|
state
|
|
8067
8465
|
]));
|
|
8068
8466
|
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
8069
|
-
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8467
|
+
const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
|
|
8070
8468
|
track2(() => props2.data);
|
|
8071
8469
|
if (props2.data)
|
|
8072
|
-
mergeNewRootState(props2, state2, elementRef2, props2.data);
|
|
8470
|
+
mergeNewRootState(props2, state2, showContentProps2, elementRef2, props2.data);
|
|
8073
8471
|
}, "EnableEditor_component_useTask_5_24QxS0r0KF8", [
|
|
8074
8472
|
elementRef,
|
|
8075
8473
|
props,
|
|
8474
|
+
showContentProps,
|
|
8076
8475
|
state
|
|
8077
8476
|
]));
|
|
8078
8477
|
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
8079
|
-
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8478
|
+
const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
|
|
8080
8479
|
track2(() => props2.locale);
|
|
8081
8480
|
if (props2.locale)
|
|
8082
|
-
mergeNewRootState(props2, state2, elementRef2, {
|
|
8481
|
+
mergeNewRootState(props2, state2, showContentProps2, elementRef2, {
|
|
8083
8482
|
locale: props2.locale
|
|
8084
8483
|
});
|
|
8085
8484
|
}, "EnableEditor_component_useTask_6_0CaFTUOgv08", [
|
|
8086
8485
|
elementRef,
|
|
8087
8486
|
props,
|
|
8487
|
+
showContentProps,
|
|
8088
8488
|
state
|
|
8089
8489
|
]));
|
|
8090
8490
|
return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
@@ -8093,69 +8493,58 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
8093
8493
|
return props.apiKey;
|
|
8094
8494
|
},
|
|
8095
8495
|
get contentId() {
|
|
8096
|
-
var
|
|
8097
|
-
return (
|
|
8496
|
+
var _a2;
|
|
8497
|
+
return (_a2 = props.builderContextSignal.content) == null ? void 0 : _a2.id;
|
|
8098
8498
|
},
|
|
8099
8499
|
get variationId() {
|
|
8100
|
-
var
|
|
8101
|
-
return (
|
|
8500
|
+
var _a2;
|
|
8501
|
+
return (_a2 = props.builderContextSignal.content) == null ? void 0 : _a2.testVariationId;
|
|
8102
8502
|
},
|
|
8103
8503
|
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
8104
|
-
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8105
|
-
return onClick(props2, state2, elementRef2, event);
|
|
8504
|
+
const [elementRef2, props2, showContentProps2, state2] = qwik.useLexicalScope();
|
|
8505
|
+
return onClick(props2, state2, showContentProps2, elementRef2, event);
|
|
8106
8506
|
}, "EnableEditor_component__Fragment_onClick_b4nYT3DrjEk", [
|
|
8107
8507
|
elementRef,
|
|
8108
8508
|
props,
|
|
8509
|
+
showContentProps,
|
|
8109
8510
|
state
|
|
8110
8511
|
]),
|
|
8111
8512
|
ref: elementRef,
|
|
8112
8513
|
shouldTrack: String(props.builderContextSignal.content && getDefaultCanTrack(props.canTrack)),
|
|
8113
8514
|
get "builder-content-id"() {
|
|
8114
|
-
var
|
|
8115
|
-
return (
|
|
8515
|
+
var _a2;
|
|
8516
|
+
return (_a2 = props.builderContextSignal.content) == null ? void 0 : _a2.id;
|
|
8116
8517
|
},
|
|
8117
8518
|
get "builder-model"() {
|
|
8118
8519
|
return props.model;
|
|
8119
8520
|
},
|
|
8120
|
-
...
|
|
8121
|
-
hidden: true,
|
|
8122
|
-
"aria-hidden": true
|
|
8123
|
-
},
|
|
8521
|
+
...showContentProps.value,
|
|
8124
8522
|
...props.contentWrapperProps,
|
|
8125
|
-
get class() {
|
|
8126
|
-
var _a, _b;
|
|
8127
|
-
return `variant-${((_a = props.content) == null ? void 0 : _a.testVariationId) || ((_b = props.content) == null ? void 0 : _b.id)}`;
|
|
8128
|
-
},
|
|
8129
8523
|
children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "06_0"),
|
|
8524
|
+
class: getWrapperClassName(((_a = props.content) == null ? void 0 : _a.testVariationId) || ((_b = props.content) == null ? void 0 : _b.id)),
|
|
8130
8525
|
[qwik._IMMUTABLE]: {
|
|
8131
8526
|
apiKey: qwik._fnSignal((p0) => p0.apiKey, [
|
|
8132
8527
|
props
|
|
8133
8528
|
], "p0.apiKey"),
|
|
8134
8529
|
"builder-content-id": qwik._fnSignal((p0) => {
|
|
8135
|
-
var
|
|
8136
|
-
return (
|
|
8530
|
+
var _a2;
|
|
8531
|
+
return (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.id;
|
|
8137
8532
|
}, [
|
|
8138
8533
|
props
|
|
8139
8534
|
], "p0.builderContextSignal.content?.id"),
|
|
8140
8535
|
"builder-model": qwik._fnSignal((p0) => p0.model, [
|
|
8141
8536
|
props
|
|
8142
8537
|
], "p0.model"),
|
|
8143
|
-
class: qwik._fnSignal((p0) => {
|
|
8144
|
-
var _a, _b;
|
|
8145
|
-
return `variant-${((_a = p0.content) == null ? void 0 : _a.testVariationId) || ((_b = p0.content) == null ? void 0 : _b.id)}`;
|
|
8146
|
-
}, [
|
|
8147
|
-
props
|
|
8148
|
-
], "`variant-${p0.content?.testVariationId||p0.content?.id}`"),
|
|
8149
8538
|
contentId: qwik._fnSignal((p0) => {
|
|
8150
|
-
var
|
|
8151
|
-
return (
|
|
8539
|
+
var _a2;
|
|
8540
|
+
return (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.id;
|
|
8152
8541
|
}, [
|
|
8153
8542
|
props
|
|
8154
8543
|
], "p0.builderContextSignal.content?.id"),
|
|
8155
8544
|
ref: qwik._IMMUTABLE,
|
|
8156
8545
|
variationId: qwik._fnSignal((p0) => {
|
|
8157
|
-
var
|
|
8158
|
-
return (
|
|
8546
|
+
var _a2;
|
|
8547
|
+
return (_a2 = p0.builderContextSignal.content) == null ? void 0 : _a2.testVariationId;
|
|
8159
8548
|
}, [
|
|
8160
8549
|
props
|
|
8161
8550
|
], "p0.builderContextSignal.content?.testVariationId")
|
|
@@ -8163,71 +8552,6 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
8163
8552
|
}, 0, "06_1") : null
|
|
8164
8553
|
}, 1, "06_2");
|
|
8165
8554
|
}, "EnableEditor_component_ko1mO8oaj8k"));
|
|
8166
|
-
const getCssFromFont = (font) => {
|
|
8167
|
-
var _a;
|
|
8168
|
-
const family = font.family + (font.kind && !font.kind.includes("#") ? ", " + font.kind : "");
|
|
8169
|
-
const name = family.split(",")[0];
|
|
8170
|
-
const url = font.fileUrl ?? ((_a = font == null ? void 0 : font.files) == null ? void 0 : _a.regular);
|
|
8171
|
-
let str = "";
|
|
8172
|
-
if (url && family && name)
|
|
8173
|
-
str += `
|
|
8174
|
-
@font-face {
|
|
8175
|
-
font-family: "${family}";
|
|
8176
|
-
src: local("${name}"), url('${url}') format('woff2');
|
|
8177
|
-
font-display: fallback;
|
|
8178
|
-
font-weight: 400;
|
|
8179
|
-
}
|
|
8180
|
-
`.trim();
|
|
8181
|
-
if (font.files)
|
|
8182
|
-
for (const weight in font.files) {
|
|
8183
|
-
const isNumber = String(Number(weight)) === weight;
|
|
8184
|
-
if (!isNumber)
|
|
8185
|
-
continue;
|
|
8186
|
-
const weightUrl = font.files[weight];
|
|
8187
|
-
if (weightUrl && weightUrl !== url)
|
|
8188
|
-
str += `
|
|
8189
|
-
@font-face {
|
|
8190
|
-
font-family: "${family}";
|
|
8191
|
-
src: url('${weightUrl}') format('woff2');
|
|
8192
|
-
font-display: fallback;
|
|
8193
|
-
font-weight: ${weight};
|
|
8194
|
-
}
|
|
8195
|
-
`.trim();
|
|
8196
|
-
}
|
|
8197
|
-
return str;
|
|
8198
|
-
};
|
|
8199
|
-
const getFontCss = ({ customFonts }) => {
|
|
8200
|
-
var _a;
|
|
8201
|
-
return ((_a = customFonts == null ? void 0 : customFonts.map((font) => getCssFromFont(font))) == null ? void 0 : _a.join(" ")) || "";
|
|
8202
|
-
};
|
|
8203
|
-
const getCss = ({ cssCode, contentId }) => {
|
|
8204
|
-
if (!cssCode)
|
|
8205
|
-
return "";
|
|
8206
|
-
if (!contentId)
|
|
8207
|
-
return cssCode;
|
|
8208
|
-
return (cssCode == null ? void 0 : cssCode.replace(/&/g, `div[builder-content-id="${contentId}"]`)) || "";
|
|
8209
|
-
};
|
|
8210
|
-
const DEFAULT_STYLES = `
|
|
8211
|
-
.builder-button {
|
|
8212
|
-
all: unset;
|
|
8213
|
-
}
|
|
8214
|
-
|
|
8215
|
-
.builder-text > p:first-of-type, .builder-text > .builder-paragraph:first-of-type {
|
|
8216
|
-
margin: 0;
|
|
8217
|
-
}
|
|
8218
|
-
.builder-text > p, .builder-text > .builder-paragraph {
|
|
8219
|
-
color: inherit;
|
|
8220
|
-
line-height: inherit;
|
|
8221
|
-
letter-spacing: inherit;
|
|
8222
|
-
font-weight: inherit;
|
|
8223
|
-
font-size: inherit;
|
|
8224
|
-
text-align: inherit;
|
|
8225
|
-
font-family: inherit;
|
|
8226
|
-
}
|
|
8227
|
-
`;
|
|
8228
|
-
const getDefaultStyles = (isNested) => {
|
|
8229
|
-
return !isNested ? DEFAULT_STYLES : "";
|
|
8230
|
-
};
|
|
8231
8555
|
const ContentStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
8232
8556
|
const state = qwik.useStore({
|
|
8233
8557
|
injectedStyles: `
|
|
@@ -8832,7 +9156,7 @@ const fetchSymbolContent = async ({ builderContextValue, symbol }) => {
|
|
|
8832
9156
|
});
|
|
8833
9157
|
return void 0;
|
|
8834
9158
|
};
|
|
8835
|
-
const setContent = function setContent2(props, state) {
|
|
9159
|
+
const setContent = function setContent2(props, state, blocksWrapper, contentWrapper, className) {
|
|
8836
9160
|
if (state.contentToUse)
|
|
8837
9161
|
return;
|
|
8838
9162
|
fetchSymbolContent({
|
|
@@ -8845,6 +9169,12 @@ const setContent = function setContent2(props, state) {
|
|
|
8845
9169
|
};
|
|
8846
9170
|
const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
8847
9171
|
var _a;
|
|
9172
|
+
const blocksWrapper = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
9173
|
+
return "div";
|
|
9174
|
+
}, "Symbol_component_blocksWrapper_useComputed_B5dlF985gMM"));
|
|
9175
|
+
const contentWrapper = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
9176
|
+
return "div";
|
|
9177
|
+
}, "Symbol_component_contentWrapper_useComputed_EvmPpPj8JTo"));
|
|
8848
9178
|
const className = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
8849
9179
|
var _a2, _b;
|
|
8850
9180
|
const [props2] = qwik.useLexicalScope();
|
|
@@ -8861,10 +9191,13 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
8861
9191
|
contentToUse: (_a = props.symbol) == null ? void 0 : _a.content
|
|
8862
9192
|
});
|
|
8863
9193
|
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
8864
|
-
const [props2, state2] = qwik.useLexicalScope();
|
|
9194
|
+
const [blocksWrapper2, className2, contentWrapper2, props2, state2] = qwik.useLexicalScope();
|
|
8865
9195
|
track2(() => props2.symbol);
|
|
8866
9196
|
setContent(props2, state2);
|
|
8867
9197
|
}, "Symbol_component_useTask_NIAWAC1bMBo", [
|
|
9198
|
+
blocksWrapper,
|
|
9199
|
+
className,
|
|
9200
|
+
contentWrapper,
|
|
8868
9201
|
props,
|
|
8869
9202
|
state
|
|
8870
9203
|
]));
|
|
@@ -8906,8 +9239,12 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
8906
9239
|
get linkComponent() {
|
|
8907
9240
|
return props.builderLinkComponent;
|
|
8908
9241
|
},
|
|
8909
|
-
blocksWrapper
|
|
8910
|
-
|
|
9242
|
+
get blocksWrapper() {
|
|
9243
|
+
return blocksWrapper.value;
|
|
9244
|
+
},
|
|
9245
|
+
get contentWrapper() {
|
|
9246
|
+
return contentWrapper.value;
|
|
9247
|
+
},
|
|
8911
9248
|
[qwik._IMMUTABLE]: {
|
|
8912
9249
|
apiKey: qwik._fnSignal((p0) => p0.builderContext.apiKey, [
|
|
8913
9250
|
props
|
|
@@ -8915,11 +9252,15 @@ const Symbol$1 = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQ
|
|
|
8915
9252
|
apiVersion: qwik._fnSignal((p0) => p0.builderContext.apiVersion, [
|
|
8916
9253
|
props
|
|
8917
9254
|
], "p0.builderContext.apiVersion"),
|
|
8918
|
-
blocksWrapper: qwik.
|
|
9255
|
+
blocksWrapper: qwik._fnSignal((p0) => p0.value, [
|
|
9256
|
+
blocksWrapper
|
|
9257
|
+
], "p0.value"),
|
|
8919
9258
|
content: qwik._fnSignal((p0) => p0.contentToUse, [
|
|
8920
9259
|
state
|
|
8921
9260
|
], "p0.contentToUse"),
|
|
8922
|
-
contentWrapper: qwik.
|
|
9261
|
+
contentWrapper: qwik._fnSignal((p0) => p0.value, [
|
|
9262
|
+
contentWrapper
|
|
9263
|
+
], "p0.value"),
|
|
8923
9264
|
context: qwik._fnSignal((p0) => {
|
|
8924
9265
|
var _a2;
|
|
8925
9266
|
return {
|