@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/lib/edge/dev.jsx CHANGED
@@ -4682,7 +4682,7 @@ function BlocksWrapper(props) {
4682
4682
  });
4683
4683
  return <>
4684
4684
  <Dynamic4
4685
- class={className() + " dynamic-5b6a86b6"}
4685
+ class={className() + " dynamic-3c4beb0c"}
4686
4686
  ref={blocksWrapperRef}
4687
4687
  builder-path={dataPath()}
4688
4688
  builder-parent-id={props.parent}
@@ -4694,7 +4694,7 @@ function BlocksWrapper(props) {
4694
4694
  {...props.BlocksWrapperProps}
4695
4695
  component={props.BlocksWrapper}
4696
4696
  >{props.children}</Dynamic4>
4697
- <style>{`.dynamic-5b6a86b6 {
4697
+ <style>{`.dynamic-3c4beb0c {
4698
4698
  display: flex;
4699
4699
  flex-direction: column;
4700
4700
  align-items: stretch;
@@ -4859,7 +4859,7 @@ function Columns(props) {
4859
4859
  }
4860
4860
  return <>
4861
4861
  <div
4862
- class={getColumnsClass(props.builderBlock?.id) + " div-2ac94efa"}
4862
+ class={getColumnsClass(props.builderBlock?.id) + " div-6331dfc5"}
4863
4863
  style={columnsCssVars()}
4864
4864
  {...{}}
4865
4865
  >
@@ -4878,17 +4878,17 @@ function Columns(props) {
4878
4878
  ><Blocks_default
4879
4879
  path={`columns.${index}.blocks`}
4880
4880
  parent={props.builderBlock.id}
4881
- styleProp={{
4882
- flexGrow: "1"
4883
- }}
4884
4881
  context={props.builderContext}
4885
4882
  registeredComponents={props.builderComponents}
4886
4883
  linkComponent={props.builderLinkComponent}
4887
4884
  blocks={column.blocks}
4885
+ styleProp={{
4886
+ "flex-grow": "1"
4887
+ }}
4888
4888
  /></Dynamic_renderer_default>;
4889
4889
  }}</For4>
4890
4890
  </div>
4891
- <style>{`.div-2ac94efa {
4891
+ <style>{`.div-6331dfc5 {
4892
4892
  display: flex;
4893
4893
  line-height: normal;
4894
4894
  }`}</style>
@@ -4903,7 +4903,7 @@ function FragmentComponent(props) {
4903
4903
  var fragment_default = FragmentComponent;
4904
4904
 
4905
4905
  // src/blocks/image/image.tsx
4906
- import { Show as Show8, onMount as onMount4, createMemo as createMemo8 } from "solid-js";
4906
+ import { Show as Show8, createMemo as createMemo8 } from "solid-js";
4907
4907
 
4908
4908
  // src/blocks/image/image.helpers.ts
4909
4909
  function removeProtocol(path) {
@@ -4993,14 +4993,12 @@ function Image(props) {
4993
4993
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
4994
4994
  return out;
4995
4995
  });
4996
- onMount4(() => {
4997
- });
4998
4996
  return <>
4999
4997
  <>
5000
4998
  <picture>
5001
4999
  <Show8 when={webpSrcSet()}><source type="image/webp" srcset={webpSrcSet()} /></Show8>
5002
5000
  <img
5003
- class={"builder-image" + (props.className ? " " + props.className : "") + " img-070d7e88"}
5001
+ class={"builder-image" + (props.className ? " " + props.className : "") + " img-dc6700b4"}
5004
5002
  loading={props.highPriority ? "eager" : "lazy"}
5005
5003
  fetchpriority={props.highPriority ? "high" : "auto"}
5006
5004
  alt={props.altText}
@@ -5018,22 +5016,22 @@ function Image(props) {
5018
5016
  <Show8
5019
5017
  when={props.aspectRatio && !(props.builderBlock?.children?.length && props.fitContent)}
5020
5018
  ><div
5021
- class="builder-image-sizer div-070d7e88"
5019
+ class="builder-image-sizer div-dc6700b4"
5022
5020
  style={{
5023
5021
  "padding-top": props.aspectRatio * 100 + "%"
5024
5022
  }}
5025
5023
  /></Show8>
5026
5024
  <Show8 when={props.builderBlock?.children?.length && props.fitContent}>{props.children}</Show8>
5027
- <Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-070d7e88-2">{props.children}</div></Show8>
5025
+ <Show8 when={!props.fitContent && props.builderBlock?.children?.length}><div class="div-dc6700b4-2">{props.children}</div></Show8>
5028
5026
  </>
5029
- <style>{`.img-070d7e88 {
5027
+ <style>{`.img-dc6700b4 {
5030
5028
  opacity: 1;
5031
5029
  transition: opacity 0.2s ease-in-out;
5032
- }.div-070d7e88 {
5030
+ }.div-dc6700b4 {
5033
5031
  width: 100%;
5034
5032
  pointer-events: none;
5035
5033
  font-size: 0;
5036
- }.div-070d7e88-2 {
5034
+ }.div-dc6700b4-2 {
5037
5035
  display: flex;
5038
5036
  flex-direction: column;
5039
5037
  align-items: stretch;
@@ -5069,10 +5067,10 @@ function SectionComponent(props) {
5069
5067
  var section_default = SectionComponent;
5070
5068
 
5071
5069
  // src/blocks/symbol/symbol.tsx
5072
- import { onMount as onMount8, on as on4, createEffect as createEffect4, createMemo as createMemo19, createSignal as createSignal19 } from "solid-js";
5070
+ import { onMount as onMount7, on as on4, createEffect as createEffect4, createMemo as createMemo19, createSignal as createSignal19 } from "solid-js";
5073
5071
 
5074
5072
  // src/components/content-variants/content-variants.tsx
5075
- import { Show as Show15, For as For9, onMount as onMount7, createSignal as createSignal18, createMemo as createMemo18 } from "solid-js";
5073
+ import { Show as Show15, For as For8, onMount as onMount6, createSignal as createSignal18, createMemo as createMemo18 } from "solid-js";
5076
5074
 
5077
5075
  // src/helpers/url.ts
5078
5076
  var getTopLevelDomain = (host) => {
@@ -6348,12 +6346,12 @@ var componentInfo11 = {
6348
6346
  };
6349
6347
 
6350
6348
  // src/blocks/custom-code/custom-code.tsx
6351
- import { onMount as onMount5, createSignal as createSignal11 } from "solid-js";
6349
+ import { onMount as onMount4, createSignal as createSignal11 } from "solid-js";
6352
6350
  function CustomCode(props) {
6353
6351
  const [scriptsInserted, setScriptsInserted] = createSignal11([]);
6354
6352
  const [scriptsRun, setScriptsRun] = createSignal11([]);
6355
6353
  let elementRef;
6356
- onMount5(() => {
6354
+ onMount4(() => {
6357
6355
  if (!elementRef?.getElementsByTagName || typeof window === "undefined") {
6358
6356
  return;
6359
6357
  }
@@ -6703,7 +6701,7 @@ var componentInfo13 = {
6703
6701
  };
6704
6702
 
6705
6703
  // src/blocks/form/form/form.tsx
6706
- import { Show as Show11, For as For7, createSignal as createSignal13 } from "solid-js";
6704
+ import { Show as Show11, createSignal as createSignal13 } from "solid-js";
6707
6705
 
6708
6706
  // src/functions/get-env.ts
6709
6707
  var validEnvList = ["production", "qa", "test", "development", "dev", "cdn-qa", "cloud", "fast", "cdn2", "cdn-prod"];
@@ -6920,16 +6918,7 @@ function FormComponent(props) {
6920
6918
  {...{}}
6921
6919
  {...props.attributes}
6922
6920
  >
6923
- <Show11 when={props.builderBlock && props.builderBlock.children}><For7 each={props.builderBlock?.children}>{(block, _index) => {
6924
- const idx = _index();
6925
- return <Block_default
6926
- key={`form-block-${idx}`}
6927
- block={block}
6928
- context={props.builderContext}
6929
- registeredComponents={props.builderComponents}
6930
- linkComponent={props.builderLinkComponent}
6931
- />;
6932
- }}</For7></Show11>
6921
+ {props.children}
6933
6922
  <Show11 when={submissionState() === "error"}><Blocks_default
6934
6923
  path="errorMessage"
6935
6924
  blocks={props.errorMessage}
@@ -6940,14 +6929,14 @@ function FormComponent(props) {
6940
6929
  blocks={props.sendingMessage}
6941
6930
  context={props.builderContext}
6942
6931
  /></Show11>
6943
- <Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-6210236e">{JSON.stringify(responseData(), null, 2)}</pre></Show11>
6932
+ <Show11 when={submissionState() === "error" && responseData()}><pre class="builder-form-error-text pre-04a43b72">{JSON.stringify(responseData(), null, 2)}</pre></Show11>
6944
6933
  <Show11 when={submissionState() === "success"}><Blocks_default
6945
6934
  path="successMessage"
6946
6935
  blocks={props.successMessage}
6947
6936
  context={props.builderContext}
6948
6937
  /></Show11>
6949
6938
  </form>
6950
- <style>{`.pre-6210236e {
6939
+ <style>{`.pre-04a43b72 {
6951
6940
  padding: 10px;
6952
6941
  color: red;
6953
6942
  text-align: center;
@@ -7072,7 +7061,7 @@ var componentInfo15 = {
7072
7061
  };
7073
7062
 
7074
7063
  // src/blocks/form/select/select.tsx
7075
- import { For as For8 } from "solid-js";
7064
+ import { For as For7 } from "solid-js";
7076
7065
  function SelectComponent(props) {
7077
7066
  return <><select
7078
7067
  {...{}}
@@ -7082,10 +7071,10 @@ function SelectComponent(props) {
7082
7071
  defaultValue={props.defaultValue}
7083
7072
  name={props.name}
7084
7073
  required={props.required}
7085
- ><For8 each={props.options}>{(option, _index) => {
7074
+ ><For7 each={props.options}>{(option, _index) => {
7086
7075
  const index = _index();
7087
7076
  return <option key={`${option.name}-${index}`} value={option.value}>{option.name || option.value}</option>;
7088
- }}</For8></select></>;
7077
+ }}</For7></select></>;
7089
7078
  }
7090
7079
  var select_default = SelectComponent;
7091
7080
 
@@ -7340,7 +7329,6 @@ function Video(props) {
7340
7329
  "object-position": props.position,
7341
7330
  // Hack to get object fit to work as expected and
7342
7331
  // not have the video overflow
7343
- "z-index": 2,
7344
7332
  "border-radius": "1px",
7345
7333
  ...props.aspectRatio ? {
7346
7334
  position: "absolute"
@@ -7525,7 +7513,7 @@ var Inlined_script_default = InlinedScript;
7525
7513
  // src/components/content/components/enable-editor.tsx
7526
7514
  import {
7527
7515
  Show as Show13,
7528
- onMount as onMount6,
7516
+ onMount as onMount5,
7529
7517
  on as on3,
7530
7518
  createEffect as createEffect3,
7531
7519
  createMemo as createMemo15,
@@ -7539,7 +7527,7 @@ function getPreviewContent(_searchParams) {
7539
7527
  }
7540
7528
 
7541
7529
  // src/constants/sdk-version.ts
7542
- var SDK_VERSION = "3.0.2";
7530
+ var SDK_VERSION = "3.0.5";
7543
7531
 
7544
7532
  // src/helpers/sdk-headers.ts
7545
7533
  var getSdkHeaders = () => ({
@@ -8533,7 +8521,7 @@ function EnableEditor(props) {
8533
8521
  let elementRef;
8534
8522
  runHttpRequests();
8535
8523
  emitStateUpdate();
8536
- onMount6(() => {
8524
+ onMount5(() => {
8537
8525
  if (isBrowser()) {
8538
8526
  if (isEditing() && !props.isNestedRender) {
8539
8527
  window.addEventListener("message", processMessage);
@@ -8878,7 +8866,7 @@ function ContentVariants(props) {
8878
8866
  canTrack: getDefaultCanTrack(props.canTrack)
8879
8867
  });
8880
8868
  });
8881
- onMount7(() => {
8869
+ onMount6(() => {
8882
8870
  setShouldRenderVariants(false);
8883
8871
  });
8884
8872
  return <><>
@@ -8898,7 +8886,7 @@ function ContentVariants(props) {
8898
8886
  scriptStr={updateCookieAndStylesScriptStr()}
8899
8887
  nonce={props.nonce || ""}
8900
8888
  />
8901
- <For9 each={getVariants(props.content)}>{(variant, _index) => {
8889
+ <For8 each={getVariants(props.content)}>{(variant, _index) => {
8902
8890
  const index = _index();
8903
8891
  return <Content_default
8904
8892
  apiHost={props.apiHost}
@@ -8925,7 +8913,7 @@ function ContentVariants(props) {
8925
8913
  trustedHosts={props.trustedHosts}
8926
8914
  {...{}}
8927
8915
  />;
8928
- }}</For9>
8916
+ }}</For8>
8929
8917
  </Show15>
8930
8918
  <Content_default
8931
8919
  apiHost={props.apiHost}
@@ -9008,7 +8996,7 @@ function Symbol2(props) {
9008
8996
  }
9009
8997
  });
9010
8998
  }
9011
- onMount8(() => {
8999
+ onMount7(() => {
9012
9000
  });
9013
9001
  const onUpdateFn_0_props_symbol = createMemo19(() => props.symbol);
9014
9002
  function onUpdateFn_0() {
package/lib/edge/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { delegateEvents, createComponent, spread, mergeProps, insert, effect, setAttribute, className, style, template, Dynamic, memo, use } from 'solid-js/web';
2
- import { createContext, useContext, Show, For, createMemo, onMount, createSignal, createEffect, on } from 'solid-js';
2
+ import { createContext, useContext, Show, For, createMemo, createSignal, onMount, 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]
@@ -4788,7 +4788,7 @@ function Block(props) {
4788
4788
  });
4789
4789
  }
4790
4790
  var block_default = Block;
4791
- var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-5b6a86b6 {
4791
+ var _tmpl$2 = /* @__PURE__ */ template(`<style>.dynamic-3c4beb0c {
4792
4792
  display: flex;
4793
4793
  flex-direction: column;
4794
4794
  align-items: stretch;
@@ -4831,7 +4831,7 @@ function BlocksWrapper(props) {
4831
4831
  });
4832
4832
  return [createComponent(Dynamic, mergeProps({
4833
4833
  get ["class"]() {
4834
- return className() + " dynamic-5b6a86b6";
4834
+ return className() + " dynamic-3c4beb0c";
4835
4835
  },
4836
4836
  ref(r$) {
4837
4837
  const _ref$ = blocksWrapperRef;
@@ -4930,7 +4930,7 @@ var getColumnsClass = (id2) => {
4930
4930
 
4931
4931
  // src/blocks/columns/columns.tsx
4932
4932
  var _tmpl$3 = /* @__PURE__ */ template(`<div>`);
4933
- var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-2ac94efa {
4933
+ var _tmpl$22 = /* @__PURE__ */ template(`<style>.div-6331dfc5 {
4934
4934
  display: flex;
4935
4935
  line-height: normal;
4936
4936
  }`);
@@ -5059,7 +5059,7 @@ function Columns(props) {
5059
5059
  const _el$ = _tmpl$3();
5060
5060
  spread(_el$, mergeProps({
5061
5061
  get ["class"]() {
5062
- return getColumnsClass(props.builderBlock?.id) + " div-2ac94efa";
5062
+ return getColumnsClass(props.builderBlock?.id) + " div-6331dfc5";
5063
5063
  },
5064
5064
  get style() {
5065
5065
  return columnsCssVars();
@@ -5100,9 +5100,6 @@ function Columns(props) {
5100
5100
  get parent() {
5101
5101
  return props.builderBlock.id;
5102
5102
  },
5103
- styleProp: {
5104
- flexGrow: "1"
5105
- },
5106
5103
  get context() {
5107
5104
  return props.builderContext;
5108
5105
  },
@@ -5114,6 +5111,9 @@ function Columns(props) {
5114
5111
  },
5115
5112
  get blocks() {
5116
5113
  return column.blocks;
5114
+ },
5115
+ styleProp: {
5116
+ "flex-grow": "1"
5117
5117
  }
5118
5118
  });
5119
5119
  }
@@ -5184,16 +5184,16 @@ function getSrcSet(url) {
5184
5184
  // src/blocks/image/image.tsx
5185
5185
  var _tmpl$5 = /* @__PURE__ */ template(`<source type=image/webp>`);
5186
5186
  var _tmpl$23 = /* @__PURE__ */ template(`<picture><img>`);
5187
- var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-070d7e88">`);
5188
- var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-070d7e88-2>`);
5189
- var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-070d7e88 {
5187
+ var _tmpl$32 = /* @__PURE__ */ template(`<div class="builder-image-sizer div-dc6700b4">`);
5188
+ var _tmpl$42 = /* @__PURE__ */ template(`<div class=div-dc6700b4-2>`);
5189
+ var _tmpl$52 = /* @__PURE__ */ template(`<style>.img-dc6700b4 {
5190
5190
  opacity: 1;
5191
5191
  transition: opacity 0.2s ease-in-out;
5192
- }.div-070d7e88 {
5192
+ }.div-dc6700b4 {
5193
5193
  width: 100%;
5194
5194
  pointer-events: none;
5195
5195
  font-size: 0;
5196
- }.div-070d7e88-2 {
5196
+ }.div-dc6700b4-2 {
5197
5197
  display: flex;
5198
5198
  flex-direction: column;
5199
5199
  align-items: stretch;
@@ -5242,8 +5242,6 @@ function Image(props) {
5242
5242
  const out = props.aspectRatio ? aspectRatioStyles : void 0;
5243
5243
  return out;
5244
5244
  });
5245
- onMount(() => {
5246
- });
5247
5245
  return [[(() => {
5248
5246
  const _el$ = _tmpl$23(), _el$3 = _el$.firstChild;
5249
5247
  insert(_el$, createComponent(Show, {
@@ -5257,7 +5255,7 @@ function Image(props) {
5257
5255
  }
5258
5256
  }), _el$3);
5259
5257
  effect((_p$) => {
5260
- const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-070d7e88", _v$2 = props.highPriority ? "eager" : "lazy", _v$3 = props.highPriority ? "high" : "auto", _v$4 = props.altText, _v$5 = props.altText ? void 0 : "presentation", _v$6 = {
5258
+ const _v$ = "builder-image" + (props.className ? " " + props.className : "") + " img-dc6700b4", _v$2 = props.highPriority ? "eager" : "lazy", _v$3 = props.highPriority ? "high" : "auto", _v$4 = props.altText, _v$5 = props.altText ? void 0 : "presentation", _v$6 = {
5261
5259
  "object-position": props.backgroundPosition || "center",
5262
5260
  "object-fit": props.backgroundSize || "cover",
5263
5261
  ...aspectRatioCss()
@@ -7070,9 +7068,9 @@ function logFetch(url) {
7070
7068
  }
7071
7069
 
7072
7070
  // src/blocks/form/form/form.tsx
7073
- var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-6210236e">`);
7071
+ var _tmpl$13 = /* @__PURE__ */ template(`<pre class="builder-form-error-text pre-04a43b72">`);
7074
7072
  var _tmpl$26 = /* @__PURE__ */ template(`<form>`);
7075
- var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-6210236e {
7073
+ var _tmpl$34 = /* @__PURE__ */ template(`<style>.pre-04a43b72 {
7076
7074
  padding: 10px;
7077
7075
  color: red;
7078
7076
  text-align: center;
@@ -7282,34 +7280,7 @@ function FormComponent(props) {
7282
7280
  return props.name;
7283
7281
  }
7284
7282
  }, {}, {}, () => props.attributes), false, true);
7285
- insert(_el$, createComponent(Show, {
7286
- get when() {
7287
- return props.builderBlock && props.builderBlock.children;
7288
- },
7289
- get children() {
7290
- return createComponent(For, {
7291
- get each() {
7292
- return props.builderBlock?.children;
7293
- },
7294
- children: (block, _index) => {
7295
- const idx = _index();
7296
- return createComponent(block_default, {
7297
- key: `form-block-${idx}`,
7298
- block,
7299
- get context() {
7300
- return props.builderContext;
7301
- },
7302
- get registeredComponents() {
7303
- return props.builderComponents;
7304
- },
7305
- get linkComponent() {
7306
- return props.builderLinkComponent;
7307
- }
7308
- });
7309
- }
7310
- });
7311
- }
7312
- }), null);
7283
+ insert(_el$, () => props.children, null);
7313
7284
  insert(_el$, createComponent(Show, {
7314
7285
  get when() {
7315
7286
  return submissionState() === "error";
@@ -7818,7 +7789,6 @@ function Video(props) {
7818
7789
  "object-position": props.position,
7819
7790
  // Hack to get object fit to work as expected and
7820
7791
  // not have the video overflow
7821
- "z-index": 2,
7822
7792
  "border-radius": "1px",
7823
7793
  ...props.aspectRatio ? {
7824
7794
  position: "absolute"
@@ -8046,7 +8016,7 @@ function getPreviewContent(_searchParams) {
8046
8016
  }
8047
8017
 
8048
8018
  // src/constants/sdk-version.ts
8049
- var SDK_VERSION = "3.0.2";
8019
+ var SDK_VERSION = "3.0.5";
8050
8020
 
8051
8021
  // src/helpers/sdk-headers.ts
8052
8022
  var getSdkHeaders = () => ({