@builder.io/sdk-solid 4.0.6 → 4.0.8
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/lib/browser/dev.js +40 -15
- package/lib/browser/dev.jsx +80 -47
- package/lib/browser/index.js +40 -15
- package/lib/browser/index.jsx +80 -47
- package/lib/edge/dev.js +40 -15
- package/lib/edge/dev.jsx +80 -47
- package/lib/edge/index.js +40 -15
- package/lib/edge/index.jsx +80 -47
- package/lib/node/dev.js +40 -15
- package/lib/node/dev.jsx +80 -47
- package/lib/node/index.js +40 -15
- package/lib/node/index.jsx +80 -47
- package/package.json +1 -1
package/lib/edge/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { delegateEvents, createComponent, spread, mergeProps, insert, effect, setAttribute, className, style, template, use, Dynamic, memo } from 'solid-js/web';
|
|
2
|
-
import { createContext, useContext, Show, For, createMemo,
|
|
2
|
+
import { createContext, useContext, Show, For, createMemo, onMount, createSignal, createEffect, on } from 'solid-js';
|
|
3
3
|
|
|
4
4
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
5
5
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
@@ -4108,6 +4108,9 @@ var provideBuilderContext = (block, context) => {
|
|
|
4108
4108
|
};
|
|
4109
4109
|
return {};
|
|
4110
4110
|
};
|
|
4111
|
+
var generateKey = (index) => {
|
|
4112
|
+
return index.toString();
|
|
4113
|
+
};
|
|
4111
4114
|
|
|
4112
4115
|
// src/constants/device-sizes.ts
|
|
4113
4116
|
var SIZES = {
|
|
@@ -4387,6 +4390,7 @@ var awaiter_default = Awaiter;
|
|
|
4387
4390
|
|
|
4388
4391
|
// src/components/block/components/interactive-element.tsx
|
|
4389
4392
|
function InteractiveElement(props) {
|
|
4393
|
+
createSignal(0);
|
|
4390
4394
|
const attributes = createMemo(() => {
|
|
4391
4395
|
return props.includeBlockProps ? {
|
|
4392
4396
|
...getBlockProperties({
|
|
@@ -4402,9 +4406,17 @@ function InteractiveElement(props) {
|
|
|
4402
4406
|
})
|
|
4403
4407
|
} : {};
|
|
4404
4408
|
});
|
|
4409
|
+
const targetWrapperProps = createMemo(() => {
|
|
4410
|
+
return props.wrapperProps;
|
|
4411
|
+
});
|
|
4412
|
+
const onUpdateFn_0_props_wrapperProps = createMemo(() => props.wrapperProps);
|
|
4413
|
+
const onUpdateFn_0_props_block__component__options = createMemo(() => props.block?.component?.options);
|
|
4414
|
+
function onUpdateFn_0() {
|
|
4415
|
+
}
|
|
4416
|
+
createEffect(on(() => [onUpdateFn_0_props_wrapperProps(), onUpdateFn_0_props_block__component__options()], onUpdateFn_0));
|
|
4405
4417
|
return createComponent(Show, {
|
|
4406
4418
|
get fallback() {
|
|
4407
|
-
return createComponent(Dynamic, mergeProps(
|
|
4419
|
+
return createComponent(Dynamic, mergeProps(targetWrapperProps, {
|
|
4408
4420
|
get attributes() {
|
|
4409
4421
|
return attributes();
|
|
4410
4422
|
},
|
|
@@ -4534,6 +4546,11 @@ function ComponentRef(props) {
|
|
|
4534
4546
|
var component_ref_default = ComponentRef;
|
|
4535
4547
|
function RepeatedBlock(props) {
|
|
4536
4548
|
const [store, setStore] = createSignal(props.repeatContext);
|
|
4549
|
+
const onUpdateFn_0_props_repeatContext = createMemo(() => props.repeatContext);
|
|
4550
|
+
function onUpdateFn_0() {
|
|
4551
|
+
setStore(props.repeatContext);
|
|
4552
|
+
}
|
|
4553
|
+
createEffect(on(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
|
|
4537
4554
|
return createComponent(builder_context_default.Provider, {
|
|
4538
4555
|
get value() {
|
|
4539
4556
|
return store();
|
|
@@ -4660,7 +4677,9 @@ function Block(props) {
|
|
|
4660
4677
|
children: (data, _index) => {
|
|
4661
4678
|
const index = _index();
|
|
4662
4679
|
return createComponent(repeated_block_default, {
|
|
4663
|
-
key
|
|
4680
|
+
get key() {
|
|
4681
|
+
return generateKey(index);
|
|
4682
|
+
},
|
|
4664
4683
|
get repeatContext() {
|
|
4665
4684
|
return data.context;
|
|
4666
4685
|
},
|
|
@@ -4726,7 +4745,9 @@ function Block(props) {
|
|
|
4726
4745
|
children: (data, _index) => {
|
|
4727
4746
|
const index = _index();
|
|
4728
4747
|
return createComponent(repeated_block_default, {
|
|
4729
|
-
key
|
|
4748
|
+
get key() {
|
|
4749
|
+
return generateKey(index);
|
|
4750
|
+
},
|
|
4730
4751
|
get repeatContext() {
|
|
4731
4752
|
return data.context;
|
|
4732
4753
|
},
|
|
@@ -5222,16 +5243,16 @@ function getSrcSet(url) {
|
|
|
5222
5243
|
// src/blocks/image/image.tsx
|
|
5223
5244
|
var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
|
|
5224
5245
|
var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
|
|
5225
|
-
var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-
|
|
5226
|
-
var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-
|
|
5227
|
-
var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-
|
|
5246
|
+
var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-5f381e78">`);
|
|
5247
|
+
var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-5f381e78-2>`);
|
|
5248
|
+
var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-5f381e78 {
|
|
5228
5249
|
opacity: 1;
|
|
5229
5250
|
transition: opacity 0.2s ease-in-out;
|
|
5230
|
-
}.div-
|
|
5251
|
+
}.div-5f381e78 {
|
|
5231
5252
|
width: 100%;
|
|
5232
5253
|
pointer-events: none;
|
|
5233
5254
|
font-size: 0;
|
|
5234
|
-
}.div-
|
|
5255
|
+
}.div-5f381e78-2 {
|
|
5235
5256
|
display: flex;
|
|
5236
5257
|
flex-direction: column;
|
|
5237
5258
|
align-items: stretch;
|
|
@@ -5280,6 +5301,8 @@ function Image(props) {
|
|
|
5280
5301
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
5281
5302
|
return out;
|
|
5282
5303
|
});
|
|
5304
|
+
onMount(() => {
|
|
5305
|
+
});
|
|
5283
5306
|
return [[(() => {
|
|
5284
5307
|
const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
|
|
5285
5308
|
insert(_el$, createComponent(Show, {
|
|
@@ -5293,7 +5316,7 @@ function Image(props) {
|
|
|
5293
5316
|
}
|
|
5294
5317
|
}), _el$3);
|
|
5295
5318
|
effect((_p$) => {
|
|
5296
|
-
const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-
|
|
5319
|
+
const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-5f381e78", _v$2 = props.highPriority ? "eager" : "lazy", _v$3 = props.highPriority ? "high" : "auto", _v$4 = props.altText, _v$5 = props.title, _v$6 = props.altText ? void 0 : "presentation", _v$7 = {
|
|
5297
5320
|
"object-position": props.backgroundPosition || "center",
|
|
5298
5321
|
"object-fit": props.backgroundSize || "cover",
|
|
5299
5322
|
...aspectRatioCss()
|
|
@@ -7128,10 +7151,10 @@ delegateEvents(["click"]);
|
|
|
7128
7151
|
|
|
7129
7152
|
// src/blocks/text/component-info.ts
|
|
7130
7153
|
var componentInfo11 = {
|
|
7131
|
-
shouldReceiveBuilderProps: {
|
|
7132
|
-
builderBlock:
|
|
7154
|
+
shouldReceiveBuilderProps: TARGET === "reactNative" ? {
|
|
7155
|
+
builderBlock: true,
|
|
7133
7156
|
builderContext: true
|
|
7134
|
-
},
|
|
7157
|
+
} : {},
|
|
7135
7158
|
name: "Text",
|
|
7136
7159
|
static: true,
|
|
7137
7160
|
isRSC: true,
|
|
@@ -8528,7 +8551,7 @@ function getPreviewContent(_searchParams) {
|
|
|
8528
8551
|
}
|
|
8529
8552
|
|
|
8530
8553
|
// src/constants/sdk-version.ts
|
|
8531
|
-
var SDK_VERSION = "4.0.
|
|
8554
|
+
var SDK_VERSION = "4.0.8";
|
|
8532
8555
|
|
|
8533
8556
|
// src/helpers/sdk-headers.ts
|
|
8534
8557
|
var getSdkHeaders = () => ({
|
|
@@ -10143,6 +10166,7 @@ var fetchSymbolContent = async ({
|
|
|
10143
10166
|
var _tmpl$30 = /* @__PURE__ */ template(`<div>`);
|
|
10144
10167
|
function Symbol2(props) {
|
|
10145
10168
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
10169
|
+
const [symbolEntry, setSymbolEntry] = createSignal(props.symbol?.entry);
|
|
10146
10170
|
const blocksWrapper = createMemo(() => {
|
|
10147
10171
|
return "div";
|
|
10148
10172
|
});
|
|
@@ -10153,7 +10177,7 @@ function Symbol2(props) {
|
|
|
10153
10177
|
return [...[props.attributes[getClassPropName()]], "builder-symbol", props.symbol?.inline ? "builder-inline-symbol" : void 0, props.symbol?.dynamic || props.dynamic ? "builder-dynamic-symbol" : void 0].filter(Boolean).join(" ");
|
|
10154
10178
|
});
|
|
10155
10179
|
function setContent() {
|
|
10156
|
-
if (contentToUse())
|
|
10180
|
+
if (contentToUse() && symbolEntry() === props.symbol?.entry)
|
|
10157
10181
|
return;
|
|
10158
10182
|
fetchSymbolContent({
|
|
10159
10183
|
symbol: props.symbol,
|
|
@@ -10161,6 +10185,7 @@ function Symbol2(props) {
|
|
|
10161
10185
|
}).then((newContent) => {
|
|
10162
10186
|
if (newContent) {
|
|
10163
10187
|
setContentToUse(newContent);
|
|
10188
|
+
setSymbolEntry(props.symbol?.entry);
|
|
10164
10189
|
}
|
|
10165
10190
|
});
|
|
10166
10191
|
}
|
package/lib/edge/index.jsx
CHANGED
|
@@ -4105,6 +4105,9 @@ var provideBuilderContext = (block, context) => {
|
|
|
4105
4105
|
};
|
|
4106
4106
|
return {};
|
|
4107
4107
|
};
|
|
4108
|
+
var generateKey = (index) => {
|
|
4109
|
+
return index.toString();
|
|
4110
|
+
};
|
|
4108
4111
|
|
|
4109
4112
|
// src/components/block/components/block-styles.tsx
|
|
4110
4113
|
import { Show as Show2, createMemo } from "solid-js";
|
|
@@ -4375,15 +4378,15 @@ var Block_wrapper_default = BlockWrapper;
|
|
|
4375
4378
|
import {
|
|
4376
4379
|
Show as Show4,
|
|
4377
4380
|
For,
|
|
4378
|
-
on,
|
|
4379
|
-
createEffect,
|
|
4381
|
+
on as on2,
|
|
4382
|
+
createEffect as createEffect2,
|
|
4380
4383
|
createMemo as createMemo3,
|
|
4381
4384
|
createSignal as createSignal3
|
|
4382
4385
|
} from "solid-js";
|
|
4383
4386
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
4384
4387
|
|
|
4385
4388
|
// src/components/block/components/interactive-element.tsx
|
|
4386
|
-
import { Show as Show3, createMemo as createMemo2 } from "solid-js";
|
|
4389
|
+
import { Show as Show3, on, createEffect, createMemo as createMemo2, createSignal as createSignal2 } from "solid-js";
|
|
4387
4390
|
import { Dynamic as Dynamic2 } from "solid-js/web";
|
|
4388
4391
|
|
|
4389
4392
|
// src/components/awaiter.tsx
|
|
@@ -4397,6 +4400,7 @@ var Awaiter_default = Awaiter;
|
|
|
4397
4400
|
|
|
4398
4401
|
// src/components/block/components/interactive-element.tsx
|
|
4399
4402
|
function InteractiveElement(props) {
|
|
4403
|
+
const [forceRenderCount, setForceRenderCount] = createSignal2(0);
|
|
4400
4404
|
const attributes = createMemo2(() => {
|
|
4401
4405
|
return props.includeBlockProps ? {
|
|
4402
4406
|
...getBlockProperties({
|
|
@@ -4412,9 +4416,27 @@ function InteractiveElement(props) {
|
|
|
4412
4416
|
})
|
|
4413
4417
|
} : {};
|
|
4414
4418
|
});
|
|
4419
|
+
const targetWrapperProps = createMemo2(() => {
|
|
4420
|
+
return props.wrapperProps;
|
|
4421
|
+
});
|
|
4422
|
+
const onUpdateFn_0_props_wrapperProps = createMemo2(() => props.wrapperProps);
|
|
4423
|
+
const onUpdateFn_0_props_block__component__options = createMemo2(
|
|
4424
|
+
() => props.block?.component?.options
|
|
4425
|
+
);
|
|
4426
|
+
function onUpdateFn_0() {
|
|
4427
|
+
}
|
|
4428
|
+
createEffect(
|
|
4429
|
+
on(
|
|
4430
|
+
() => [
|
|
4431
|
+
onUpdateFn_0_props_wrapperProps(),
|
|
4432
|
+
onUpdateFn_0_props_block__component__options()
|
|
4433
|
+
],
|
|
4434
|
+
onUpdateFn_0
|
|
4435
|
+
)
|
|
4436
|
+
);
|
|
4415
4437
|
return <><Show3
|
|
4416
4438
|
fallback={<Dynamic2
|
|
4417
|
-
{...
|
|
4439
|
+
{...targetWrapperProps()}
|
|
4418
4440
|
attributes={attributes()}
|
|
4419
4441
|
component={props.Wrapper}
|
|
4420
4442
|
>{props.children}</Dynamic2>}
|
|
@@ -4475,8 +4497,8 @@ function ComponentRef(props) {
|
|
|
4475
4497
|
);
|
|
4476
4498
|
function onUpdateFn_0() {
|
|
4477
4499
|
}
|
|
4478
|
-
|
|
4479
|
-
|
|
4500
|
+
createEffect2(
|
|
4501
|
+
on2(
|
|
4480
4502
|
() => [
|
|
4481
4503
|
onUpdateFn_0_props_componentOptions(),
|
|
4482
4504
|
onUpdateFn_0_props_blockChildren()
|
|
@@ -4510,9 +4532,16 @@ function ComponentRef(props) {
|
|
|
4510
4532
|
var Component_ref_default = ComponentRef;
|
|
4511
4533
|
|
|
4512
4534
|
// src/components/block/components/repeated-block.tsx
|
|
4513
|
-
import { createSignal as createSignal4 } from "solid-js";
|
|
4535
|
+
import { on as on3, createEffect as createEffect3, createMemo as createMemo4, createSignal as createSignal4 } from "solid-js";
|
|
4514
4536
|
function RepeatedBlock(props) {
|
|
4515
4537
|
const [store, setStore] = createSignal4(props.repeatContext);
|
|
4538
|
+
const onUpdateFn_0_props_repeatContext = createMemo4(
|
|
4539
|
+
() => props.repeatContext
|
|
4540
|
+
);
|
|
4541
|
+
function onUpdateFn_0() {
|
|
4542
|
+
setStore(props.repeatContext);
|
|
4543
|
+
}
|
|
4544
|
+
createEffect3(on3(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
|
|
4516
4545
|
return <><builder_context_default.Provider value={store()}><Block_default
|
|
4517
4546
|
block={props.block}
|
|
4518
4547
|
context={store()}
|
|
@@ -4617,7 +4646,7 @@ function Block(props) {
|
|
|
4617
4646
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
4618
4647
|
const index = _index();
|
|
4619
4648
|
return <Repeated_block_default
|
|
4620
|
-
key={index}
|
|
4649
|
+
key={generateKey(index)}
|
|
4621
4650
|
repeatContext={data.context}
|
|
4622
4651
|
block={data.block}
|
|
4623
4652
|
registeredComponents={props.registeredComponents}
|
|
@@ -4641,7 +4670,7 @@ function Block(props) {
|
|
|
4641
4670
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
4642
4671
|
const index = _index();
|
|
4643
4672
|
return <Repeated_block_default
|
|
4644
|
-
key={index}
|
|
4673
|
+
key={generateKey(index)}
|
|
4645
4674
|
repeatContext={data.context}
|
|
4646
4675
|
block={data.block}
|
|
4647
4676
|
registeredComponents={props.registeredComponents}
|
|
@@ -4681,7 +4710,7 @@ function Block(props) {
|
|
|
4681
4710
|
var Block_default = Block;
|
|
4682
4711
|
|
|
4683
4712
|
// src/components/blocks/blocks-wrapper.tsx
|
|
4684
|
-
import { onMount as onMount3, on as
|
|
4713
|
+
import { onMount as onMount3, on as on5, createEffect as createEffect5, createMemo as createMemo6, createSignal as createSignal6 } from "solid-js";
|
|
4685
4714
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
4686
4715
|
function BlocksWrapper(props) {
|
|
4687
4716
|
const [shouldUpdate, setShouldUpdate] = createSignal6(false);
|
|
@@ -4734,7 +4763,7 @@ function BlocksWrapper(props) {
|
|
|
4734
4763
|
const onUpdateFn_0_props_blocks = createMemo6(() => props.blocks);
|
|
4735
4764
|
function onUpdateFn_0() {
|
|
4736
4765
|
}
|
|
4737
|
-
|
|
4766
|
+
createEffect5(on5(() => [onUpdateFn_0_props_blocks()], onUpdateFn_0));
|
|
4738
4767
|
return <>
|
|
4739
4768
|
<Dynamic4
|
|
4740
4769
|
class={className() + " dynamic-023c60f2"}
|
|
@@ -4959,7 +4988,7 @@ function FragmentComponent(props) {
|
|
|
4959
4988
|
var fragment_default = FragmentComponent;
|
|
4960
4989
|
|
|
4961
4990
|
// src/blocks/image/image.tsx
|
|
4962
|
-
import { Show as Show8, createMemo as createMemo8 } from "solid-js";
|
|
4991
|
+
import { Show as Show8, onMount as onMount4, createMemo as createMemo8 } from "solid-js";
|
|
4963
4992
|
|
|
4964
4993
|
// src/blocks/image/image.helpers.ts
|
|
4965
4994
|
function removeProtocol(path) {
|
|
@@ -5048,12 +5077,14 @@ function Image(props) {
|
|
|
5048
5077
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
5049
5078
|
return out;
|
|
5050
5079
|
});
|
|
5080
|
+
onMount4(() => {
|
|
5081
|
+
});
|
|
5051
5082
|
return <>
|
|
5052
5083
|
<>
|
|
5053
5084
|
<picture>
|
|
5054
5085
|
<Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
|
|
5055
5086
|
<img
|
|
5056
|
-
class={"builder-image" + (props.className ? " " + props.className : "") + " img-
|
|
5087
|
+
class={"builder-image" + (props.className ? " " + props.className : "") + " img-5f381e78"}
|
|
5057
5088
|
loading={props.highPriority ? "eager" : "lazy"}
|
|
5058
5089
|
fetchpriority={props.highPriority ? "high" : "auto"}
|
|
5059
5090
|
alt={props.altText}
|
|
@@ -5072,22 +5103,22 @@ function Image(props) {
|
|
|
5072
5103
|
<Show8
|
|
5073
5104
|
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
5074
5105
|
><div
|
|
5075
|
-
class="builder-image-sizer div-
|
|
5106
|
+
class="builder-image-sizer div-5f381e78"
|
|
5076
5107
|
style={{
|
|
5077
5108
|
"padding-top": props.aspectRatio * 100 + "%"
|
|
5078
5109
|
}}
|
|
5079
5110
|
/></Show8>
|
|
5080
5111
|
<Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
|
|
5081
|
-
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-
|
|
5112
|
+
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-5f381e78-2">{props.children}</div></Show8>
|
|
5082
5113
|
</>
|
|
5083
|
-
<style>{`.img-
|
|
5114
|
+
<style>{`.img-5f381e78 {
|
|
5084
5115
|
opacity: 1;
|
|
5085
5116
|
transition: opacity 0.2s ease-in-out;
|
|
5086
|
-
}.div-
|
|
5117
|
+
}.div-5f381e78 {
|
|
5087
5118
|
width: 100%;
|
|
5088
5119
|
pointer-events: none;
|
|
5089
5120
|
font-size: 0;
|
|
5090
|
-
}.div-
|
|
5121
|
+
}.div-5f381e78-2 {
|
|
5091
5122
|
display: flex;
|
|
5092
5123
|
flex-direction: column;
|
|
5093
5124
|
align-items: stretch;
|
|
@@ -5123,10 +5154,10 @@ function SectionComponent(props) {
|
|
|
5123
5154
|
var section_default = SectionComponent;
|
|
5124
5155
|
|
|
5125
5156
|
// src/blocks/symbol/symbol.tsx
|
|
5126
|
-
import { onMount as
|
|
5157
|
+
import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
|
|
5127
5158
|
|
|
5128
5159
|
// src/components/content-variants/content-variants.tsx
|
|
5129
|
-
import { Show as Show16, For as For9, onMount as
|
|
5160
|
+
import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
|
|
5130
5161
|
|
|
5131
5162
|
// src/helpers/url.ts
|
|
5132
5163
|
var getTopLevelDomain = (host) => {
|
|
@@ -6107,7 +6138,7 @@ var componentInfo6 = {
|
|
|
6107
6138
|
};
|
|
6108
6139
|
|
|
6109
6140
|
// src/blocks/personalization-container/personalization-container.tsx
|
|
6110
|
-
import { Show as Show10, For as For6, onMount as
|
|
6141
|
+
import { Show as Show10, For as For6, onMount as onMount5, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
|
|
6111
6142
|
|
|
6112
6143
|
// src/components/inlined-script.tsx
|
|
6113
6144
|
function InlinedScript(props) {
|
|
@@ -6372,7 +6403,7 @@ function PersonalizationContainer(props) {
|
|
|
6372
6403
|
).join("");
|
|
6373
6404
|
});
|
|
6374
6405
|
let rootRef;
|
|
6375
|
-
|
|
6406
|
+
onMount5(() => {
|
|
6376
6407
|
setIsHydrated(true);
|
|
6377
6408
|
const unsub = userAttributesService.subscribeOnUserAttributesChange(
|
|
6378
6409
|
(attrs) => {
|
|
@@ -6774,10 +6805,10 @@ var tabs_default = Tabs;
|
|
|
6774
6805
|
|
|
6775
6806
|
// src/blocks/text/component-info.ts
|
|
6776
6807
|
var componentInfo11 = {
|
|
6777
|
-
shouldReceiveBuilderProps: {
|
|
6778
|
-
builderBlock:
|
|
6808
|
+
shouldReceiveBuilderProps: TARGET === "reactNative" ? {
|
|
6809
|
+
builderBlock: true,
|
|
6779
6810
|
builderContext: true
|
|
6780
|
-
},
|
|
6811
|
+
} : {},
|
|
6781
6812
|
name: "Text",
|
|
6782
6813
|
static: true,
|
|
6783
6814
|
isRSC: true,
|
|
@@ -6835,7 +6866,7 @@ var componentInfo12 = {
|
|
|
6835
6866
|
};
|
|
6836
6867
|
|
|
6837
6868
|
// src/blocks/custom-code/custom-code.tsx
|
|
6838
|
-
import { onMount as
|
|
6869
|
+
import { onMount as onMount6, on as on6, createEffect as createEffect6, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
|
|
6839
6870
|
function CustomCode(props) {
|
|
6840
6871
|
const [scriptsInserted, setScriptsInserted] = createSignal12([]);
|
|
6841
6872
|
const [scriptsRun, setScriptsRun] = createSignal12([]);
|
|
@@ -6876,7 +6907,7 @@ function CustomCode(props) {
|
|
|
6876
6907
|
}
|
|
6877
6908
|
}
|
|
6878
6909
|
let elementRef;
|
|
6879
|
-
|
|
6910
|
+
onMount6(() => {
|
|
6880
6911
|
runScripts();
|
|
6881
6912
|
});
|
|
6882
6913
|
const onUpdateFn_0_props_code = createMemo12(() => props.code);
|
|
@@ -6885,7 +6916,7 @@ function CustomCode(props) {
|
|
|
6885
6916
|
runScripts();
|
|
6886
6917
|
}
|
|
6887
6918
|
}
|
|
6888
|
-
|
|
6919
|
+
createEffect6(on6(() => [onUpdateFn_0_props_code()], onUpdateFn_0));
|
|
6889
6920
|
return <><div
|
|
6890
6921
|
class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
|
|
6891
6922
|
ref={elementRef}
|
|
@@ -6913,7 +6944,7 @@ var componentInfo13 = {
|
|
|
6913
6944
|
};
|
|
6914
6945
|
|
|
6915
6946
|
// src/blocks/embed/embed.tsx
|
|
6916
|
-
import { on as
|
|
6947
|
+
import { on as on7, createEffect as createEffect7, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
|
|
6917
6948
|
|
|
6918
6949
|
// src/blocks/embed/helpers.ts
|
|
6919
6950
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -6955,8 +6986,8 @@ function Embed(props) {
|
|
|
6955
6986
|
findAndRunScripts();
|
|
6956
6987
|
}
|
|
6957
6988
|
}
|
|
6958
|
-
|
|
6959
|
-
|
|
6989
|
+
createEffect7(
|
|
6990
|
+
on7(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
|
|
6960
6991
|
);
|
|
6961
6992
|
return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
|
|
6962
6993
|
}
|
|
@@ -7788,7 +7819,7 @@ var componentInfo20 = {
|
|
|
7788
7819
|
};
|
|
7789
7820
|
|
|
7790
7821
|
// src/blocks/video/video.tsx
|
|
7791
|
-
import { Show as Show13, onMount as
|
|
7822
|
+
import { Show as Show13, onMount as onMount7, createSignal as createSignal15, createMemo as createMemo15 } from "solid-js";
|
|
7792
7823
|
function Video(props) {
|
|
7793
7824
|
const [lazyVideoObserver, setLazyVideoObserver] = createSignal15(void 0);
|
|
7794
7825
|
const videoProps = createMemo15(() => {
|
|
@@ -7816,7 +7847,7 @@ function Video(props) {
|
|
|
7816
7847
|
};
|
|
7817
7848
|
});
|
|
7818
7849
|
let videoRef;
|
|
7819
|
-
|
|
7850
|
+
onMount7(() => {
|
|
7820
7851
|
if (props.lazyLoad) {
|
|
7821
7852
|
const oberver = new IntersectionObserver(function(entries) {
|
|
7822
7853
|
entries.forEach(function(entry) {
|
|
@@ -8046,9 +8077,9 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
8046
8077
|
// src/components/content/components/enable-editor.tsx
|
|
8047
8078
|
import {
|
|
8048
8079
|
Show as Show14,
|
|
8049
|
-
onMount as
|
|
8050
|
-
on as
|
|
8051
|
-
createEffect as
|
|
8080
|
+
onMount as onMount8,
|
|
8081
|
+
on as on8,
|
|
8082
|
+
createEffect as createEffect8,
|
|
8052
8083
|
createMemo as createMemo16,
|
|
8053
8084
|
createSignal as createSignal16
|
|
8054
8085
|
} from "solid-js";
|
|
@@ -8060,7 +8091,7 @@ function getPreviewContent(_searchParams) {
|
|
|
8060
8091
|
}
|
|
8061
8092
|
|
|
8062
8093
|
// src/constants/sdk-version.ts
|
|
8063
|
-
var SDK_VERSION = "4.0.
|
|
8094
|
+
var SDK_VERSION = "4.0.8";
|
|
8064
8095
|
|
|
8065
8096
|
// src/helpers/sdk-headers.ts
|
|
8066
8097
|
var getSdkHeaders = () => ({
|
|
@@ -9064,7 +9095,7 @@ function EnableEditor(props) {
|
|
|
9064
9095
|
let elementRef;
|
|
9065
9096
|
runHttpRequests();
|
|
9066
9097
|
emitStateUpdate();
|
|
9067
|
-
|
|
9098
|
+
onMount8(() => {
|
|
9068
9099
|
if (isBrowser()) {
|
|
9069
9100
|
if (isEditing() && !props.isNestedRender) {
|
|
9070
9101
|
window.addEventListener("message", processMessage);
|
|
@@ -9145,15 +9176,15 @@ function EnableEditor(props) {
|
|
|
9145
9176
|
mergeNewContent(props.content);
|
|
9146
9177
|
}
|
|
9147
9178
|
}
|
|
9148
|
-
|
|
9179
|
+
createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
9149
9180
|
const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
|
|
9150
9181
|
() => props.builderContextSignal.rootState
|
|
9151
9182
|
);
|
|
9152
9183
|
function onUpdateFn_1() {
|
|
9153
9184
|
emitStateUpdate();
|
|
9154
9185
|
}
|
|
9155
|
-
|
|
9156
|
-
|
|
9186
|
+
createEffect8(
|
|
9187
|
+
on8(
|
|
9157
9188
|
() => [onUpdateFn_1_props_builderContextSignal_rootState()],
|
|
9158
9189
|
onUpdateFn_1
|
|
9159
9190
|
)
|
|
@@ -9164,7 +9195,7 @@ function EnableEditor(props) {
|
|
|
9164
9195
|
mergeNewRootState(props.data);
|
|
9165
9196
|
}
|
|
9166
9197
|
}
|
|
9167
|
-
|
|
9198
|
+
createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
|
|
9168
9199
|
const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
|
|
9169
9200
|
function onUpdateFn_3() {
|
|
9170
9201
|
if (props.locale) {
|
|
@@ -9173,7 +9204,7 @@ function EnableEditor(props) {
|
|
|
9173
9204
|
});
|
|
9174
9205
|
}
|
|
9175
9206
|
}
|
|
9176
|
-
|
|
9207
|
+
createEffect8(on8(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
|
|
9177
9208
|
return <><builder_context_default.Provider value={props.builderContextSignal}><Show14
|
|
9178
9209
|
when={props.builderContextSignal.content || needsElementRefDivForEditing()}
|
|
9179
9210
|
><Dynamic5
|
|
@@ -9415,7 +9446,7 @@ function ContentVariants(props) {
|
|
|
9415
9446
|
canTrack: getDefaultCanTrack(props.canTrack)
|
|
9416
9447
|
});
|
|
9417
9448
|
});
|
|
9418
|
-
|
|
9449
|
+
onMount9(() => {
|
|
9419
9450
|
setShouldRenderVariants(false);
|
|
9420
9451
|
});
|
|
9421
9452
|
return <><>
|
|
@@ -9519,6 +9550,7 @@ var fetchSymbolContent = async ({
|
|
|
9519
9550
|
// src/blocks/symbol/symbol.tsx
|
|
9520
9551
|
function Symbol2(props) {
|
|
9521
9552
|
const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
|
|
9553
|
+
const [symbolEntry, setSymbolEntry] = createSignal20(props.symbol?.entry);
|
|
9522
9554
|
const blocksWrapper = createMemo20(() => {
|
|
9523
9555
|
return "div";
|
|
9524
9556
|
});
|
|
@@ -9534,7 +9566,7 @@ function Symbol2(props) {
|
|
|
9534
9566
|
].filter(Boolean).join(" ");
|
|
9535
9567
|
});
|
|
9536
9568
|
function setContent() {
|
|
9537
|
-
if (contentToUse())
|
|
9569
|
+
if (contentToUse() && symbolEntry() === props.symbol?.entry)
|
|
9538
9570
|
return;
|
|
9539
9571
|
fetchSymbolContent({
|
|
9540
9572
|
symbol: props.symbol,
|
|
@@ -9542,16 +9574,17 @@ function Symbol2(props) {
|
|
|
9542
9574
|
}).then((newContent) => {
|
|
9543
9575
|
if (newContent) {
|
|
9544
9576
|
setContentToUse(newContent);
|
|
9577
|
+
setSymbolEntry(props.symbol?.entry);
|
|
9545
9578
|
}
|
|
9546
9579
|
});
|
|
9547
9580
|
}
|
|
9548
|
-
|
|
9581
|
+
onMount10(() => {
|
|
9549
9582
|
});
|
|
9550
9583
|
const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
|
|
9551
9584
|
function onUpdateFn_0() {
|
|
9552
9585
|
setContent();
|
|
9553
9586
|
}
|
|
9554
|
-
|
|
9587
|
+
createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
9555
9588
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
9556
9589
|
nonce={props.builderContext.nonce}
|
|
9557
9590
|
isNestedRender={true}
|