pollination-react-io 1.98.0 → 1.99.0

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.
@@ -1,9 +1,11 @@
1
+ import { MeshOptions } from "../hooks";
1
2
  export declare enum GetModelActions {
2
3
  selection = "selection",
3
4
  subscribe = "subscribe",
4
5
  preview = "preview"
5
6
  }
6
7
  export interface GetGeometryProps {
8
+ defaultKey: string;
7
9
  setParentState?: (data: any) => void;
8
10
  optionsConfig?: {
9
11
  [index in GetModelActions]: {
@@ -12,6 +14,6 @@ export interface GetGeometryProps {
12
14
  };
13
15
  };
14
16
  buttonLabel?: string;
15
- defaultKey?: string;
16
17
  useIcon?: boolean;
18
+ meshOptions?: MeshOptions;
17
19
  }
@@ -0,0 +1,8 @@
1
+ import { EventHandler } from 'react';
2
+ /**
3
+ * Listen for a CustomEvent.
4
+ * If web it uses document, if panel it uses webview
5
+ * @param eventName Name of the CustomEvent
6
+ * @param handler Handler to trigger
7
+ */
8
+ export declare const useCustomEvent: (eventName: 'onGeometryChanged' | 'onModelChanged' | 'onResultChanged', handler: EventHandler<any>) => void;
@@ -4,8 +4,12 @@ declare global {
4
4
  chrome?: any;
5
5
  }
6
6
  }
7
- export declare const useGetGeometry: () => {
7
+ export interface MeshOptions {
8
+ gridSize?: number;
9
+ union?: boolean;
10
+ }
11
+ export declare const useGetGeometry: (meshOptions?: MeshOptions) => {
8
12
  host: string;
9
13
  geometry: Blob;
10
- getGeometry: (key?: any, selection?: any, force?: any) => void;
14
+ getGeometry: (key?: any, selection?: boolean, force?: boolean, useSelection?: boolean) => void;
11
15
  };