pollination-react-io 0.0.10 → 0.0.13

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.
@@ -4,14 +4,19 @@ import "./Dropdown.scss";
4
4
  export declare type Option = {
5
5
  type: 'checkbox' | 'radio' | 'button' | 'label' | 'link';
6
6
  id: string;
7
- label: React.ReactNode;
7
+ label: string;
8
8
  checked?: boolean;
9
9
  disabled?: boolean;
10
10
  onSelect?: (option: Option) => void;
11
11
  to?: string;
12
12
  };
13
+ export declare type OptionGroup = {
14
+ options: Option[];
15
+ type?: 'radio' | 'default';
16
+ value?: string;
17
+ };
13
18
  interface DropdownProps {
14
- options: Option[][];
19
+ optionGroups: OptionGroup[];
15
20
  trigger: React.ReactNode;
16
21
  contentProps?: DropdownMenu.DropdownMenuContentProps;
17
22
  itemProps?: DropdownMenu.DropdownMenuItemProps;
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { GetModelProps } from './GetModel.types';
3
+ export declare const GetModel: FC<GetModelProps>;
4
+ export default GetModel;
@@ -0,0 +1,3 @@
1
+ export interface GetModelProps {
2
+ setParentState: (data: any) => any;
3
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { PreviewBakeGeometryProps } from "./PreviewBakeGeometry.types";
3
+ declare const PreviewBakeGeometry: React.FC<PreviewBakeGeometryProps>;
4
+ export default PreviewBakeGeometry;
@@ -0,0 +1,4 @@
1
+ import { XOR } from "../ts-utils";
2
+ export interface PreviewBakeGeometryProps {
3
+ geometry?: XOR<object, (args?: any) => Promise<object>>;
4
+ }
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { PreviewBakeModelProps } from "./PreviewBakeModel.types";
3
+ declare const PreviewBakeModel: React.FC<PreviewBakeModelProps>;
4
+ export default PreviewBakeModel;
@@ -0,0 +1,4 @@
1
+ import { XOR } from "../ts-utils";
2
+ export interface PreviewBakeModelProps {
3
+ hbjson?: XOR<object, (args?: any) => Promise<object>>;
4
+ }
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { RunCommandProps } from "./RunCommand.types";
3
+ import "./RunCommand.scss";
4
+ declare const RunCommand: React.FC<RunCommandProps>;
5
+ export default RunCommand;
@@ -0,0 +1,4 @@
1
+ export interface RunCommandProps {
2
+ command: string;
3
+ prefix?: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+ import { SendModelProps } from './SendModel.types';
3
+ export declare const SendModel: FC<SendModelProps>;
4
+ export default SendModel;
@@ -0,0 +1,3 @@
1
+ export interface SendModelProps {
2
+ hbjson?: object;
3
+ }
@@ -1,10 +1,11 @@
1
- import { FC } from 'react';
2
- import { Option } from '../Dropdown/Dropdown';
1
+ import React, { FC, ReactNode } from 'react';
2
+ import { OptionGroup } from '../Dropdown/Dropdown';
3
3
  import '../buttons.scss';
4
4
  export interface SettingsButtonProps {
5
- options: Option[][];
6
- disabled: boolean;
7
5
  onClick: () => void;
8
- label: string;
6
+ label: string | ReactNode;
7
+ options?: OptionGroup[];
8
+ disabled?: boolean;
9
+ triggerIcon?: React.ReactNode;
9
10
  }
10
11
  export declare const SettingsButton: FC<SettingsButtonProps>;
@@ -29,6 +29,7 @@
29
29
  transition: background-color 0.125s ease-in-out;
30
30
  z-index: 10;
31
31
  align-items: center;
32
+ gap: 8px;
32
33
  }
33
34
 
34
35
  .btn-group button:disabled {
@@ -2,8 +2,9 @@ export interface Options {
2
2
  layer?: string;
3
3
  units?: string;
4
4
  }
5
+ export declare type actions = 'BakeGeometry' | 'ClearGeometry' | 'DrawGeometry' | 'DisableDraw' | 'CombinedRendering' | 'RunCommand' | 'BakePollinationModel' | 'DisableDrawPollinationModel' | 'DrawPollinationModel' | 'CombinedRenderingPollinationModel' | 'SetModelSettings';
5
6
  export interface Message {
6
- action?: string;
7
+ action?: actions;
7
8
  data?: any;
8
9
  options?: any;
9
10
  }
package/build/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  export * from './hooks';
2
2
  export * from './GetGeometry/GetGeometry';
3
- export * from './GetHbjson/GetHbjson';
3
+ export * from './GetModel/GetModel';
4
+ export * from './PreviewBakeGeometry/PreviewBakeGeometry';
5
+ export * from './PreviewBakeModel/PreviewBakeModel';
6
+ export * from './RunCommand/RunCommand';
4
7
  export * from './SendGeometry/SendGeometry';
5
- export * from './SendHbjson/SendHbjson';
8
+ export * from './SendModel/SendModel';