@builder.io/sdk-solid 3.0.2 → 3.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +13 -2
- package/lib/browser/dev.js +18 -48
- package/lib/browser/dev.jsx +32 -44
- package/lib/browser/index.js +18 -48
- package/lib/browser/index.jsx +32 -44
- package/lib/edge/dev.js +18 -48
- package/lib/edge/dev.jsx +32 -44
- package/lib/edge/index.js +18 -48
- package/lib/edge/index.jsx +32 -44
- package/lib/node/dev.js +18 -48
- package/lib/node/dev.jsx +32 -44
- package/lib/node/index.js +18 -48
- package/lib/node/index.jsx +32 -44
- package/package.json +1 -1
package/lib/node/index.jsx
CHANGED
|
@@ -1663,7 +1663,7 @@ function BlocksWrapper(props) {
|
|
|
1663
1663
|
});
|
|
1664
1664
|
return <>
|
|
1665
1665
|
<Dynamic4
|
|
1666
|
-
class={className() + " dynamic-
|
|
1666
|
+
class={className() + " dynamic-3c4beb0c"}
|
|
1667
1667
|
ref={blocksWrapperRef}
|
|
1668
1668
|
builder-path={dataPath()}
|
|
1669
1669
|
builder-parent-id={props.parent}
|
|
@@ -1675,7 +1675,7 @@ function BlocksWrapper(props) {
|
|
|
1675
1675
|
{...props.BlocksWrapperProps}
|
|
1676
1676
|
component={props.BlocksWrapper}
|
|
1677
1677
|
>{props.children}</Dynamic4>
|
|
1678
|
-
<style>{`.dynamic-
|
|
1678
|
+
<style>{`.dynamic-3c4beb0c {
|
|
1679
1679
|
display: flex;
|
|
1680
1680
|
flex-direction: column;
|
|
1681
1681
|
align-items: stretch;
|
|
@@ -1840,7 +1840,7 @@ function Columns(props) {
|
|
|
1840
1840
|
}
|
|
1841
1841
|
return <>
|
|
1842
1842
|
<div
|
|
1843
|
-
class={getColumnsClass(props.builderBlock?.id) + " div-
|
|
1843
|
+
class={getColumnsClass(props.builderBlock?.id) + " div-6331dfc5"}
|
|
1844
1844
|
style={columnsCssVars()}
|
|
1845
1845
|
{...{}}
|
|
1846
1846
|
>
|
|
@@ -1859,17 +1859,17 @@ function Columns(props) {
|
|
|
1859
1859
|
><Blocks_default
|
|
1860
1860
|
path={`columns.${index}.blocks`}
|
|
1861
1861
|
parent={props.builderBlock.id}
|
|
1862
|
-
styleProp={{
|
|
1863
|
-
flexGrow: "1"
|
|
1864
|
-
}}
|
|
1865
1862
|
context={props.builderContext}
|
|
1866
1863
|
registeredComponents={props.builderComponents}
|
|
1867
1864
|
linkComponent={props.builderLinkComponent}
|
|
1868
1865
|
blocks={column.blocks}
|
|
1866
|
+
styleProp={{
|
|
1867
|
+
"flex-grow": "1"
|
|
1868
|
+
}}
|
|
1869
1869
|
/></Dynamic_renderer_default>;
|
|
1870
1870
|
}}</For4>
|
|
1871
1871
|
</div>
|
|
1872
|
-
<style>{`.div-
|
|
1872
|
+
<style>{`.div-6331dfc5 {
|
|
1873
1873
|
display: flex;
|
|
1874
1874
|
line-height: normal;
|
|
1875
1875
|
}`}</style>
|
|
@@ -1884,7 +1884,7 @@ function FragmentComponent(props) {
|
|
|
1884
1884
|
var fragment_default = FragmentComponent;
|
|
1885
1885
|
|
|
1886
1886
|
// src/blocks/image/image.tsx
|
|
1887
|
-
import { Show as Show8,
|
|
1887
|
+
import { Show as Show8, createMemo as createMemo8 } from "solid-js";
|
|
1888
1888
|
|
|
1889
1889
|
// src/blocks/image/image.helpers.ts
|
|
1890
1890
|
function removeProtocol(path) {
|
|
@@ -1973,14 +1973,12 @@ function Image(props) {
|
|
|
1973
1973
|
const out = props.aspectRatio ? aspectRatioStyles : void 0;
|
|
1974
1974
|
return out;
|
|
1975
1975
|
});
|
|
1976
|
-
onMount4(() => {
|
|
1977
|
-
});
|
|
1978
1976
|
return <>
|
|
1979
1977
|
<>
|
|
1980
1978
|
<picture>
|
|
1981
1979
|
<Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
|
|
1982
1980
|
<img
|
|
1983
|
-
class={"builder-image" + (props.className ? " " + props.className : "") + " img-
|
|
1981
|
+
class={"builder-image" + (props.className ? " " + props.className : "") + " img-dc6700b4"}
|
|
1984
1982
|
loading={props.highPriority ? "eager" : "lazy"}
|
|
1985
1983
|
fetchpriority={props.highPriority ? "high" : "auto"}
|
|
1986
1984
|
alt={props.altText}
|
|
@@ -1998,22 +1996,22 @@ function Image(props) {
|
|
|
1998
1996
|
<Show8
|
|
1999
1997
|
when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
|
|
2000
1998
|
><div
|
|
2001
|
-
class="builder-image-sizer div-
|
|
1999
|
+
class="builder-image-sizer div-dc6700b4"
|
|
2002
2000
|
style={{
|
|
2003
2001
|
"padding-top": props.aspectRatio * 100 + "%"
|
|
2004
2002
|
}}
|
|
2005
2003
|
/></Show8>
|
|
2006
2004
|
<Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
|
|
2007
|
-
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-
|
|
2005
|
+
<Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-dc6700b4-2">{props.children}</div></Show8>
|
|
2008
2006
|
</>
|
|
2009
|
-
<style>{`.img-
|
|
2007
|
+
<style>{`.img-dc6700b4 {
|
|
2010
2008
|
opacity: 1;
|
|
2011
2009
|
transition: opacity 0.2s ease-in-out;
|
|
2012
|
-
}.div-
|
|
2010
|
+
}.div-dc6700b4 {
|
|
2013
2011
|
width: 100%;
|
|
2014
2012
|
pointer-events: none;
|
|
2015
2013
|
font-size: 0;
|
|
2016
|
-
}.div-
|
|
2014
|
+
}.div-dc6700b4-2 {
|
|
2017
2015
|
display: flex;
|
|
2018
2016
|
flex-direction: column;
|
|
2019
2017
|
align-items: stretch;
|
|
@@ -2049,10 +2047,10 @@ function SectionComponent(props) {
|
|
|
2049
2047
|
var section_default = SectionComponent;
|
|
2050
2048
|
|
|
2051
2049
|
// src/blocks/symbol/symbol.tsx
|
|
2052
|
-
import { onMount as
|
|
2050
|
+
import { onMount as onMount7, on as on4, createEffect as createEffect4, createMemo as createMemo19, createSignal as createSignal19 } from "solid-js";
|
|
2053
2051
|
|
|
2054
2052
|
// src/components/content-variants/content-variants.tsx
|
|
2055
|
-
import { Show as Show15, For as
|
|
2053
|
+
import { Show as Show15, For as For8, onMount as onMount6, createSignal as createSignal18, createMemo as createMemo18 } from "solid-js";
|
|
2056
2054
|
|
|
2057
2055
|
// src/helpers/url.ts
|
|
2058
2056
|
var getTopLevelDomain = (host) => {
|
|
@@ -3327,12 +3325,12 @@ var componentInfo11 = {
|
|
|
3327
3325
|
};
|
|
3328
3326
|
|
|
3329
3327
|
// src/blocks/custom-code/custom-code.tsx
|
|
3330
|
-
import { onMount as
|
|
3328
|
+
import { onMount as onMount4, createSignal as createSignal11 } from "solid-js";
|
|
3331
3329
|
function CustomCode(props) {
|
|
3332
3330
|
const [scriptsInserted, setScriptsInserted] = createSignal11([]);
|
|
3333
3331
|
const [scriptsRun, setScriptsRun] = createSignal11([]);
|
|
3334
3332
|
let elementRef;
|
|
3335
|
-
|
|
3333
|
+
onMount4(() => {
|
|
3336
3334
|
if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
|
|
3337
3335
|
return;
|
|
3338
3336
|
}
|
|
@@ -3680,7 +3678,7 @@ var componentInfo13 = {
|
|
|
3680
3678
|
};
|
|
3681
3679
|
|
|
3682
3680
|
// src/blocks/form/form/form.tsx
|
|
3683
|
-
import { Show as Show11,
|
|
3681
|
+
import { Show as Show11, createSignal as createSignal13 } from "solid-js";
|
|
3684
3682
|
|
|
3685
3683
|
// src/functions/get-env.ts
|
|
3686
3684
|
var validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"];
|
|
@@ -3897,16 +3895,7 @@ function FormComponent(props) {
|
|
|
3897
3895
|
{...{}}
|
|
3898
3896
|
{...props.attributes}
|
|
3899
3897
|
>
|
|
3900
|
-
|
|
3901
|
-
const idx = _index();
|
|
3902
|
-
return <Block_default
|
|
3903
|
-
key={`form-block-${idx}`}
|
|
3904
|
-
block={block}
|
|
3905
|
-
context={props.builderContext}
|
|
3906
|
-
registeredComponents={props.builderComponents}
|
|
3907
|
-
linkComponent={props.builderLinkComponent}
|
|
3908
|
-
/>;
|
|
3909
|
-
}}</For7></Show11>
|
|
3898
|
+
{props.children}
|
|
3910
3899
|
<Show11 when={submissionState() === "error"}><Blocks_default
|
|
3911
3900
|
path="errorMessage"
|
|
3912
3901
|
blocks={props.errorMessage}
|
|
@@ -3917,14 +3906,14 @@ function FormComponent(props) {
|
|
|
3917
3906
|
blocks={props.sendingMessage}
|
|
3918
3907
|
context={props.builderContext}
|
|
3919
3908
|
/></Show11>
|
|
3920
|
-
<Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-
|
|
3909
|
+
<Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-04a43b72">{JSON.stringify(responseData(), null, 2)}</pre></Show11>
|
|
3921
3910
|
<Show11 when={submissionState() === "success"}><Blocks_default
|
|
3922
3911
|
path="successMessage"
|
|
3923
3912
|
blocks={props.successMessage}
|
|
3924
3913
|
context={props.builderContext}
|
|
3925
3914
|
/></Show11>
|
|
3926
3915
|
</form>
|
|
3927
|
-
<style>{`.pre-
|
|
3916
|
+
<style>{`.pre-04a43b72 {
|
|
3928
3917
|
padding: 10px;
|
|
3929
3918
|
color: red;
|
|
3930
3919
|
text-align: center;
|
|
@@ -4049,7 +4038,7 @@ var componentInfo15 = {
|
|
|
4049
4038
|
};
|
|
4050
4039
|
|
|
4051
4040
|
// src/blocks/form/select/select.tsx
|
|
4052
|
-
import { For as
|
|
4041
|
+
import { For as For7 } from "solid-js";
|
|
4053
4042
|
function SelectComponent(props) {
|
|
4054
4043
|
return <><select
|
|
4055
4044
|
{...{}}
|
|
@@ -4059,10 +4048,10 @@ function SelectComponent(props) {
|
|
|
4059
4048
|
defaultValue={props.defaultValue}
|
|
4060
4049
|
name={props.name}
|
|
4061
4050
|
required={props.required}
|
|
4062
|
-
><
|
|
4051
|
+
><For7 each={props.options}>{(option, _index) => {
|
|
4063
4052
|
const index = _index();
|
|
4064
4053
|
return <option key={`${option.name}-${index}`} value={option.value}>{option.name || option.value}</option>;
|
|
4065
|
-
}}</
|
|
4054
|
+
}}</For7></select></>;
|
|
4066
4055
|
}
|
|
4067
4056
|
var select_default = SelectComponent;
|
|
4068
4057
|
|
|
@@ -4317,7 +4306,6 @@ function Video(props) {
|
|
|
4317
4306
|
"object-position": props.position,
|
|
4318
4307
|
// Hack to get object fit to work as expected and
|
|
4319
4308
|
// not have the video overflow
|
|
4320
|
-
"z-index": 2,
|
|
4321
4309
|
"border-radius": "1px",
|
|
4322
4310
|
...props.aspectRatio ? {
|
|
4323
4311
|
position: "absolute"
|
|
@@ -4502,7 +4490,7 @@ var Inlined_script_default = InlinedScript;
|
|
|
4502
4490
|
// src/components/content/components/enable-editor.tsx
|
|
4503
4491
|
import {
|
|
4504
4492
|
Show as Show13,
|
|
4505
|
-
onMount as
|
|
4493
|
+
onMount as onMount5,
|
|
4506
4494
|
on as on3,
|
|
4507
4495
|
createEffect as createEffect3,
|
|
4508
4496
|
createMemo as createMemo15,
|
|
@@ -4516,7 +4504,7 @@ function getPreviewContent(_searchParams) {
|
|
|
4516
4504
|
}
|
|
4517
4505
|
|
|
4518
4506
|
// src/constants/sdk-version.ts
|
|
4519
|
-
var SDK_VERSION = "3.0.
|
|
4507
|
+
var SDK_VERSION = "3.0.5";
|
|
4520
4508
|
|
|
4521
4509
|
// src/helpers/sdk-headers.ts
|
|
4522
4510
|
var getSdkHeaders = () => ({
|
|
@@ -5503,7 +5491,7 @@ function EnableEditor(props) {
|
|
|
5503
5491
|
let elementRef;
|
|
5504
5492
|
runHttpRequests();
|
|
5505
5493
|
emitStateUpdate();
|
|
5506
|
-
|
|
5494
|
+
onMount5(() => {
|
|
5507
5495
|
if (isBrowser()) {
|
|
5508
5496
|
if (isEditing() && !props.isNestedRender) {
|
|
5509
5497
|
window.addEventListener("message", processMessage);
|
|
@@ -5848,7 +5836,7 @@ function ContentVariants(props) {
|
|
|
5848
5836
|
canTrack: getDefaultCanTrack(props.canTrack)
|
|
5849
5837
|
});
|
|
5850
5838
|
});
|
|
5851
|
-
|
|
5839
|
+
onMount6(() => {
|
|
5852
5840
|
setShouldRenderVariants(false);
|
|
5853
5841
|
});
|
|
5854
5842
|
return <><>
|
|
@@ -5868,7 +5856,7 @@ function ContentVariants(props) {
|
|
|
5868
5856
|
scriptStr={updateCookieAndStylesScriptStr()}
|
|
5869
5857
|
nonce={props.nonce || ""}
|
|
5870
5858
|
/>
|
|
5871
|
-
<
|
|
5859
|
+
<For8 each={getVariants(props.content)}>{(variant, _index) => {
|
|
5872
5860
|
const index = _index();
|
|
5873
5861
|
return <Content_default
|
|
5874
5862
|
apiHost={props.apiHost}
|
|
@@ -5895,7 +5883,7 @@ function ContentVariants(props) {
|
|
|
5895
5883
|
trustedHosts={props.trustedHosts}
|
|
5896
5884
|
{...{}}
|
|
5897
5885
|
/>;
|
|
5898
|
-
}}</
|
|
5886
|
+
}}</For8>
|
|
5899
5887
|
</Show15>
|
|
5900
5888
|
<Content_default
|
|
5901
5889
|
apiHost={props.apiHost}
|
|
@@ -5978,7 +5966,7 @@ function Symbol(props) {
|
|
|
5978
5966
|
}
|
|
5979
5967
|
});
|
|
5980
5968
|
}
|
|
5981
|
-
|
|
5969
|
+
onMount7(() => {
|
|
5982
5970
|
});
|
|
5983
5971
|
const onUpdateFn_0_props_symbol = createMemo19(() => props.symbol);
|
|
5984
5972
|
function onUpdateFn_0() {
|