@builder.io/sdk-react 1.0.19-dev-0 → 1.0.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-exports.cjs +13 -13
- package/lib/browser/blocks-exports.mjs +339 -349
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{server-entry-cfff49d1.js → server-entry-a562cf23.js} +1 -1
- package/lib/browser/{server-entry-1a86f409.cjs → server-entry-a77461d4.cjs} +1 -1
- package/lib/browser/server-entry.cjs +1 -1
- package/lib/browser/server-entry.mjs +1 -1
- package/lib/edge/{blocks-87a3568e.cjs → blocks-523eb4f1.cjs} +4 -4
- package/lib/edge/{blocks-03aafa4f.js → blocks-683aad9f.js} +26 -26
- package/lib/edge/blocks-exports.cjs +1 -1
- package/lib/edge/blocks-exports.mjs +2 -2
- package/lib/edge/{button-58695538.cjs → button-0d418bcf.cjs} +1 -1
- package/lib/edge/{button-14d13356.js → button-9f6acf3e.js} +3 -3
- package/lib/edge/{columns-f98bd830.cjs → columns-1613d62d.cjs} +2 -2
- package/lib/edge/{columns-d2f7e212.js → columns-b0785992.js} +33 -33
- package/lib/edge/{content-variants-ad9f707f.js → content-variants-13f821c6.js} +68 -68
- package/lib/edge/{content-variants-7e661199.cjs → content-variants-281298f6.cjs} +5 -5
- package/lib/edge/dynamic-renderer-8b343325.js +8 -0
- package/lib/edge/{dynamic-renderer-1c9f24c0.cjs → dynamic-renderer-b29b45ca.cjs} +1 -1
- package/lib/edge/form-0483aa64.cjs +1 -0
- package/lib/edge/{form-04cf10db.js → form-db27fc26.js} +56 -66
- package/lib/edge/{get-class-prop-name-859a7f60.js → get-class-prop-name-6bfc4756.js} +1 -1
- package/lib/edge/{get-class-prop-name-f1301669.cjs → get-class-prop-name-e3ba0522.cjs} +1 -1
- package/lib/edge/{image-2cc909d9.js → image-0008c792.js} +25 -25
- package/lib/edge/image-ee3dd857.cjs +17 -0
- package/lib/edge/{img-b4ff1bef.js → img-43a8ffe0.js} +1 -1
- package/lib/edge/{img-0c1e53c0.cjs → img-f01d904d.cjs} +1 -1
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/edge/{input-c6fee09c.js → input-805a9ac6.js} +1 -1
- package/lib/edge/{input-2103da14.cjs → input-e6483bd7.cjs} +1 -1
- package/lib/edge/select-4966723f.js +20 -0
- package/lib/edge/select-e5d1e627.cjs +1 -0
- package/lib/edge/{server-entry-00891f33.cjs → server-entry-83648311.cjs} +1 -1
- package/lib/edge/{server-entry-d46a218d.js → server-entry-c13e82bd.js} +1 -1
- package/lib/edge/server-entry.cjs +1 -1
- package/lib/edge/server-entry.mjs +1 -1
- package/lib/edge/{slot-8fa7f242.js → slot-1b0351de.js} +4 -4
- package/lib/edge/{slot-bb84f342.cjs → slot-3ef77ae1.cjs} +1 -1
- package/lib/edge/{symbol-636383eb.cjs → symbol-883d624f.cjs} +1 -1
- package/lib/edge/{symbol-324dadc8.js → symbol-f1632f93.js} +2 -2
- package/lib/edge/{video-d02ff89b.js → video-58c2cc8d.js} +15 -15
- package/lib/edge/video-e20dcbbc.cjs +1 -0
- package/lib/node/blocks-exports.cjs +72 -32
- package/lib/node/blocks-exports.mjs +1018 -902
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +22 -23
- package/lib/node/{server-entry-8c84ddbd.js → server-entry-8c712c9b.js} +1 -1
- package/lib/node/{server-entry-ff6fc2b4.cjs → server-entry-bedf45f8.cjs} +1 -1
- package/lib/node/server-entry.cjs +1 -1
- package/lib/node/server-entry.mjs +1 -1
- package/package.json +1 -6
- package/types/blocks/button/button.d.ts +1 -1
- package/types/blocks/button/button.types.d.ts +1 -1
- package/types/blocks/button/component-info.d.ts +1 -1
- package/types/blocks/columns/columns.d.ts +1 -1
- package/types/blocks/columns/columns.types.d.ts +2 -2
- package/types/blocks/columns/component-info.d.ts +1 -1
- package/types/blocks/custom-code/component-info.d.ts +1 -1
- package/types/blocks/embed/component-info.d.ts +1 -1
- package/types/blocks/form/form/component-info.d.ts +1 -1
- package/types/blocks/form/form/form.d.ts +2 -2
- package/types/blocks/form/input/component-info.d.ts +1 -1
- package/types/blocks/form/select/component-info.d.ts +1 -1
- package/types/blocks/form/submit-button/component-info.d.ts +1 -1
- package/types/blocks/fragment/component-info.d.ts +1 -1
- package/types/blocks/fragment/fragment.d.ts +1 -1
- package/types/blocks/image/component-info.d.ts +1 -1
- package/types/blocks/image/image.d.ts +1 -1
- package/types/blocks/image/image.types.d.ts +1 -1
- package/types/blocks/img/component-info.d.ts +1 -1
- package/types/blocks/raw-text/component-info.d.ts +1 -1
- package/types/blocks/section/component-info.d.ts +1 -1
- package/types/blocks/section/section.d.ts +1 -1
- package/types/blocks/slot/component-info.d.ts +1 -1
- package/types/blocks/slot/slot.d.ts +1 -1
- package/types/blocks/symbol/component-info.d.ts +1 -1
- package/types/blocks/symbol/symbol.d.ts +1 -1
- package/types/blocks/symbol/symbol.helpers.d.ts +2 -2
- package/types/blocks/symbol/symbol.types.d.ts +2 -2
- package/types/blocks/text/component-info.d.ts +1 -1
- package/types/blocks/text/text.d.ts +1 -1
- package/types/blocks/textarea/component-info.d.ts +1 -1
- package/types/blocks/video/component-info.d.ts +1 -1
- package/types/blocks/video/video.d.ts +1 -1
- package/types/blocks/video/video.types.d.ts +1 -1
- package/types/components/block/animator.d.ts +1 -1
- package/types/components/block/block.d.ts +2 -2
- package/types/components/block/block.helpers.d.ts +4 -4
- package/types/components/block/components/block-styles.d.ts +2 -2
- package/types/components/block/components/block-wrapper.d.ts +2 -2
- package/types/components/block/components/component-ref/component-ref.d.ts +1 -1
- package/types/components/block/components/component-ref/component-ref.helpers.d.ts +3 -3
- package/types/components/block/components/interactive-element.d.ts +3 -3
- package/types/components/block/components/repeated-block.d.ts +1 -1
- package/types/components/block/types.d.ts +2 -2
- package/types/components/blocks/blocks-wrapper.d.ts +1 -1
- package/types/components/blocks/blocks.d.ts +1 -1
- package/types/components/blocks/blocks.types.d.ts +1 -1
- package/types/components/content/components/enable-editor.d.ts +2 -2
- package/types/components/content/components/styles.d.ts +1 -1
- package/types/components/content/content.d.ts +1 -1
- package/types/components/content/content.helpers.d.ts +3 -3
- package/types/components/content/content.types.d.ts +2 -2
- package/types/components/content/contentProps.types.d.ts +2 -2
- package/types/components/content-variants/content-variants.d.ts +1 -1
- package/types/components/content-variants/content-variants.types.d.ts +4 -4
- package/types/components/content-variants/helpers.d.ts +5 -5
- package/types/constants/builder-registered-components.d.ts +1 -1
- package/types/constants/extra-components.d.ts +1 -1
- package/types/constants/sdk-version.d.ts +1 -1
- package/types/context/index.d.ts +1 -1
- package/types/context/types.d.ts +4 -4
- package/types/functions/evaluate/browser-runtime/browser.d.ts +2 -2
- package/types/functions/evaluate/browser-runtime/index.d.ts +1 -1
- package/types/functions/evaluate/choose-eval.d.ts +1 -1
- package/types/functions/evaluate/edge-runtime/edge-runtime.d.ts +1 -1
- package/types/functions/evaluate/edge-runtime/index.d.ts +1 -1
- package/types/functions/evaluate/evaluate.d.ts +1 -1
- package/types/functions/evaluate/helpers.d.ts +3 -3
- package/types/functions/evaluate/index.d.ts +1 -1
- package/types/functions/evaluate/node-runtime/index.d.ts +1 -1
- package/types/functions/evaluate/node-runtime/node-runtime.d.ts +1 -2
- package/types/functions/evaluate/placeholder-runtime.d.ts +1 -1
- package/types/functions/fetch-builder-props.d.ts +3 -3
- package/types/functions/get-block-actions-handler.d.ts +2 -2
- package/types/functions/get-block-actions.d.ts +2 -2
- package/types/functions/get-block-component-options.d.ts +1 -1
- package/types/functions/get-block-properties.d.ts +2 -2
- package/types/functions/get-builder-search-params/index.d.ts +1 -1
- package/types/functions/get-content/generate-content-url.d.ts +1 -1
- package/types/functions/get-content/index.d.ts +2 -2
- package/types/functions/get-processed-block.d.ts +2 -2
- package/types/functions/get-style.d.ts +2 -2
- package/types/functions/is-editing.d.ts +1 -1
- package/types/functions/is-previewing.d.ts +1 -1
- package/types/functions/register-component.d.ts +1 -1
- package/types/functions/register.d.ts +2 -2
- package/types/functions/track/index.d.ts +2 -2
- package/types/functions/transform-block-properties.d.ts +2 -2
- package/types/functions/transform-block.d.ts +1 -1
- package/types/functions/transform-style-property.d.ts +2 -2
- package/types/helpers/ab-tests.d.ts +3 -3
- package/types/helpers/cookie.d.ts +1 -1
- package/types/helpers/localStorage.d.ts +2 -2
- package/types/helpers/preview-lru-cache/get.d.ts +1 -1
- package/types/helpers/preview-lru-cache/set.d.ts +1 -1
- package/types/helpers/sessionId.d.ts +1 -1
- package/types/helpers/subscribe-to-editor.d.ts +3 -3
- package/types/helpers/visitorId.d.ts +1 -1
- package/types/index-helpers/blocks-exports.d.ts +11 -11
- package/types/index.d.ts +3 -3
- package/types/server-index.d.ts +27 -27
- package/types/types/builder-content.d.ts +3 -3
- package/types/types/builder-props.d.ts +2 -2
- package/types/types/components.d.ts +2 -2
- package/types/types/enforced-partials.d.ts +1 -1
- package/lib/edge/dynamic-renderer-96ba4e48.js +0 -8
- package/lib/edge/form-e83f7b7a.cjs +0 -1
- package/lib/edge/image-7e1361ce.cjs +0 -17
- package/lib/edge/select-b8ad0a4c.cjs +0 -1
- package/lib/edge/select-f260d051.js +0 -20
- package/lib/edge/video-64014cc4.cjs +0 -1
- package/lib/node/init.cjs +0 -1
- package/lib/node/init.mjs +0 -8
- package/lib/node/node-runtime-1ca09d03.js +0 -137
- package/lib/node/node-runtime-56212f7c.cjs +0 -41
- package/types/blocks/form/component-info.d.ts +0 -2
- package/types/blocks/form/form.d.ts +0 -3
- package/types/blocks/input/component-info.d.ts +0 -2
- package/types/blocks/input/input.d.ts +0 -15
- package/types/blocks/select/component-info.d.ts +0 -2
- package/types/blocks/select/select.d.ts +0 -16
- package/types/blocks/submit-button/component-info.d.ts +0 -2
- package/types/blocks/submit-button/submit-button.d.ts +0 -10
- package/types/components/content/components/context-updater.d.ts +0 -5
- package/types/components/dynamic-renderer.d.ts +0 -3
- package/types/functions/evaluate/node-runtime/init.d.ts +0 -2
- package/types/functions/get-react-native-block-styles.d.ts +0 -15
- package/types/functions/sanitize-react-native-block-styles.d.ts +0 -3
- package/types/functions/sanitize-rn-allowed-css.d.ts +0 -8
- package/types/node-runtime/index.d.ts +0 -1
- package/types/node-runtime/node-runtime.d.ts +0 -9
- package/types/node-runtime.d.ts +0 -1
package/lib/node/init.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("isolated-vm"),r=require("./node-runtime-56212f7c.cjs");require("./server-entry-ff6fc2b4.cjs");r.setIvm(e);exports.ivm=e;
|
package/lib/node/init.mjs
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { isEditing, isBrowser, getUserAttributes, fastClone } from "./server-entry-8c84ddbd.js";
|
|
2
|
-
const getFunctionArguments = ({
|
|
3
|
-
builder: e,
|
|
4
|
-
context: n,
|
|
5
|
-
event: r,
|
|
6
|
-
state: t
|
|
7
|
-
}) => Object.entries({
|
|
8
|
-
state: t,
|
|
9
|
-
Builder: e,
|
|
10
|
-
// legacy
|
|
11
|
-
builder: e,
|
|
12
|
-
context: n,
|
|
13
|
-
event: r
|
|
14
|
-
}), getBuilderGlobals = () => ({
|
|
15
|
-
isEditing: isEditing(),
|
|
16
|
-
isBrowser: isBrowser(),
|
|
17
|
-
isServer: !isBrowser(),
|
|
18
|
-
getUserAttributes: () => getUserAttributes()
|
|
19
|
-
}), parseCode = (e, {
|
|
20
|
-
isExpression: n = !0
|
|
21
|
-
}) => /* we disable this for cases where we definitely don't want a return */ n && !(e.includes(";") || e.includes(" return ") || e.trim().startsWith("return ")) ? `return (${e});` : e, set = (e, n, r) => {
|
|
22
|
-
if (Object(e) !== e)
|
|
23
|
-
return e;
|
|
24
|
-
const t = Array.isArray(n) ? n : n.toString().match(/[^.[\]]+/g);
|
|
25
|
-
return t.slice(0, -1).reduce((c, s, u) => Object(c[s]) === c[s] ? c[s] : c[s] = Math.abs(Number(t[u + 1])) >> 0 === +t[u + 1] ? [] : {}, e)[t[t.length - 1]] = r, e;
|
|
26
|
-
}, noop = () => {
|
|
27
|
-
};
|
|
28
|
-
let safeDynamicRequire = noop;
|
|
29
|
-
try {
|
|
30
|
-
safeDynamicRequire = eval("require");
|
|
31
|
-
} catch (e) {
|
|
32
|
-
}
|
|
33
|
-
const getSyncValName = (e) => `bldr_${e}_sync`, BUILDER_SET_STATE_NAME = "BUILDER_SET_STATE", INJECTED_IVM_GLOBAL = "BUILDER_IVM", REF_TO_PROXY_FN = `
|
|
34
|
-
var refToProxy = (obj) => {
|
|
35
|
-
if (typeof obj !== 'object' || obj === null) {
|
|
36
|
-
return obj;
|
|
37
|
-
}
|
|
38
|
-
return new Proxy({}, {
|
|
39
|
-
get(target, key) {
|
|
40
|
-
if (key === 'copySync') {
|
|
41
|
-
return () => obj.copySync();
|
|
42
|
-
}
|
|
43
|
-
const val = obj.getSync(key);
|
|
44
|
-
if (typeof val?.getSync === 'function') {
|
|
45
|
-
return refToProxy(val);
|
|
46
|
-
}
|
|
47
|
-
return val;
|
|
48
|
-
},
|
|
49
|
-
set(target, key, value) {
|
|
50
|
-
const v = typeof value === 'object' ? new ${INJECTED_IVM_GLOBAL}.Reference(value) : value;
|
|
51
|
-
obj.setSync(key, v);
|
|
52
|
-
${BUILDER_SET_STATE_NAME}(key, value)
|
|
53
|
-
},
|
|
54
|
-
deleteProperty(target, key) {
|
|
55
|
-
obj.deleteSync(key);
|
|
56
|
-
}
|
|
57
|
-
})
|
|
58
|
-
}
|
|
59
|
-
`, processCode = ({
|
|
60
|
-
code: e,
|
|
61
|
-
args: n
|
|
62
|
-
}) => {
|
|
63
|
-
const r = n.map(([t]) => `var ${t} = refToProxy(${getSyncValName(t)}); `).join("");
|
|
64
|
-
return `
|
|
65
|
-
${REF_TO_PROXY_FN}
|
|
66
|
-
${r}
|
|
67
|
-
function theFunction() {
|
|
68
|
-
${e}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
let output = theFunction()
|
|
72
|
-
|
|
73
|
-
if (typeof output === 'object' && output !== null) {
|
|
74
|
-
output = JSON.stringify(output.copySync ? output.copySync() : output);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
output;
|
|
78
|
-
`;
|
|
79
|
-
};
|
|
80
|
-
let IVM_INSTANCE = null;
|
|
81
|
-
const setIvm = (e) => {
|
|
82
|
-
IVM_INSTANCE = e;
|
|
83
|
-
}, getIvm = () => IVM_INSTANCE || safeDynamicRequire("isolated-vm"), getIsolateContext = () => {
|
|
84
|
-
const e = getIvm();
|
|
85
|
-
return new e.Isolate({
|
|
86
|
-
memoryLimit: 128
|
|
87
|
-
}).createContextSync();
|
|
88
|
-
}, runInNode = ({
|
|
89
|
-
code: e,
|
|
90
|
-
builder: n,
|
|
91
|
-
context: r,
|
|
92
|
-
event: t,
|
|
93
|
-
localState: c,
|
|
94
|
-
rootSetState: s,
|
|
95
|
-
rootState: u
|
|
96
|
-
}) => {
|
|
97
|
-
const y = getIvm(), I = fastClone({
|
|
98
|
-
...u,
|
|
99
|
-
...c
|
|
100
|
-
}), a = getFunctionArguments({
|
|
101
|
-
builder: n,
|
|
102
|
-
context: r,
|
|
103
|
-
event: t,
|
|
104
|
-
state: I
|
|
105
|
-
}), g = getIsolateContext(), i = g.global;
|
|
106
|
-
i.setSync("global", i.derefInto()), i.setSync("log", function(...o) {
|
|
107
|
-
console.log(...o);
|
|
108
|
-
}), i.setSync(BUILDER_SET_STATE_NAME, function(o, l) {
|
|
109
|
-
set(u, o, l), s == null || s(u);
|
|
110
|
-
}), a.forEach(([o, l]) => {
|
|
111
|
-
const _ = typeof l == "object" ? new y.Reference(
|
|
112
|
-
// workaround: methods with default values for arguments is not being cloned over
|
|
113
|
-
o === "builder" ? {
|
|
114
|
-
...l,
|
|
115
|
-
getUserAttributes: () => l.getUserAttributes()
|
|
116
|
-
} : l
|
|
117
|
-
) : null;
|
|
118
|
-
i.setSync(getSyncValName(o), _);
|
|
119
|
-
}), i.setSync(INJECTED_IVM_GLOBAL, y);
|
|
120
|
-
const f = processCode({
|
|
121
|
-
code: e,
|
|
122
|
-
args: a
|
|
123
|
-
}), E = g.evalSync(f);
|
|
124
|
-
try {
|
|
125
|
-
return JSON.parse(E);
|
|
126
|
-
} catch {
|
|
127
|
-
return E;
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
export {
|
|
131
|
-
getBuilderGlobals,
|
|
132
|
-
getFunctionArguments,
|
|
133
|
-
parseCode,
|
|
134
|
-
runInNode,
|
|
135
|
-
set,
|
|
136
|
-
setIvm
|
|
137
|
-
};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";const serverEntry=require("./server-entry-ff6fc2b4.cjs"),getFunctionArguments=({builder:e,context:r,event:n,state:t})=>Object.entries({state:t,Builder:e,builder:e,context:r,event:n}),getBuilderGlobals=()=>({isEditing:serverEntry.isEditing(),isBrowser:serverEntry.isBrowser(),isServer:!serverEntry.isBrowser(),getUserAttributes:()=>serverEntry.getUserAttributes()}),parseCode=(e,{isExpression:r=!0})=>r&&!(e.includes(";")||e.includes(" return ")||e.trim().startsWith("return "))?`return (${e});`:e,set=(e,r,n)=>{if(Object(e)!==e)return e;const t=Array.isArray(r)?r:r.toString().match(/[^.[\]]+/g);return t.slice(0,-1).reduce((c,s,u)=>Object(c[s])===c[s]?c[s]:c[s]=Math.abs(Number(t[u+1]))>>0===+t[u+1]?[]:{},e)[t[t.length-1]]=n,e},noop=()=>{};let safeDynamicRequire=noop;try{safeDynamicRequire=eval("require")}catch(e){}const getSyncValName=e=>`bldr_${e}_sync`,BUILDER_SET_STATE_NAME="BUILDER_SET_STATE",INJECTED_IVM_GLOBAL="BUILDER_IVM",REF_TO_PROXY_FN=`
|
|
2
|
-
var refToProxy = (obj) => {
|
|
3
|
-
if (typeof obj !== 'object' || obj === null) {
|
|
4
|
-
return obj;
|
|
5
|
-
}
|
|
6
|
-
return new Proxy({}, {
|
|
7
|
-
get(target, key) {
|
|
8
|
-
if (key === 'copySync') {
|
|
9
|
-
return () => obj.copySync();
|
|
10
|
-
}
|
|
11
|
-
const val = obj.getSync(key);
|
|
12
|
-
if (typeof val?.getSync === 'function') {
|
|
13
|
-
return refToProxy(val);
|
|
14
|
-
}
|
|
15
|
-
return val;
|
|
16
|
-
},
|
|
17
|
-
set(target, key, value) {
|
|
18
|
-
const v = typeof value === 'object' ? new ${INJECTED_IVM_GLOBAL}.Reference(value) : value;
|
|
19
|
-
obj.setSync(key, v);
|
|
20
|
-
${BUILDER_SET_STATE_NAME}(key, value)
|
|
21
|
-
},
|
|
22
|
-
deleteProperty(target, key) {
|
|
23
|
-
obj.deleteSync(key);
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
}
|
|
27
|
-
`,processCode=({code:e,args:r})=>{const n=r.map(([t])=>`var ${t} = refToProxy(${getSyncValName(t)}); `).join("");return`
|
|
28
|
-
${REF_TO_PROXY_FN}
|
|
29
|
-
${n}
|
|
30
|
-
function theFunction() {
|
|
31
|
-
${e}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
let output = theFunction()
|
|
35
|
-
|
|
36
|
-
if (typeof output === 'object' && output !== null) {
|
|
37
|
-
output = JSON.stringify(output.copySync ? output.copySync() : output);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
output;
|
|
41
|
-
`};let IVM_INSTANCE=null;const setIvm=e=>{IVM_INSTANCE=e},getIvm=()=>IVM_INSTANCE||safeDynamicRequire("isolated-vm"),getIsolateContext=()=>{const e=getIvm();return new e.Isolate({memoryLimit:128}).createContextSync()},runInNode=({code:e,builder:r,context:n,event:t,localState:c,rootSetState:s,rootState:u})=>{const y=getIvm(),v=serverEntry.fastClone({...u,...c}),a=getFunctionArguments({builder:r,context:n,event:t,state:v}),g=getIsolateContext(),i=g.global;i.setSync("global",i.derefInto()),i.setSync("log",function(...o){console.log(...o)}),i.setSync(BUILDER_SET_STATE_NAME,function(o,l){set(u,o,l),s==null||s(u)}),a.forEach(([o,l])=>{const p=typeof l=="object"?new y.Reference(o==="builder"?{...l,getUserAttributes:()=>l.getUserAttributes()}:l):null;i.setSync(getSyncValName(o),p)}),i.setSync(INJECTED_IVM_GLOBAL,y);const I=processCode({code:e,args:a}),E=g.evalSync(I);try{return JSON.parse(E)}catch{return E}};exports.getBuilderGlobals=getBuilderGlobals;exports.getFunctionArguments=getFunctionArguments;exports.parseCode=parseCode;exports.runInNode=runInNode;exports.set=set;exports.setIvm=setIvm;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
-
*/
|
|
5
|
-
export interface FormInputProps {
|
|
6
|
-
type?: string;
|
|
7
|
-
attributes?: any;
|
|
8
|
-
name?: string;
|
|
9
|
-
value?: string;
|
|
10
|
-
placeholder?: string;
|
|
11
|
-
defaultValue?: string;
|
|
12
|
-
required?: boolean;
|
|
13
|
-
}
|
|
14
|
-
declare function FormInputComponent(props: FormInputProps): React.JSX.Element;
|
|
15
|
-
export default FormInputComponent;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
-
*/
|
|
5
|
-
export interface FormSelectProps {
|
|
6
|
-
options?: {
|
|
7
|
-
name?: string;
|
|
8
|
-
value: string;
|
|
9
|
-
}[];
|
|
10
|
-
attributes?: any;
|
|
11
|
-
name?: string;
|
|
12
|
-
value?: string;
|
|
13
|
-
defaultValue?: string;
|
|
14
|
-
}
|
|
15
|
-
declare function SelectComponent(props: FormSelectProps): React.JSX.Element;
|
|
16
|
-
export default SelectComponent;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* This import is used by the Svelte SDK. Do not remove.
|
|
4
|
-
*/
|
|
5
|
-
export interface ButtonProps {
|
|
6
|
-
attributes?: any;
|
|
7
|
-
text?: string;
|
|
8
|
-
}
|
|
9
|
-
declare function SubmitButton(props: ButtonProps): React.JSX.Element;
|
|
10
|
-
export default SubmitButton;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
type BuilderEditorProps = Omit<ContentProps, "customComponents" | "apiVersion" | "isSsrAbTest" | "blocksWrapper" | "blocksWrapperProps">;
|
|
3
|
-
import type { ContentProps } from "../content.types.js";
|
|
4
|
-
declare function ContextUpdater(props: BuilderEditorProps): React.JSX.Element;
|
|
5
|
-
export default ContextUpdater;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { BuilderContextInterface } from '../context/types.js';
|
|
2
|
-
import type { BuilderBlock } from '../types/builder-block.js';
|
|
3
|
-
/**
|
|
4
|
-
* @description Cleans styles that RN can't handle and css-to-react-native doesn't fix
|
|
5
|
-
*/
|
|
6
|
-
export declare const cleanCssStyleProps: (styles: {
|
|
7
|
-
[key: string]: string;
|
|
8
|
-
}) => {
|
|
9
|
-
[key: string]: string;
|
|
10
|
-
};
|
|
11
|
-
export declare function getReactNativeBlockStyles({ block, context, blockStyles }: {
|
|
12
|
-
block: BuilderBlock;
|
|
13
|
-
context: BuilderContextInterface;
|
|
14
|
-
blockStyles: any;
|
|
15
|
-
}): CSSStyleDeclaration | Record<string, string | undefined>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';
|
|
2
|
-
type StyleSheetProperties = ImageStyle & TextStyle & ViewStyle;
|
|
3
|
-
/**
|
|
4
|
-
* @description List of allowed css properties.
|
|
5
|
-
* We use this to filter out web CSS from Builder.io that would crash RN.
|
|
6
|
-
*/
|
|
7
|
-
export declare const ALLOWED_CSS_PROPERTIES: Array<keyof StyleSheetProperties>;
|
|
8
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { evaluator } from './node-runtime.js';
|
package/types/node-runtime.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const evaluator: (code: string) => any;
|