@builder.io/sdk-react 0.5.2 → 0.5.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/README.md +4 -0
- package/dist/blocks/BaseText.d.ts +1 -0
- package/dist/blocks/button/button.d.ts +1 -0
- package/dist/blocks/button/button.js +2 -2
- package/dist/blocks/columns/columns.d.ts +1 -0
- package/dist/blocks/columns/columns.js +2 -2
- package/dist/blocks/custom-code/custom-code.d.ts +1 -0
- package/dist/blocks/embed/embed.d.ts +1 -0
- package/dist/blocks/form/form.d.ts +1 -0
- package/dist/blocks/fragment/fragment.d.ts +1 -0
- package/dist/blocks/image/image.d.ts +1 -0
- package/dist/blocks/img/img.d.ts +1 -0
- package/dist/blocks/img/img.js +1 -1
- package/dist/blocks/input/input.d.ts +1 -0
- package/dist/blocks/input/input.js +1 -1
- package/dist/blocks/raw-text/raw-text.d.ts +1 -0
- package/dist/blocks/section/section.d.ts +1 -0
- package/dist/blocks/section/section.js +1 -1
- package/dist/blocks/select/select.d.ts +1 -0
- package/dist/blocks/select/select.js +1 -1
- package/dist/blocks/submit-button/submit-button.d.ts +1 -0
- package/dist/blocks/submit-button/submit-button.js +1 -1
- package/dist/blocks/symbol/symbol.d.ts +1 -0
- package/dist/blocks/symbol/symbol.js +1 -1
- package/dist/blocks/text/text.d.ts +1 -0
- package/dist/blocks/text/text.js +1 -1
- package/dist/blocks/textarea/textarea.d.ts +1 -0
- package/dist/blocks/textarea/textarea.js +1 -1
- package/dist/blocks/video/video.d.ts +1 -0
- package/dist/components/block/block.d.ts +1 -0
- package/dist/components/block/components/block-styles.d.ts +1 -0
- package/dist/components/block/components/block-wrapper.d.ts +1 -0
- package/dist/components/block/components/component-ref/component-ref.d.ts +1 -0
- package/dist/components/block/components/interactive-element.d.ts +1 -0
- package/dist/components/block/components/repeated-block.d.ts +1 -0
- package/dist/components/blocks/blocks-wrapper.d.ts +1 -0
- package/dist/components/blocks/blocks-wrapper.js +1 -1
- package/dist/components/blocks/blocks.d.ts +1 -0
- package/dist/components/content/components/enable-editor.d.ts +1 -0
- package/dist/components/content/components/enable-editor.js +1 -1
- package/dist/components/content/components/styles.d.ts +1 -0
- package/dist/components/content/content.d.ts +1 -0
- package/dist/components/content/content.js +3 -1
- package/dist/components/content-variants/content-variants.d.ts +1 -0
- package/dist/components/content-variants/content-variants.js +12 -6
- package/dist/components/inlined-script.d.ts +1 -0
- package/dist/components/inlined-styles.d.ts +1 -0
- package/dist/constants/sdk-version.d.ts +1 -1
- package/dist/constants/sdk-version.js +1 -1
- package/dist/functions/evaluate/acorn-interpreter.js +3111 -0
- package/dist/functions/evaluate/evaluate.js +1 -1
- package/dist/functions/evaluate/non-node-runtime/index.d.ts +1 -0
- package/dist/functions/evaluate/non-node-runtime/index.js +2 -0
- package/dist/functions/evaluate/{non-node-runtime.d.ts → non-node-runtime/non-node-runtime.d.ts} +1 -1
- package/dist/functions/evaluate/{non-node-runtime.js → non-node-runtime/non-node-runtime.js} +3 -3
- package/dist/functions/evaluate/types.d.ts +1 -0
- package/package.json +9 -2
- package/dist/functions/evaluate/acorn.d.ts +0 -0
- package/dist/functions/evaluate/acorn.js +0 -2432
- package/dist/functions/evaluate/interpreter.js +0 -3853
- /package/dist/functions/evaluate/{interpreter.d.ts → acorn-interpreter.d.ts} +0 -0
|
@@ -2,7 +2,7 @@ import { logger } from '../../helpers/logger.js';
|
|
|
2
2
|
import { isBrowser } from '../is-browser.js';
|
|
3
3
|
import { isEditing } from '../is-editing.js';
|
|
4
4
|
import { isNonNodeServer } from '../is-non-node-server.js';
|
|
5
|
-
import { runInNonNode } from './non-node-runtime.js';
|
|
5
|
+
import { runInNonNode } from './non-node-runtime/index.js';
|
|
6
6
|
export function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression = true }) {
|
|
7
7
|
if (code === '') {
|
|
8
8
|
logger.warn('Skipping evaluation of empty code block.');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { runInNonNode } from './non-node-runtime.js';
|
package/dist/functions/evaluate/{non-node-runtime.d.ts → non-node-runtime/non-node-runtime.d.ts}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ExecutorArgs } from '
|
|
1
|
+
import type { ExecutorArgs } from '../types';
|
|
2
2
|
export declare const runInNonNode: ({ builder, context, event, rootState, localState, rootSetState, useCode }: ExecutorArgs) => any;
|
package/dist/functions/evaluate/{non-node-runtime.js → non-node-runtime/non-node-runtime.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { logger } from '
|
|
2
|
-
import { set } from '
|
|
3
|
-
import Interpreter from '
|
|
1
|
+
import { logger } from '../../../helpers/logger';
|
|
2
|
+
import { set } from '../../set';
|
|
3
|
+
import Interpreter from '../acorn-interpreter.js';
|
|
4
4
|
const processCode = (code) => {
|
|
5
5
|
return code.split('\n').map(line => {
|
|
6
6
|
const trimmed = line.trim();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder.io/sdk-react",
|
|
3
3
|
"description": "Builder.io SDK for React",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.4",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
7
7
|
],
|
|
@@ -18,8 +18,15 @@
|
|
|
18
18
|
"react": "^18.2.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
+
"nx": "^16.6.0",
|
|
22
|
+
"nx-cloud": "^16.2.0",
|
|
21
23
|
"react": "^18.2.0",
|
|
22
24
|
"rimraf": "^3.0.2",
|
|
23
|
-
"typescript": "^
|
|
25
|
+
"typescript": "^4.9.4"
|
|
26
|
+
},
|
|
27
|
+
"nx": {
|
|
28
|
+
"implicitDependencies": [
|
|
29
|
+
"@builder.io/sdks"
|
|
30
|
+
]
|
|
24
31
|
}
|
|
25
32
|
}
|
|
File without changes
|