@builder.io/sdk-qwik 0.16.2 → 0.16.3

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.
@@ -1612,6 +1612,7 @@ const getWidthForBreakpointSize = function getWidthForBreakpointSize2(props, sta
1612
1612
  return breakpointSizes[size].max;
1613
1613
  };
1614
1614
  const columnsStyles = function columnsStyles2(props, state) {
1615
+ const childColumnDiv = `.${props.builderBlock.id}-breakpoints > .builder-column`;
1615
1616
  return `
1616
1617
  @media (max-width: ${getWidthForBreakpointSize(props, state, "medium")}px) {
1617
1618
  .${props.builderBlock.id}-breakpoints {
@@ -1619,7 +1620,7 @@ const columnsStyles = function columnsStyles2(props, state) {
1619
1620
  align-items: stretch;
1620
1621
  }
1621
1622
 
1622
- .${props.builderBlock.id}-breakpoints > .builder-column {
1623
+ ${childColumnDiv} {
1623
1624
  width: var(--column-width-tablet) !important;
1624
1625
  margin-left: var(--column-margin-left-tablet) !important;
1625
1626
  }
@@ -1631,7 +1632,7 @@ const columnsStyles = function columnsStyles2(props, state) {
1631
1632
  align-items: stretch;
1632
1633
  }
1633
1634
 
1634
- .${props.builderBlock.id}-breakpoints > .builder-column {
1635
+ ${childColumnDiv} {
1635
1636
  width: var(--column-width-mobile) !important;
1636
1637
  margin-left: var(--column-margin-left-mobile) !important;
1637
1638
  }
@@ -4753,14 +4754,13 @@ const serializeFn = (fnValue) => {
4753
4754
  const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
4754
4755
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
4755
4756
  };
4756
- const serializeValue = (value) => typeof value === "function" ? serializeFn(value) : fastClone(value);
4757
- const serializeComponentInfo = ({ inputs, ...info }) => ({
4758
- ...fastClone(info),
4759
- inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => ({
4760
- ...acc,
4761
- [key]: serializeValue(value)
4762
- }), {}))
4763
- });
4757
+ function serializeComponentInfo(info) {
4758
+ return JSON.parse(JSON.stringify(info, (key, value) => {
4759
+ if (typeof value === "function")
4760
+ return serializeFn(value);
4761
+ return value;
4762
+ }));
4763
+ }
4764
4764
  const UPDATE_COOKIES_AND_STYLES_SCRIPT = "function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {\n function getAndSetVariantId() {\n function setCookie(name, value, days) {\n let expires = '';\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n expires = '; expires=' + date.toUTCString();\n }\n document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${contentId}`;\n const variantInCookie = getCookie(cookieName);\n const availableIDs = variants.map(vr => vr.id).concat(contentId);\n if (variantInCookie && availableIDs.includes(variantInCookie)) {\n return variantInCookie;\n }\n let n = 0;\n const random = Math.random();\n for (let i = 0; i < variants.length; i++) {\n const variant = variants[i];\n const testRatio = variant.testRatio;\n n += testRatio;\n if (random < n) {\n setCookie(cookieName, variant.id);\n return variant.id;\n }\n }\n setCookie(cookieName, contentId);\n return contentId;\n }\n const winningVariantId = getAndSetVariantId();\n const styleEl = document.currentScript?.previousElementSibling;\n if (isHydrationTarget) {\n styleEl.remove();\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n } else {\n const newStyleStr = variants.concat({\n id: contentId\n }).filter(variant => variant.id !== winningVariantId).map(value => {\n return `.variant-${value.id} { display: none; }\n `;\n }).join('');\n styleEl.innerHTML = newStyleStr;\n }\n}";
4765
4765
  const UPDATE_VARIANT_VISIBILITY_SCRIPT = "function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {\n if (!navigator.cookieEnabled) {\n return;\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${defaultContentId}`;\n const winningVariant = getCookie(cookieName);\n const parentDiv = document.currentScript?.parentElement;\n const isDefaultContent = variantContentId === defaultContentId;\n const isWinningVariant = winningVariant === variantContentId;\n if (isWinningVariant && !isDefaultContent) {\n parentDiv?.removeAttribute('hidden');\n parentDiv?.removeAttribute('aria-hidden');\n } else if (!isWinningVariant && isDefaultContent) {\n parentDiv?.setAttribute('hidden', 'true');\n parentDiv?.setAttribute('aria-hidden', 'true');\n }\n if (isHydrationTarget) {\n if (!isWinningVariant) {\n parentDiv?.remove();\n }\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n }\n return;\n}";
