@builder.io/sdk-qwik 0.16.2 → 0.16.4
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/index.qwik.cjs +34 -20
- package/lib/browser/index.qwik.mjs +34 -20
- package/lib/edge/index.qwik.cjs +34 -20
- package/lib/edge/index.qwik.mjs +34 -20
- package/lib/node/index.qwik.cjs +34 -20
- package/lib/node/index.qwik.mjs +34 -20
- package/package.json +1 -1
- package/types/src/blocks/image/image.types.d.ts +2 -0
- package/types/src/blocks/symbol/symbol.types.d.ts +1 -0
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/register-component.d.ts +2 -2
|
@@ -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
|
-
|
|
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
|
-
|
|
1635
|
+
${childColumnDiv} {
|
|
1635
1636
|
width: var(--column-width-mobile) !important;
|
|
1636
1637
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
1637
1638
|
}
|
|
@@ -1836,6 +1837,8 @@ const Image = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
1836
1837
|
}, "Image_component_aspectRatioCss_useComputed_yJ1jG0g5fbw", [
|
|
1837
1838
|
props
|
|
1838
1839
|
]));
|
|
1840
|
+
qwik.useVisibleTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
1841
|
+
}, "Image_component_useVisibleTask_pRTGrfPyv0Y"));
|
|
1839
1842
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
1840
1843
|
children: [
|
|
1841
1844
|
/* @__PURE__ */ qwik._jsxQ("picture", null, null, [
|
|
@@ -3361,7 +3364,8 @@ const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
3361
3364
|
}, "Tabs_component_MhWcxXy0lMY"));
|
|
3362
3365
|
const componentInfo$9 = {
|
|
3363
3366
|
shouldReceiveBuilderProps: {
|
|
3364
|
-
builderBlock: false
|
|
3367
|
+
builderBlock: false,
|
|
3368
|
+
builderContext: true
|
|
3365
3369
|
},
|
|
3366
3370
|
name: "Text",
|
|
3367
3371
|
static: true,
|
|
@@ -3384,14 +3388,27 @@ const componentInfo$9 = {
|
|
|
3384
3388
|
}
|
|
3385
3389
|
};
|
|
3386
3390
|
const Text = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
3391
|
+
const processedText = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
3392
|
+
var _a;
|
|
3393
|
+
const [props2] = qwik.useLexicalScope();
|
|
3394
|
+
const context = props2.builderContext;
|
|
3395
|
+
const { context: contextContext, localState, rootState, rootSetState } = context;
|
|
3396
|
+
return String(((_a = props2.text) == null ? void 0 : _a.toString()) || "").replace(/{{([^}]+)}}/g, (match, group) => evaluate({
|
|
3397
|
+
code: group,
|
|
3398
|
+
context: contextContext,
|
|
3399
|
+
localState,
|
|
3400
|
+
rootState,
|
|
3401
|
+
rootSetState,
|
|
3402
|
+
enableCache: false
|
|
3403
|
+
}));
|
|
3404
|
+
}, "Text_component_processedText_useComputed_FbQ0o8kZPCU", [
|
|
3405
|
+
props
|
|
3406
|
+
]));
|
|
3387
3407
|
return /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
3388
3408
|
class: "builder-text",
|
|
3389
|
-
dangerouslySetInnerHTML: qwik._fnSignal((p0) =>
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
}, [
|
|
3393
|
-
props
|
|
3394
|
-
], 'p0.text?.toString()||""'),
|
|
3409
|
+
dangerouslySetInnerHTML: qwik._fnSignal((p0) => p0.value, [
|
|
3410
|
+
processedText
|
|
3411
|
+
], "p0.value"),
|
|
3395
3412
|
style: {
|
|
3396
3413
|
outline: "none"
|
|
3397
3414
|
}
|
|
@@ -4753,14 +4770,13 @@ const serializeFn = (fnValue) => {
|
|
|
4753
4770
|
const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
|
|
4754
4771
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
4755
4772
|
};
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
|
|
4763
|
-
});
|
|
4773
|
+
function serializeComponentInfo(info) {
|
|
4774
|
+
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
4775
|
+
if (typeof value === "function")
|
|
4776
|
+
return serializeFn(value);
|
|
4777
|
+
return value;
|
|
4778
|
+
}));
|
|
4779
|
+
}
|
|
4764
4780
|
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
4781
|
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
4782
|
const UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest";
|
|
@@ -5203,7 +5219,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
5203
5219
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
5204
5220
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
5205
5221
|
}
|
|
5206
|
-
const SDK_VERSION = "0.16.
|
|
5222
|
+
const SDK_VERSION = "0.16.4";
|
|
5207
5223
|
const registry = {};
|
|
5208
5224
|
function register(type, info) {
|
|
5209
5225
|
let typeList = registry[type];
|
|
@@ -6179,8 +6195,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
6179
6195
|
props,
|
|
6180
6196
|
state
|
|
6181
6197
|
]));
|
|
6182
|
-
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
6183
|
-
}, "ContentVariants_component_useTask_lSvynevU008"));
|
|
6184
6198
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
6185
6199
|
children: [
|
|
6186
6200
|
!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
|
-
|
|
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
|
-
|
|
1633
|
+
${childColumnDiv} {
|
|
1633
1634
|
width: var(--column-width-mobile) !important;
|
|
1634
1635
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
1635
1636
|
}
|
|
@@ -1834,6 +1835,8 @@ const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
1834
1835
|
}, "Image_component_aspectRatioCss_useComputed_yJ1jG0g5fbw", [
|
|
1835
1836
|
props
|
|
1836
1837
|
]));
|
|
1838
|
+
useVisibleTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
1839
|
+
}, "Image_component_useVisibleTask_pRTGrfPyv0Y"));
|
|
1837
1840
|
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
1838
1841
|
children: [
|
|
1839
1842
|
/* @__PURE__ */ _jsxQ("picture", null, null, [
|
|
@@ -3359,7 +3362,8 @@ const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
3359
3362
|
}, "Tabs_component_MhWcxXy0lMY"));
|
|
3360
3363
|
const componentInfo$9 = {
|
|
3361
3364
|
shouldReceiveBuilderProps: {
|
|
3362
|
-
builderBlock: false
|
|
3365
|
+
builderBlock: false,
|
|
3366
|
+
builderContext: true
|
|
3363
3367
|
},
|
|
3364
3368
|
name: "Text",
|
|
3365
3369
|
static: true,
|
|
@@ -3382,14 +3386,27 @@ const componentInfo$9 = {
|
|
|
3382
3386
|
}
|
|
3383
3387
|
};
|
|
3384
3388
|
const Text = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
3389
|
+
const processedText = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
3390
|
+
var _a;
|
|
3391
|
+
const [props2] = useLexicalScope();
|
|
3392
|
+
const context = props2.builderContext;
|
|
3393
|
+
const { context: contextContext, localState, rootState, rootSetState } = context;
|
|
3394
|
+
return String(((_a = props2.text) == null ? void 0 : _a.toString()) || "").replace(/{{([^}]+)}}/g, (match, group) => evaluate({
|
|
3395
|
+
code: group,
|
|
3396
|
+
context: contextContext,
|
|
3397
|
+
localState,
|
|
3398
|
+
rootState,
|
|
3399
|
+
rootSetState,
|
|
3400
|
+
enableCache: false
|
|
3401
|
+
}));
|
|
3402
|
+
}, "Text_component_processedText_useComputed_FbQ0o8kZPCU", [
|
|
3403
|
+
props
|
|
3404
|
+
]));
|
|
3385
3405
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
3386
3406
|
class: "builder-text",
|
|
3387
|
-
dangerouslySetInnerHTML: _fnSignal((p0) =>
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
}, [
|
|
3391
|
-
props
|
|
3392
|
-
], 'p0.text?.toString()||""'),
|
|
3407
|
+
dangerouslySetInnerHTML: _fnSignal((p0) => p0.value, [
|
|
3408
|
+
processedText
|
|
3409
|
+
], "p0.value"),
|
|
3393
3410
|
style: {
|
|
3394
3411
|
outline: "none"
|
|
3395
3412
|
}
|
|
@@ -4751,14 +4768,13 @@ const serializeFn = (fnValue) => {
|
|
|
4751
4768
|
const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
|
|
4752
4769
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
4753
4770
|
};
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
});
|
|
4771
|
+
function serializeComponentInfo(info) {
|
|
4772
|
+
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
4773
|
+
if (typeof value === "function")
|
|
4774
|
+
return serializeFn(value);
|
|
4775
|
+
return value;
|
|
4776
|
+
}));
|
|
4777
|
+
}
|
|
4762
4778
|
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
4779
|
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
4780
|
const UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest";
|
|
@@ -5201,7 +5217,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
5201
5217
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
5202
5218
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
5203
5219
|
}
|
|
5204
|
-
const SDK_VERSION = "0.16.
|
|
5220
|
+
const SDK_VERSION = "0.16.4";
|
|
5205
5221
|
const registry = {};
|
|
5206
5222
|
function register(type, info) {
|
|
5207
5223
|
let typeList = registry[type];
|
|
@@ -6177,8 +6193,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
6177
6193
|
props,
|
|
6178
6194
|
state
|
|
6179
6195
|
]));
|
|
6180
|
-
useTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
6181
|
-
}, "ContentVariants_component_useTask_lSvynevU008"));
|
|
6182
6196
|
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
6183
6197
|
children: [
|
|
6184
6198
|
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(InlinedScript, {
|
package/lib/edge/index.qwik.cjs
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
4859
|
+
${childColumnDiv} {
|
|
4859
4860
|
width: var(--column-width-mobile) !important;
|
|
4860
4861
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
4861
4862
|
}
|
|
@@ -5060,6 +5061,8 @@ const Image = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
5060
5061
|
}, "Image_component_aspectRatioCss_useComputed_yJ1jG0g5fbw", [
|
|
5061
5062
|
props
|
|
5062
5063
|
]));
|
|
5064
|
+
qwik.useVisibleTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
5065
|
+
}, "Image_component_useVisibleTask_pRTGrfPyv0Y"));
|
|
5063
5066
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
5064
5067
|
children: [
|
|
5065
5068
|
/* @__PURE__ */ qwik._jsxQ("picture", null, null, [
|
|
@@ -6585,7 +6588,8 @@ const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
6585
6588
|
}, "Tabs_component_MhWcxXy0lMY"));
|
|
6586
6589
|
const componentInfo$9 = {
|
|
6587
6590
|
shouldReceiveBuilderProps: {
|
|
6588
|
-
builderBlock: false
|
|
6591
|
+
builderBlock: false,
|
|
6592
|
+
builderContext: true
|
|
6589
6593
|
},
|
|
6590
6594
|
name: "Text",
|
|
6591
6595
|
static: true,
|
|
@@ -6608,14 +6612,27 @@ const componentInfo$9 = {
|
|
|
6608
6612
|
}
|
|
6609
6613
|
};
|
|
6610
6614
|
const Text = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
6615
|
+
const processedText = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
6616
|
+
var _a;
|
|
6617
|
+
const [props2] = qwik.useLexicalScope();
|
|
6618
|
+
const context = props2.builderContext;
|
|
6619
|
+
const { context: contextContext, localState, rootState, rootSetState } = context;
|
|
6620
|
+
return String(((_a = props2.text) == null ? void 0 : _a.toString()) || "").replace(/{{([^}]+)}}/g, (match, group) => evaluate({
|
|
6621
|
+
code: group,
|
|
6622
|
+
context: contextContext,
|
|
6623
|
+
localState,
|
|
6624
|
+
rootState,
|
|
6625
|
+
rootSetState,
|
|
6626
|
+
enableCache: false
|
|
6627
|
+
}));
|
|
6628
|
+
}, "Text_component_processedText_useComputed_FbQ0o8kZPCU", [
|
|
6629
|
+
props
|
|
6630
|
+
]));
|
|
6611
6631
|
return /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
6612
6632
|
class: "builder-text",
|
|
6613
|
-
dangerouslySetInnerHTML: qwik._fnSignal((p0) =>
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
}, [
|
|
6617
|
-
props
|
|
6618
|
-
], 'p0.text?.toString()||""'),
|
|
6633
|
+
dangerouslySetInnerHTML: qwik._fnSignal((p0) => p0.value, [
|
|
6634
|
+
processedText
|
|
6635
|
+
], "p0.value"),
|
|
6619
6636
|
style: {
|
|
6620
6637
|
outline: "none"
|
|
6621
6638
|
}
|
|
@@ -7977,14 +7994,13 @@ const serializeFn = (fnValue) => {
|
|
|
7977
7994
|
const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
|
|
7978
7995
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
7979
7996
|
};
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
-
});
|
|
7997
|
+
function serializeComponentInfo(info) {
|
|
7998
|
+
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
7999
|
+
if (typeof value === "function")
|
|
8000
|
+
return serializeFn(value);
|
|
8001
|
+
return value;
|
|
8002
|
+
}));
|
|
8003
|
+
}
|
|
7988
8004
|
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
8005
|
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
8006
|
const UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest";
|
|
@@ -8427,7 +8443,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
8427
8443
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
8428
8444
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
8429
8445
|
}
|
|
8430
|
-
const SDK_VERSION = "0.16.
|
|
8446
|
+
const SDK_VERSION = "0.16.4";
|
|
8431
8447
|
const registry = {};
|
|
8432
8448
|
function register(type, info) {
|
|
8433
8449
|
let typeList = registry[type];
|
|
@@ -9403,8 +9419,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
9403
9419
|
props,
|
|
9404
9420
|
state
|
|
9405
9421
|
]));
|
|
9406
|
-
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
9407
|
-
}, "ContentVariants_component_useTask_lSvynevU008"));
|
|
9408
9422
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
9409
9423
|
children: [
|
|
9410
9424
|
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(InlinedScript, {
|
package/lib/edge/index.qwik.mjs
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
4857
|
+
${childColumnDiv} {
|
|
4857
4858
|
width: var(--column-width-mobile) !important;
|
|
4858
4859
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
4859
4860
|
}
|
|
@@ -5058,6 +5059,8 @@ const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
5058
5059
|
}, "Image_component_aspectRatioCss_useComputed_yJ1jG0g5fbw", [
|
|
5059
5060
|
props
|
|
5060
5061
|
]));
|
|
5062
|
+
useVisibleTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
5063
|
+
}, "Image_component_useVisibleTask_pRTGrfPyv0Y"));
|
|
5061
5064
|
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
5062
5065
|
children: [
|
|
5063
5066
|
/* @__PURE__ */ _jsxQ("picture", null, null, [
|
|
@@ -6583,7 +6586,8 @@ const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
6583
6586
|
}, "Tabs_component_MhWcxXy0lMY"));
|
|
6584
6587
|
const componentInfo$9 = {
|
|
6585
6588
|
shouldReceiveBuilderProps: {
|
|
6586
|
-
builderBlock: false
|
|
6589
|
+
builderBlock: false,
|
|
6590
|
+
builderContext: true
|
|
6587
6591
|
},
|
|
6588
6592
|
name: "Text",
|
|
6589
6593
|
static: true,
|
|
@@ -6606,14 +6610,27 @@ const componentInfo$9 = {
|
|
|
6606
6610
|
}
|
|
6607
6611
|
};
|
|
6608
6612
|
const Text = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
6613
|
+
const processedText = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
6614
|
+
var _a;
|
|
6615
|
+
const [props2] = useLexicalScope();
|
|
6616
|
+
const context = props2.builderContext;
|
|
6617
|
+
const { context: contextContext, localState, rootState, rootSetState } = context;
|
|
6618
|
+
return String(((_a = props2.text) == null ? void 0 : _a.toString()) || "").replace(/{{([^}]+)}}/g, (match, group) => evaluate({
|
|
6619
|
+
code: group,
|
|
6620
|
+
context: contextContext,
|
|
6621
|
+
localState,
|
|
6622
|
+
rootState,
|
|
6623
|
+
rootSetState,
|
|
6624
|
+
enableCache: false
|
|
6625
|
+
}));
|
|
6626
|
+
}, "Text_component_processedText_useComputed_FbQ0o8kZPCU", [
|
|
6627
|
+
props
|
|
6628
|
+
]));
|
|
6609
6629
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
6610
6630
|
class: "builder-text",
|
|
6611
|
-
dangerouslySetInnerHTML: _fnSignal((p0) =>
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
}, [
|
|
6615
|
-
props
|
|
6616
|
-
], 'p0.text?.toString()||""'),
|
|
6631
|
+
dangerouslySetInnerHTML: _fnSignal((p0) => p0.value, [
|
|
6632
|
+
processedText
|
|
6633
|
+
], "p0.value"),
|
|
6617
6634
|
style: {
|
|
6618
6635
|
outline: "none"
|
|
6619
6636
|
}
|
|
@@ -7975,14 +7992,13 @@ const serializeFn = (fnValue) => {
|
|
|
7975
7992
|
const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
|
|
7976
7993
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
7977
7994
|
};
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
});
|
|
7995
|
+
function serializeComponentInfo(info) {
|
|
7996
|
+
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
7997
|
+
if (typeof value === "function")
|
|
7998
|
+
return serializeFn(value);
|
|
7999
|
+
return value;
|
|
8000
|
+
}));
|
|
8001
|
+
}
|
|
7986
8002
|
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
8003
|
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
8004
|
const UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest";
|
|
@@ -8425,7 +8441,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
8425
8441
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
8426
8442
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
8427
8443
|
}
|
|
8428
|
-
const SDK_VERSION = "0.16.
|
|
8444
|
+
const SDK_VERSION = "0.16.4";
|
|
8429
8445
|
const registry = {};
|
|
8430
8446
|
function register(type, info) {
|
|
8431
8447
|
let typeList = registry[type];
|
|
@@ -9401,8 +9417,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
9401
9417
|
props,
|
|
9402
9418
|
state
|
|
9403
9419
|
]));
|
|
9404
|
-
useTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
9405
|
-
}, "ContentVariants_component_useTask_lSvynevU008"));
|
|
9406
9420
|
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
9407
9421
|
children: [
|
|
9408
9422
|
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(InlinedScript, {
|
package/lib/node/index.qwik.cjs
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
1780
|
+
${childColumnDiv} {
|
|
1780
1781
|
width: var(--column-width-mobile) !important;
|
|
1781
1782
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
1782
1783
|
}
|
|
@@ -1981,6 +1982,8 @@ const Image = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
1981
1982
|
}, "Image_component_aspectRatioCss_useComputed_yJ1jG0g5fbw", [
|
|
1982
1983
|
props
|
|
1983
1984
|
]));
|
|
1985
|
+
qwik.useVisibleTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
1986
|
+
}, "Image_component_useVisibleTask_pRTGrfPyv0Y"));
|
|
1984
1987
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
1985
1988
|
children: [
|
|
1986
1989
|
/* @__PURE__ */ qwik._jsxQ("picture", null, null, [
|
|
@@ -3506,7 +3509,8 @@ const Tabs = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
3506
3509
|
}, "Tabs_component_MhWcxXy0lMY"));
|
|
3507
3510
|
const componentInfo$9 = {
|
|
3508
3511
|
shouldReceiveBuilderProps: {
|
|
3509
|
-
builderBlock: false
|
|
3512
|
+
builderBlock: false,
|
|
3513
|
+
builderContext: true
|
|
3510
3514
|
},
|
|
3511
3515
|
name: "Text",
|
|
3512
3516
|
static: true,
|
|
@@ -3529,14 +3533,27 @@ const componentInfo$9 = {
|
|
|
3529
3533
|
}
|
|
3530
3534
|
};
|
|
3531
3535
|
const Text = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
3536
|
+
const processedText = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
3537
|
+
var _a;
|
|
3538
|
+
const [props2] = qwik.useLexicalScope();
|
|
3539
|
+
const context = props2.builderContext;
|
|
3540
|
+
const { context: contextContext, localState, rootState, rootSetState } = context;
|
|
3541
|
+
return String(((_a = props2.text) == null ? void 0 : _a.toString()) || "").replace(/{{([^}]+)}}/g, (match, group) => evaluate({
|
|
3542
|
+
code: group,
|
|
3543
|
+
context: contextContext,
|
|
3544
|
+
localState,
|
|
3545
|
+
rootState,
|
|
3546
|
+
rootSetState,
|
|
3547
|
+
enableCache: false
|
|
3548
|
+
}));
|
|
3549
|
+
}, "Text_component_processedText_useComputed_FbQ0o8kZPCU", [
|
|
3550
|
+
props
|
|
3551
|
+
]));
|
|
3532
3552
|
return /* @__PURE__ */ qwik._jsxQ("div", null, {
|
|
3533
3553
|
class: "builder-text",
|
|
3534
|
-
dangerouslySetInnerHTML: qwik._fnSignal((p0) =>
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
}, [
|
|
3538
|
-
props
|
|
3539
|
-
], 'p0.text?.toString()||""'),
|
|
3554
|
+
dangerouslySetInnerHTML: qwik._fnSignal((p0) => p0.value, [
|
|
3555
|
+
processedText
|
|
3556
|
+
], "p0.value"),
|
|
3540
3557
|
style: {
|
|
3541
3558
|
outline: "none"
|
|
3542
3559
|
}
|
|
@@ -4898,14 +4915,13 @@ const serializeFn = (fnValue) => {
|
|
|
4898
4915
|
const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
|
|
4899
4916
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
4900
4917
|
};
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
});
|
|
4918
|
+
function serializeComponentInfo(info) {
|
|
4919
|
+
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
4920
|
+
if (typeof value === "function")
|
|
4921
|
+
return serializeFn(value);
|
|
4922
|
+
return value;
|
|
4923
|
+
}));
|
|
4924
|
+
}
|
|
4909
4925
|
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
4926
|
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
4927
|
const UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest";
|
|
@@ -5348,7 +5364,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
5348
5364
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
5349
5365
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
5350
5366
|
}
|
|
5351
|
-
const SDK_VERSION = "0.16.
|
|
5367
|
+
const SDK_VERSION = "0.16.4";
|
|
5352
5368
|
const registry = {};
|
|
5353
5369
|
function register(type, info) {
|
|
5354
5370
|
let typeList = registry[type];
|
|
@@ -6324,8 +6340,6 @@ const ContentVariants = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.i
|
|
|
6324
6340
|
props,
|
|
6325
6341
|
state
|
|
6326
6342
|
]));
|
|
6327
|
-
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
6328
|
-
}, "ContentVariants_component_useTask_lSvynevU008"));
|
|
6329
6343
|
return /* @__PURE__ */ qwik._jsxC(qwik.Fragment, {
|
|
6330
6344
|
children: [
|
|
6331
6345
|
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ qwik._jsxC(InlinedScript, {
|
package/lib/node/index.qwik.mjs
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
1778
|
+
${childColumnDiv} {
|
|
1778
1779
|
width: var(--column-width-mobile) !important;
|
|
1779
1780
|
margin-left: var(--column-margin-left-mobile) !important;
|
|
1780
1781
|
}
|
|
@@ -1979,6 +1980,8 @@ const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
1979
1980
|
}, "Image_component_aspectRatioCss_useComputed_yJ1jG0g5fbw", [
|
|
1980
1981
|
props
|
|
1981
1982
|
]));
|
|
1983
|
+
useVisibleTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
1984
|
+
}, "Image_component_useVisibleTask_pRTGrfPyv0Y"));
|
|
1982
1985
|
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
1983
1986
|
children: [
|
|
1984
1987
|
/* @__PURE__ */ _jsxQ("picture", null, null, [
|
|
@@ -3504,7 +3507,8 @@ const Tabs = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
3504
3507
|
}, "Tabs_component_MhWcxXy0lMY"));
|
|
3505
3508
|
const componentInfo$9 = {
|
|
3506
3509
|
shouldReceiveBuilderProps: {
|
|
3507
|
-
builderBlock: false
|
|
3510
|
+
builderBlock: false,
|
|
3511
|
+
builderContext: true
|
|
3508
3512
|
},
|
|
3509
3513
|
name: "Text",
|
|
3510
3514
|
static: true,
|
|
@@ -3527,14 +3531,27 @@ const componentInfo$9 = {
|
|
|
3527
3531
|
}
|
|
3528
3532
|
};
|
|
3529
3533
|
const Text = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
3534
|
+
const processedText = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
3535
|
+
var _a;
|
|
3536
|
+
const [props2] = useLexicalScope();
|
|
3537
|
+
const context = props2.builderContext;
|
|
3538
|
+
const { context: contextContext, localState, rootState, rootSetState } = context;
|
|
3539
|
+
return String(((_a = props2.text) == null ? void 0 : _a.toString()) || "").replace(/{{([^}]+)}}/g, (match, group) => evaluate({
|
|
3540
|
+
code: group,
|
|
3541
|
+
context: contextContext,
|
|
3542
|
+
localState,
|
|
3543
|
+
rootState,
|
|
3544
|
+
rootSetState,
|
|
3545
|
+
enableCache: false
|
|
3546
|
+
}));
|
|
3547
|
+
}, "Text_component_processedText_useComputed_FbQ0o8kZPCU", [
|
|
3548
|
+
props
|
|
3549
|
+
]));
|
|
3530
3550
|
return /* @__PURE__ */ _jsxQ("div", null, {
|
|
3531
3551
|
class: "builder-text",
|
|
3532
|
-
dangerouslySetInnerHTML: _fnSignal((p0) =>
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
}, [
|
|
3536
|
-
props
|
|
3537
|
-
], 'p0.text?.toString()||""'),
|
|
3552
|
+
dangerouslySetInnerHTML: _fnSignal((p0) => p0.value, [
|
|
3553
|
+
processedText
|
|
3554
|
+
], "p0.value"),
|
|
3538
3555
|
style: {
|
|
3539
3556
|
outline: "none"
|
|
3540
3557
|
}
|
|
@@ -4896,14 +4913,13 @@ const serializeFn = (fnValue) => {
|
|
|
4896
4913
|
const appendFunction = !fnStr.startsWith("function") && !fnStr.startsWith("(");
|
|
4897
4914
|
return `return (${appendFunction ? "function " : ""}${fnStr}).apply(this, arguments)`;
|
|
4898
4915
|
};
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
});
|
|
4916
|
+
function serializeComponentInfo(info) {
|
|
4917
|
+
return JSON.parse(JSON.stringify(info, (key, value) => {
|
|
4918
|
+
if (typeof value === "function")
|
|
4919
|
+
return serializeFn(value);
|
|
4920
|
+
return value;
|
|
4921
|
+
}));
|
|
4922
|
+
}
|
|
4907
4923
|
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
4924
|
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
4925
|
const UPDATE_COOKIES_AND_STYLES_SCRIPT_NAME = "builderIoAbTest";
|
|
@@ -5346,7 +5362,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
5346
5362
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
5347
5363
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
5348
5364
|
}
|
|
5349
|
-
const SDK_VERSION = "0.16.
|
|
5365
|
+
const SDK_VERSION = "0.16.4";
|
|
5350
5366
|
const registry = {};
|
|
5351
5367
|
function register(type, info) {
|
|
5352
5368
|
let typeList = registry[type];
|
|
@@ -6322,8 +6338,6 @@ const ContentVariants = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl(
|
|
|
6322
6338
|
props,
|
|
6323
6339
|
state
|
|
6324
6340
|
]));
|
|
6325
|
-
useTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
6326
|
-
}, "ContentVariants_component_useTask_lSvynevU008"));
|
|
6327
6341
|
return /* @__PURE__ */ _jsxC(Fragment$1, {
|
|
6328
6342
|
children: [
|
|
6329
6343
|
!props.isNestedRender && TARGET !== "reactNative" ? /* @__PURE__ */ _jsxC(InlinedScript, {
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BuilderBlock } from '../../types/builder-block';
|
|
2
2
|
export interface ImageProps {
|
|
3
|
+
attributes?: string;
|
|
3
4
|
highPriority?: boolean;
|
|
4
5
|
className?: string;
|
|
5
6
|
image: string;
|
|
@@ -12,6 +13,7 @@ export interface ImageProps {
|
|
|
12
13
|
backgroundPosition?: string;
|
|
13
14
|
srcset?: string;
|
|
14
15
|
aspectRatio?: number;
|
|
16
|
+
lockAspectRatio?: boolean;
|
|
15
17
|
children?: any;
|
|
16
18
|
fitContent?: boolean;
|
|
17
19
|
builderBlock?: BuilderBlock;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.16.
|
|
1
|
+
export declare const SDK_VERSION = "0.16.4";
|
|
@@ -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:
|
|
4
|
+
data: any;
|
|
5
5
|
};
|
|
6
|
-
export declare
|
|
6
|
+
export declare function serializeComponentInfo(info: ComponentInfo): any;
|