@builder.io/sdk-react 4.2.2 → 4.2.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/blocks-exports.cjs +30 -30
- package/lib/browser/blocks-exports.mjs +676 -623
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-074665de.js → server-entry-1c122812.js} +248 -246
- package/lib/browser/server-entry-4452b993.cjs +2 -0
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-0768e15a.cjs → accordion-3f30d417.cjs} +1 -1
- package/lib/edge/{accordion-d3831f48.js → accordion-48a5b362.js} +1 -1
- package/lib/edge/{blocks-2af1d7c9.cjs → blocks-3024bb2c.cjs} +14 -14
- package/lib/edge/{blocks-0269007e.js → blocks-729e6331.js} +735 -721
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-a478ff1a.js → button-36cacb47.js} +2 -2
- package/lib/edge/{button-050f4fef.cjs → button-8ab624e2.cjs} +1 -1
- package/lib/edge/{columns-25375990.cjs → columns-0d6d8b29.cjs} +1 -1
- package/lib/edge/{columns-0b3181f1.js → columns-597b4a0e.js} +3 -3
- package/lib/edge/{content-variants-0dd65b50.js → content-variants-78e04173.js} +142 -108
- package/lib/edge/{content-variants-4cab7215.cjs → content-variants-b2c99976.cjs} +3 -3
- package/lib/edge/{custom-code-f7a0f1c1.js → custom-code-0a11f81d.js} +1 -1
- package/lib/edge/{custom-code-eb5aedd2.cjs → custom-code-1d8040fe.cjs} +1 -1
- package/lib/edge/{embed-e4979560.js → embed-5b2461a4.js} +1 -1
- package/lib/edge/{embed-69114c35.cjs → embed-89e540df.cjs} +1 -1
- package/lib/edge/{form-7b4bd399.cjs → form-46264810.cjs} +1 -1
- package/lib/edge/{form-30fba682.js → form-4f5ea678.js} +3 -3
- package/lib/edge/{get-class-prop-name-f470d5ce.cjs → get-class-prop-name-a8c4e896.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-770bdff2.js → get-class-prop-name-e31571bf.js} +1 -1
- package/lib/edge/image-cce92f6c.cjs +17 -0
- package/lib/edge/image-d87761af.js +123 -0
- package/lib/edge/img-194b08ce.js +33 -0
- package/lib/edge/img-821534bf.cjs +1 -0
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-a6caf021.cjs → input-6d65470b.cjs} +1 -1
- package/lib/edge/{input-e4a9fe0b.js → input-cfd5294a.js} +1 -1
- package/lib/edge/{personalization-container-64f3cd71.js → personalization-container-0d92ab21.js} +4 -4
- package/lib/edge/{personalization-container-f7030f08.cjs → personalization-container-74138dc4.cjs} +1 -1
- package/lib/edge/{select-c217566c.cjs → select-cec6b7d9.cjs} +1 -1
- package/lib/edge/{select-c59c9ac6.js → select-d665e4e4.js} +1 -1
- package/lib/edge/server-entry-d79ba493.cjs +2 -0
- package/lib/{node/server-entry-83d3751d.js → edge/server-entry-fec7344c.js} +307 -307
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-ccd946e2.cjs → slot-4ad8e165.cjs} +1 -1
- package/lib/edge/{slot-26ec2911.js → slot-f2279693.js} +3 -3
- package/lib/edge/{symbol-4548e942.cjs → symbol-064c9433.cjs} +1 -1
- package/lib/edge/{symbol-10cb2f77.js → symbol-93b85799.js} +2 -2
- package/lib/edge/{tabs-f9110171.js → tabs-d87f99ab.js} +3 -3
- package/lib/edge/{tabs-82a9170c.cjs → tabs-f81e3a59.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +32 -32
- package/lib/node/blocks-exports.mjs +821 -768
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +3 -3
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +3 -3
- package/lib/{edge/server-entry-fb5f2b80.js → node/server-entry-b75016aa.js} +346 -342
- package/lib/node/server-entry-fec6b9d9.cjs +2 -0
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-596668c3.js → setIvm-6290921a.js} +1 -1
- package/lib/node/{setIvm-0a5b2ba2.cjs → setIvm-9ebbab5f.cjs} +1 -1
- package/lib/node/setIvm.cjs +1 -1
- package/lib/node/setIvm.mjs +2 -2
- package/lib/node/{should-force-browser-runtime-in-node-5b9e373d.cjs → should-force-browser-runtime-in-node-209c023a.cjs} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-180c3315.js → should-force-browser-runtime-in-node-4ca1840a.js} +1 -1
- package/package.json +1 -1
- package/types/blocks/img/img.d.ts +2 -0
- package/types/components/block/components/live-edit-block-styles.d.ts +8 -0
- package/types/components/block/components/style-wrapper.d.ts +9 -0
- package/types/components/live-edit.d.ts +9 -0
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/functions/get-builder-search-params/index.d.ts +8 -2
- package/types/functions/is-previewing.d.ts +11 -1
- package/types/helpers/find-block.d.ts +18 -0
- package/types/helpers/subscribe-to-editor.d.ts +3 -2
- package/lib/browser/server-entry-06504dba.cjs +0 -2
- package/lib/edge/image-209835f4.js +0 -94
- package/lib/edge/image-87a4e006.cjs +0 -17
- package/lib/edge/image.helpers-3e926d47.js +0 -33
- package/lib/edge/image.helpers-dba8a869.cjs +0 -1
- package/lib/edge/img-3bb375bf.js +0 -28
- package/lib/edge/img-ddf74e12.cjs +0 -1
- package/lib/edge/server-entry-67200cf1.cjs +0 -2
- package/lib/node/server-entry-d40e4b66.cjs +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./server-entry-
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./server-entry-d79ba493.cjs"),e=require("react"),r=e.lazy(()=>Promise.resolve().then(()=>require("./button-8ab624e2.cjs"))),n=e.lazy(()=>Promise.resolve().then(()=>require("./columns-0d6d8b29.cjs"))),s=e.lazy(()=>Promise.resolve().then(()=>require("./fragment-b6e3a326.cjs"))),i=e.lazy(()=>Promise.resolve().then(()=>require("./image-cce92f6c.cjs"))),l=e.lazy(()=>Promise.resolve().then(()=>require("./section-d655ea14.cjs"))),c=e.lazy(()=>Promise.resolve().then(()=>require("./symbol-064c9433.cjs"))),a=e.lazy(()=>Promise.resolve().then(()=>require("./text-e6dbb721.cjs"))),u=e.lazy(()=>Promise.resolve().then(()=>require("./video-cc58dd83.cjs"))),m=e.lazy(()=>Promise.resolve().then(()=>require("./blocks-3024bb2c.cjs")).then(t=>t.blocks)),y=e.lazy(()=>Promise.resolve().then(()=>require("./content-variants-b2c99976.cjs")).then(t=>t.contentVariants)),v=e.createContext({content:null,context:{},localState:void 0,rootSetState(){},rootState:{},apiKey:null,apiVersion:void 0,componentInfos:{},inheritedStyles:{},BlocksWrapper:"div",BlocksWrapperProps:{},nonce:"",model:""});exports.setClientUserAttributes=o.setClientUserAttributes;exports.Blocks=m;exports.BuilderContext=v;exports.Button=r;exports.Columns=n;exports.Content=y;exports.Fragment=s;exports.Image=i;exports.Section=l;exports.Symbol=c;exports.Text=a;exports.Video=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { setClientUserAttributes as C } from "./server-entry-
|
|
2
|
+
import { setClientUserAttributes as C } from "./server-entry-fec7344c.js";
|
|
3
3
|
import { lazy as t, createContext as e } from "react";
|
|
4
|
-
const s = t(() => import("./button-
|
|
4
|
+
const s = t(() => import("./button-36cacb47.js")), r = t(() => import("./columns-597b4a0e.js")), i = t(() => import("./fragment-1492bc7f.js")), a = t(() => import("./image-d87761af.js")), c = t(() => import("./section-d83e2dd3.js")), m = t(() => import("./symbol-93b85799.js")), l = t(() => import("./text-5915f038.js")), p = t(() => import("./video-52df64e2.js")), u = t(() => import("./blocks-729e6331.js").then((o) => o.blocks)), d = t(() => import("./content-variants-78e04173.js").then((o) => o.contentVariants)), x = e({
|
|
5
5
|
content: null,
|
|
6
6
|
context: {},
|
|
7
7
|
localState: void 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { DynamicRenderer as r } from "./dynamic-renderer-8b343325.js";
|
|
3
|
-
import { getClassPropName as n } from "./get-class-prop-name-
|
|
4
|
-
import "./server-entry-
|
|
3
|
+
import { getClassPropName as n } from "./get-class-prop-name-e31571bf.js";
|
|
4
|
+
import "./server-entry-fec7344c.js";
|
|
5
5
|
function b(t) {
|
|
6
6
|
function e() {
|
|
7
7
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),r=require("./dynamic-renderer-b29b45ca.cjs"),t=require("./get-class-prop-name-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),r=require("./dynamic-renderer-b29b45ca.cjs"),t=require("./get-class-prop-name-a8c4e896.cjs");require("./server-entry-d79ba493.cjs");function u(e){function n(){return{...e.attributes,[t.getClassPropName()]:`${e.link?"":"builder-button"} ${e.attributes[t.getClassPropName()]||""}`,...e.link?{href:e.link,target:e.openLinkInNewTab?"_blank":void 0,role:"link"}:{role:"button"}}}return i.jsx(r.DynamicRenderer,{attributes:n(),TagName:e.link?e.builderLinkComponent||"a":"button",actionAttributes:{},children:e.text})}exports.default=u;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("./blocks-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),o=require("./blocks-3024bb2c.cjs"),j=require("./dynamic-renderer-b29b45ca.cjs"),B=require("./get-class-prop-name-a8c4e896.cjs");require("react");require("./blocks-exports.cjs");require("./server-entry-d79ba493.cjs");const q=t=>`builder-columns ${t}-breakpoints`;function p(t){var f,k;function a(){return typeof t.space=="number"?t.space||0:20}function s(){return t.columns||[]}function u(){return t.stackColumnsAt||"tablet"}function y(e){return e.link?t.builderLinkComponent||"a":"div"}function x(e){var n;return((n=s()[e])==null?void 0:n.width)||100/s().length}function S(e){const n=x(e),i=a()*(s().length-1)*(n/100);return`calc(${n}% - ${i}px)`}function c({stackedStyle:e,desktopStyle:n}){return u()==="tablet"?e:n}function d({stackedStyle:e,desktopStyle:n}){return u()==="never"?n:e}function m(){return t.stackColumnsAt==="never"?"row":t.reverseColumnsWhenStacked?"column-reverse":"column"}function C(){return{"--flex-dir":m(),"--flex-dir-tablet":c({stackedStyle:m(),desktopStyle:"row"})}}function v(e){const n=e===0?0:a(),i=S(e),r=`${n}px`,g="100%",h=0;return{...{display:"flex",flexDirection:"column",alignItems:"stretch"},width:i,["marginLeft"]:r,"--column-width-mobile":d({stackedStyle:g,desktopStyle:i}),"--column-margin-left-mobile":d({stackedStyle:h,desktopStyle:r}),"--column-width-tablet":c({stackedStyle:g,desktopStyle:i}),"--column-margin-left-tablet":c({stackedStyle:h,desktopStyle:r})}}function b(e){var i,r;return o.getSizesForBreakpoints(((r=(i=t.builderContext.content)==null?void 0:i.meta)==null?void 0:r.breakpoints)||{})[e].max}function w(){const e=`.${t.builderBlock.id}-breakpoints > .builder-column`;return`
|
|
2
2
|
@media (max-width: ${b("medium")}px) {
|
|
3
3
|
.${t.builderBlock.id}-breakpoints {
|
|
4
4
|
flex-direction: var(--flex-dir-tablet);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as g, Fragment as $, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { InlinedStyles as B, Blocks as L, mapStyleObjToStrIfNeeded as W, getSizesForBreakpoints as z } from "./blocks-
|
|
2
|
+
import { InlinedStyles as B, Blocks as L, mapStyleObjToStrIfNeeded as W, getSizesForBreakpoints as z } from "./blocks-729e6331.js";
|
|
3
3
|
import { DynamicRenderer as A } from "./dynamic-renderer-8b343325.js";
|
|
4
|
-
import { getClassPropName as N } from "./get-class-prop-name-
|
|
4
|
+
import { getClassPropName as N } from "./get-class-prop-name-e31571bf.js";
|
|
5
5
|
import "react";
|
|
6
6
|
import "./blocks-exports.mjs";
|
|
7
|
-
import "./server-entry-
|
|
7
|
+
import "./server-entry-fec7344c.js";
|
|
8
8
|
const D = (e) => `builder-columns ${e}-breakpoints`;
|
|
9
9
|
function O(e) {
|
|
10
10
|
var b, f;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as S, jsxs as H, Fragment as M } from "react/jsx-runtime";
|
|
2
2
|
import { lazy as C, useRef as Y, useState as k, useEffect as N } from "react";
|
|
3
|
-
import { TARGET as F, isBrowser as L, isEditing as
|
|
3
|
+
import { TARGET as F, isBrowser as L, isEditing as _, isPreviewing as ue, setupBrowserForEditing as ve, createRegisterComponentMessage as xe, getDefaultCanTrack as j, getCookieSync as Se, _track as ne, fetchOneEntry as Te, createEditorListener as Ie, logFetch as ke, serializeIncludingFunctions as ae, logger as Ce, handleABTestingSync as we } from "./server-entry-fec7344c.js";
|
|
4
4
|
import { Video as Ve, Button as Ee, Columns as Re, Fragment as Ae, Image as De, Section as Pe, Symbol as Fe, Text as We, BuilderContext as Ne } from "./blocks-exports.mjs";
|
|
5
|
-
import { triggerAnimation as $e, evaluate as de, fastClone as _e, InlinedStyles as ce, ComponentsContext as Le, Blocks as
|
|
5
|
+
import { triggerAnimation as $e, evaluate as de, fastClone as _e, InlinedStyles as ce, ComponentsContext as Le, Blocks as Be } from "./blocks-729e6331.js";
|
|
6
6
|
function tn(e, t, n, o) {
|
|
7
7
|
function r(m) {
|
|
8
8
|
return typeof m == "string";
|
|
@@ -60,7 +60,7 @@ function tn(e, t, n, o) {
|
|
|
60
60
|
}, u = e.date && new Date(e.date) || /* @__PURE__ */ new Date();
|
|
61
61
|
return i.startDate && new Date(i.startDate) > u || i.endDate && new Date(i.endDate) < u ? !1 : !i.query || !i.query.length ? !0 : i.query.every((m) => a(e, m));
|
|
62
62
|
}
|
|
63
|
-
const
|
|
63
|
+
const Ue = `function getPersonalizedVariant(variants, blockId, isHydrationTarget, locale) {
|
|
64
64
|
if (!navigator.cookieEnabled) {
|
|
65
65
|
return;
|
|
66
66
|
}
|
|
@@ -238,7 +238,7 @@ function an({
|
|
|
238
238
|
path: "this.children",
|
|
239
239
|
index: qe
|
|
240
240
|
};
|
|
241
|
-
if (n &&
|
|
241
|
+
if (n && _()) {
|
|
242
242
|
if (typeof t == "number" && t < ((a = e == null ? void 0 : e.length) != null ? a : 0)) {
|
|
243
243
|
const i = e == null ? void 0 : e[t];
|
|
244
244
|
if (i)
|
|
@@ -266,7 +266,7 @@ function an({
|
|
|
266
266
|
}
|
|
267
267
|
const Ke = () => `
|
|
268
268
|
window.${je} = ${He}
|
|
269
|
-
window.${me} = ${
|
|
269
|
+
window.${me} = ${Ue}
|
|
270
270
|
window.${pe} = ${Oe}
|
|
271
271
|
`, ge = F === "react", on = (e, t, n) => `window.${me}(${JSON.stringify(e)}, "${t}", ${ge}${n ? `, "${n}"` : ""})`, rn = (e, t, n) => `window.${pe}(${JSON.stringify(e)}, "${t}", ${ge}${n ? `, "${n}"` : ""})`, K = {
|
|
272
272
|
"@type": "@builder.io/sdk:Element",
|
|
@@ -392,7 +392,7 @@ const Ke = () => `
|
|
|
392
392
|
builderComponents: !0,
|
|
393
393
|
builderLinkComponent: !0
|
|
394
394
|
}
|
|
395
|
-
}, Je = C(() => import("./accordion-
|
|
395
|
+
}, Je = C(() => import("./accordion-48a5b362.js")), Qe = {
|
|
396
396
|
name: "Core:Button",
|
|
397
397
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F81a15681c3e74df09677dfc57a615b13",
|
|
398
398
|
defaultStyles: {
|
|
@@ -789,7 +789,7 @@ const Ke = () => `
|
|
|
789
789
|
defaultValue: []
|
|
790
790
|
}]
|
|
791
791
|
}]
|
|
792
|
-
}, tt = C(() => import("./personalization-container-
|
|
792
|
+
}, tt = C(() => import("./personalization-container-0d92ab21.js")), nt = {
|
|
793
793
|
name: "Core:Section",
|
|
794
794
|
static: !0,
|
|
795
795
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F682efef23ace49afac61748dd305c70a",
|
|
@@ -845,7 +845,7 @@ const Ke = () => `
|
|
|
845
845
|
builderContext: !0,
|
|
846
846
|
builderComponents: !0
|
|
847
847
|
}
|
|
848
|
-
}, it = C(() => import("./slot-
|
|
848
|
+
}, it = C(() => import("./slot-f2279693.js")), ot = {
|
|
849
849
|
name: "Symbol",
|
|
850
850
|
noWrap: !0,
|
|
851
851
|
static: !0,
|
|
@@ -1025,11 +1025,10 @@ const Ke = () => `
|
|
|
1025
1025
|
builderComponents: !0,
|
|
1026
1026
|
builderLinkComponent: !0
|
|
1027
1027
|
}
|
|
1028
|
-
}, lt = C(() => import("./tabs-
|
|
1028
|
+
}, lt = C(() => import("./tabs-d87f99ab.js")), st = {
|
|
1029
1029
|
shouldReceiveBuilderProps: {},
|
|
1030
1030
|
name: "Text",
|
|
1031
1031
|
static: !0,
|
|
1032
|
-
isRSC: !0,
|
|
1033
1032
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-text_fields-24px%20(1).svg?alt=media&token=12177b73-0ee3-42ca-98c6-0dd003de1929",
|
|
1034
1033
|
inputs: [{
|
|
1035
1034
|
name: "text",
|
|
@@ -1066,7 +1065,7 @@ const Ke = () => `
|
|
|
1066
1065
|
helperText: "Only print and run scripts on the client. Important when scripts influence DOM that could be replaced when client loads",
|
|
1067
1066
|
advanced: !0
|
|
1068
1067
|
}]
|
|
1069
|
-
}, dt = C(() => import("./custom-code-
|
|
1068
|
+
}, dt = C(() => import("./custom-code-0a11f81d.js")), ct = {
|
|
1070
1069
|
name: "Embed",
|
|
1071
1070
|
static: !0,
|
|
1072
1071
|
inputs: [{
|
|
@@ -1081,7 +1080,7 @@ const Ke = () => `
|
|
|
1081
1080
|
defaultValue: '<div style="padding: 20px; text-align: center">(Choose an embed URL)<div>',
|
|
1082
1081
|
hideFromUI: !0
|
|
1083
1082
|
}]
|
|
1084
|
-
}, mt = C(() => import("./embed-
|
|
1083
|
+
}, mt = C(() => import("./embed-5b2461a4.js")), pt = {
|
|
1085
1084
|
name: "Form:Form",
|
|
1086
1085
|
// editableTags: ['builder-form-error']
|
|
1087
1086
|
defaults: {
|
|
@@ -1318,7 +1317,7 @@ const Ke = () => `
|
|
|
1318
1317
|
builderComponents: !0,
|
|
1319
1318
|
builderLinkComponent: !0
|
|
1320
1319
|
}
|
|
1321
|
-
}, ft = C(() => import("./form-
|
|
1320
|
+
}, ft = C(() => import("./form-4f5ea678.js")), gt = {
|
|
1322
1321
|
name: "Form:Input",
|
|
1323
1322
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fad6f37889d9e40bbbbc72cdb5875d6ca",
|
|
1324
1323
|
inputs: [
|
|
@@ -1369,7 +1368,7 @@ const Ke = () => `
|
|
|
1369
1368
|
borderStyle: "solid",
|
|
1370
1369
|
borderColor: "#ccc"
|
|
1371
1370
|
}
|
|
1372
|
-
}, ht = C(() => import("./input-
|
|
1371
|
+
}, ht = C(() => import("./input-cfd5294a.js")), bt = {
|
|
1373
1372
|
name: "Form:Select",
|
|
1374
1373
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2F83acca093fb24aaf94dee136e9a4b045",
|
|
1375
1374
|
defaultStyles: {
|
|
@@ -1411,7 +1410,7 @@ const Ke = () => `
|
|
|
1411
1410
|
}],
|
|
1412
1411
|
static: !0,
|
|
1413
1412
|
noWrap: !0
|
|
1414
|
-
}, yt = C(() => import("./select-
|
|
1413
|
+
}, yt = C(() => import("./select-d665e4e4.js")), vt = {
|
|
1415
1414
|
name: "Form:SubmitButton",
|
|
1416
1415
|
image: "https://cdn.builder.io/api/v1/image/assets%2FIsxPKMo2gPRRKeakUztj1D6uqed2%2Fdf2820ffed1f4349a94c40b3221f5b98",
|
|
1417
1416
|
defaultStyles: {
|
|
@@ -1473,7 +1472,6 @@ const Ke = () => `
|
|
|
1473
1472
|
static: !0,
|
|
1474
1473
|
noWrap: !0
|
|
1475
1474
|
}, Tt = C(() => import("./textarea-d29025e9.js")), It = {
|
|
1476
|
-
// friendlyName?
|
|
1477
1475
|
name: "Raw:Img",
|
|
1478
1476
|
hideFromInsertMenu: !0,
|
|
1479
1477
|
image: "https://firebasestorage.googleapis.com/v0/b/builder-3b0a2.appspot.com/o/images%2Fbaseline-insert_photo-24px.svg?alt=media&token=4e5d0ef4-f5e8-4e57-b3a9-38d63a9b9dc4",
|
|
@@ -1483,10 +1481,41 @@ const Ke = () => `
|
|
|
1483
1481
|
type: "file",
|
|
1484
1482
|
allowedFileTypes: G,
|
|
1485
1483
|
required: !0
|
|
1484
|
+
}, {
|
|
1485
|
+
name: "backgroundSize",
|
|
1486
|
+
type: "text",
|
|
1487
|
+
defaultValue: "cover",
|
|
1488
|
+
enum: [{
|
|
1489
|
+
label: "contain",
|
|
1490
|
+
value: "contain",
|
|
1491
|
+
helperText: "The image should never get cropped"
|
|
1492
|
+
}, {
|
|
1493
|
+
label: "cover",
|
|
1494
|
+
value: "cover",
|
|
1495
|
+
helperText: "The image should fill it's box, cropping when needed"
|
|
1496
|
+
}]
|
|
1497
|
+
}, {
|
|
1498
|
+
name: "backgroundPosition",
|
|
1499
|
+
type: "text",
|
|
1500
|
+
defaultValue: "center",
|
|
1501
|
+
enum: ["center", "top", "left", "right", "bottom", "top left", "top right", "bottom left", "bottom right"]
|
|
1502
|
+
}, {
|
|
1503
|
+
name: "altText",
|
|
1504
|
+
type: "string",
|
|
1505
|
+
helperText: "Text to display when the user has images off"
|
|
1506
|
+
}, {
|
|
1507
|
+
name: "title",
|
|
1508
|
+
type: "string",
|
|
1509
|
+
helperText: "Text to display when hovering over the asset"
|
|
1510
|
+
}, {
|
|
1511
|
+
name: "aspectRatio",
|
|
1512
|
+
type: "number",
|
|
1513
|
+
helperText: "This is the ratio of height/width, e.g. set to 1.5 for a 300px wide and 200px tall photo. Set to 0 to not force the image to maintain it's aspect ratio",
|
|
1514
|
+
advanced: !0,
|
|
1515
|
+
defaultValue: 0.7041
|
|
1486
1516
|
}],
|
|
1487
|
-
noWrap: !0
|
|
1488
|
-
|
|
1489
|
-
}, kt = C(() => import("./img-3bb375bf.js")), Ct = {
|
|
1517
|
+
noWrap: !0
|
|
1518
|
+
}, kt = C(() => import("./img-194b08ce.js")), Ct = {
|
|
1490
1519
|
name: "Video",
|
|
1491
1520
|
canHaveChildren: !0,
|
|
1492
1521
|
defaultStyles: {
|
|
@@ -1794,7 +1823,7 @@ const Nt = (e, t, n = !0) => {
|
|
|
1794
1823
|
builderElementIndex: n && o ? [].slice.call(document.getElementsByClassName(o)).indexOf(n) : void 0
|
|
1795
1824
|
}
|
|
1796
1825
|
};
|
|
1797
|
-
}, Lt = ["svelte", "qwik", "vue"], le = () => Lt.includes(F) && (
|
|
1826
|
+
}, Lt = ["svelte", "qwik", "vue"], le = () => Lt.includes(F) && (_() || ue()), Bt = (e) => {
|
|
1798
1827
|
var l, a;
|
|
1799
1828
|
const t = e.family + (e.kind && !e.kind.includes("#") ? ", " + e.kind : ""), n = t.split(",")[0], o = (a = e.fileUrl) != null ? a : (l = e == null ? void 0 : e.files) == null ? void 0 : l.regular;
|
|
1800
1829
|
let r = "";
|
|
@@ -1820,11 +1849,11 @@ font-weight: ${i};
|
|
|
1820
1849
|
`.trim());
|
|
1821
1850
|
}
|
|
1822
1851
|
return r;
|
|
1823
|
-
},
|
|
1852
|
+
}, Ut = ({
|
|
1824
1853
|
customFonts: e
|
|
1825
1854
|
}) => {
|
|
1826
1855
|
var t;
|
|
1827
|
-
return ((t = e == null ? void 0 : e.map((n) =>
|
|
1856
|
+
return ((t = e == null ? void 0 : e.map((n) => Bt(n))) == null ? void 0 : t.join(" ")) || "";
|
|
1828
1857
|
}, Ht = ({
|
|
1829
1858
|
cssCode: e,
|
|
1830
1859
|
contentId: t
|
|
@@ -1849,37 +1878,42 @@ font-weight: ${i};
|
|
|
1849
1878
|
function Mt(e) {
|
|
1850
1879
|
var Z, ee, te;
|
|
1851
1880
|
const t = Y(null);
|
|
1852
|
-
k(() => !1)
|
|
1881
|
+
k(() => !1), k(
|
|
1882
|
+
() => e.builderContextSignal
|
|
1883
|
+
);
|
|
1853
1884
|
const [n, o] = k(() => null), [r, l] = k(() => "");
|
|
1854
|
-
function a(c) {
|
|
1855
|
-
var
|
|
1856
|
-
const
|
|
1885
|
+
function a(c, h) {
|
|
1886
|
+
var y, p;
|
|
1887
|
+
const f = {
|
|
1857
1888
|
...e.builderContextSignal.rootState,
|
|
1858
1889
|
...c
|
|
1859
1890
|
};
|
|
1860
|
-
e.builderContextSignal.rootSetState ? (
|
|
1861
|
-
...
|
|
1862
|
-
rootState:
|
|
1891
|
+
e.builderContextSignal.rootSetState ? (p = (y = e.builderContextSignal).rootSetState) == null || p.call(y, f) : e.setBuilderContextSignal((b) => ({
|
|
1892
|
+
...b,
|
|
1893
|
+
rootState: f
|
|
1894
|
+
})), e.builderContextSignal.rootSetState ? e.builderContextSignal.rootSetState(f) : e.setBuilderContextSignal((b) => ({
|
|
1895
|
+
...b,
|
|
1896
|
+
rootState: f
|
|
1863
1897
|
}));
|
|
1864
1898
|
}
|
|
1865
|
-
function i(c) {
|
|
1866
|
-
var
|
|
1867
|
-
const
|
|
1899
|
+
function i(c, h) {
|
|
1900
|
+
var y, p, b, P, $;
|
|
1901
|
+
const f = {
|
|
1868
1902
|
...e.builderContextSignal.content,
|
|
1869
1903
|
...c,
|
|
1870
1904
|
data: {
|
|
1871
|
-
...(
|
|
1905
|
+
...(y = e.builderContextSignal.content) == null ? void 0 : y.data,
|
|
1872
1906
|
...c == null ? void 0 : c.data
|
|
1873
1907
|
},
|
|
1874
1908
|
meta: {
|
|
1875
|
-
...(
|
|
1909
|
+
...(p = e.builderContextSignal.content) == null ? void 0 : p.meta,
|
|
1876
1910
|
...c == null ? void 0 : c.meta,
|
|
1877
|
-
breakpoints: ((
|
|
1911
|
+
breakpoints: ((b = c == null ? void 0 : c.meta) == null ? void 0 : b.breakpoints) || (($ = (P = e.builderContextSignal.content) == null ? void 0 : P.meta) == null ? void 0 : $.breakpoints)
|
|
1878
1912
|
}
|
|
1879
1913
|
};
|
|
1880
|
-
e.setBuilderContextSignal((
|
|
1881
|
-
...
|
|
1882
|
-
content:
|
|
1914
|
+
e.setBuilderContextSignal((v) => ({
|
|
1915
|
+
...v,
|
|
1916
|
+
content: f
|
|
1883
1917
|
}));
|
|
1884
1918
|
}
|
|
1885
1919
|
function u() {
|
|
@@ -1896,101 +1930,101 @@ function Mt(e) {
|
|
|
1896
1930
|
model: e.model,
|
|
1897
1931
|
trustedHosts: e.trustedHosts,
|
|
1898
1932
|
callbacks: {
|
|
1899
|
-
configureSdk: (
|
|
1900
|
-
var
|
|
1901
|
-
const { breakpoints:
|
|
1902
|
-
!
|
|
1933
|
+
configureSdk: (h) => {
|
|
1934
|
+
var p;
|
|
1935
|
+
const { breakpoints: f, contentId: y } = h;
|
|
1936
|
+
!y || y !== ((p = e.builderContextSignal.content) == null ? void 0 : p.id) || f && i({
|
|
1903
1937
|
meta: {
|
|
1904
|
-
breakpoints:
|
|
1938
|
+
breakpoints: f
|
|
1905
1939
|
}
|
|
1906
1940
|
});
|
|
1907
1941
|
},
|
|
1908
|
-
animation: (
|
|
1909
|
-
$e(
|
|
1942
|
+
animation: (h) => {
|
|
1943
|
+
$e(h);
|
|
1910
1944
|
},
|
|
1911
|
-
contentUpdate: (
|
|
1912
|
-
i(
|
|
1945
|
+
contentUpdate: (h, f) => {
|
|
1946
|
+
i(h);
|
|
1913
1947
|
},
|
|
1914
|
-
stateUpdate: (
|
|
1915
|
-
a(
|
|
1948
|
+
stateUpdate: (h, f) => {
|
|
1949
|
+
a(h);
|
|
1916
1950
|
}
|
|
1917
1951
|
}
|
|
1918
1952
|
})(c);
|
|
1919
1953
|
}
|
|
1920
|
-
const [T, A] = k(() => ({})), [s, d] = k(() => ({})), [D,
|
|
1954
|
+
const [T, A] = k(() => ({})), [s, d] = k(() => ({})), [D, B] = k(() => !1);
|
|
1921
1955
|
function I(c) {
|
|
1922
|
-
var
|
|
1956
|
+
var h, f;
|
|
1923
1957
|
if (e.builderContextSignal.content) {
|
|
1924
|
-
const
|
|
1958
|
+
const y = (h = e.builderContextSignal.content) == null ? void 0 : h.testVariationId, p = (f = e.builderContextSignal.content) == null ? void 0 : f.id;
|
|
1925
1959
|
ne({
|
|
1926
1960
|
apiHost: e.apiHost,
|
|
1927
1961
|
type: "click",
|
|
1928
1962
|
canTrack: j(e.canTrack),
|
|
1929
|
-
contentId:
|
|
1963
|
+
contentId: p,
|
|
1930
1964
|
apiKey: e.apiKey,
|
|
1931
|
-
variationId:
|
|
1965
|
+
variationId: y !== p ? y : void 0,
|
|
1932
1966
|
..._t(c),
|
|
1933
1967
|
unique: !D
|
|
1934
1968
|
});
|
|
1935
1969
|
}
|
|
1936
|
-
D ||
|
|
1970
|
+
D || B(!0);
|
|
1937
1971
|
}
|
|
1938
1972
|
function w() {
|
|
1939
|
-
var
|
|
1940
|
-
const c = (
|
|
1973
|
+
var h, f, y;
|
|
1974
|
+
const c = (y = (f = (h = e.builderContextSignal.content) == null ? void 0 : h.data) == null ? void 0 : f.httpRequests) != null ? y : {};
|
|
1941
1975
|
Object.entries(c).forEach(
|
|
1942
|
-
([
|
|
1943
|
-
if (!
|
|
1976
|
+
([p, b]) => {
|
|
1977
|
+
if (!b)
|
|
1944
1978
|
return;
|
|
1945
|
-
const P = typeof
|
|
1946
|
-
if (s[
|
|
1979
|
+
const P = typeof b == "object" && b["@type"] === "@builder.io/core:Request";
|
|
1980
|
+
if (s[p] || T[p] && !_())
|
|
1947
1981
|
return;
|
|
1948
|
-
const
|
|
1949
|
-
s[
|
|
1950
|
-
const
|
|
1982
|
+
const $ = P ? b.request.url : b;
|
|
1983
|
+
s[p] = !0;
|
|
1984
|
+
const v = $.replace(
|
|
1951
1985
|
/{{([^}]+)}}/g,
|
|
1952
|
-
(E,
|
|
1986
|
+
(E, U) => String(
|
|
1953
1987
|
de({
|
|
1954
|
-
code:
|
|
1988
|
+
code: U,
|
|
1955
1989
|
context: e.context || {},
|
|
1956
1990
|
localState: void 0,
|
|
1957
1991
|
rootState: e.builderContextSignal.rootState,
|
|
1958
1992
|
rootSetState: e.builderContextSignal.rootSetState
|
|
1959
1993
|
})
|
|
1960
1994
|
)
|
|
1961
|
-
),
|
|
1962
|
-
url:
|
|
1963
|
-
method:
|
|
1964
|
-
headers:
|
|
1965
|
-
body:
|
|
1995
|
+
), x = P ? {
|
|
1996
|
+
url: v,
|
|
1997
|
+
method: b.request.method,
|
|
1998
|
+
headers: b.request.headers,
|
|
1999
|
+
body: b.request.body
|
|
1966
2000
|
} : {
|
|
1967
|
-
url:
|
|
2001
|
+
url: v,
|
|
1968
2002
|
method: "GET"
|
|
1969
2003
|
};
|
|
1970
|
-
ke(JSON.stringify(
|
|
2004
|
+
ke(JSON.stringify(x));
|
|
1971
2005
|
const W = {
|
|
1972
|
-
method:
|
|
1973
|
-
headers:
|
|
1974
|
-
body:
|
|
2006
|
+
method: x.method,
|
|
2007
|
+
headers: x.headers,
|
|
2008
|
+
body: x.body
|
|
1975
2009
|
};
|
|
1976
|
-
|
|
2010
|
+
x.method === "GET" && delete W.body, fetch(x.url, W).then((E) => E.json()).then((E) => {
|
|
1977
2011
|
a({
|
|
1978
|
-
[
|
|
1979
|
-
}), T[
|
|
2012
|
+
[p]: E
|
|
2013
|
+
}), T[p] = !0;
|
|
1980
2014
|
}).catch((E) => {
|
|
1981
2015
|
console.error(
|
|
1982
2016
|
"error fetching dynamic data",
|
|
1983
|
-
JSON.stringify(
|
|
2017
|
+
JSON.stringify(b),
|
|
1984
2018
|
E
|
|
1985
2019
|
);
|
|
1986
2020
|
}).finally(() => {
|
|
1987
|
-
s[
|
|
2021
|
+
s[p] = !1;
|
|
1988
2022
|
});
|
|
1989
2023
|
}
|
|
1990
2024
|
);
|
|
1991
2025
|
}
|
|
1992
2026
|
function V() {
|
|
1993
|
-
|
|
2027
|
+
_() && window.dispatchEvent(
|
|
1994
2028
|
new CustomEvent(
|
|
1995
2029
|
"builder:component:stateChange",
|
|
1996
2030
|
{
|
|
@@ -2006,9 +2040,9 @@ function Mt(e) {
|
|
|
2006
2040
|
}
|
|
2007
2041
|
const X = Y(!1);
|
|
2008
2042
|
return X.current || (w(), V(), X.current = !0), N(() => {
|
|
2009
|
-
var c,
|
|
2043
|
+
var c, h, f, y, p;
|
|
2010
2044
|
if (L()) {
|
|
2011
|
-
|
|
2045
|
+
_() && !e.isNestedRender && (window.addEventListener("message", R), ve({
|
|
2012
2046
|
...e.locale ? {
|
|
2013
2047
|
locale: e.locale
|
|
2014
2048
|
} : {},
|
|
@@ -2022,46 +2056,46 @@ function Mt(e) {
|
|
|
2022
2056
|
apiKey: e.apiKey
|
|
2023
2057
|
}), Object.values(
|
|
2024
2058
|
e.builderContextSignal.componentInfos
|
|
2025
|
-
).forEach((
|
|
2026
|
-
var
|
|
2027
|
-
if (!((
|
|
2028
|
-
const E = xe(
|
|
2059
|
+
).forEach((v) => {
|
|
2060
|
+
var x, W;
|
|
2061
|
+
if (!((x = v.models) != null && x.length) || v.models.includes(e.model)) {
|
|
2062
|
+
const E = xe(v);
|
|
2029
2063
|
(W = window.parent) == null || W.postMessage(E, "*");
|
|
2030
2064
|
}
|
|
2031
2065
|
}), window.addEventListener(
|
|
2032
2066
|
"builder:component:stateChangeListenerActivated",
|
|
2033
2067
|
V
|
|
2034
2068
|
));
|
|
2035
|
-
const
|
|
2036
|
-
name: `builder.tests.${(
|
|
2069
|
+
const b = e.builderContextSignal.content && j(e.canTrack), P = Se({
|
|
2070
|
+
name: `builder.tests.${(h = e.builderContextSignal.content) == null ? void 0 : h.id}`,
|
|
2037
2071
|
canTrack: !0
|
|
2038
|
-
}),
|
|
2039
|
-
if (
|
|
2040
|
-
const
|
|
2072
|
+
}), $ = (f = e.builderContextSignal.content) == null ? void 0 : f.testVariationId;
|
|
2073
|
+
if (b && $ === P) {
|
|
2074
|
+
const v = (y = e.builderContextSignal.content) == null ? void 0 : y.id, x = e.apiKey;
|
|
2041
2075
|
ne({
|
|
2042
2076
|
apiHost: e.apiHost,
|
|
2043
2077
|
type: "impression",
|
|
2044
2078
|
canTrack: !0,
|
|
2045
|
-
contentId:
|
|
2046
|
-
apiKey:
|
|
2047
|
-
variationId: P !==
|
|
2079
|
+
contentId: v,
|
|
2080
|
+
apiKey: x,
|
|
2081
|
+
variationId: P !== v ? P : void 0
|
|
2048
2082
|
});
|
|
2049
2083
|
}
|
|
2050
|
-
if (ue() &&
|
|
2051
|
-
const
|
|
2052
|
-
`builder.overrides.${
|
|
2053
|
-
), E =
|
|
2054
|
-
(
|
|
2084
|
+
if (ue() && !_()) {
|
|
2085
|
+
const v = new URL(location.href).searchParams, x = v.get("builder.preview"), W = v.get(
|
|
2086
|
+
`builder.overrides.${x}`
|
|
2087
|
+
), E = v.get("apiKey") || v.get("builder.space");
|
|
2088
|
+
(x === "BUILDER_STUDIO" || x === e.model && E === e.apiKey && (!e.content || W === e.content.id)) && Te({
|
|
2055
2089
|
model: e.model,
|
|
2056
2090
|
apiKey: e.apiKey,
|
|
2057
2091
|
apiVersion: e.builderContextSignal.apiVersion,
|
|
2058
|
-
...
|
|
2092
|
+
...x === "BUILDER_STUDIO" && ((p = e.context) != null && p.symbolId) ? {
|
|
2059
2093
|
query: {
|
|
2060
2094
|
id: e.context.symbolId
|
|
2061
2095
|
}
|
|
2062
2096
|
} : {}
|
|
2063
|
-
}).then((
|
|
2064
|
-
|
|
2097
|
+
}).then((U) => {
|
|
2098
|
+
U && i(U);
|
|
2065
2099
|
});
|
|
2066
2100
|
}
|
|
2067
2101
|
}
|
|
@@ -2114,7 +2148,7 @@ ${Ht({
|
|
|
2114
2148
|
cssCode: e.cssCode,
|
|
2115
2149
|
contentId: e.contentId
|
|
2116
2150
|
})}
|
|
2117
|
-
${
|
|
2151
|
+
${Ut({
|
|
2118
2152
|
customFonts: e.customFonts
|
|
2119
2153
|
})}
|
|
2120
2154
|
${qt(e.isNestedRender)}
|
|
@@ -2158,7 +2192,7 @@ const zt = ({
|
|
|
2158
2192
|
meta: e == null ? void 0 : e.meta
|
|
2159
2193
|
} : void 0;
|
|
2160
2194
|
function se(e) {
|
|
2161
|
-
var m, g, R, T, A, s, d, D,
|
|
2195
|
+
var m, g, R, T, A, s, d, D, B;
|
|
2162
2196
|
const [t, n] = k(
|
|
2163
2197
|
() => {
|
|
2164
2198
|
var I, w;
|
|
@@ -2284,9 +2318,9 @@ function se(e) {
|
|
|
2284
2318
|
}
|
|
2285
2319
|
),
|
|
2286
2320
|
/* @__PURE__ */ S(
|
|
2287
|
-
|
|
2321
|
+
Be,
|
|
2288
2322
|
{
|
|
2289
|
-
blocks: (
|
|
2323
|
+
blocks: (B = (D = a.content) == null ? void 0 : D.data) == null ? void 0 : B.blocks,
|
|
2290
2324
|
context: a,
|
|
2291
2325
|
registeredComponents: r,
|
|
2292
2326
|
linkComponent: e.linkComponent
|