@wandelbots/wandelbots-js-react-components 1.1.4 → 1.2.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.
- package/dist/cjs/components/3d-viewport/SafetyZonesRenderer.d.ts +2 -0
- package/dist/cjs/index.js +5875 -1
- package/dist/cjs/types/components/3d-viewport/CoordinateSystemTransform.d.ts +10 -0
- package/dist/cjs/types/components/3d-viewport/PresetEnvironment.d.ts +6 -0
- package/dist/cjs/types/components/3d-viewport/SafetyZonesRenderer.d.ts +6 -0
- package/dist/cjs/types/components/robots/ABB_1200_07_7.d.ts +2 -0
- package/dist/cjs/types/components/robots/AxisConfig.d.ts +2 -0
- package/dist/cjs/types/components/robots/DHRobot.d.ts +2 -0
- package/dist/cjs/types/components/robots/FANUC_ARC_Mate_100iD.d.ts +2 -0
- package/dist/cjs/types/components/robots/FANUC_ARC_Mate_120iD.d.ts +2 -0
- package/dist/cjs/types/components/robots/FANUC_CRX10iA.d.ts +2 -0
- package/dist/cjs/types/components/robots/FANUC_CRX25iA.d.ts +2 -0
- package/dist/cjs/types/components/robots/FANUC_CRX25iAL.d.ts +2 -0
- package/dist/cjs/types/components/robots/KUKA_KR210_R2700.d.ts +2 -0
- package/dist/cjs/types/components/robots/KUKA_KR270_R2700.d.ts +2 -0
- package/dist/cjs/types/components/robots/RobotAnimator.d.ts +11 -0
- package/dist/cjs/types/components/robots/SupportedRobot.d.ts +14 -0
- package/dist/cjs/types/components/robots/UniversalRobots_UR10.d.ts +2 -0
- package/dist/cjs/types/components/robots/UniversalRobots_UR10e.d.ts +2 -0
- package/dist/cjs/types/components/robots/UniversalRobots_UR3.d.ts +2 -0
- package/dist/cjs/types/components/robots/UniversalRobots_UR3e.d.ts +2 -0
- package/dist/cjs/types/components/robots/UniversalRobots_UR5.d.ts +2 -0
- package/dist/cjs/types/components/robots/UniversalRobots_UR5e.d.ts +2 -0
- package/dist/cjs/types/components/robots/Yaskawa_AR1440.d.ts +2 -0
- package/dist/cjs/types/components/robots/Yaskawa_AR1730.d.ts +2 -0
- package/dist/cjs/types/components/robots/Yaskawa_AR2010.d.ts +2 -0
- package/dist/cjs/types/components/robots/Yaskawa_AR3120.d.ts +2 -0
- package/dist/cjs/types/components/robots/Yaskawa_AR900.d.ts +2 -0
- package/dist/cjs/types/components/utils/hooks.d.ts +21 -0
- package/dist/cjs/types/components/utils/robotTreeQuery.d.ts +5 -0
- package/dist/cjs/types/components/wandelscript-editor/WandelscriptEditor.d.ts +12 -0
- package/dist/cjs/types/components/wandelscript-editor/WandelscriptEditor.stories.d.ts +5 -0
- package/dist/cjs/types/components/wandelscript-editor/wandelscript.tmLanguage.d.ts +44 -0
- package/dist/cjs/types/icons/arrowForwardFilled.d.ts +1 -0
- package/dist/cjs/types/icons/expandFilled.d.ts +1 -0
- package/dist/cjs/types/icons/home.d.ts +1 -0
- package/dist/cjs/types/icons/index.d.ts +6 -0
- package/dist/cjs/types/icons/infoOutlined.d.ts +1 -0
- package/dist/cjs/types/icons/robot.d.ts +1 -0
- package/dist/cjs/types/icons/wbLogo.d.ts +6 -0
- package/dist/cjs/types/index.d.ts +4 -0
- package/dist/cjs/types/themes/color.d.ts +9 -0
- package/dist/cjs/types/themes/theme.d.ts +143 -0
- package/dist/cjs/types/themes/wbTheme.d.ts +1 -0
- package/dist/cjs/types/themes/wbTheme.stories.d.ts +6 -0
- package/dist/esm/components/3d-viewport/SafetyZonesRenderer.d.ts +2 -0
- package/dist/esm/index.js +5852 -1
- package/dist/esm/types/components/3d-viewport/CoordinateSystemTransform.d.ts +10 -0
- package/dist/esm/types/components/3d-viewport/PresetEnvironment.d.ts +6 -0
- package/dist/esm/types/components/3d-viewport/SafetyZonesRenderer.d.ts +6 -0
- package/dist/esm/types/components/robots/ABB_1200_07_7.d.ts +2 -0
- package/dist/esm/types/components/robots/AxisConfig.d.ts +2 -0
- package/dist/esm/types/components/robots/DHRobot.d.ts +2 -0
- package/dist/esm/types/components/robots/FANUC_ARC_Mate_100iD.d.ts +2 -0
- package/dist/esm/types/components/robots/FANUC_ARC_Mate_120iD.d.ts +2 -0
- package/dist/esm/types/components/robots/FANUC_CRX10iA.d.ts +2 -0
- package/dist/esm/types/components/robots/FANUC_CRX25iA.d.ts +2 -0
- package/dist/esm/types/components/robots/FANUC_CRX25iAL.d.ts +2 -0
- package/dist/esm/types/components/robots/KUKA_KR210_R2700.d.ts +2 -0
- package/dist/esm/types/components/robots/KUKA_KR270_R2700.d.ts +2 -0
- package/dist/esm/types/components/robots/RobotAnimator.d.ts +11 -0
- package/dist/esm/types/components/robots/SupportedRobot.d.ts +14 -0
- package/dist/esm/types/components/robots/UniversalRobots_UR10.d.ts +2 -0
- package/dist/esm/types/components/robots/UniversalRobots_UR10e.d.ts +2 -0
- package/dist/esm/types/components/robots/UniversalRobots_UR3.d.ts +2 -0
- package/dist/esm/types/components/robots/UniversalRobots_UR3e.d.ts +2 -0
- package/dist/esm/types/components/robots/UniversalRobots_UR5.d.ts +2 -0
- package/dist/esm/types/components/robots/UniversalRobots_UR5e.d.ts +2 -0
- package/dist/esm/types/components/robots/Yaskawa_AR1440.d.ts +2 -0
- package/dist/esm/types/components/robots/Yaskawa_AR1730.d.ts +2 -0
- package/dist/esm/types/components/robots/Yaskawa_AR2010.d.ts +2 -0
- package/dist/esm/types/components/robots/Yaskawa_AR3120.d.ts +2 -0
- package/dist/esm/types/components/robots/Yaskawa_AR900.d.ts +2 -0
- package/dist/esm/types/components/utils/hooks.d.ts +21 -0
- package/dist/esm/types/components/utils/robotTreeQuery.d.ts +5 -0
- package/dist/esm/types/components/wandelscript-editor/WandelscriptEditor.d.ts +12 -0
- package/dist/esm/types/components/wandelscript-editor/WandelscriptEditor.stories.d.ts +5 -0
- package/dist/esm/types/components/wandelscript-editor/wandelscript.tmLanguage.d.ts +44 -0
- package/dist/esm/types/icons/arrowForwardFilled.d.ts +1 -0
- package/dist/esm/types/icons/expandFilled.d.ts +1 -0
- package/dist/esm/types/icons/home.d.ts +1 -0
- package/dist/esm/types/icons/index.d.ts +6 -0
- package/dist/esm/types/icons/infoOutlined.d.ts +1 -0
- package/dist/esm/types/icons/robot.d.ts +1 -0
- package/dist/esm/types/icons/wbLogo.d.ts +6 -0
- package/dist/esm/types/index.d.ts +4 -0
- package/dist/esm/types/themes/color.d.ts +9 -0
- package/dist/esm/types/themes/theme.d.ts +143 -0
- package/dist/esm/types/themes/wbTheme.d.ts +1 -0
- package/dist/esm/types/themes/wbTheme.stories.d.ts +6 -0
- package/dist/index.d.ts +33 -0
- package/package.json +9 -5
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { CoordinateSystem } from "@wandelbots/wandelbots-api-client";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Applies a API coordinate system transformation to
|
|
5
|
+
* all react-three child components.
|
|
6
|
+
*/
|
|
7
|
+
export declare const CoordinateSystemTransform: ({ coordinateSystem, children, }: {
|
|
8
|
+
coordinateSystem?: CoordinateSystem;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SafetySetupSafetyZone } from "@wandelbots/wandelbots-js";
|
|
2
|
+
import { type GroupProps } from "@react-three/fiber";
|
|
3
|
+
export type SafetyZonesRendererProps = {
|
|
4
|
+
safetyZones: SafetySetupSafetyZone[];
|
|
5
|
+
} & GroupProps;
|
|
6
|
+
export declare function SafetyZonesRenderer({ safetyZones, ...props }: SafetyZonesRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as THREE from "three";
|
|
2
|
+
import { type RobotSceneJoint } from "../utils/robotTreeQuery";
|
|
3
|
+
import type { ConnectedMotionGroup } from "@wandelbots/wandelbots-js";
|
|
4
|
+
type RobotAnimatorProps = {
|
|
5
|
+
connectedMotionGroup: ConnectedMotionGroup;
|
|
6
|
+
robotRootObjectName: string;
|
|
7
|
+
onRotationChanged: (joints: THREE.Object3D[], jointValues: number[]) => void;
|
|
8
|
+
jointCollector?: (rootObject: THREE.Object3D) => RobotSceneJoint[];
|
|
9
|
+
};
|
|
10
|
+
export default function RobotAnimator({ connectedMotionGroup, robotRootObjectName, onRotationChanged, jointCollector, }: RobotAnimatorProps): any;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type GroupProps } from "@react-three/fiber";
|
|
2
|
+
import type { ConnectedMotionGroup } from "@wandelbots/wandelbots-js";
|
|
3
|
+
export type DHRobotProps = {
|
|
4
|
+
connectedMotionGroup: ConnectedMotionGroup;
|
|
5
|
+
} & GroupProps;
|
|
6
|
+
export type RobotProps = {
|
|
7
|
+
connectedMotionGroup: ConnectedMotionGroup;
|
|
8
|
+
modelURL: string;
|
|
9
|
+
} & GroupProps;
|
|
10
|
+
export type SupportedRobotProps = {
|
|
11
|
+
connectedMotionGroup: ConnectedMotionGroup;
|
|
12
|
+
getModel?: (modelFromController: string) => string;
|
|
13
|
+
} & GroupProps;
|
|
14
|
+
export declare function SupportedRobot({ connectedMotionGroup, getModel, ...props }: SupportedRobotProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { autorun, reaction } from "mobx";
|
|
2
|
+
import { type EffectCallback } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Run code once on component mount. Shorthand for useEffect(effect, []).
|
|
5
|
+
*/
|
|
6
|
+
export declare function useMounted(effect: EffectCallback): void;
|
|
7
|
+
/**
|
|
8
|
+
* Initialize a mobx autorun watcher on component mount, and
|
|
9
|
+
* clean it up when the component unmounts.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useAutorun(view: Parameters<typeof autorun>[0]): void;
|
|
12
|
+
/**
|
|
13
|
+
* Initialize a mobx reaction watcher on component mount, and
|
|
14
|
+
* clean it up when the component unmounts.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useReaction<T>(expression: Parameters<typeof reaction<T>>[0], effect: Parameters<typeof reaction<T>>[1], opts?: Parameters<typeof reaction<T>>[2]): void;
|
|
17
|
+
/**
|
|
18
|
+
* Run a callback on every animation frame. Cleans up
|
|
19
|
+
* after component unmount.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useAnimationFrame(callback: () => void): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type * as THREE from "three";
|
|
2
|
+
export type RobotSceneJoint = THREE.Object3D;
|
|
3
|
+
export declare const defaultJointNamePattern = "(^joint_[0-9]+$)|(_J[0-9]+$)";
|
|
4
|
+
export declare function getAllObjects(root: THREE.Object3D): THREE.Object3D[];
|
|
5
|
+
export declare function getAllJointsByName(rootObject: THREE.Object3D, jointNamePattern?: string): RobotSceneJoint[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Monaco } from "@monaco-editor/react";
|
|
2
|
+
import { editor } from "monaco-editor";
|
|
3
|
+
type WandelscriptEditorProps = {
|
|
4
|
+
/** The current Wandelscript content of the code editor (controlled component) */
|
|
5
|
+
code?: string;
|
|
6
|
+
/** What to do when the user edits the code */
|
|
7
|
+
onChange?: (code: string | undefined, ev: editor.IModelContentChangedEvent) => void;
|
|
8
|
+
/** Callback to further configure monaco on startup if needed */
|
|
9
|
+
monacoSetup?: (monaco: Monaco) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const WandelscriptEditor: (props: WandelscriptEditorProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
$schema: string;
|
|
3
|
+
name: string;
|
|
4
|
+
patterns: {
|
|
5
|
+
include: string;
|
|
6
|
+
}[];
|
|
7
|
+
repository: {
|
|
8
|
+
keywords: {
|
|
9
|
+
patterns: {
|
|
10
|
+
name: string;
|
|
11
|
+
match: string;
|
|
12
|
+
}[];
|
|
13
|
+
};
|
|
14
|
+
strings: {
|
|
15
|
+
name: string;
|
|
16
|
+
begin: string;
|
|
17
|
+
end: string;
|
|
18
|
+
patterns: {
|
|
19
|
+
name: string;
|
|
20
|
+
match: string;
|
|
21
|
+
}[];
|
|
22
|
+
};
|
|
23
|
+
comments: {
|
|
24
|
+
patterns: {
|
|
25
|
+
begin: string;
|
|
26
|
+
beginCaptures: {
|
|
27
|
+
"0": {
|
|
28
|
+
name: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
end: string;
|
|
32
|
+
name: string;
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
35
|
+
functions: {
|
|
36
|
+
patterns: {
|
|
37
|
+
match: string;
|
|
38
|
+
name: string;
|
|
39
|
+
}[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
scopeName: string;
|
|
43
|
+
};
|
|
44
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ArrowForwardFilledIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function ExpandFilledIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function HomeIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { ArrowForwardFilledIcon } from "./arrowForwardFilled";
|
|
2
|
+
export { ExpandFilledIcon } from "./expandFilled";
|
|
3
|
+
export { HomeIcon } from "./home";
|
|
4
|
+
export { InfoOutlinedIcon } from "./infoOutlined";
|
|
5
|
+
export { RobotIcon } from "./robot";
|
|
6
|
+
export { WBLogoIcon } from "./wbLogo";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function InfoOutlinedIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function RobotIcon(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export declare function ColorSection(props: {
|
|
3
|
+
name: string;
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function Color({ name, color }: {
|
|
7
|
+
name: string;
|
|
8
|
+
color: string;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { ThemeOptions } from '@mui/material/styles';
|
|
2
|
+
type ThemeName = 'wandelbots';
|
|
3
|
+
export declare const allThemes: {
|
|
4
|
+
wb: import("@mui/material/styles").Theme;
|
|
5
|
+
};
|
|
6
|
+
export interface NamedThemeOptions extends ThemeOptions {
|
|
7
|
+
name: ThemeName;
|
|
8
|
+
}
|
|
9
|
+
declare module '@mui/material/styles' {
|
|
10
|
+
interface Theme {
|
|
11
|
+
backgrounds: {
|
|
12
|
+
light1: string;
|
|
13
|
+
light2: string;
|
|
14
|
+
medium: string;
|
|
15
|
+
dark1: string;
|
|
16
|
+
dark2: string;
|
|
17
|
+
};
|
|
18
|
+
buttonPrimary: {
|
|
19
|
+
background: string;
|
|
20
|
+
text: string;
|
|
21
|
+
};
|
|
22
|
+
buttonSecondary: {
|
|
23
|
+
background: string;
|
|
24
|
+
text: string;
|
|
25
|
+
};
|
|
26
|
+
buttonBack: {
|
|
27
|
+
background: string;
|
|
28
|
+
text: string;
|
|
29
|
+
};
|
|
30
|
+
inputField: {
|
|
31
|
+
background: string;
|
|
32
|
+
text: string;
|
|
33
|
+
unitBackground: string;
|
|
34
|
+
unitText: string;
|
|
35
|
+
};
|
|
36
|
+
sidebar: {
|
|
37
|
+
background: string;
|
|
38
|
+
backgroundSelected: string;
|
|
39
|
+
selected: string;
|
|
40
|
+
};
|
|
41
|
+
actionPanel: {
|
|
42
|
+
background: string;
|
|
43
|
+
backgroundSelected: string;
|
|
44
|
+
text: string;
|
|
45
|
+
};
|
|
46
|
+
controlPanel: {
|
|
47
|
+
background: string;
|
|
48
|
+
text: string;
|
|
49
|
+
};
|
|
50
|
+
listItem: {
|
|
51
|
+
background: string;
|
|
52
|
+
backgroundSelected: string;
|
|
53
|
+
textTitle: string;
|
|
54
|
+
textTitleSelected: string;
|
|
55
|
+
textDesc: string;
|
|
56
|
+
textDescSelected: string;
|
|
57
|
+
};
|
|
58
|
+
breadcrumb: {
|
|
59
|
+
background: string;
|
|
60
|
+
text: string;
|
|
61
|
+
textSelected: string;
|
|
62
|
+
};
|
|
63
|
+
axes: {
|
|
64
|
+
x: string;
|
|
65
|
+
y: string;
|
|
66
|
+
z: string;
|
|
67
|
+
};
|
|
68
|
+
viewport: {
|
|
69
|
+
background: string;
|
|
70
|
+
controlBackground: string;
|
|
71
|
+
};
|
|
72
|
+
tabIcon: {
|
|
73
|
+
color: string;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
interface ThemeOptions {
|
|
77
|
+
backgrounds?: {
|
|
78
|
+
light1?: string;
|
|
79
|
+
light2?: string;
|
|
80
|
+
medium?: string;
|
|
81
|
+
dark1?: string;
|
|
82
|
+
dark2?: string;
|
|
83
|
+
};
|
|
84
|
+
buttonPrimary?: {
|
|
85
|
+
background?: string;
|
|
86
|
+
text?: string;
|
|
87
|
+
};
|
|
88
|
+
buttonSecondary?: {
|
|
89
|
+
background?: string;
|
|
90
|
+
text?: string;
|
|
91
|
+
};
|
|
92
|
+
buttonBack?: {
|
|
93
|
+
background?: string;
|
|
94
|
+
text?: string;
|
|
95
|
+
};
|
|
96
|
+
inputField?: {
|
|
97
|
+
background?: string;
|
|
98
|
+
text?: string;
|
|
99
|
+
unitBackground?: string;
|
|
100
|
+
unitText?: string;
|
|
101
|
+
};
|
|
102
|
+
sidebar?: {
|
|
103
|
+
background?: string;
|
|
104
|
+
backgroundSelected?: string;
|
|
105
|
+
selected?: string;
|
|
106
|
+
};
|
|
107
|
+
actionPanel?: {
|
|
108
|
+
background?: string;
|
|
109
|
+
backgroundSelected?: string;
|
|
110
|
+
text?: string;
|
|
111
|
+
};
|
|
112
|
+
controlPanel?: {
|
|
113
|
+
background?: string;
|
|
114
|
+
text?: string;
|
|
115
|
+
};
|
|
116
|
+
listItem?: {
|
|
117
|
+
background?: string;
|
|
118
|
+
backgroundSelected?: string;
|
|
119
|
+
textTitle?: string;
|
|
120
|
+
textTitleSelected?: string;
|
|
121
|
+
textDesc?: string;
|
|
122
|
+
textDescSelected?: string;
|
|
123
|
+
};
|
|
124
|
+
breadcrumb?: {
|
|
125
|
+
background?: string;
|
|
126
|
+
text?: string;
|
|
127
|
+
textSelected?: string;
|
|
128
|
+
};
|
|
129
|
+
axes?: {
|
|
130
|
+
x?: string;
|
|
131
|
+
y?: string;
|
|
132
|
+
z?: string;
|
|
133
|
+
};
|
|
134
|
+
viewport?: {
|
|
135
|
+
background?: string;
|
|
136
|
+
controlBackground?: string;
|
|
137
|
+
};
|
|
138
|
+
tabIcon?: {
|
|
139
|
+
color?: string;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const wbTheme: import("@mui/material/styles").Theme;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
declare const ColorPalette: () => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare const meta: Meta<typeof ColorPalette>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ColorPalette>;
|
|
6
|
+
export declare const colorPalette: Story;
|