pollination-react-io 0.0.11 → 0.0.14
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/Dropdown/Dropdown.d.ts +7 -2
- package/build/GetModel/GetModel.d.ts +4 -0
- package/build/GetModel/GetModel.types.d.ts +3 -0
- package/build/PreviewBakeGeometry/PreviewBakeGeometry.d.ts +4 -0
- package/build/PreviewBakeGeometry/PreviewBakeGeometry.types.d.ts +4 -0
- package/build/PreviewBakeModel/PreviewBakeModel.d.ts +4 -0
- package/build/PreviewBakeModel/PreviewBakeModel.types.d.ts +4 -0
- package/build/RunCommand/RunCommand.d.ts +5 -0
- package/build/RunCommand/RunCommand.types.d.ts +4 -0
- package/build/SendGeometry/SendGeometry.types.d.ts +1 -0
- package/build/SendModel/SendModel.d.ts +4 -0
- package/build/SendModel/SendModel.types.d.ts +4 -0
- package/build/SettingsButton/index.d.ts +6 -5
- package/build/buttons.scss +1 -0
- package/build/hooks/types.d.ts +4 -1
- package/build/hooks/useSendGeometry.d.ts +2 -2
- package/build/hooks/useSendHbjson.d.ts +2 -2
- package/build/index.d.ts +5 -2
- package/build/index.esm.js +488 -230
- package/build/index.esm.js.map +1 -1
- package/build/index.js +489 -231
- package/build/index.js.map +1 -1
- package/build/ts-utils.d.ts +4 -0
- package/package.json +3 -1
|
@@ -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:
|
|
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
|
-
|
|
19
|
+
optionGroups: OptionGroup[];
|
|
15
20
|
trigger: React.ReactNode;
|
|
16
21
|
contentProps?: DropdownMenu.DropdownMenuContentProps;
|
|
17
22
|
itemProps?: DropdownMenu.DropdownMenuItemProps;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import React, { FC, ReactNode } from 'react';
|
|
2
|
+
import { OptionGroup } from '../Dropdown/Dropdown';
|
|
3
3
|
import '../buttons.scss';
|
|
4
4
|
export interface SettingsButtonProps {
|
|
5
|
-
disabled: boolean;
|
|
6
5
|
onClick: () => void;
|
|
7
|
-
label: string;
|
|
8
|
-
options?:
|
|
6
|
+
label: string | ReactNode;
|
|
7
|
+
options?: OptionGroup[];
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
triggerIcon?: React.ReactNode;
|
|
9
10
|
}
|
|
10
11
|
export declare const SettingsButton: FC<SettingsButtonProps>;
|
package/build/buttons.scss
CHANGED
package/build/hooks/types.d.ts
CHANGED
|
@@ -2,8 +2,11 @@ export interface Options {
|
|
|
2
2
|
layer?: string;
|
|
3
3
|
units?: string;
|
|
4
4
|
}
|
|
5
|
+
export declare type GeometryAction = 'BakeGeometry' | 'ClearGeometry' | 'DrawGeometry' | 'DisableDraw' | 'CombinedRendering';
|
|
6
|
+
export declare type ModelAction = 'BakePollinationModel' | 'DisableDrawPollinationModel' | 'DrawPollinationModel' | 'CombinedRenderingPollinationModel';
|
|
7
|
+
export declare type Action = GeometryAction | ModelAction | 'RunCommand' | 'SetModelSettings';
|
|
5
8
|
export interface Message {
|
|
6
|
-
action?:
|
|
9
|
+
action?: Action;
|
|
7
10
|
data?: any;
|
|
8
11
|
options?: any;
|
|
9
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Message } from './types';
|
|
1
|
+
import { GeometryAction, Message } from './types';
|
|
2
2
|
interface SendGeometryOptions {
|
|
3
3
|
layer: string;
|
|
4
4
|
units: string;
|
|
@@ -11,6 +11,6 @@ declare type SendGeometryMessage = Message & SendGeometry;
|
|
|
11
11
|
export declare const useSendGeometry: () => {
|
|
12
12
|
host: any;
|
|
13
13
|
state: {};
|
|
14
|
-
sendGeometry: (
|
|
14
|
+
sendGeometry: (action: GeometryAction, message: SendGeometryMessage) => Message;
|
|
15
15
|
};
|
|
16
16
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Message } from './types';
|
|
1
|
+
import { ModelAction, Message } from './types';
|
|
2
2
|
interface SendGeometryOptions {
|
|
3
3
|
layer: string;
|
|
4
4
|
units: string;
|
|
@@ -11,6 +11,6 @@ declare type SendGeometryMessage = Message & SendGeometry;
|
|
|
11
11
|
export declare const useSendHbjson: () => {
|
|
12
12
|
host: any;
|
|
13
13
|
state: {};
|
|
14
|
-
sendHbjson: (
|
|
14
|
+
sendHbjson: (action: ModelAction, message: SendGeometryMessage) => Message;
|
|
15
15
|
};
|
|
16
16
|
export {};
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export * from './hooks';
|
|
2
2
|
export * from './GetGeometry/GetGeometry';
|
|
3
|
-
export * from './
|
|
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 './
|
|
8
|
+
export * from './SendModel/SendModel';
|