@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/dev.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]
|
|
@@ -4117,6 +4117,9 @@ var provideBuilderContext = (block, context) => {
|
|
|
4117
4117
|
};
|
|
4118
4118
|
return {};
|
|
4119
4119
|
};
|
|
4120
|
+
var generateKey = (index) => {
|
|
4121
|
+
return index.toString();
|
|
4122
|
+
};
|
|
4120
4123
|
|
|
4121
4124
|
// src/constants/device-sizes.ts
|
|
4122
4125
|
var SIZES = {
|
|
@@ -4396,6 +4399,7 @@ var awaiter_default = Awaiter;
|
|
|
4396
4399
|
|
|
4397
4400
|
// src/components/block/components/interactive-element.tsx
|
|
4398
4401
|
function InteractiveElement(props) {
|
|
4402
|
+
createSignal(0);
|
|
4399
4403
|
const attributes = createMemo(() => {
|
|
4400
4404
|
return props.includeBlockProps ? {
|
|
4401
4405
|
...getBlockProperties({
|
|
@@ -4411,9 +4415,17 @@ function InteractiveElement(props) {
|
|
|
4411
4415
|
})
|
|
4412
4416
|
} : {};
|
|
4413
4417
|
});
|
|
4418
|
+
const targetWrapperProps = createMemo(() => {
|
|
4419
|
+
return props.wrapperProps;
|
|
4420
|
+
});
|
|
4421
|
+
const onUpdateFn_0_props_wrapperProps = createMemo(() => props.wrapperProps);
|
|
4422
|
+
const onUpdateFn_0_props_block__component__options = createMemo(() => props.block?.component?.options);
|
|
4423
|
+
function onUpdateFn_0() {
|
|
4424
|
+
}
|
|
4425
|
+
createEffect(on(() => [onUpdateFn_0_props_wrapperProps(), onUpdateFn_0_props_block__component__options()], onUpdateFn_0));
|
|
4414
4426
|
return createComponent(Show, {
|
|
4415
4427
|
get fallback() {
|
|
4416
|
-
return createComponent(Dynamic, mergeProps(
|
|
4428
|
+
return createComponent(Dynamic, mergeProps(targetWrapperProps, {
|
|
4417
4429
|
get attributes() {
|
|
4418
4430
|
return attributes();
|
|
4419
4431
|
},
|
|
@@ -4543,6 +4555,11 @@ function ComponentRef(props) {
|
|
|
4543
4555
|
var component_ref_default = ComponentRef;
|
|
4544
4556
|
function RepeatedBlock(props) {
|
|
4545
4557
|
const [store, setStore] = createSignal(props.repeatContext);
|
|
4558
|
+
const onUpdateFn_0_props_repeatContext = createMemo(() => props.repeatContext);
|
|
4559
|
+
function onUpdateFn_0() {
|
|
4560
|
+
setStore(props.repeatContext);
|
|
4561
|
+
}
|
|
4562
|
+
createEffect(on(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
|
|
4546
4563
|
return createComponent(builder_context_default.Provider, {
|
|
4547
4564
|
get value() {
|
|
4548
4565
|
return store();
|
|
@@ -4669,7 +4686,9 @@ function Block(props) {
|
|
|
4669
4686
|
children: (data, _index) => {
|
|
4670
4687
|
const index = _index();
|
|
4671
4688
|
return createComponent(repeated_block_default, {
|
|
4672
|
-
key
|
|
4689
|
+
get key() {
|
|
4690
|
+
return generateKey(index);
|
|
4691
|
+
},
|
|
4673
4692
|
get repeatContext() {
|
|
4674
4693
|
return data.context;
|
|
4675
4694
|
},
|
|
@@ -4735,7 +4754,9 @@ function Block(props) {
|
|
|
4735
4754
|
children: (data, _index) => {
|
|
4736
4755
|
const index = _index();
|
|
4737
4756
|
return createComponent(repeated_block_default, {
|
|
4738
|
-
key
|
|
4757
|
+
get key() {
|
|
4758
|
+
return generateKey(index);
|
|
4759
|
+
},
|
|
4739
4760
|
get repeatContext() {
|
|
4740
4761
|
return data.context;
|
|
4741
4762
|
},
|
|
@@ -5231,16 +5252,16 @@ function getSrcSet(url) {
|
|
|
5231
5252
|
// src/blocks/image/image.tsx
|
|
5232
5253
|
var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
|
|
5233
5254
|
var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
|
|
5234
|
-
var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-
|
|
5235
|
-
var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-
|
|
5236
|
-
var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-
|
|
5255
|
+
var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-5f381e78">`);
|
|
5256
|
+
var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-5f381e78-2>`);
|
|
5257
|
+
var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-5f381e78 {
|
|
5237
5258
|
opacity: 1;
|
|
5238
5259
|
transition: opacity 0.2s ease-in-out;
|
|
5239
|
-
}.div-
|
|
5260
|
+
}.div-5f381e78 {
|
|
5240
5261
|
width: 100%;
|
|
5241
5262
|
pointer-events: none;
|
|
5242
5263
|
font-size: 0;
|
|
5243
|
-
}.div-
|
|
5264
|
+
}.div-5f381e78-2 {
|
|
5244
5265
|
display: flex;
|
|
5245
5266
|
flex-direction: column;
|
|
5246
5267
|
align-items: stretch;
|
|
@@ -5290,6 +5311,8 @@ function Image(props) {
|
|
|
5290
5311
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
5291
5312
|
return out;
|
|
5292
5313
|
});
|
|
5314
|
+
onMount(() => {
|
|
5315
|
+
});
|
|
5293
5316
|
return [[(() => {
|
|
5294
5317
|
const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
|
|
5295
5318
|
insert(_el$, createComponent(Show, {
|
|
@@ -5303,7 +5326,7 @@ function Image(props) {
|
|
|
5303
5326
|
}
|
|
5304
5327
|
}), _el$3);
|
|
5305
5328
|
effect((_p$) => {
|
|
5306
|
-
const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-
|
|
5329
|
+
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 = {
|
|
5307
5330
|
"object-position": props.backgroundPosition || "center",
|
|
5308
5331
|
"object-fit": props.backgroundSize || "cover",
|
|
5309
5332
|
...aspectRatioCss()
|
|
@@ -7139,10 +7162,10 @@ delegateEvents(["click"]);
|
|
|
7139
7162
|
|
|
7140
7163
|
// src/blocks/text/component-info.ts
|
|
7141
7164
|
var componentInfo11 = {
|
|
7142
|
-
shouldReceiveBuilderProps: {
|
|
7143
|
-
builderBlock:
|
|
7165
|
+
shouldReceiveBuilderProps: TARGET === "reactNative" ? {
|
|
7166
|
+
builderBlock: true,
|
|
7144
7167
|
builderContext: true
|
|
7145
|
-
},
|
|
7168
|
+
} : {},
|
|
7146
7169
|
name: "Text",
|
|
7147
7170
|
static: true,
|
|
7148
7171
|
isRSC: true,
|
|
@@ -8540,7 +8563,7 @@ function getPreviewContent(_searchParams) {
|
|
|
8540
8563
|
}
|
|
8541
8564
|
|
|
8542
8565
|
// src/constants/sdk-version.ts
|
|
8543
|
-
var SDK_VERSION = "4.0.
|
|
8566
|
+
var SDK_VERSION = "4.0.8";
|
|
8544
8567
|
|
|
8545
8568
|
// src/helpers/sdk-headers.ts
|
|
8546
8569
|
var getSdkHeaders = () => ({
|
|
@@ -10162,6 +10185,7 @@ var fetchSymbolContent = async ({
|
|
|
10162
10185
|
var _tmpl$30 = /* @__PURE__ */ template(`<div>`);
|
|
10163
10186
|
function Symbol2(props) {
|
|
10164
10187
|
const [contentToUse, setContentToUse] = createSignal(props.symbol?.content);
|
|
10188
|
+
const [symbolEntry, setSymbolEntry] = createSignal(props.symbol?.entry);
|
|
10165
10189
|
const blocksWrapper = createMemo(() => {
|
|
10166
10190
|
return "div";
|
|
10167
10191
|
});
|
|
@@ -10172,7 +10196,7 @@ function Symbol2(props) {
|
|
|
10172
10196
|
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(" ");
|
|
10173
10197
|
});
|
|
10174
10198
|
function setContent() {
|
|
10175
|
-
if (contentToUse())
|
|
10199
|
+
if (contentToUse() && symbolEntry() === props.symbol?.entry)
|
|
10176
10200
|
return;
|
|
10177
10201
|
fetchSymbolContent({
|
|
10178
10202
|
symbol: props.symbol,
|
|
@@ -10180,6 +10204,7 @@ function Symbol2(props) {
|
|
|
10180
10204
|
}).then((newContent) => {
|
|
10181
10205
|
if (newContent) {
|
|
10182
10206
|
setContentToUse(newContent);
|
|
10207
|
+
setSymbolEntry(props.symbol?.entry);
|
|
10183
10208
|
}
|
|
10184
10209
|
});
|
|
10185
10210
|
}
|
package/lib/edge/dev.jsx
CHANGED
|
@@ -4112,6 +4112,9 @@ var provideBuilderContext = (block, context) => {
|
|
|
4112
4112
|
};
|
|
4113
4113
|
return {};
|
|
4114
4114
|
};
|
|
4115
|
+
var generateKey = (index) => {
|
|
4116
|
+
return index.toString();
|
|
4117
|
+
};
|
|
4115
4118
|
|
|
4116
4119
|
// src/components/block/components/block-styles.tsx
|
|
4117
4120
|
import { Show as Show2, createMemo } from "solid-js";
|
|
@@ -4382,15 +4385,15 @@ var Block_wrapper_default = BlockWrapper;
|
|
|
4382
4385
|
import {
|
|
4383
4386
|
Show as Show4,
|
|
4384
4387
|
For,
|
|
4385
|
-
on,
|
|
4386
|
-
createEffect,
|
|
4388
|
+
on as on2,
|
|
4389
|
+
createEffect as createEffect2,
|
|
4387
4390
|
createMemo as createMemo3,
|
|
4388
4391
|
createSignal as createSignal3
|
|
4389
4392
|
} from "solid-js";
|
|
4390
4393
|
import { Dynamic as Dynamic3 } from "solid-js/web";
|
|
4391
4394
|
|
|
4392
4395
|
// src/components/block/components/interactive-element.tsx
|
|
4393
|
-
import { Show as Show3, createMemo as createMemo2 } from "solid-js";
|
|
4396
|
+
import { Show as Show3, on, createEffect, createMemo as createMemo2, createSignal as createSignal2 } from "solid-js";
|
|
4394
4397
|
import { Dynamic as Dynamic2 } from "solid-js/web";
|
|
4395
4398
|
|
|
4396
4399
|
// src/components/awaiter.tsx
|
|
@@ -4404,6 +4407,7 @@ var Awaiter_default = Awaiter;
|
|
|
4404
4407
|
|
|
4405
4408
|
// src/components/block/components/interactive-element.tsx
|
|
4406
4409
|
function InteractiveElement(props) {
|
|
4410
|
+
const [forceRenderCount, setForceRenderCount] = createSignal2(0);
|
|
4407
4411
|
const attributes = createMemo2(() => {
|
|
4408
4412
|
return props.includeBlockProps ? {
|
|
4409
4413
|
...getBlockProperties({
|
|
@@ -4419,9 +4423,27 @@ function InteractiveElement(props) {
|
|
|
4419
4423
|
})
|
|
4420
4424
|
} : {};
|
|
4421
4425
|
});
|
|
4426
|
+
const targetWrapperProps = createMemo2(() => {
|
|
4427
|
+
return props.wrapperProps;
|
|
4428
|
+
});
|
|
4429
|
+
const onUpdateFn_0_props_wrapperProps = createMemo2(() => props.wrapperProps);
|
|
4430
|
+
const onUpdateFn_0_props_block__component__options = createMemo2(
|
|
4431
|
+
() => props.block?.component?.options
|
|
4432
|
+
);
|
|
4433
|
+
function onUpdateFn_0() {
|
|
4434
|
+
}
|
|
4435
|
+
createEffect(
|
|
4436
|
+
on(
|
|
4437
|
+
() => [
|
|
4438
|
+
onUpdateFn_0_props_wrapperProps(),
|
|
4439
|
+
onUpdateFn_0_props_block__component__options()
|
|
4440
|
+
],
|
|
4441
|
+
onUpdateFn_0
|
|
4442
|
+
)
|
|
4443
|
+
);
|
|
4422
4444
|
return <><Show3
|
|
4423
4445
|
fallback={<Dynamic2
|
|
4424
|
-
{...
|
|
4446
|
+
{...targetWrapperProps()}
|
|
4425
4447
|
attributes={attributes()}
|
|
4426
4448
|
component={props.Wrapper}
|
|
4427
4449
|
>{props.children}</Dynamic2>}
|
|
@@ -4482,8 +4504,8 @@ function ComponentRef(props) {
|
|
|
4482
4504
|
);
|
|
4483
4505
|
function onUpdateFn_0() {
|
|
4484
4506
|
}
|
|
4485
|
-
|
|
4486
|
-
|
|
4507
|
+
createEffect2(
|
|
4508
|
+
on2(
|
|
4487
4509
|
() => [
|
|
4488
4510
|
onUpdateFn_0_props_componentOptions(),
|
|
4489
4511
|
onUpdateFn_0_props_blockChildren()
|
|
@@ -4517,9 +4539,16 @@ function ComponentRef(props) {
|
|
|
4517
4539
|
var Component_ref_default = ComponentRef;
|
|
4518
4540
|
|
|
4519
4541
|
// src/components/block/components/repeated-block.tsx
|
|
4520
|
-
import { createSignal as createSignal4 } from "solid-js";
|
|
4542
|
+
import { on as on3, createEffect as createEffect3, createMemo as createMemo4, createSignal as createSignal4 } from "solid-js";
|
|
4521
4543
|
function RepeatedBlock(props) {
|
|
4522
4544
|
const [store, setStore] = createSignal4(props.repeatContext);
|
|
4545
|
+
const onUpdateFn_0_props_repeatContext = createMemo4(
|
|
4546
|
+
() => props.repeatContext
|
|
4547
|
+
);
|
|
4548
|
+
function onUpdateFn_0() {
|
|
4549
|
+
setStore(props.repeatContext);
|
|
4550
|
+
}
|
|
4551
|
+
createEffect3(on3(() => [onUpdateFn_0_props_repeatContext()], onUpdateFn_0));
|
|
4523
4552
|
return <><builder_context_default.Provider value={store()}><Block_default
|
|
4524
4553
|
block={props.block}
|
|
4525
4554
|
context={store()}
|
|
@@ -4624,7 +4653,7 @@ function Block(props) {
|
|
|
4624
4653
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
4625
4654
|
const index = _index();
|
|
4626
4655
|
return <Repeated_block_default
|
|
4627
|
-
key={index}
|
|
4656
|
+
key={generateKey(index)}
|
|
4628
4657
|
repeatContext={data.context}
|
|
4629
4658
|
block={data.block}
|
|
4630
4659
|
registeredComponents={props.registeredComponents}
|
|
@@ -4648,7 +4677,7 @@ function Block(props) {
|
|
|
4648
4677
|
fallback={<For2 each={repeatItem()}>{(data, _index) => {
|
|
4649
4678
|
const index = _index();
|
|
4650
4679
|
return <Repeated_block_default
|
|
4651
|
-
key={index}
|
|
4680
|
+
key={generateKey(index)}
|
|
4652
4681
|
repeatContext={data.context}
|
|
4653
4682
|
block={data.block}
|
|
4654
4683
|
registeredComponents={props.registeredComponents}
|
|
@@ -4688,7 +4717,7 @@ function Block(props) {
|
|
|
4688
4717
|
var Block_default = Block;
|
|
4689
4718
|
|
|
4690
4719
|
// src/components/blocks/blocks-wrapper.tsx
|
|
4691
|
-
import { onMount as onMount3, on as
|
|
4720
|
+
import { onMount as onMount3, on as on5, createEffect as createEffect5, createMemo as createMemo6, createSignal as createSignal6 } from "solid-js";
|
|
4692
4721
|
import { Dynamic as Dynamic4 } from "solid-js/web";
|
|
4693
4722
|
function BlocksWrapper(props) {
|
|
4694
4723
|
const [shouldUpdate, setShouldUpdate] = createSignal6(false);
|
|
@@ -4741,7 +4770,7 @@ function BlocksWrapper(props) {
|
|
|
4741
4770
|
const onUpdateFn_0_props_blocks = createMemo6(() => props.blocks);
|
|
4742
4771
|
function onUpdateFn_0() {
|
|
4743
4772
|
}
|
|
4744
|
-
|
|
4773
|
+
createEffect5(on5(() => [onUpdateFn_0_props_blocks()], onUpdateFn_0));
|
|
4745
4774
|
return <>
|
|
4746
4775
|
<Dynamic4
|
|
4747
4776
|
class={className() + " dynamic-023c60f2"}
|
|
@@ -4966,7 +4995,7 @@ function FragmentComponent(props) {
|
|
|
4966
4995
|
var fragment_default = FragmentComponent;
|
|
4967
4996
|
|
|
4968
4997
|
// src/blocks/image/image.tsx
|
|
4969
|
-
import { Show as Show8, createMemo as createMemo8 } from "solid-js";
|
|
4998
|
+
import { Show as Show8, onMount as onMount4, createMemo as createMemo8 } from "solid-js";
|
|
4970
4999
|
|
|
4971
5000
|
// src/blocks/image/image.helpers.ts
|
|
4972
5001
|
function removeProtocol(path) {
|
|
@@ -5056,12 +5085,14 @@ function Image(props) {
|
|
|
5056
5085
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
5057
5086
|
return out;
|
|
5058
5087
|
});
|
|
5088
|
+
onMount4(() => {
|
|
5089
|
+
});
|
|
5059
5090
|
return <>
|
|
5060
5091
|
<>
|
|
5061
5092
|
<picture>
|
|
5062
5093
|
<Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
|
|
5063
5094
|
<img
|
|
5064
|
-
class={"builder-image" + (props.className ? " " + props.className : "") + " img-
|
|
5095
|
+
class={"builder-image" + (props.className ? " " + props.className : "") + " img-5f381e78"}
|
|
5065
5096
|
loading={props.highPriority ? "eager" : "lazy"}
|
|
5066
5097
|
fetchpriority={props.highPriority ? "high" : "auto"}
|
|
5067
5098
|
alt={props.altText}
|
|
@@ -5080,22 +5111,22 @@ function Image(props) {
|
|
|
5080
5111
|
<Show8
|
|
5081
5112
|
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
5082
5113
|
><div
|
|
5083
|
-
class="builder-image-sizer div-
|
|
5114
|
+
class="builder-image-sizer div-5f381e78"
|
|
5084
5115
|
style={{
|
|
5085
5116
|
"padding-top": props.aspectRatio * 100 + "%"
|
|
5086
5117
|
}}
|
|
5087
5118
|
/></Show8>
|
|
5088
5119
|
<Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
|
|
5089
|
-
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-
|
|
5120
|
+
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-5f381e78-2">{props.children}</div></Show8>
|
|
5090
5121
|
</>
|
|
5091
|
-
<style>{`.img-
|
|
5122
|
+
<style>{`.img-5f381e78 {
|
|
5092
5123
|
opacity: 1;
|
|
5093
5124
|
transition: opacity 0.2s ease-in-out;
|
|
5094
|
-
}.div-
|
|
5125
|
+
}.div-5f381e78 {
|
|
5095
5126
|
width: 100%;
|
|
5096
5127
|
pointer-events: none;
|
|
5097
5128
|
font-size: 0;
|
|
5098
|
-
}.div-
|
|
5129
|
+
}.div-5f381e78-2 {
|
|
5099
5130
|
display: flex;
|
|
5100
5131
|
flex-direction: column;
|
|
5101
5132
|
align-items: stretch;
|
|
@@ -5131,10 +5162,10 @@ function SectionComponent(props) {
|
|
|
5131
5162
|
var section_default = SectionComponent;
|
|
5132
5163
|
|
|
5133
5164
|
// src/blocks/symbol/symbol.tsx
|
|
5134
|
-
import { onMount as
|
|
5165
|
+
import { onMount as onMount10, on as on9, createEffect as createEffect9, createMemo as createMemo20, createSignal as createSignal20 } from "solid-js";
|
|
5135
5166
|
|
|
5136
5167
|
// src/components/content-variants/content-variants.tsx
|
|
5137
|
-
import { Show as Show16, For as For9, onMount as
|
|
5168
|
+
import { Show as Show16, For as For9, onMount as onMount9, createSignal as createSignal19, createMemo as createMemo19 } from "solid-js";
|
|
5138
5169
|
|
|
5139
5170
|
// src/helpers/url.ts
|
|
5140
5171
|
var getTopLevelDomain = (host) => {
|
|
@@ -6116,7 +6147,7 @@ var componentInfo6 = {
|
|
|
6116
6147
|
};
|
|
6117
6148
|
|
|
6118
6149
|
// src/blocks/personalization-container/personalization-container.tsx
|
|
6119
|
-
import { Show as Show10, For as For6, onMount as
|
|
6150
|
+
import { Show as Show10, For as For6, onMount as onMount5, createSignal as createSignal10, createMemo as createMemo10 } from "solid-js";
|
|
6120
6151
|
|
|
6121
6152
|
// src/components/inlined-script.tsx
|
|
6122
6153
|
function InlinedScript(props) {
|
|
@@ -6381,7 +6412,7 @@ function PersonalizationContainer(props) {
|
|
|
6381
6412
|
).join("");
|
|
6382
6413
|
});
|
|
6383
6414
|
let rootRef;
|
|
6384
|
-
|
|
6415
|
+
onMount5(() => {
|
|
6385
6416
|
setIsHydrated(true);
|
|
6386
6417
|
const unsub = userAttributesService.subscribeOnUserAttributesChange(
|
|
6387
6418
|
(attrs) => {
|
|
@@ -6783,10 +6814,10 @@ var tabs_default = Tabs;
|
|
|
6783
6814
|
|
|
6784
6815
|
// src/blocks/text/component-info.ts
|
|
6785
6816
|
var componentInfo11 = {
|
|
6786
|
-
shouldReceiveBuilderProps: {
|
|
6787
|
-
builderBlock:
|
|
6817
|
+
shouldReceiveBuilderProps: TARGET === "reactNative" ? {
|
|
6818
|
+
builderBlock: true,
|
|
6788
6819
|
builderContext: true
|
|
6789
|
-
},
|
|
6820
|
+
} : {},
|
|
6790
6821
|
name: "Text",
|
|
6791
6822
|
static: true,
|
|
6792
6823
|
isRSC: true,
|
|
@@ -6844,7 +6875,7 @@ var componentInfo12 = {
|
|
|
6844
6875
|
};
|
|
6845
6876
|
|
|
6846
6877
|
// src/blocks/custom-code/custom-code.tsx
|
|
6847
|
-
import { onMount as
|
|
6878
|
+
import { onMount as onMount6, on as on6, createEffect as createEffect6, createMemo as createMemo12, createSignal as createSignal12 } from "solid-js";
|
|
6848
6879
|
function CustomCode(props) {
|
|
6849
6880
|
const [scriptsInserted, setScriptsInserted] = createSignal12([]);
|
|
6850
6881
|
const [scriptsRun, setScriptsRun] = createSignal12([]);
|
|
@@ -6885,7 +6916,7 @@ function CustomCode(props) {
|
|
|
6885
6916
|
}
|
|
6886
6917
|
}
|
|
6887
6918
|
let elementRef;
|
|
6888
|
-
|
|
6919
|
+
onMount6(() => {
|
|
6889
6920
|
runScripts();
|
|
6890
6921
|
});
|
|
6891
6922
|
const onUpdateFn_0_props_code = createMemo12(() => props.code);
|
|
@@ -6894,7 +6925,7 @@ function CustomCode(props) {
|
|
|
6894
6925
|
runScripts();
|
|
6895
6926
|
}
|
|
6896
6927
|
}
|
|
6897
|
-
|
|
6928
|
+
createEffect6(on6(() => [onUpdateFn_0_props_code()], onUpdateFn_0));
|
|
6898
6929
|
return <><div
|
|
6899
6930
|
class={"builder-custom-code" + (props.replaceNodes ? " replace-nodes" : "")}
|
|
6900
6931
|
ref={elementRef}
|
|
@@ -6922,7 +6953,7 @@ var componentInfo13 = {
|
|
|
6922
6953
|
};
|
|
6923
6954
|
|
|
6924
6955
|
// src/blocks/embed/embed.tsx
|
|
6925
|
-
import { on as
|
|
6956
|
+
import { on as on7, createEffect as createEffect7, createMemo as createMemo13, createSignal as createSignal13 } from "solid-js";
|
|
6926
6957
|
|
|
6927
6958
|
// src/blocks/embed/helpers.ts
|
|
6928
6959
|
var SCRIPT_MIME_TYPES = ["text/javascript", "application/javascript", "application/ecmascript"];
|
|
@@ -6964,8 +6995,8 @@ function Embed(props) {
|
|
|
6964
6995
|
findAndRunScripts();
|
|
6965
6996
|
}
|
|
6966
6997
|
}
|
|
6967
|
-
|
|
6968
|
-
|
|
6998
|
+
createEffect7(
|
|
6999
|
+
on7(() => [onUpdateFn_0_elem(), onUpdateFn_0_ranInitFn__()], onUpdateFn_0)
|
|
6969
7000
|
);
|
|
6970
7001
|
return <><div class="builder-embed" ref={elem} innerHTML={props.content} /></>;
|
|
6971
7002
|
}
|
|
@@ -7797,7 +7828,7 @@ var componentInfo20 = {
|
|
|
7797
7828
|
};
|
|
7798
7829
|
|
|
7799
7830
|
// src/blocks/video/video.tsx
|
|
7800
|
-
import { Show as Show13, onMount as
|
|
7831
|
+
import { Show as Show13, onMount as onMount7, createSignal as createSignal15, createMemo as createMemo15 } from "solid-js";
|
|
7801
7832
|
function Video(props) {
|
|
7802
7833
|
const [lazyVideoObserver, setLazyVideoObserver] = createSignal15(void 0);
|
|
7803
7834
|
const videoProps = createMemo15(() => {
|
|
@@ -7825,7 +7856,7 @@ function Video(props) {
|
|
|
7825
7856
|
};
|
|
7826
7857
|
});
|
|
7827
7858
|
let videoRef;
|
|
7828
|
-
|
|
7859
|
+
onMount7(() => {
|
|
7829
7860
|
if (props.lazyLoad) {
|
|
7830
7861
|
const oberver = new IntersectionObserver(function(entries) {
|
|
7831
7862
|
entries.forEach(function(entry) {
|
|
@@ -8056,9 +8087,9 @@ var getUpdateVariantVisibilityScript = ({
|
|
|
8056
8087
|
// src/components/content/components/enable-editor.tsx
|
|
8057
8088
|
import {
|
|
8058
8089
|
Show as Show14,
|
|
8059
|
-
onMount as
|
|
8060
|
-
on as
|
|
8061
|
-
createEffect as
|
|
8090
|
+
onMount as onMount8,
|
|
8091
|
+
on as on8,
|
|
8092
|
+
createEffect as createEffect8,
|
|
8062
8093
|
createMemo as createMemo16,
|
|
8063
8094
|
createSignal as createSignal16
|
|
8064
8095
|
} from "solid-js";
|
|
@@ -8070,7 +8101,7 @@ function getPreviewContent(_searchParams) {
|
|
|
8070
8101
|
}
|
|
8071
8102
|
|
|
8072
8103
|
// src/constants/sdk-version.ts
|
|
8073
|
-
var SDK_VERSION = "4.0.
|
|
8104
|
+
var SDK_VERSION = "4.0.8";
|
|
8074
8105
|
|
|
8075
8106
|
// src/helpers/sdk-headers.ts
|
|
8076
8107
|
var getSdkHeaders = () => ({
|
|
@@ -9081,7 +9112,7 @@ function EnableEditor(props) {
|
|
|
9081
9112
|
let elementRef;
|
|
9082
9113
|
runHttpRequests();
|
|
9083
9114
|
emitStateUpdate();
|
|
9084
|
-
|
|
9115
|
+
onMount8(() => {
|
|
9085
9116
|
if (isBrowser()) {
|
|
9086
9117
|
if (isEditing() && !props.isNestedRender) {
|
|
9087
9118
|
window.addEventListener("message", processMessage);
|
|
@@ -9162,15 +9193,15 @@ function EnableEditor(props) {
|
|
|
9162
9193
|
mergeNewContent(props.content);
|
|
9163
9194
|
}
|
|
9164
9195
|
}
|
|
9165
|
-
|
|
9196
|
+
createEffect8(on8(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
9166
9197
|
const onUpdateFn_1_props_builderContextSignal_rootState = createMemo16(
|
|
9167
9198
|
() => props.builderContextSignal.rootState
|
|
9168
9199
|
);
|
|
9169
9200
|
function onUpdateFn_1() {
|
|
9170
9201
|
emitStateUpdate();
|
|
9171
9202
|
}
|
|
9172
|
-
|
|
9173
|
-
|
|
9203
|
+
createEffect8(
|
|
9204
|
+
on8(
|
|
9174
9205
|
() => [onUpdateFn_1_props_builderContextSignal_rootState()],
|
|
9175
9206
|
onUpdateFn_1
|
|
9176
9207
|
)
|
|
@@ -9181,7 +9212,7 @@ function EnableEditor(props) {
|
|
|
9181
9212
|
mergeNewRootState(props.data);
|
|
9182
9213
|
}
|
|
9183
9214
|
}
|
|
9184
|
-
|
|
9215
|
+
createEffect8(on8(() => [onUpdateFn_2_props_data()], onUpdateFn_2));
|
|
9185
9216
|
const onUpdateFn_3_props_locale = createMemo16(() => props.locale);
|
|
9186
9217
|
function onUpdateFn_3() {
|
|
9187
9218
|
if (props.locale) {
|
|
@@ -9190,7 +9221,7 @@ function EnableEditor(props) {
|
|
|
9190
9221
|
});
|
|
9191
9222
|
}
|
|
9192
9223
|
}
|
|
9193
|
-
|
|
9224
|
+
createEffect8(on8(() => [onUpdateFn_3_props_locale()], onUpdateFn_3));
|
|
9194
9225
|
return <><builder_context_default.Provider value={props.builderContextSignal}><Show14
|
|
9195
9226
|
when={props.builderContextSignal.content || needsElementRefDivForEditing()}
|
|
9196
9227
|
><Dynamic5
|
|
@@ -9432,7 +9463,7 @@ function ContentVariants(props) {
|
|
|
9432
9463
|
canTrack: getDefaultCanTrack(props.canTrack)
|
|
9433
9464
|
});
|
|
9434
9465
|
});
|
|
9435
|
-
|
|
9466
|
+
onMount9(() => {
|
|
9436
9467
|
setShouldRenderVariants(false);
|
|
9437
9468
|
});
|
|
9438
9469
|
return <><>
|
|
@@ -9536,6 +9567,7 @@ var fetchSymbolContent = async ({
|
|
|
9536
9567
|
// src/blocks/symbol/symbol.tsx
|
|
9537
9568
|
function Symbol2(props) {
|
|
9538
9569
|
const [contentToUse, setContentToUse] = createSignal20(props.symbol?.content);
|
|
9570
|
+
const [symbolEntry, setSymbolEntry] = createSignal20(props.symbol?.entry);
|
|
9539
9571
|
const blocksWrapper = createMemo20(() => {
|
|
9540
9572
|
return "div";
|
|
9541
9573
|
});
|
|
@@ -9551,7 +9583,7 @@ function Symbol2(props) {
|
|
|
9551
9583
|
].filter(Boolean).join(" ");
|
|
9552
9584
|
});
|
|
9553
9585
|
function setContent() {
|
|
9554
|
-
if (contentToUse())
|
|
9586
|
+
if (contentToUse() && symbolEntry() === props.symbol?.entry)
|
|
9555
9587
|
return;
|
|
9556
9588
|
fetchSymbolContent({
|
|
9557
9589
|
symbol: props.symbol,
|
|
@@ -9559,16 +9591,17 @@ function Symbol2(props) {
|
|
|
9559
9591
|
}).then((newContent) => {
|
|
9560
9592
|
if (newContent) {
|
|
9561
9593
|
setContentToUse(newContent);
|
|
9594
|
+
setSymbolEntry(props.symbol?.entry);
|
|
9562
9595
|
}
|
|
9563
9596
|
});
|
|
9564
9597
|
}
|
|
9565
|
-
|
|
9598
|
+
onMount10(() => {
|
|
9566
9599
|
});
|
|
9567
9600
|
const onUpdateFn_0_props_symbol = createMemo20(() => props.symbol);
|
|
9568
9601
|
function onUpdateFn_0() {
|
|
9569
9602
|
setContent();
|
|
9570
9603
|
}
|
|
9571
|
-
|
|
9604
|
+
createEffect9(on9(() => [onUpdateFn_0_props_symbol()], onUpdateFn_0));
|
|
9572
9605
|
return <><div class={className()} {...{}} {...props.attributes} {...{}}><Content_variants_default
|
|
9573
9606
|
nonce={props.builderContext.nonce}
|
|
9574
9607
|
isNestedRender={true}
|