@threekit-tools/treble 0.0.28 → 0.0.32

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.
@@ -47,8 +47,6 @@ function TrebleApp(props) {
47
47
  react_1.Children.forEach(Object.values(productComponents).map(function (el) { return el({}); }), function (jsx, i) {
48
48
  if (!jsx)
49
49
  return;
50
- if (jsx.type.name !== 'ProductLayout')
51
- return;
52
50
  if (!jsx.props.products)
53
51
  return;
54
52
  var products = jsx.props.products;
@@ -87,6 +87,8 @@ function formComponentContainer(FormComponent
87
87
  var attribute = props.attribute, metadataKeyThumbnail = props.metadataKeyThumbnail, metadataKeyDescription = props.metadataKeyDescription, metadataKeyPrice = props.metadataKeyPrice, hideAttributeTitle = props.hideAttributeTitle, sort = props.sort;
88
88
  var isLoading = (0, usePlayerLoadingStatus_1.default)();
89
89
  var _a = (0, useAttribute_1.default)(attribute), attributeData = _a[0], setAttribute = _a[1];
90
+ if (!attribute)
91
+ return react_1.default.createElement(FormComponent, __assign({}, props));
90
92
  if (!attributeData)
91
93
  return null;
92
94
  if (!FormComponent.compatibleAttributes.has(attributeData.type)) {
@@ -10,10 +10,10 @@ declare const store: import("@reduxjs/toolkit").EnhancedStore<{
10
10
  }, import("redux").Dispatch<import("redux").AnyAction>>>>;
11
11
  export declare type RootState = ReturnType<typeof store.getState>;
12
12
  export declare type ThreekitDispatch = typeof store.dispatch;
13
- export declare const useThreekitDispatch: () => import("@reduxjs/toolkit").ThunkDispatch<{
13
+ export declare const useThreekitDispatch: () => import("redux").Dispatch<import("redux").AnyAction> & import("@reduxjs/toolkit").ThunkDispatch<{
14
14
  threekit: import("./threekit").ThreekitState;
15
15
  }, null, import("redux").AnyAction> & import("@reduxjs/toolkit").ThunkDispatch<{
16
16
  threekit: import("./threekit").ThreekitState;
17
- }, undefined, import("redux").AnyAction> & import("redux").Dispatch<import("redux").AnyAction>;
17
+ }, undefined, import("redux").AnyAction>;
18
18
  export declare const useThreekitSelector: TypedUseSelectorHook<RootState>;
19
19
  export default store;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threekit-tools/treble",
3
- "version": "0.0.28",
3
+ "version": "0.0.32",
4
4
  "author": "Amaan Saeed",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -32,6 +32,10 @@
32
32
  "reselect": "^4.1.2",
33
33
  "styled-components": "^5.3.3"
34
34
  },
35
+ "peerDependencies": {
36
+ "react": "^17.0.2",
37
+ "react-dom": "^17.0.2"
38
+ },
35
39
  "devDependencies": {
36
40
  "@babel/core": "^7.15.8",
37
41
  "@storybook/addon-actions": "^6.3.12",
@@ -41,18 +45,16 @@
41
45
  "@storybook/addon-storysource": "^6.3.12",
42
46
  "@storybook/react": "^6.3.12",
43
47
  "@types/node": "^16.10.3",
44
- "@types/react": ">=17.0.27",
45
- "@types/react-dom": ">=17.0.9",
48
+ "@types/react": "^17.0.27",
49
+ "@types/react-dom": "^17.0.9",
46
50
  "@types/redux-logger": "^3.0.9",
47
51
  "@types/styled-components": "^5.1.15",
48
52
  "@types/webpack-env": "^1.16.3",
49
53
  "babel-loader": "^8.2.2",
50
- "react": ">=17.0.2",
51
- "react-dom": ">=17.0.2",
52
54
  "rimraf": "^3.0.2",
53
55
  "serve": "^12.0.1",
54
56
  "storybook-addon-styled-component-theme": "^2.0.0",
55
- "typescript": ">=4.4.4"
57
+ "typescript": "^4.4.4"
56
58
  },
57
59
  "gitHead": "2e16bcf98f81e16bb1768072fdb3968122e7966f"
58
60
  }