4766
4766
  const UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest";
@@ -5203,7 +5203,7 @@ function isFromTrustedHost(trustedHosts, e) {
5203
5203
  const url = new URL(e.origin), hostname = url.hostname;
5204
5204
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5205
5205
  }
5206
- const SDK_VERSION = "0.16.2";
5206
+ const SDK_VERSION = "0.16.3";
5207
5207
  const registry = {};
5208
5208
  function register(type, info) {
5209
5209
  let typeList = registry[type];
@@ -6179,8 +6179,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
6179
6179
  props,
6180
6180
  state
6181
6181
  ]));
6182
- qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
6183
- }, "ContentVariants_component_useTask_lSvynevU008"));
6184
6182
  return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
6185
6183
  children: [
6186
6184
  !props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(InlinedScript, {
@@ -1610,6 +1610,7 @@ const getWidthForBreakpointSize = function getWidthForBreakpointSize2(props, sta
1610
1610
  return breakpointSizes[size].max;
1611
1611
  };
1612
1612
  const columnsStyles = function columnsStyles2(props, state) {
1613
+ const childColumnDiv = `.${props.builderBlock.id}-breakpoints > .builder-column`;
1613
1614
  return `
1614
1615
  @media (max-width: ${getWidthForBreakpointSize(props, state, "medium")}px) {
1615
1616
  .${props.builderBlock.id}-breakpoints {
@@ -1617,7 +1618,7 @@ const columnsStyles = function columnsStyles2(props, state) {
1617
1618
  align-items: stretch;
1618
1619
  }
1619
1620
 
1620
- .${props.builderBlock.id}-breakpoints > .builder-column {
1621
+ ${childColumnDiv} {
1621
1622
  width: var(--column-width-tablet) !important;
1622
1623
  margin-left: var(--column-margin-left-tablet) !important;
1623
1624
  }
@@ -1629,7 +1630,7 @@ const columnsStyles = function columnsStyles2(props, state) {
1629
1630
  align-items: stretch;
1630
1631
  }
1631
1632
 
1632
- .${props.builderBlock.id}-breakpoints > .builder-column {
1633
+ ${childColumnDiv} {
1633
1634
  width: var(--column-width-mobile) !important;
1634
1635
  margin-left: var(--column-margin-left-mobile) !important;
1635
1636
  }
@@ -4751,14 +4752,13 @@ const serializeFn = (fnValue) => {
4751
4752
  const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
4752
4753
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
4753
4754
  };
4754
- const serializeValue = (value) => typeof value === "function" ? serializeFn(value) : fastClone(value);
4755
- const serializeComponentInfo = ({ inputs, ...info }) => ({
4756
- ...fastClone(info),
4757
- inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => ({
4758
- ...acc,
4759
- [key]: serializeValue(value)
4760
- }), {}))
4761
- });
4755
+ function serializeComponentInfo(info) {
4756
+ return JSON.parse(JSON.stringify(info, (key, value) => {
4757
+ if (typeof value === "function")
4758
+ return serializeFn(value);
4759
+ return value;
4760
+ }));
4761
+ }
4762
4762
  const UPDATE_COOKIES_AND_STYLES_SCRIPT = "function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {\n function getAndSetVariantId() {\n function setCookie(name, value, days) {\n let expires = '';\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n expires = '; expires=' + date.toUTCString();\n }\n document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${contentId}`;\n const variantInCookie = getCookie(cookieName);\n const availableIDs = variants.map(vr => vr.id).concat(contentId);\n if (variantInCookie && availableIDs.includes(variantInCookie)) {\n return variantInCookie;\n }\n let n = 0;\n const random = Math.random();\n for (let i = 0; i < variants.length; i++) {\n const variant = variants[i];\n const testRatio = variant.testRatio;\n n += testRatio;\n if (random < n) {\n setCookie(cookieName, variant.id);\n return variant.id;\n }\n }\n setCookie(cookieName, contentId);\n return contentId;\n }\n const winningVariantId = getAndSetVariantId();\n const styleEl = document.currentScript?.previousElementSibling;\n if (isHydrationTarget) {\n styleEl.remove();\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n } else {\n const newStyleStr = variants.concat({\n id: contentId\n }).filter(variant => variant.id !== winningVariantId).map(value => {\n return `.variant-${value.id} { display: none; }\n `;\n }).join('');\n styleEl.innerHTML = newStyleStr;\n }\n}";
4763
4763
  const UPDATE_VARIANT_VISIBILITY_SCRIPT = "function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {\n if (!navigator.cookieEnabled) {\n return;\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${defaultContentId}`;\n const winningVariant = getCookie(cookieName);\n const parentDiv = document.currentScript?.parentElement;\n const isDefaultContent = variantContentId === defaultContentId;\n const isWinningVariant = winningVariant === variantContentId;\n if (isWinningVariant && !isDefaultContent) {\n parentDiv?.removeAttribute('hidden');\n parentDiv?.removeAttribute('aria-hidden');\n } else if (!isWinningVariant && isDefaultContent) {\n parentDiv?.setAttribute('hidden', 'true');\n parentDiv?.setAttribute('aria-hidden', 'true');\n }\n if (isHydrationTarget) {\n if (!isWinningVariant) {\n parentDiv?.remove();\n }\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n }\n return;\n}";
4764
4764
  const UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest";
@@ -5201,7 +5201,7 @@ function isFromTrustedHost(trustedHosts, e) {
5201
5201
  const url = new URL(e.origin), hostname = url.hostname;
5202
5202
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5203
5203
  }
5204
- const SDK_VERSION = "0.16.2";
5204
+ const SDK_VERSION = "0.16.3";
5205
5205
  const registry = {};
5206
5206
  function register(type, info) {
5207
5207
  let typeList = registry[type];
@@ -6177,8 +6177,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
6177
6177
  props,
6178
6178
  state
6179
6179
  ]));
