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.
@@ -1947,6 +1947,7 @@ var useGetHbjson = function () {
1947
1947
  var hbjsonRef = useRef(undefined);
1948
1948
  var setReturnValue = useCallback(function (res, force) {
1949
1949
  var bytes = new TextEncoder().encode(res.Geometry);
1950
+ console.log(res);
1950
1951
  if (hbjsonRef.current) {
1951
1952
  if (force || !lodash_isequal(bytes, hbjsonRef.current)) {
1952
1953
  setHbjson(new Blob([bytes], {
@@ -2005,6 +2006,7 @@ var useGetHbjson = function () {
2005
2006
  var revitGetHbjson = useCallback(function () {
2006
2007
  if (!checkDotNet())
2007
2008
  return;
2009
+ console.log('Calling revitGetHbjson');
2008
2010
  window.parent.chrome.webview.hostObjects.sync.hbjson.PassHBJSON();
2009
2011
  }, []);
2010
2012
  var getHbjson = useMemo(function () {
@@ -4818,6 +4820,11 @@ var GetGeometry = function (_a) {
4818
4820
  var _d = useState(false), subscribe = _d[0], setSubscribe = _d[1];
4819
4821
  // pollination-react-io hooks
4820
4822
  var _e = useGetGeometry(); _e.host; var geometry = _e.geometry, getGeometry = _e.getGeometry;
4823
+ useEffect(function () {
4824
+ if (!setParentState)
4825
+ return;
4826
+ setParentState(geometry);
4827
+ }, [geometry, setParentState]);
4821
4828
  useEffect(function () {
4822
4829
  if (!geometry || !setParentState)
4823
4830
  return;
@@ -4909,6 +4916,11 @@ var GetModel = function (_a) {
4909
4916
  };
4910
4917
  fr.readAsText(hbjson);
4911
4918
  }, [hbjson, setParentState]);
4919
+ useEffect(function () {
4920
+ if (!setParentState)
4921
+ return;
4922
+ setParentState(hbjson);
4923
+ }, [hbjson, setParentState]);
4912
4924
  // subscribe
4913
4925
  useEffect(function () {
4914
4926
  if (!getHbjson)