@builder.io/sdk-solid 1.0.13 → 1.0.14
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 +15 -29
- package/lib/browser/dev.jsx +18 -34
- package/lib/browser/index.js +15 -29
- package/lib/browser/index.jsx +18 -34
- package/lib/edge/dev.js +15 -29
- package/lib/edge/dev.jsx +18 -34
- package/lib/edge/index.js +15 -29
- package/lib/edge/index.jsx +18 -34
- package/lib/node/dev.js +15 -29
- package/lib/node/dev.jsx +18 -34
- package/lib/node/index.js +15 -29
- package/lib/node/index.jsx +18 -34
- package/package.json +1 -1
package/lib/node/index.js
CHANGED
|
@@ -4555,7 +4555,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4555
4555
|
}
|
|
4556
4556
|
|
|
4557
4557
|
// src/constants/sdk-version.ts
|
|
4558
|
-
var SDK_VERSION = "1.0.
|
|
4558
|
+
var SDK_VERSION = "1.0.14";
|
|
4559
4559
|
|
|
4560
4560
|
// src/functions/register.ts
|
|
4561
4561
|
var registry = {};
|
|
@@ -4753,10 +4753,6 @@ var subscribeToEditor = (model, callback, options) => {
|
|
|
4753
4753
|
|
|
4754
4754
|
// src/components/content/components/enable-editor.tsx
|
|
4755
4755
|
function EnableEditor(props) {
|
|
4756
|
-
const [forceReRenderCount, setForceReRenderCount] = createSignal(0);
|
|
4757
|
-
createSignal(true);
|
|
4758
|
-
createSignal(0);
|
|
4759
|
-
const [shouldSendResetCookie, setShouldSendResetCookie] = createSignal(false);
|
|
4760
4756
|
const [ContentWrapper, setContentWrapper] = createSignal(props.contentWrapper || "div");
|
|
4761
4757
|
const [httpReqsData, setHttpReqsData] = createSignal({});
|
|
4762
4758
|
const [clicked, setClicked] = createSignal(false);
|
|
@@ -4812,7 +4808,6 @@ function EnableEditor(props) {
|
|
|
4812
4808
|
breakpoints
|
|
4813
4809
|
}
|
|
4814
4810
|
});
|
|
4815
|
-
setForceReRenderCount(forceReRenderCount() + 1);
|
|
4816
4811
|
}
|
|
4817
4812
|
},
|
|
4818
4813
|
animation: (animation) => {
|
|
@@ -4820,7 +4815,6 @@ function EnableEditor(props) {
|
|
|
4820
4815
|
},
|
|
4821
4816
|
contentUpdate: (newContent) => {
|
|
4822
4817
|
mergeNewContent(newContent);
|
|
4823
|
-
setForceReRenderCount(forceReRenderCount() + 1);
|
|
4824
4818
|
}
|
|
4825
4819
|
}
|
|
4826
4820
|
})(event);
|
|
@@ -4911,7 +4905,6 @@ function EnableEditor(props) {
|
|
|
4911
4905
|
onMount(() => {
|
|
4912
4906
|
if (isBrowser()) {
|
|
4913
4907
|
if (isEditing()) {
|
|
4914
|
-
setForceReRenderCount(forceReRenderCount() + 1);
|
|
4915
4908
|
window.addEventListener("message", processMessage);
|
|
4916
4909
|
registerInsertMenu();
|
|
4917
4910
|
setupBrowserForEditing({
|
|
@@ -4978,41 +4971,37 @@ function EnableEditor(props) {
|
|
|
4978
4971
|
}
|
|
4979
4972
|
}
|
|
4980
4973
|
createEffect(on(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
4981
|
-
const
|
|
4974
|
+
const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo(() => props.builderContextSignal.content?.data?.jsCode);
|
|
4982
4975
|
function onUpdateFn_1() {
|
|
4983
|
-
}
|
|
4984
|
-
createEffect(on(() => [onUpdateFn_1_shouldSendResetCookie__()], onUpdateFn_1));
|
|
4985
|
-
const onUpdateFn_2_props_builderContextSignal_content__data__jsCode = createMemo(() => props.builderContextSignal.content?.data?.jsCode);
|
|
4986
|
-
function onUpdateFn_2() {
|
|
4987
4976
|
evaluateJsCode();
|
|
4988
4977
|
}
|
|
4989
|
-
createEffect(on(() => [
|
|
4990
|
-
const
|
|
4991
|
-
function
|
|
4978
|
+
createEffect(on(() => [onUpdateFn_1_props_builderContextSignal_content__data__jsCode()], onUpdateFn_1));
|
|
4979
|
+
const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo(() => props.builderContextSignal.content?.data?.httpRequests);
|
|
4980
|
+
function onUpdateFn_2() {
|
|
4992
4981
|
runHttpRequests();
|
|
4993
4982
|
}
|
|
4994
|
-
createEffect(on(() => [
|
|
4995
|
-
const
|
|
4996
|
-
function
|
|
4983
|
+
createEffect(on(() => [onUpdateFn_2_props_builderContextSignal_content__data__httpRequests()], onUpdateFn_2));
|
|
4984
|
+
const onUpdateFn_3_props_builderContextSignal_rootState = createMemo(() => props.builderContextSignal.rootState);
|
|
4985
|
+
function onUpdateFn_3() {
|
|
4997
4986
|
emitStateUpdate();
|
|
4998
4987
|
}
|
|
4999
|
-
createEffect(on(() => [
|
|
5000
|
-
const
|
|
5001
|
-
function
|
|
4988
|
+
createEffect(on(() => [onUpdateFn_3_props_builderContextSignal_rootState()], onUpdateFn_3));
|
|
4989
|
+
const onUpdateFn_4_props_data = createMemo(() => props.data);
|
|
4990
|
+
function onUpdateFn_4() {
|
|
5002
4991
|
if (props.data) {
|
|
5003
4992
|
mergeNewRootState(props.data);
|
|
5004
4993
|
}
|
|
5005
4994
|
}
|
|
5006
|
-
createEffect(on(() => [
|
|
5007
|
-
const
|
|
5008
|
-
function
|
|
4995
|
+
createEffect(on(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
|
|
4996
|
+
const onUpdateFn_5_props_locale = createMemo(() => props.locale);
|
|
4997
|
+
function onUpdateFn_5() {
|
|
5009
4998
|
if (props.locale) {
|
|
5010
4999
|
mergeNewRootState({
|
|
5011
5000
|
locale: props.locale
|
|
5012
5001
|
});
|
|
5013
5002
|
}
|
|
5014
5003
|
}
|
|
5015
|
-
createEffect(on(() => [
|
|
5004
|
+
createEffect(on(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
|
|
5016
5005
|
return createComponent(builder_context_default.Provider, {
|
|
5017
5006
|
get value() {
|
|
5018
5007
|
return props.builderContextSignal;
|
|
@@ -5028,9 +5017,6 @@ function EnableEditor(props) {
|
|
|
5028
5017
|
return `variant-${props.content?.testVariationId || props.content?.id}`;
|
|
5029
5018
|
}
|
|
5030
5019
|
}, {}, {
|
|
5031
|
-
get key() {
|
|
5032
|
-
return forceReRenderCount();
|
|
5033
|
-
},
|
|
5034
5020
|
ref(r$) {
|
|
5035
5021
|
const _ref$ = elementRef;
|
|
5036
5022
|
typeof _ref$ === "function" ? _ref$(r$) : elementRef = r$;
|
package/lib/node/index.jsx
CHANGED
|
@@ -4140,7 +4140,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
4140
4140
|
}
|
|
4141
4141
|
|
|
4142
4142
|
// src/constants/sdk-version.ts
|
|
4143
|
-
var SDK_VERSION = "1.0.
|
|
4143
|
+
var SDK_VERSION = "1.0.14";
|
|
4144
4144
|
|
|
4145
4145
|
// src/functions/register.ts
|
|
4146
4146
|
var registry = {};
|
|
@@ -4338,10 +4338,6 @@ var subscribeToEditor = (model, callback, options) => {
|
|
|
4338
4338
|
|
|
4339
4339
|
// src/components/content/components/enable-editor.tsx
|
|
4340
4340
|
function EnableEditor(props) {
|
|
4341
|
-
const [forceReRenderCount, setForceReRenderCount] = createSignal12(0);
|
|
4342
|
-
const [firstRender, setFirstRender] = createSignal12(true);
|
|
4343
|
-
const [lastUpdated, setLastUpdated] = createSignal12(0);
|
|
4344
|
-
const [shouldSendResetCookie, setShouldSendResetCookie] = createSignal12(false);
|
|
4345
4341
|
const [ContentWrapper, setContentWrapper] = createSignal12(
|
|
4346
4342
|
props.contentWrapper || "div"
|
|
4347
4343
|
);
|
|
@@ -4396,7 +4392,6 @@ function EnableEditor(props) {
|
|
|
4396
4392
|
breakpoints
|
|
4397
4393
|
}
|
|
4398
4394
|
});
|
|
4399
|
-
setForceReRenderCount(forceReRenderCount() + 1);
|
|
4400
4395
|
}
|
|
4401
4396
|
},
|
|
4402
4397
|
animation: (animation) => {
|
|
@@ -4404,7 +4399,6 @@ function EnableEditor(props) {
|
|
|
4404
4399
|
},
|
|
4405
4400
|
contentUpdate: (newContent) => {
|
|
4406
4401
|
mergeNewContent(newContent);
|
|
4407
|
-
setForceReRenderCount(forceReRenderCount() + 1);
|
|
4408
4402
|
}
|
|
4409
4403
|
}
|
|
4410
4404
|
})(event);
|
|
@@ -4502,7 +4496,6 @@ function EnableEditor(props) {
|
|
|
4502
4496
|
onMount3(() => {
|
|
4503
4497
|
if (isBrowser()) {
|
|
4504
4498
|
if (isEditing()) {
|
|
4505
|
-
setForceReRenderCount(forceReRenderCount() + 1);
|
|
4506
4499
|
window.addEventListener("message", processMessage);
|
|
4507
4500
|
registerInsertMenu();
|
|
4508
4501
|
setupBrowserForEditing({
|
|
@@ -4578,68 +4571,59 @@ function EnableEditor(props) {
|
|
|
4578
4571
|
}
|
|
4579
4572
|
}
|
|
4580
4573
|
createEffect2(on2(() => [onUpdateFn_0_props_content()], onUpdateFn_0));
|
|
4581
|
-
const
|
|
4582
|
-
() => shouldSendResetCookie()
|
|
4583
|
-
);
|
|
4574
|
+
const onUpdateFn_1_props_builderContextSignal_content__data__jsCode = createMemo12(() => props.builderContextSignal.content?.data?.jsCode);
|
|
4584
4575
|
function onUpdateFn_1() {
|
|
4585
|
-
}
|
|
4586
|
-
createEffect2(
|
|
4587
|
-
on2(() => [onUpdateFn_1_shouldSendResetCookie__()], onUpdateFn_1)
|
|
4588
|
-
);
|
|
4589
|
-
const onUpdateFn_2_props_builderContextSignal_content__data__jsCode = createMemo12(() => props.builderContextSignal.content?.data?.jsCode);
|
|
4590
|
-
function onUpdateFn_2() {
|
|
4591
4576
|
evaluateJsCode();
|
|
4592
4577
|
}
|
|
4593
4578
|
createEffect2(
|
|
4594
4579
|
on2(
|
|
4595
|
-
() => [
|
|
4596
|
-
|
|
4580
|
+
() => [onUpdateFn_1_props_builderContextSignal_content__data__jsCode()],
|
|
4581
|
+
onUpdateFn_1
|
|
4597
4582
|
)
|
|
4598
4583
|
);
|
|
4599
|
-
const
|
|
4600
|
-
function
|
|
4584
|
+
const onUpdateFn_2_props_builderContextSignal_content__data__httpRequests = createMemo12(() => props.builderContextSignal.content?.data?.httpRequests);
|
|
4585
|
+
function onUpdateFn_2() {
|
|
4601
4586
|
runHttpRequests();
|
|
4602
4587
|
}
|
|
4603
4588
|
createEffect2(
|
|
4604
4589
|
on2(
|
|
4605
4590
|
() => [
|
|
4606
|
-
|
|
4591
|
+
onUpdateFn_2_props_builderContextSignal_content__data__httpRequests()
|
|
4607
4592
|
],
|
|
4608
|
-
|
|
4593
|
+
onUpdateFn_2
|
|
4609
4594
|
)
|
|
4610
4595
|
);
|
|
4611
|
-
const
|
|
4596
|
+
const onUpdateFn_3_props_builderContextSignal_rootState = createMemo12(
|
|
4612
4597
|
() => props.builderContextSignal.rootState
|
|
4613
4598
|
);
|
|
4614
|
-
function
|
|
4599
|
+
function onUpdateFn_3() {
|
|
4615
4600
|
emitStateUpdate();
|
|
4616
4601
|
}
|
|
4617
4602
|
createEffect2(
|
|
4618
4603
|
on2(
|
|
4619
|
-
() => [
|
|
4620
|
-
|
|
4604
|
+
() => [onUpdateFn_3_props_builderContextSignal_rootState()],
|
|
4605
|
+
onUpdateFn_3
|
|
4621
4606
|
)
|
|
4622
4607
|
);
|
|
4623
|
-
const
|
|
4624
|
-
function
|
|
4608
|
+
const onUpdateFn_4_props_data = createMemo12(() => props.data);
|
|
4609
|
+
function onUpdateFn_4() {
|
|
4625
4610
|
if (props.data) {
|
|
4626
4611
|
mergeNewRootState(props.data);
|
|
4627
4612
|
}
|
|
4628
4613
|
}
|
|
4629
|
-
createEffect2(on2(() => [
|
|
4630
|
-
const
|
|
4631
|
-
function
|
|
4614
|
+
createEffect2(on2(() => [onUpdateFn_4_props_data()], onUpdateFn_4));
|
|
4615
|
+
const onUpdateFn_5_props_locale = createMemo12(() => props.locale);
|
|
4616
|
+
function onUpdateFn_5() {
|
|
4632
4617
|
if (props.locale) {
|
|
4633
4618
|
mergeNewRootState({
|
|
4634
4619
|
locale: props.locale
|
|
4635
4620
|
});
|
|
4636
4621
|
}
|
|
4637
4622
|
}
|
|
4638
|
-
createEffect2(on2(() => [
|
|
4623
|
+
createEffect2(on2(() => [onUpdateFn_5_props_locale()], onUpdateFn_5));
|
|
4639
4624
|
return <builder_context_default.Provider value={props.builderContextSignal}><Show10 when={props.builderContextSignal.content}><Dynamic5
|
|
4640
4625
|
class={`variant-${props.content?.testVariationId || props.content?.id}`}
|
|
4641
4626
|
{...{}}
|
|
4642
|
-
key={forceReRenderCount()}
|
|
4643
4627
|
ref={elementRef}
|
|
4644
4628
|
onClick={(event) => onClick(event)}
|
|
4645
4629
|
builder-content-id={props.builderContextSignal.content?.id}
|