6180
- useTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
6181
- }, "ContentVariants_component_useTask_lSvynevU008"));
6182
6180
  return /* @__PURE__ */ _jsxC(Fragment$1, {
6183
6181
  children: [
6184
6182
  !props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(InlinedScript, {
@@ -4836,6 +4836,7 @@ const getWidthForBreakpointSize = function getWidthForBreakpointSize2(props, sta
4836
4836
  return breakpointSizes[size].max;
4837
4837
  };
4838
4838
  const columnsStyles = function columnsStyles2(props, state) {
4839
+ const childColumnDiv = `.${props.builderBlock.id}-breakpoints > .builder-column`;
4839
4840
  return `
4840
4841
  @media (max-width: ${getWidthForBreakpointSize(props, state, "medium")}px) {
4841
4842
  .${props.builderBlock.id}-breakpoints {
@@ -4843,7 +4844,7 @@ const columnsStyles = function columnsStyles2(props, state) {
4843
4844
  align-items: stretch;
4844
4845
  }
4845
4846
 
4846
- .${props.builderBlock.id}-breakpoints > .builder-column {
4847
+ ${childColumnDiv} {
4847
4848
  width: var(--column-width-tablet) !important;
4848
4849
  margin-left: var(--column-margin-left-tablet) !important;
4849
4850
  }
@@ -4855,7 +4856,7 @@ const columnsStyles = function columnsStyles2(props, state) {
4855
4856
  align-items: stretch;
4856
4857
  }
4857
4858
 
4858
- .${props.builderBlock.id}-breakpoints > .builder-column {
4859
+ ${childColumnDiv} {
4859
4860
  width: var(--column-width-mobile) !important;
4860
4861
  margin-left: var(--column-margin-left-mobile) !important;
4861
4862
  }
@@ -7977,14 +7978,13 @@ const serializeFn = (fnValue) => {
7977
7978
  const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
7978
7979
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
7979
7980
  };
7980
- const serializeValue = (value) => typeof value === "function" ? serializeFn(value) : fastClone(value);
7981
- const serializeComponentInfo = ({ inputs, ...info }) => ({
7982
- ...fastClone(info),
7983
- inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => ({
7984
- ...acc,
7985
- [key]: serializeValue(value)
7986
- }), {}))
7987
- });
7981
+ function serializeComponentInfo(info) {
7982
+ return JSON.parse(JSON.stringify(info, (key, value) => {
7983
+ if (typeof value === "function")
7984
+ return serializeFn(value);
7985
+ return value;
7986
+ }));
7987
+ }
7988
7988
  const UPDATE_COOKIES_AND_STYLES_SCRIPT = "function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {\n function getAndSetVariantId() {\n function setCookie(name, value, days) {\n let expires = '';\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n expires = '; expires=' + date.toUTCString();\n }\n document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${contentId}`;\n const variantInCookie = getCookie(cookieName);\n const availableIDs = variants.map(vr => vr.id).concat(contentId);\n if (variantInCookie && availableIDs.includes(variantInCookie)) {\n return variantInCookie;\n }\n let n = 0;\n const random = Math.random();\n for (let i = 0; i < variants.length; i++) {\n const variant = variants[i];\n const testRatio = variant.testRatio;\n n += testRatio;\n if (random < n) {\n setCookie(cookieName, variant.id);\n return variant.id;\n }\n }\n setCookie(cookieName, contentId);\n return contentId;\n }\n const winningVariantId = getAndSetVariantId();\n const styleEl = document.currentScript?.previousElementSibling;\n if (isHydrationTarget) {\n styleEl.remove();\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n } else {\n const newStyleStr = variants.concat({\n id: contentId\n }).filter(variant => variant.id !== winningVariantId).map(value => {\n return `.variant-${value.id} { display: none; }\n `;\n }).join('');\n styleEl.innerHTML = newStyleStr;\n }\n}";
7989
7989
  const UPDATE_VARIANT_VISIBILITY_SCRIPT = "function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {\n if (!navigator.cookieEnabled) {\n return;\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${defaultContentId}`;\n const winningVariant = getCookie(cookieName);\n const parentDiv = document.currentScript?.parentElement;\n const isDefaultContent = variantContentId === defaultContentId;\n const isWinningVariant = winningVariant === variantContentId;\n if (isWinningVariant && !isDefaultContent) {\n parentDiv?.removeAttribute('hidden');\n parentDiv?.removeAttribute('aria-hidden');\n } else if (!isWinningVariant && isDefaultContent) {\n parentDiv?.setAttribute('hidden', 'true');\n parentDiv?.setAttribute('aria-hidden', 'true');\n }\n if (isHydrationTarget) {\n if (!isWinningVariant) {\n parentDiv?.remove();\n }\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n }\n return;\n}";
7990
7990
  const UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest";
@@ -8427,7 +8427,7 @@ function isFromTrustedHost(trustedHosts, e) {
8427
8427
  const url = new URL(e.origin), hostname = url.hostname;
8428
8428
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
8429
8429
  }
8430
- const SDK_VERSION = "0.16.2";
8430
+ const SDK_VERSION = "0.16.3";
8431
8431
  const registry = {};
8432
8432
  function register(type, info) {
8433
8433
  let typeList = registry[type];
@@ -9403,8 +9403,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
9403
9403
  props,
9404
9404
  state
9405
9405
  ]));
9406
- qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
9407
- }, "ContentVariants_component_useTask_lSvynevU008"));
9408
9406
  return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
