pollination-react-io 0.0.24 → 0.0.25

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/build/index.js CHANGED
@@ -1974,6 +1974,7 @@ var useGetHbjson = function () {
1974
1974
  var hbjsonRef = React.useRef(undefined);
1975
1975
  var setReturnValue = React.useCallback(function (res, force) {
1976
1976
  var bytes = new TextEncoder().encode(res.Geometry);
1977
+ console.log(res);
1977
1978
  if (hbjsonRef.current) {
1978
1979
  if (force || !lodash_isequal(bytes, hbjsonRef.current)) {
1979
1980
  setHbjson(new Blob([bytes], {
@@ -2032,6 +2033,7 @@ var useGetHbjson = function () {
2032
2033
  var revitGetHbjson = React.useCallback(function () {
2033
2034
  if (!checkDotNet())
2034
2035
  return;
2036
+ console.log('Calling revitGetHbjson');
2035
2037
  window.parent.chrome.webview.hostObjects.sync.hbjson.PassHBJSON();
2036
2038
  }, []);
2037
2039
  var getHbjson = React.useMemo(function () {
@@ -4845,6 +4847,11 @@ var GetGeometry = function (_a) {
4845
4847
  var _d = React.useState(false), subscribe = _d[0], setSubscribe = _d[1];
4846
4848
  // pollination-react-io hooks
4847
4849
  var _e = useGetGeometry(); _e.host; var geometry = _e.geometry, getGeometry = _e.getGeometry;
4850
+ React.useEffect(function () {
4851
+ if (!setParentState)
4852
+ return;
4853
+ setParentState(geometry);
4854
+ }, [geometry, setParentState]);
4848
4855
  React.useEffect(function () {
4849
4856
  if (!geometry || !setParentState)
4850
4857
  return;
@@ -4936,6 +4943,11 @@ var GetModel = function (_a) {
4936
4943
  };
4937
4944
  fr.readAsText(hbjson);
4938
4945
  }, [hbjson, setParentState]);
4946
+ React.useEffect(function () {
4947
+ if (!setParentState)
4948
+ return;
4949
+ setParentState(hbjson);
4950
+ }, [hbjson, setParentState]);
4939
4951
  // subscribe
4940
4952
  React.useEffect(function () {
4941
4953
  if (!getHbjson)