@builder.io/sdk-react-nextjs 0.16.18 → 0.16.20
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/columns/columns.cjs +3 -3
- package/lib/browser/blocks/columns/columns.mjs +41 -33
- package/lib/browser/components/content/components/enable-editor.cjs +1 -1
- package/lib/browser/components/content/components/enable-editor.mjs +107 -105
- package/lib/browser/components/content/content.cjs +1 -1
- package/lib/browser/components/content/content.mjs +23 -21
- package/lib/browser/components/content-variants/content-variants.cjs +1 -1
- package/lib/browser/components/content-variants/content-variants.mjs +10 -8
- package/lib/browser/constants/sdk-version.cjs +1 -1
- package/lib/browser/constants/sdk-version.mjs +1 -1
- package/lib/browser/functions/evaluate/node-runtime/node-runtime.cjs +3 -3
- package/lib/browser/functions/evaluate/node-runtime/node-runtime.mjs +16 -14
- package/lib/browser/functions/get-content/generate-content-url.cjs +1 -1
- package/lib/browser/functions/get-content/generate-content-url.mjs +24 -23
- package/lib/browser/functions/track/index.cjs +1 -1
- package/lib/browser/functions/track/index.mjs +21 -19
- package/lib/edge/blocks/columns/columns.cjs +3 -3
- package/lib/edge/blocks/columns/columns.mjs +41 -33
- package/lib/edge/components/content/components/enable-editor.cjs +1 -1
- package/lib/edge/components/content/components/enable-editor.mjs +107 -105
- package/lib/edge/components/content/content.cjs +1 -1
- package/lib/edge/components/content/content.mjs +23 -21
- package/lib/edge/components/content-variants/content-variants.cjs +1 -1
- package/lib/edge/components/content-variants/content-variants.mjs +10 -8
- package/lib/edge/constants/sdk-version.cjs +1 -1
- package/lib/edge/constants/sdk-version.mjs +1 -1
- package/lib/edge/functions/evaluate/node-runtime/node-runtime.cjs +3 -3
- package/lib/edge/functions/evaluate/node-runtime/node-runtime.mjs +16 -14
- package/lib/edge/functions/get-content/generate-content-url.cjs +1 -1
- package/lib/edge/functions/get-content/generate-content-url.mjs +24 -23
- package/lib/edge/functions/track/index.cjs +1 -1
- package/lib/edge/functions/track/index.mjs +21 -19
- package/lib/node/blocks/columns/columns.cjs +3 -3
- package/lib/node/blocks/columns/columns.mjs +41 -33
- package/lib/node/components/content/components/enable-editor.cjs +1 -1
- package/lib/node/components/content/components/enable-editor.mjs +107 -105
- package/lib/node/components/content/content.cjs +1 -1
- package/lib/node/components/content/content.mjs +23 -21
- package/lib/node/components/content-variants/content-variants.cjs +1 -1
- package/lib/node/components/content-variants/content-variants.mjs +10 -8
- package/lib/node/constants/sdk-version.cjs +1 -1
- package/lib/node/constants/sdk-version.mjs +1 -1
- package/lib/node/functions/evaluate/node-runtime/node-runtime.cjs +6 -6
- package/lib/node/functions/evaluate/node-runtime/node-runtime.mjs +20 -18
- package/lib/node/functions/get-content/generate-content-url.cjs +1 -1
- package/lib/node/functions/get-content/generate-content-url.mjs +24 -23
- package/lib/node/functions/track/index.cjs +1 -1
- package/lib/node/functions/track/index.mjs +21 -19
- package/package.json +1 -1
- package/types/cjs/components/content/components/enable-editor.d.ts +1 -1
- package/types/cjs/components/content-variants/content-variants.types.d.ts +4 -0
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/cjs/functions/evaluate/node-runtime/setIvm.d.ts +1 -0
- package/types/cjs/functions/get-content/types.d.ts +4 -0
- package/types/cjs/functions/track/index.d.ts +3 -1
- package/types/esm/components/content/components/enable-editor.d.ts +1 -1
- package/types/esm/components/content-variants/content-variants.types.d.ts +4 -0
- package/types/esm/constants/sdk-version.d.ts +1 -1
- package/types/esm/functions/evaluate/node-runtime/setIvm.d.ts +1 -0
- package/types/esm/functions/get-content/types.d.ts +4 -0
- package/types/esm/functions/track/index.d.ts +3 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SDK_NAME as
|
|
2
|
-
import { logger as j, MSG_PREFIX as
|
|
3
|
-
import { fastClone as
|
|
1
|
+
import { SDK_NAME as c } from "../../../constants/sdk-name.mjs";
|
|
2
|
+
import { logger as j, MSG_PREFIX as R } from "../../../helpers/logger.mjs";
|
|
3
|
+
import { fastClone as x } from "../../fast-clone.mjs";
|
|
4
4
|
import { set as k } from "../../set.mjs";
|
|
5
5
|
import { getFunctionArguments as A } from "../helpers.mjs";
|
|
6
6
|
import { safeDynamicRequire as h } from "./safeDynamicRequire.mjs";
|
|
@@ -51,24 +51,24 @@ if (typeof output === 'object' && output !== null) {
|
|
|
51
51
|
}
|
|
52
52
|
`;
|
|
53
53
|
};
|
|
54
|
-
let
|
|
54
|
+
let u = null, y = null;
|
|
55
55
|
const V = (e, t = {}) => {
|
|
56
|
-
|
|
57
|
-
}, O =
|
|
56
|
+
u || (u = e, E(t));
|
|
57
|
+
}, O = c === "@builder.io/sdk-react-nextjs" || c === "@builder.io/sdk-react" || c === "@builder.io/sdk-qwik" || c === "@builder.io/sdk-vue", g = () => {
|
|
58
58
|
try {
|
|
59
|
-
if (
|
|
60
|
-
return
|
|
59
|
+
if (u)
|
|
60
|
+
return u;
|
|
61
61
|
const t = h("isolated-vm");
|
|
62
62
|
if (t)
|
|
63
63
|
return t;
|
|
64
64
|
} catch (t) {
|
|
65
65
|
j.error("isolated-vm import error.", t);
|
|
66
66
|
}
|
|
67
|
-
const e = `${
|
|
67
|
+
const e = `${R}could not import \`isolated-vm\` module for safe script execution on a Node server.
|
|
68
68
|
|
|
69
69
|
SOLUTION: In a server-only execution path within your application, do one of the following:
|
|
70
70
|
|
|
71
|
-
${O ? `- import and call \`initializeNodeRuntime()\` from "${
|
|
71
|
+
${O ? `- import and call \`initializeNodeRuntime()\` from "${c}/node/init".` : ""}
|
|
72
72
|
- add the following import: \`await import('isolated-vm')\`.
|
|
73
73
|
|
|
74
74
|
For more information, visit https://builder.io/c/docs/integration-tips#enabling-data-bindings-in-node-environments`;
|
|
@@ -77,22 +77,24 @@ const V = (e, t = {}) => {
|
|
|
77
77
|
function E(e = {
|
|
78
78
|
memoryLimit: 128
|
|
79
79
|
}) {
|
|
80
|
+
if (y)
|
|
81
|
+
return y;
|
|
80
82
|
const t = g(), o = new t.Isolate(e).createContextSync(), n = o.global;
|
|
81
|
-
return n.setSync("global", n.derefInto()), n.setSync("log", function(...
|
|
82
|
-
console.log(...
|
|
83
|
+
return n.setSync("global", n.derefInto()), n.setSync("log", function(...s) {
|
|
84
|
+
console.log(...s);
|
|
83
85
|
}), n.setSync(I, t), y = o, o;
|
|
84
86
|
}
|
|
85
|
-
const $ = () =>
|
|
87
|
+
const $ = () => E(), B = ({
|
|
86
88
|
code: e,
|
|
87
89
|
builder: t,
|
|
88
90
|
context: l,
|
|
89
91
|
event: o,
|
|
90
92
|
localState: n,
|
|
91
|
-
rootSetState:
|
|
92
|
-
rootState:
|
|
93
|
+
rootSetState: s,
|
|
94
|
+
rootState: a
|
|
93
95
|
}) => {
|
|
94
|
-
const S = g(), _ =
|
|
95
|
-
...
|
|
96
|
+
const S = g(), _ = x({
|
|
97
|
+
...a,
|
|
96
98
|
...n
|
|
97
99
|
}), f = A({
|
|
98
100
|
builder: t,
|
|
@@ -101,7 +103,7 @@ const $ = () => y || E(), B = ({
|
|
|
101
103
|
state: _
|
|
102
104
|
}), m = $(), p = m.global;
|
|
103
105
|
p.setSync(b, function(r, i) {
|
|
104
|
-
k(
|
|
106
|
+
k(a, r, i), s == null || s(a);
|
|
105
107
|
}), f.forEach(([r, i]) => {
|
|
106
108
|
const N = typeof i == "object" ? new S.Reference(
|
|
107
109
|
// workaround: methods with default values for arguments is not being cloned over
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../helpers/flatten.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../../helpers/flatten.cjs"),O=require("../../helpers/search/search.cjs"),A=require("../../types/api-version.cjs"),V=require("../get-builder-search-params/index.cjs"),y=r=>typeof r=="number"&&!isNaN(r)&&r>=0,$=r=>{const{limit:l=30,userAttributes:f,query:m,model:b,apiKey:h,enrich:u,locale:d,apiVersion:a=A.DEFAULT_API_VERSION,fields:P,omit:v,offset:i,cacheSeconds:n,staleCacheSeconds:o,sort:S,includeUnpublished:g,apiHost:N}=r;if(!h)throw new Error("Missing API key");if(!["v3"].includes(a))throw new Error(`Invalid apiVersion: expected 'v3', received '${a}'`);const U=l!==1,q=N||"https://cdn.builder.io",e=new URL(`${q}/api/${a}/content/${b}`);if(e.searchParams.set("apiKey",h),e.searchParams.set("limit",String(l)),e.searchParams.set("noTraverse",String(U)),e.searchParams.set("includeRefs",String(!0)),d&&e.searchParams.set("locale",d),u&&e.searchParams.set("enrich",String(u)),e.searchParams.set("omit",v||"meta.componentsUsed"),P&&e.searchParams.set("fields",P),Number.isFinite(i)&&i>-1&&e.searchParams.set("offset",String(Math.floor(i))),typeof g=="boolean"&&e.searchParams.set("includeUnpublished",String(g)),n&&y(n)&&e.searchParams.set("cacheSeconds",String(n)),o&&y(o)&&e.searchParams.set("staleCacheSeconds",String(o)),S){const s=c.flatten({sort:S});for(const t in s)e.searchParams.set(t,JSON.stringify(s[t]))}const w={...V.getBuilderSearchParamsFromWindow(),...O.normalizeSearchParams(r.options||{})},p=c.flatten(w);for(const s in p)e.searchParams.set(s,String(p[s]));if(f&&e.searchParams.set("userAttributes",JSON.stringify(f)),m){const s=c.flattenMongoQuery({query:m});for(const t in s)e.searchParams.set(t,JSON.stringify(s[t]))}return e};exports.generateContentUrl=$;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { flatten as g, flattenMongoQuery as
|
|
2
|
-
import { normalizeSearchParams as
|
|
3
|
-
import { DEFAULT_API_VERSION as
|
|
4
|
-
import { getBuilderSearchParamsFromWindow as
|
|
5
|
-
const y = (
|
|
1
|
+
import { flatten as g, flattenMongoQuery as O } from "../../helpers/flatten.mjs";
|
|
2
|
+
import { normalizeSearchParams as k } from "../../helpers/search/search.mjs";
|
|
3
|
+
import { DEFAULT_API_VERSION as E } from "../../types/api-version.mjs";
|
|
4
|
+
import { getBuilderSearchParamsFromWindow as I } from "../get-builder-search-params/index.mjs";
|
|
5
|
+
const y = (r) => typeof r == "number" && !isNaN(r) && r >= 0, M = (r) => {
|
|
6
6
|
const {
|
|
7
7
|
limit: c = 30,
|
|
8
8
|
userAttributes: m,
|
|
@@ -11,42 +11,43 @@ const y = (s) => typeof s == "number" && !isNaN(s) && s >= 0, J = (s) => {
|
|
|
11
11
|
apiKey: l,
|
|
12
12
|
enrich: h,
|
|
13
13
|
locale: d,
|
|
14
|
-
apiVersion: a =
|
|
14
|
+
apiVersion: a = E,
|
|
15
15
|
fields: u,
|
|
16
16
|
omit: N,
|
|
17
17
|
offset: i,
|
|
18
18
|
cacheSeconds: n,
|
|
19
19
|
staleCacheSeconds: o,
|
|
20
20
|
sort: P,
|
|
21
|
-
includeUnpublished:
|
|
22
|
-
|
|
21
|
+
includeUnpublished: p,
|
|
22
|
+
apiHost: v
|
|
23
|
+
} = r;
|
|
23
24
|
if (!l)
|
|
24
25
|
throw new Error("Missing API key");
|
|
25
26
|
if (!["v3"].includes(a))
|
|
26
27
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${a}'`);
|
|
27
|
-
const
|
|
28
|
-
if (e.searchParams.set("apiKey", l), e.searchParams.set("limit", String(c)), e.searchParams.set("noTraverse", String(
|
|
29
|
-
const
|
|
28
|
+
const U = c !== 1, w = v || "https://cdn.builder.io", e = new URL(`${w}/api/${a}/content/${b}`);
|
|
29
|
+
if (e.searchParams.set("apiKey", l), e.searchParams.set("limit", String(c)), e.searchParams.set("noTraverse", String(U)), e.searchParams.set("includeRefs", String(!0)), d && e.searchParams.set("locale", d), h && e.searchParams.set("enrich", String(h)), e.searchParams.set("omit", N || "meta.componentsUsed"), u && e.searchParams.set("fields", u), Number.isFinite(i) && i > -1 && e.searchParams.set("offset", String(Math.floor(i))), typeof p == "boolean" && e.searchParams.set("includeUnpublished", String(p)), n && y(n) && e.searchParams.set("cacheSeconds", String(n)), o && y(o) && e.searchParams.set("staleCacheSeconds", String(o)), P) {
|
|
30
|
+
const s = g({
|
|
30
31
|
sort: P
|
|
31
32
|
});
|
|
32
|
-
for (const t in
|
|
33
|
-
e.searchParams.set(t, JSON.stringify(
|
|
33
|
+
for (const t in s)
|
|
34
|
+
e.searchParams.set(t, JSON.stringify(s[t]));
|
|
34
35
|
}
|
|
35
|
-
const
|
|
36
|
-
...
|
|
37
|
-
...
|
|
38
|
-
},
|
|
39
|
-
for (const
|
|
40
|
-
e.searchParams.set(
|
|
36
|
+
const A = {
|
|
37
|
+
...I(),
|
|
38
|
+
...k(r.options || {})
|
|
39
|
+
}, S = g(A);
|
|
40
|
+
for (const s in S)
|
|
41
|
+
e.searchParams.set(s, String(S[s]));
|
|
41
42
|
if (m && e.searchParams.set("userAttributes", JSON.stringify(m)), f) {
|
|
42
|
-
const
|
|
43
|
+
const s = O({
|
|
43
44
|
query: f
|
|
44
45
|
});
|
|
45
|
-
for (const t in
|
|
46
|
-
e.searchParams.set(t, JSON.stringify(
|
|
46
|
+
for (const t in s)
|
|
47
|
+
e.searchParams.set(t, JSON.stringify(s[t]));
|
|
47
48
|
}
|
|
48
49
|
return e;
|
|
49
50
|
};
|
|
50
51
|
export {
|
|
51
|
-
|
|
52
|
+
M as generateContentUrl
|
|
52
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../constants/target.cjs"),a=require("../../helpers/logger.cjs"),c=require("../../helpers/sdk-headers.cjs"),d=require("../../helpers/sessionId.cjs"),u=require("../../helpers/visitorId.cjs"),g=require("../is-browser.cjs"),l=require("../is-editing.cjs"),y=require("./helpers.cjs"),I=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await d.getSessionId({canTrack:e}),r=u.getVisitorId({canTrack:e});return{sessionId:t,visitorId:r}},k=async({type:e,canTrack:t,apiKey:r,metadata:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../constants/target.cjs"),a=require("../../helpers/logger.cjs"),c=require("../../helpers/sdk-headers.cjs"),d=require("../../helpers/sessionId.cjs"),u=require("../../helpers/visitorId.cjs"),g=require("../is-browser.cjs"),l=require("../is-editing.cjs"),y=require("./helpers.cjs"),I=async({canTrack:e})=>{if(!e)return{visitorId:void 0,sessionId:void 0};const t=await d.getSessionId({canTrack:e}),r=u.getVisitorId({canTrack:e});return{sessionId:t,visitorId:r}},k=async({type:e,canTrack:t,apiKey:r,metadata:i,...o})=>({type:e,data:{...o,metadata:{url:location.href,...i},...await I({canTrack:t}),userAttributes:y.getUserAttributes(),ownerId:r}});async function s({apiHost:e,...t}){if(!t.apiKey){a.logger.error("Missing API key for track call. Please provide your API key.");return}return!t.canTrack||l.isEditing()||!(g.isBrowser()||n.TARGET==="reactNative")?void 0:fetch(`${e||"https://cdn.builder.io"}/api/v1/track`,{method:"POST",body:JSON.stringify({events:[await k(t)]}),headers:{"content-type":"application/json",...c.getSdkHeaders()},mode:"cors"}).catch(i=>{console.error("Failed to track: ",i)})}const f=e=>s({...e,canTrack:!0});exports._track=s;exports.track=f;
|
|
@@ -23,7 +23,7 @@ const u = async ({
|
|
|
23
23
|
sessionId: r,
|
|
24
24
|
visitorId: e
|
|
25
25
|
};
|
|
26
|
-
},
|
|
26
|
+
}, l = async ({
|
|
27
27
|
type: t,
|
|
28
28
|
canTrack: r,
|
|
29
29
|
apiKey: e,
|
|
@@ -44,31 +44,33 @@ const u = async ({
|
|
|
44
44
|
ownerId: e
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
-
async function
|
|
48
|
-
|
|
47
|
+
async function y({
|
|
48
|
+
apiHost: t,
|
|
49
|
+
...r
|
|
50
|
+
}) {
|
|
51
|
+
if (!r.apiKey) {
|
|
49
52
|
s.error("Missing API key for track call. Please provide your API key.");
|
|
50
53
|
return;
|
|
51
54
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
});
|
|
55
|
+
return !r.canTrack || f() || !(m() || a === "reactNative") ? void 0 : fetch(`${t || "https://cdn.builder.io"}/api/v1/track`, {
|
|
56
|
+
method: "POST",
|
|
57
|
+
body: JSON.stringify({
|
|
58
|
+
events: [await l(r)]
|
|
59
|
+
}),
|
|
60
|
+
headers: {
|
|
61
|
+
"content-type": "application/json",
|
|
62
|
+
...n()
|
|
63
|
+
},
|
|
64
|
+
mode: "cors"
|
|
65
|
+
}).catch((o) => {
|
|
66
|
+
console.error("Failed to track: ", o);
|
|
67
|
+
});
|
|
66
68
|
}
|
|
67
|
-
const E = (t) =>
|
|
69
|
+
const E = (t) => y({
|
|
68
70
|
...t,
|
|
69
71
|
canTrack: !0
|
|
70
72
|
});
|
|
71
73
|
export {
|
|
72
|
-
|
|
74
|
+
y as _track,
|
|
73
75
|
E as track
|
|
74
76
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-react-nextjs",
|
|
3
3
|
"description": "Builder.io RSC SDK for NextJS App Directory",
|
|
4
|
-
"version": "0.16.
|
|
4
|
+
"version": "0.16.20",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/builder/tree/main/packages/sdks/output/nextjs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "apiVersion" | "isSsrAbTest" | "blocksWrapper" | "blocksWrapperProps" | "
|
|
2
|
+
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "apiVersion" | "isSsrAbTest" | "blocksWrapper" | "blocksWrapperProps" | "linkComponent"> & {
|
|
3
3
|
builderContextSignal: BuilderContextInterface;
|
|
4
4
|
setBuilderContextSignal?: (signal: any) => any;
|
|
5
5
|
children?: any;
|
|
@@ -26,6 +26,10 @@ export interface ContentVariantsPrps extends ExtraFrameworkProps {
|
|
|
26
26
|
* Your API Key: needed to enable visual editing, and to dynamically fetch symbols (required).
|
|
27
27
|
*/
|
|
28
28
|
apiKey: string;
|
|
29
|
+
/**
|
|
30
|
+
* Sets the host of Builder API calls. (Defaults to global `https://cdn.builder.io`)
|
|
31
|
+
*/
|
|
32
|
+
apiHost?: string;
|
|
29
33
|
apiVersion?: ApiVersion;
|
|
30
34
|
/**
|
|
31
35
|
* An array of custom components to register (optional).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.16.
|
|
1
|
+
export declare const SDK_VERSION = "0.16.20";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { setIvm } from './node-runtime.js';
|
|
@@ -136,4 +136,8 @@ export interface GetContentOptions {
|
|
|
136
136
|
* Optional fetch options to be passed as the second argument to the `fetch` function.
|
|
137
137
|
*/
|
|
138
138
|
fetchOptions?: object;
|
|
139
|
+
/**
|
|
140
|
+
* Sets the host of Builder API calls. (Defaults to global `https://cdn.builder.io`)
|
|
141
|
+
*/
|
|
142
|
+
apiHost?: string;
|
|
139
143
|
}
|
|
@@ -46,6 +46,8 @@ type EventProperties = Pick<Event, 'type'> & Pick<Event['data'], 'contentId' | '
|
|
|
46
46
|
[index: string]: any;
|
|
47
47
|
};
|
|
48
48
|
export type EventProps = EventProperties & CanTrack;
|
|
49
|
-
export declare function _track(eventProps: EventProps
|
|
49
|
+
export declare function _track({ apiHost, ...eventProps }: EventProps & {
|
|
50
|
+
apiHost?: string;
|
|
51
|
+
}): Promise<void | Response>;
|
|
50
52
|
export declare const track: (args: EventProperties) => Promise<void | Response>;
|
|
51
53
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "apiVersion" | "isSsrAbTest" | "blocksWrapper" | "blocksWrapperProps" | "
|
|
2
|
+
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "apiVersion" | "isSsrAbTest" | "blocksWrapper" | "blocksWrapperProps" | "linkComponent"> & {
|
|
3
3
|
builderContextSignal: BuilderContextInterface;
|
|
4
4
|
setBuilderContextSignal?: (signal: any) => any;
|
|
5
5
|
children?: any;
|
|
@@ -26,6 +26,10 @@ export interface ContentVariantsPrps extends ExtraFrameworkProps {
|
|
|
26
26
|
* Your API Key: needed to enable visual editing, and to dynamically fetch symbols (required).
|
|
27
27
|
*/
|
|
28
28
|
apiKey: string;
|
|
29
|
+
/**
|
|
30
|
+
* Sets the host of Builder API calls. (Defaults to global `https://cdn.builder.io`)
|
|
31
|
+
*/
|
|
32
|
+
apiHost?: string;
|
|
29
33
|
apiVersion?: ApiVersion;
|
|
30
34
|
/**
|
|
31
35
|
* An array of custom components to register (optional).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.16.
|
|
1
|
+
export declare const SDK_VERSION = "0.16.20";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { setIvm } from './node-runtime.js';
|
|
@@ -136,4 +136,8 @@ export interface GetContentOptions {
|
|
|
136
136
|
* Optional fetch options to be passed as the second argument to the `fetch` function.
|
|
137
137
|
*/
|
|
138
138
|
fetchOptions?: object;
|
|
139
|
+
/**
|
|
140
|
+
* Sets the host of Builder API calls. (Defaults to global `https://cdn.builder.io`)
|
|
141
|
+
*/
|
|
142
|
+
apiHost?: string;
|
|
139
143
|
}
|
|
@@ -46,6 +46,8 @@ type EventProperties = Pick<Event, 'type'> & Pick<Event['data'], 'contentId' | '
|
|
|
46
46
|
[index: string]: any;
|
|
47
47
|
};
|
|
48
48
|
export type EventProps = EventProperties & CanTrack;
|
|
49
|
-
export declare function _track(eventProps: EventProps
|
|
49
|
+
export declare function _track({ apiHost, ...eventProps }: EventProps & {
|
|
50
|
+
apiHost?: string;
|
|
51
|
+
}): Promise<void | Response>;
|
|
50
52
|
export declare const track: (args: EventProperties) => Promise<void | Response>;
|
|
51
53
|
export {};
|