9409
9407
  children: [
9410
9408
  !props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(InlinedScript, {
@@ -4834,6 +4834,7 @@ const getWidthForBreakpointSize = function getWidthForBreakpointSize2(props, sta
4834
4834
  return breakpointSizes[size].max;
4835
4835
  };
4836
4836
  const columnsStyles = function columnsStyles2(props, state) {
4837
+ const childColumnDiv = `.${props.builderBlock.id}-breakpoints > .builder-column`;
4837
4838
  return `
4838
4839
  @media (max-width: ${getWidthForBreakpointSize(props, state, "medium")}px) {
4839
4840
  .${props.builderBlock.id}-breakpoints {
@@ -4841,7 +4842,7 @@ const columnsStyles = function columnsStyles2(props, state) {
4841
4842
  align-items: stretch;
4842
4843
  }
4843
4844
 
4844
- .${props.builderBlock.id}-breakpoints > .builder-column {
4845
+ ${childColumnDiv} {
4845
4846
  width: var(--column-width-tablet) !important;
4846
4847
  margin-left: var(--column-margin-left-tablet) !important;
4847
4848
  }
@@ -4853,7 +4854,7 @@ const columnsStyles = function columnsStyles2(props, state) {
4853
4854
  align-items: stretch;
4854
4855
  }
4855
4856
 
4856
- .${props.builderBlock.id}-breakpoints > .builder-column {
4857
+ ${childColumnDiv} {
4857
4858
  width: var(--column-width-mobile) !important;
4858
4859
  margin-left: var(--column-margin-left-mobile) !important;
4859
4860
  }
@@ -7975,14 +7976,13 @@ const serializeFn = (fnValue) => {
7975
7976
  const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
7976
7977
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
7977
7978
  };
7978
- const serializeValue = (value) => typeof value === "function" ? serializeFn(value) : fastClone(value);
7979
- const serializeComponentInfo = ({ inputs, ...info }) => ({
7980
- ...fastClone(info),
7981
- inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => ({
7982
- ...acc,
7983
- [key]: serializeValue(value)
7984
- }), {}))
7985
- });
7979
+ function serializeComponentInfo(info) {
7980
+ return JSON.parse(JSON.stringify(info, (key, value) => {
7981
+ if (typeof value === "function")
7982
+ return serializeFn(value);
7983
+ return value;
7984
+ }));
7985
+ }
7986
7986
  const UPDATE_COOKIES_AND_STYLES_SCRIPT = "function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {\n function getAndSetVariantId() {\n function setCookie(name, value, days) {\n let expires = '';\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n expires = '; expires=' + date.toUTCString();\n }\n document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${contentId}`;\n const variantInCookie = getCookie(cookieName);\n const availableIDs = variants.map(vr => vr.id).concat(contentId);\n if (variantInCookie && availableIDs.includes(variantInCookie)) {\n return variantInCookie;\n }\n let n = 0;\n const random = Math.random();\n for (let i = 0; i < variants.length; i++) {\n const variant = variants[i];\n const testRatio = variant.testRatio;\n n += testRatio;\n if (random < n) {\n setCookie(cookieName, variant.id);\n return variant.id;\n }\n }\n setCookie(cookieName, contentId);\n return contentId;\n }\n const winningVariantId = getAndSetVariantId();\n const styleEl = document.currentScript?.previousElementSibling;\n if (isHydrationTarget) {\n styleEl.remove();\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n } else {\n const newStyleStr = variants.concat({\n id: contentId\n }).filter(variant => variant.id !== winningVariantId).map(value => {\n return `.variant-${value.id} { display: none; }\n `;\n }).join('');\n styleEl.innerHTML = newStyleStr;\n }\n}";
7987
7987
  const UPDATE_VARIANT_VISIBILITY_SCRIPT = "function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {\n if (!navigator.cookieEnabled) {\n return;\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${defaultContentId}`;\n const winningVariant = getCookie(cookieName);\n const parentDiv = document.currentScript?.parentElement;\n const isDefaultContent = variantContentId === defaultContentId;\n const isWinningVariant = winningVariant === variantContentId;\n if (isWinningVariant && !isDefaultContent) {\n parentDiv?.removeAttribute('hidden');\n parentDiv?.removeAttribute('aria-hidden');\n } else if (!isWinningVariant && isDefaultContent) {\n parentDiv?.setAttribute('hidden', 'true');\n parentDiv?.setAttribute('aria-hidden', 'true');\n }\n if (isHydrationTarget) {\n if (!isWinningVariant) {\n parentDiv?.remove();\n }\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n }\n return;\n}";
7988
7988
  const UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest";
@@ -8425,7 +8425,7 @@ function isFromTrustedHost(trustedHosts, e) {
8425
8425
  const url = new URL(e.origin), hostname = url.hostname;
8426
8426
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
8427
8427
  }
8428
- const SDK_VERSION = "0.16.2";
8428
+ const SDK_VERSION = "0.16.3";
8429
8429
  const registry = {};
8430
8430
  function register(type, info) {
8431
8431
  let typeList = registry[type];
@@ -9401,8 +9401,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
9401
9401
  props,
9402
9402
  state
9403
9403
  ]));
