@builder.io/sdk-react 4.0.7 → 4.0.8
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 +13 -13
- package/lib/browser/blocks-exports.mjs +613 -605
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-4c650ff5.cjs → server-entry-8ea5d047.cjs} +1 -1
- package/lib/browser/{server-entry-e70c12ff.js → server-entry-d0b98fb0.js} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{accordion-742ca147.js → accordion-8ef468e5.js} +1 -1
- package/lib/edge/{accordion-c97e6506.cjs → accordion-94839d7d.cjs} +1 -1
- package/lib/edge/{blocks-2a015bd6.js → blocks-548ec8c2.js} +879 -876
- package/lib/edge/{blocks-70894a53.cjs → blocks-7e8837dc.cjs} +15 -15
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-deecd9b5.js → button-09f38c2e.js} +2 -2
- package/lib/edge/{button-6a072716.cjs → button-66c37b9c.cjs} +1 -1
- package/lib/edge/{columns-0e9b2bf4.js → columns-42cbe467.js} +3 -3
- package/lib/edge/{columns-02352a9f.cjs → columns-67ded4b4.cjs} +1 -1
- package/lib/edge/{content-variants-6948115a.js → content-variants-5a4eecaf.js} +12 -12
- package/lib/edge/{content-variants-41781d1f.cjs → content-variants-cf107f82.cjs} +1 -1
- package/lib/edge/{custom-code-73f76f76.js → custom-code-cf216b27.js} +1 -1
- package/lib/edge/{custom-code-77f98605.cjs → custom-code-ea534e98.cjs} +1 -1
- package/lib/edge/{embed-26470ea1.js → embed-12b85639.js} +1 -1
- package/lib/edge/{embed-9aaf87f9.cjs → embed-7ca4af6e.cjs} +1 -1
- package/lib/edge/{form-0213200e.cjs → form-85ea06df.cjs} +1 -1
- package/lib/edge/{form-652ef8a9.js → form-f1188ad2.js} +3 -3
- package/lib/edge/{get-class-prop-name-8647a440.cjs → get-class-prop-name-316a93c9.cjs} +1 -1
- package/lib/edge/{get-class-prop-name-1a003fac.js → get-class-prop-name-90df5962.js} +1 -1
- package/lib/edge/{img-f0b9e982.cjs → img-81a7f4d7.cjs} +1 -1
- package/lib/edge/{img-2d35513d.js → img-ee2838af.js} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-e61cf32f.cjs → input-231ec63f.cjs} +1 -1
- package/lib/edge/{input-cdd96bc7.js → input-b8907c7d.js} +1 -1
- package/lib/edge/{personalization-container-e1f03976.js → personalization-container-896a298a.js} +4 -4
- package/lib/edge/{personalization-container-4f73fbdf.cjs → personalization-container-95cba946.cjs} +1 -1
- package/lib/edge/{select-f1165866.cjs → select-b1650a75.cjs} +1 -1
- package/lib/edge/{select-de96bdc0.js → select-ffee7a69.js} +1 -1
- package/lib/edge/{server-entry-10ca8502.cjs → server-entry-1b560ddb.cjs} +1 -1
- package/lib/edge/{server-entry-637ed5ff.js → server-entry-e9974799.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-3ecf31d9.cjs → slot-ddddba8d.cjs} +1 -1
- package/lib/edge/{slot-72846242.js → slot-fe93ec42.js} +3 -3
- package/lib/edge/symbol-c266ba83.js +90 -0
- package/lib/edge/symbol-d9175a66.cjs +1 -0
- package/lib/edge/{tabs-ea0258b8.js → tabs-3481a6f6.js} +3 -3
- package/lib/edge/{tabs-788974d9.cjs → tabs-f76f757a.cjs} +1 -1
- package/lib/node/blocks-exports.cjs +17 -17
- package/lib/node/blocks-exports.mjs +426 -418
- 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/node/{server-entry-e76904a8.cjs → server-entry-03fc1c6d.cjs} +1 -1
- package/lib/node/{server-entry-7167da7c.js → server-entry-2b91f2d9.js} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/lib/node/{setIvm-e89d1a08.cjs → setIvm-26e766c5.cjs} +1 -1
- package/lib/node/{setIvm-72c91afa.js → setIvm-419a94e0.js} +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-09a401d5.js → should-force-browser-runtime-in-node-67506521.js} +1 -1
- package/lib/node/{should-force-browser-runtime-in-node-b3e23348.cjs → should-force-browser-runtime-in-node-fe3d9cb0.cjs} +1 -1
- package/package.json +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/lib/edge/symbol-49ed2192.cjs +0 -1
- package/lib/edge/symbol-61a3651b.js +0 -85
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("./blocks-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("./blocks-7e8837dc.cjs");require("react");require("./blocks-exports.cjs");require("./server-entry-1b560ddb.cjs");require("./get-class-prop-name-316a93c9.cjs");require("./dynamic-renderer-b29b45ca.cjs");function u(e){var t,n,r;return o.jsx("div",{style:{pointerEvents:"auto"},...!((t=e.builderContext.context)!=null&&t.symbolId)&&{"builder-slot":e.name},children:o.jsx(i.Blocks,{parent:(n=e.builderContext.context)==null?void 0:n.symbolId,path:`symbol.data.${e.name}`,context:e.builderContext,registeredComponents:e.builderComponents,blocks:(r=e.builderContext.rootState)==null?void 0:r[e.name]})})}exports.default=u;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { Blocks as m } from "./blocks-
|
|
2
|
+
import { Blocks as m } from "./blocks-548ec8c2.js";
|
|
3
3
|
import "react";
|
|
4
4
|
import "./blocks-exports.mjs";
|
|
5
|
-
import "./server-entry-
|
|
6
|
-
import "./get-class-prop-name-
|
|
5
|
+
import "./server-entry-e9974799.js";
|
|
6
|
+
import "./get-class-prop-name-90df5962.js";
|
|
7
7
|
import "./dynamic-renderer-8b343325.js";
|
|
8
8
|
function c(t) {
|
|
9
9
|
var e, o, n;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b, useEffect as f } from "react";
|
|
3
|
+
import { Content as x } from "./blocks-exports.mjs";
|
|
4
|
+
import { getClassPropName as K } from "./get-class-prop-name-90df5962.js";
|
|
5
|
+
import { fetchOneEntry as S, logger as E } from "./server-entry-e9974799.js";
|
|
6
|
+
const N = async ({
|
|
7
|
+
builderContextValue: t,
|
|
8
|
+
symbol: n
|
|
9
|
+
}) => {
|
|
10
|
+
if (n != null && n.model && // This is a hack, we should not need to check for this, but it is needed for Svelte.
|
|
11
|
+
(t != null && t.apiKey))
|
|
12
|
+
return S({
|
|
13
|
+
model: n.model,
|
|
14
|
+
apiKey: t.apiKey,
|
|
15
|
+
apiVersion: t.apiVersion,
|
|
16
|
+
...(n == null ? void 0 : n.entry) && {
|
|
17
|
+
query: {
|
|
18
|
+
id: n.entry
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}).catch((r) => {
|
|
22
|
+
E.error("Could not fetch symbol content: ", r);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
function T(t) {
|
|
26
|
+
var a, c, l, m, d;
|
|
27
|
+
function n() {
|
|
28
|
+
return "div";
|
|
29
|
+
}
|
|
30
|
+
function r() {
|
|
31
|
+
return "div";
|
|
32
|
+
}
|
|
33
|
+
function s() {
|
|
34
|
+
var e, o;
|
|
35
|
+
return [
|
|
36
|
+
t.attributes[K()],
|
|
37
|
+
"builder-symbol",
|
|
38
|
+
(e = t.symbol) != null && e.inline ? "builder-inline-symbol" : void 0,
|
|
39
|
+
(o = t.symbol) != null && o.dynamic || t.dynamic ? "builder-dynamic-symbol" : void 0
|
|
40
|
+
].filter(Boolean).join(" ");
|
|
41
|
+
}
|
|
42
|
+
const [i, C] = b(() => {
|
|
43
|
+
var e;
|
|
44
|
+
return (e = t.symbol) == null ? void 0 : e.content;
|
|
45
|
+
}), [v, k] = b(() => {
|
|
46
|
+
var e;
|
|
47
|
+
return (e = t.symbol) == null ? void 0 : e.entry;
|
|
48
|
+
});
|
|
49
|
+
function h() {
|
|
50
|
+
var e;
|
|
51
|
+
i && v === ((e = t.symbol) == null ? void 0 : e.entry) || N({
|
|
52
|
+
symbol: t.symbol,
|
|
53
|
+
builderContextValue: t.builderContext
|
|
54
|
+
}).then((o) => {
|
|
55
|
+
var y;
|
|
56
|
+
o && (C(o), k((y = t.symbol) == null ? void 0 : y.entry));
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return f(() => {
|
|
60
|
+
}, []), f(() => {
|
|
61
|
+
h();
|
|
62
|
+
}, [t.symbol]), /* @__PURE__ */ u("div", { ...t.attributes, className: s(), children: /* @__PURE__ */ u(
|
|
63
|
+
x,
|
|
64
|
+
{
|
|
65
|
+
nonce: t.builderContext.nonce,
|
|
66
|
+
isNestedRender: !0,
|
|
67
|
+
apiVersion: t.builderContext.apiVersion,
|
|
68
|
+
apiKey: t.builderContext.apiKey,
|
|
69
|
+
context: {
|
|
70
|
+
...t.builderContext.context,
|
|
71
|
+
symbolId: (a = t.builderBlock) == null ? void 0 : a.id
|
|
72
|
+
},
|
|
73
|
+
customComponents: Object.values(t.builderComponents),
|
|
74
|
+
data: {
|
|
75
|
+
...(c = t.symbol) == null ? void 0 : c.data,
|
|
76
|
+
...t.builderContext.localState,
|
|
77
|
+
...(l = i == null ? void 0 : i.data) == null ? void 0 : l.state
|
|
78
|
+
},
|
|
79
|
+
canTrack: t.builderContext.canTrack,
|
|
80
|
+
model: (d = (m = t.symbol) == null ? void 0 : m.model) != null ? d : "",
|
|
81
|
+
content: i,
|
|
82
|
+
linkComponent: t.builderLinkComponent,
|
|
83
|
+
blocksWrapper: n(),
|
|
84
|
+
contentWrapper: r()
|
|
85
|
+
}
|
|
86
|
+
) });
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
T as default
|
|
90
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),o=require("react"),S=require("./blocks-exports.cjs"),E=require("./get-class-prop-name-316a93c9.cjs"),b=require("./server-entry-1b560ddb.cjs"),g=async({builderContextValue:e,symbol:n})=>{if(n!=null&&n.model&&(e!=null&&e.apiKey))return b.fetchOneEntry({model:n.model,apiKey:e.apiKey,apiVersion:e.apiVersion,...(n==null?void 0:n.entry)&&{query:{id:n.entry}}}).catch(c=>{b.logger.error("Could not fetch symbol content: ",c)})};function h(e){var a,l,u,d,s;function n(){return"div"}function c(){return"div"}function f(){var t,r;return[e.attributes[E.getClassPropName()],"builder-symbol",(t=e.symbol)!=null&&t.inline?"builder-inline-symbol":void 0,(r=e.symbol)!=null&&r.dynamic||e.dynamic?"builder-dynamic-symbol":void 0].filter(Boolean).join(" ")}const[i,C]=o.useState(()=>{var t;return(t=e.symbol)==null?void 0:t.content}),[v,k]=o.useState(()=>{var t;return(t=e.symbol)==null?void 0:t.entry});function x(){var t;i&&v===((t=e.symbol)==null?void 0:t.entry)||g({symbol:e.symbol,builderContextValue:e.builderContext}).then(r=>{var y;r&&(C(r),k((y=e.symbol)==null?void 0:y.entry))})}return o.useEffect(()=>{},[]),o.useEffect(()=>{x()},[e.symbol]),m.jsx("div",{...e.attributes,className:f(),children:m.jsx(S.Content,{nonce:e.builderContext.nonce,isNestedRender:!0,apiVersion:e.builderContext.apiVersion,apiKey:e.builderContext.apiKey,context:{...e.builderContext.context,symbolId:(a=e.builderBlock)==null?void 0:a.id},customComponents:Object.values(e.builderComponents),data:{...(l=e.symbol)==null?void 0:l.data,...e.builderContext.localState,...(u=i==null?void 0:i.data)==null?void 0:u.state},canTrack:e.builderContext.canTrack,model:(s=(d=e.symbol)==null?void 0:d.model)!=null?s:"",content:i,linkComponent:e.builderLinkComponent,blocksWrapper:n(),contentWrapper:c()})})}exports.default=h;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as u, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useState as d } from "react";
|
|
3
|
-
import { Blocks as c } from "./blocks-
|
|
3
|
+
import { Blocks as c } from "./blocks-548ec8c2.js";
|
|
4
4
|
import "./blocks-exports.mjs";
|
|
5
|
-
import "./server-entry-
|
|
6
|
-
import "./get-class-prop-name-
|
|
5
|
+
import "./server-entry-e9974799.js";
|
|
6
|
+
import "./get-class-prop-name-90df5962.js";
|
|
7
7
|
import "./dynamic-renderer-8b343325.js";
|
|
8
8
|
function y(t) {
|
|
9
9
|
var b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("react"),b=require("./blocks-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),u=require("react"),b=require("./blocks-7e8837dc.cjs");require("./blocks-exports.cjs");require("./server-entry-1b560ddb.cjs");require("./get-class-prop-name-316a93c9.cjs");require("./dynamic-renderer-b29b45ca.cjs");function s(e){var o;const[t,a]=u.useState(()=>e.defaultActiveTab?e.defaultActiveTab-1:0);function c(n){return e.tabs&&e.tabs[n].content}function r(n){n===t&&e.collapsible?a(-1):a(n)}return l.jsxs("div",{children:[l.jsx("div",{className:"builder-tabs-wrap",style:{display:"flex",flexDirection:"row",justifyContent:e.tabHeaderLayout||"flex-start",overflow:"auto"},children:(o=e.tabs)==null?void 0:o.map((n,i)=>l.jsx("span",{className:`builder-tab-wrap ${t===i?"builder-tab-active":""}`,style:{...t===i?e.activeTabStyle:{}},onClick:d=>r(i),children:l.jsx(b.Blocks,{parent:e.builderBlock.id,path:`tabs.${i}.label`,blocks:n.label,context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})},i))}),c(t)?l.jsx("div",{children:l.jsx(b.Blocks,{parent:e.builderBlock.id,path:`tabs.${t}.content`,blocks:c(t),context:e.builderContext,registeredComponents:e.builderComponents,linkComponent:e.builderLinkComponent})}):null]})}exports.default=s;
|