@builder.io/sdk-react-native 0.0.1-54 → 0.0.1-55

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/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.0.1-52
2
+
3
+ 🧨 Breaking change: the format of the `customComponents` prop has changed from `[{ component, info }]` to `[{ component, ...info }]`.
4
+ See [builder-registered-components.ts](/packages/sdks/src/constants/builder-registered-components.ts) for examples of how to do so, or see the example provided for this SDK.
5
+
1
6
  ### 0.0.1-51
2
7
 
3
8
  ⚠️ Deprecation notice: Registering components via `registerComponent(component, info)` is now deprecated.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@builder.io/sdk-react-native",
3
3
  "description": "Builder.io SDK for React Native",
4
- "version": "0.0.1-54",
4
+ "version": "0.0.1-55",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
7
7
  "release:dev": "npm version prerelease --no-git-tag-version && npm publish --tag dev --access public"
@@ -11,7 +11,7 @@ export default function Image(props) {
11
11
  role={props.altText ? "presentation" : undefined}
12
12
  style={styles.view2}
13
13
  src={props.image}
14
- srcset={props.srcset}
14
+ srcSet={props.srcset}
15
15
  sizes={props.sizes}
16
16
  />
17
17
 
@@ -3,6 +3,7 @@ const componentInfo = {
3
3
  name: "Symbol",
4
4
  noWrap: true,
5
5
  static: true,
6
+ builtIn: true,
6
7
  inputs: [
7
8
  {
8
9
  name: "symbol",
@@ -17,6 +17,18 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
20
32
  import * as React from "react";
21
33
  import { useContext } from "react";
22
34
  import { TARGET } from "../../constants/target.js";
@@ -48,8 +60,12 @@ function RenderBlock(props) {
48
60
  }
49
61
  }
50
62
  function componentInfo() {
51
- var _a2;
52
- return (_a2 = component == null ? void 0 : component()) == null ? void 0 : _a2.info;
63
+ if (component()) {
64
+ const _a2 = component(), { component: _ } = _a2, info = __objRest(_a2, ["component"]);
65
+ return info;
66
+ } else {
67
+ return void 0;
68
+ }
53
69
  }
54
70
  function componentRef() {
55
71
  var _a2;
@@ -34,7 +34,12 @@ export default function RenderBlock(props) {
34
34
  }
35
35
 
36
36
  function componentInfo() {
37
- return component?.()?.info;
37
+ if (component()) {
38
+ const { component: _, ...info } = component();
39
+ return info;
40
+ } else {
41
+ return undefined;
42
+ }
38
43
  }
39
44
 
40
45
  function componentRef() {
@@ -27,7 +27,7 @@ function validateReactNativeStyles(styles) {
27
27
  }
28
28
  delete styles[key];
29
29
  }
30
- if (typeof propertyValue === "string" && propertyValue.match(/^\-?\d/)) {
30
+ if (typeof propertyValue === "string" && propertyValue.match(/^-?\d/)) {
31
31
  const newValue = parseFloat(propertyValue);
32
32
  if (!isNaN(newValue)) {
33
33
  styles[key] = newValue;
@@ -1,6 +0,0 @@
1
- import * as React from 'react';
2
- function macroEval(items, string) {
3
- }
4
- export {
5
- macroEval
6
- };