9404
- useTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
9405
- }, "ContentVariants_component_useTask_lSvynevU008"));
9406
9404
  return /* @__PURE__ */ _jsxC(Fragment$1, {
9407
9405
  children: [
9408
9406
  !props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(InlinedScript, {
@@ -1757,6 +1757,7 @@ const getWidthForBreakpointSize = function getWidthForBreakpointSize2(props, sta
1757
1757
  return breakpointSizes[size].max;
1758
1758
  };
1759
1759
  const columnsStyles = function columnsStyles2(props, state) {
1760
+ const childColumnDiv = `.${props.builderBlock.id}-breakpoints > .builder-column`;
1760
1761
  return `
1761
1762
  @media (max-width: ${getWidthForBreakpointSize(props, state, "medium")}px) {
1762
1763
  .${props.builderBlock.id}-breakpoints {
@@ -1764,7 +1765,7 @@ const columnsStyles = function columnsStyles2(props, state) {
1764
1765
  align-items: stretch;
1765
1766
  }
1766
1767
 
1767
- .${props.builderBlock.id}-breakpoints > .builder-column {
1768
+ ${childColumnDiv} {
1768
1769
  width: var(--column-width-tablet) !important;
1769
1770
  margin-left: var(--column-margin-left-tablet) !important;
1770
1771
  }
@@ -1776,7 +1777,7 @@ const columnsStyles = function columnsStyles2(props, state) {
1776
1777
  align-items: stretch;
1777
1778
  }
1778
1779
 
1779
- .${props.builderBlock.id}-breakpoints > .builder-column {
1780
+ ${childColumnDiv} {
1780
1781
  width: var(--column-width-mobile) !important;
1781
1782
  margin-left: var(--column-margin-left-mobile) !important;
1782
1783
  }
@@ -4898,14 +4899,13 @@ const serializeFn = (fnValue) => {
4898
4899
  const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
4899
4900
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
4900
4901
  };
4901
- const serializeValue = (value) => typeof value === "function" ? serializeFn(value) : fastClone(value);
4902
- const serializeComponentInfo = ({ inputs, ...info }) => ({
4903
- ...fastClone(info),
4904
- inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => ({
4905
- ...acc,
4906
- [key]: serializeValue(value)
4907
- }), {}))
4908
- });
4902
+ function serializeComponentInfo(info) {
4903
+ return JSON.parse(JSON.stringify(info, (key, value) => {
4904
+ if (typeof value === "function")
4905
+ return serializeFn(value);
4906
+ return value;
4907
+ }));
4908
+ }
4909
4909
  const UPDATE_COOKIES_AND_STYLES_SCRIPT = "function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {\n function getAndSetVariantId() {\n function setCookie(name, value, days) {\n let expires = '';\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n expires = '; expires=' + date.toUTCString();\n }\n document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${contentId}`;\n const variantInCookie = getCookie(cookieName);\n const availableIDs = variants.map(vr => vr.id).concat(contentId);\n if (variantInCookie && availableIDs.includes(variantInCookie)) {\n return variantInCookie;\n }\n let n = 0;\n const random = Math.random();\n for (let i = 0; i < variants.length; i++) {\n const variant = variants[i];\n const testRatio = variant.testRatio;\n n += testRatio;\n if (random < n) {\n setCookie(cookieName, variant.id);\n return variant.id;\n }\n }\n setCookie(cookieName, contentId);\n return contentId;\n }\n const winningVariantId = getAndSetVariantId();\n const styleEl = document.currentScript?.previousElementSibling;\n if (isHydrationTarget) {\n styleEl.remove();\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n } else {\n const newStyleStr = variants.concat({\n id: contentId\n }).filter(variant => variant.id !== winningVariantId).map(value => {\n return `.variant-${value.id} { display: none; }\n `;\n }).join('');\n styleEl.innerHTML = newStyleStr;\n }\n}";
4910
4910
  const UPDATE_VARIANT_VISIBILITY_SCRIPT = "function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {\n if (!navigator.cookieEnabled) {\n return;\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${defaultContentId}`;\n const winningVariant = getCookie(cookieName);\n const parentDiv = document.currentScript?.parentElement;\n const isDefaultContent = variantContentId === defaultContentId;\n const isWinningVariant = winningVariant === variantContentId;\n if (isWinningVariant && !isDefaultContent) {\n parentDiv?.removeAttribute('hidden');\n parentDiv?.removeAttribute('aria-hidden');\n } else if (!isWinningVariant && isDefaultContent) {\n parentDiv?.setAttribute('hidden', 'true');\n parentDiv?.setAttribute('aria-hidden', 'true');\n }\n if (isHydrationTarget) {\n if (!isWinningVariant) {\n parentDiv?.remove();\n }\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n }\n return;\n}";
4911
4911
  const UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest";
@@ -5348,7 +5348,7 @@ function isFromTrustedHost(trustedHosts, e) {
5348
5348
  const url = new URL(e.origin), hostname = url.hostname;
5349
5349
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5350
5350
  }
5351
- const SDK_VERSION = "0.16.2";
5351
+ const SDK_VERSION = "0.16.3";
5352
5352
  const registry = {};
5353
5353
  function register(type, info) {
5354
5354
  let typeList = registry[type];
@@ -6324,8 +6324,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
6324
6324
  props,
6325
6325
  state
6326
6326
  ]));
6327
- qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
6328
- }, "ContentVariants_component_useTask_lSvynevU008"));
6329
6327
  return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
6330
6328
  children: [
6331
6329
  !props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(InlinedScript, {
@@ -1755,6 +1755,7 @@ const getWidthForBreakpointSize = function getWidthForBreakpointSize2(props, sta
1755
1755
  return breakpointSizes[size].max;
1756
1756
  };
1757
1757
  const columnsStyles = function columnsStyles2(props, state) {
1758
+ const childColumnDiv = `.${props.builderBlock.id}-breakpoints > .builder-column`;
1758
1759
  return `
1759
1760
  @media (max-width: ${getWidthForBreakpointSize(props, state, "medium")}px) {
1760
1761
  .${props.builderBlock.id}-breakpoints {
@@ -1762,7 +1763,7 @@ const columnsStyles = function columnsStyles2(props, state) {
1762
1763
  align-items: stretch;
1763
1764
  }
1764
1765
 
1765
- .${props.builderBlock.id}-breakpoints > .builder-column {
1766
+ ${childColumnDiv} {
1766
1767
  width: var(--column-width-tablet) !important;
1767
1768
  margin-left: var(--column-margin-left-tablet) !important;
1768
1769
  }
@@ -1774,7 +1775,7 @@ const columnsStyles = function columnsStyles2(props, state) {
1774
1775
  align-items: stretch;
1775
1776
  }
1776
1777
 
1777
- .${props.builderBlock.id}-breakpoints > .builder-column {
1778
+ ${childColumnDiv} {
1778
1779
  width: var(--column-width-mobile) !important;
1779
1780
  margin-left: var(--column-margin-left-mobile) !important;
1780
1781
  }
@@ -4896,14 +4897,13 @@ const serializeFn = (fnValue) => {
4896
4897
  const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
4897
4898
  return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
4898
4899
  };
4899
- const serializeValue = (value) => typeof value === "function" ? serializeFn(value) : fastClone(value);
4900
- const serializeComponentInfo = ({ inputs, ...info }) => ({
4901
- ...fastClone(info),
4902
- inputs: inputs == null ? void 0 : inputs.map((input) => Object.entries(input).reduce((acc, [key, value]) => ({
4903
- ...acc,
4904
- [key]: serializeValue(value)
4905
- }), {}))
4906
- });
4900
+ function serializeComponentInfo(info) {
4901
+ return JSON.parse(JSON.stringify(info, (key, value) => {
4902
+ if (typeof value === "function")
4903
+ return serializeFn(value);
4904
+ return value;
4905
+ }));
4906
+ }
4907
4907
  const UPDATE_COOKIES_AND_STYLES_SCRIPT = "function updateCookiesAndStyles(contentId, variants, isHydrationTarget) {\n function getAndSetVariantId() {\n function setCookie(name, value, days) {\n let expires = '';\n if (days) {\n const date = new Date();\n date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);\n expires = '; expires=' + date.toUTCString();\n }\n document.cookie = name + '=' + (value || '') + expires + '; path=/' + '; Secure; SameSite=None';\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${contentId}`;\n const variantInCookie = getCookie(cookieName);\n const availableIDs = variants.map(vr => vr.id).concat(contentId);\n if (variantInCookie && availableIDs.includes(variantInCookie)) {\n return variantInCookie;\n }\n let n = 0;\n const random = Math.random();\n for (let i = 0; i < variants.length; i++) {\n const variant = variants[i];\n const testRatio = variant.testRatio;\n n += testRatio;\n if (random < n) {\n setCookie(cookieName, variant.id);\n return variant.id;\n }\n }\n setCookie(cookieName, contentId);\n return contentId;\n }\n const winningVariantId = getAndSetVariantId();\n const styleEl = document.currentScript?.previousElementSibling;\n if (isHydrationTarget) {\n styleEl.remove();\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n } else {\n const newStyleStr = variants.concat({\n id: contentId\n }).filter(variant => variant.id !== winningVariantId).map(value => {\n return `.variant-${value.id} { display: none; }\n `;\n }).join('');\n styleEl.innerHTML = newStyleStr;\n }\n}";
4908
4908
  const UPDATE_VARIANT_VISIBILITY_SCRIPT = "function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {\n if (!navigator.cookieEnabled) {\n return;\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) === ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n const cookieName = `builder.tests.${defaultContentId}`;\n const winningVariant = getCookie(cookieName);\n const parentDiv = document.currentScript?.parentElement;\n const isDefaultContent = variantContentId === defaultContentId;\n const isWinningVariant = winningVariant === variantContentId;\n if (isWinningVariant && !isDefaultContent) {\n parentDiv?.removeAttribute('hidden');\n parentDiv?.removeAttribute('aria-hidden');\n } else if (!isWinningVariant && isDefaultContent) {\n parentDiv?.setAttribute('hidden', 'true');\n parentDiv?.setAttribute('aria-hidden', 'true');\n }\n if (isHydrationTarget) {\n if (!isWinningVariant) {\n parentDiv?.remove();\n }\n const thisScriptEl = document.currentScript;\n thisScriptEl?.remove();\n }\n return;\n}";
4909
4909
  const UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest";
@@ -5346,7 +5346,7 @@ function isFromTrustedHost(trustedHosts, e) {
5346
5346
  const url = new URL(e.origin), hostname = url.hostname;
5347
5347
  return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
5348
5348
  }
5349
- const SDK_VERSION = "0.16.2";
5349
+ const SDK_VERSION = "0.16.3";
5350
5350
  const registry = {};
5351
5351
  function register(type, info) {
5352
5352
  let typeList = registry[type];
@@ -6322,8 +6322,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
6322
6322
  props,
6323
6323
  state
6324
6324
  ]));
6325
- useTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
6326
- }, "ContentVariants_component_useTask_lSvynevU008"));
6327
6325
  return /* @__PURE__ */ _jsxC(Fragment$1, {
6328
6326
  children: [
6329
6327
  !props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(InlinedScript, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-qwik",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/qwik",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.16.2";
1
+ export declare const SDK_VERSION = "0.16.3";
@@ -1,6 +1,6 @@
1
1
  import type { ComponentInfo } from '../types/components';
2
2
  export declare const createRegisterComponentMessage: (info: ComponentInfo) => {
3
3
  type: string;
4
- data: ComponentInfo;
4
+ data: any;
5
5
  };
6
- export declare const serializeComponentInfo: ({ inputs, ...info }: ComponentInfo) => ComponentInfo;
6
+ export declare function serializeComponentInfo(info: ComponentInfo): any;