@wandelbots/wandelbots-js-react-components 4.7.1 → 4.7.2-pr.dev-RB-3348-v1-clean-up.560.cbf9c17
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/README.md +11 -32
- package/dist/3d-BOCs0RwR.cjs +2 -0
- package/dist/3d-BOCs0RwR.cjs.map +1 -0
- package/dist/3d-BTtdSlR9.js +1206 -0
- package/dist/3d-BTtdSlR9.js.map +1 -0
- package/dist/3d.cjs.js +1 -2
- package/dist/3d.esm.js +2 -0
- package/dist/auth0-spa-js.production.esm-8ppNz0la.js +5007 -0
- package/dist/auth0-spa-js.production.esm-8ppNz0la.js.map +1 -0
- package/dist/auth0-spa-js.production.esm-cNFf2AtX.cjs +5 -0
- package/dist/auth0-spa-js.production.esm-cNFf2AtX.cjs.map +1 -0
- package/dist/components/3d-viewport/CoordinateSystemTransform.d.ts +1 -1
- package/dist/components/3d-viewport/CoordinateSystemTransform.d.ts.map +1 -1
- package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts +1 -2
- package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts.map +1 -1
- package/dist/components/3d-viewport/TrajectoryRenderer.d.ts +2 -2
- package/dist/components/3d-viewport/TrajectoryRenderer.d.ts.map +1 -1
- package/dist/components/3d-viewport/collider/ColliderCollection.d.ts +1 -1
- package/dist/components/3d-viewport/collider/ColliderElement.d.ts +1 -1
- package/dist/components/3d-viewport/collider/CollisionSceneRenderer.d.ts +2 -2
- package/dist/components/3d-viewport/collider/colliderShapeToBufferGeometry.d.ts +1 -1
- package/dist/components/jogging/JoggingStore.d.ts +5 -11
- package/dist/components/jogging/JoggingStore.d.ts.map +1 -1
- package/dist/core-DtLSGTAb.js +18258 -0
- package/dist/core-DtLSGTAb.js.map +1 -0
- package/dist/core-DufB-Zu5.cjs +52 -0
- package/dist/core-DufB-Zu5.cjs.map +1 -0
- package/dist/core.cjs.js +1 -2
- package/dist/core.esm.js +3 -0
- package/dist/index.cjs.js +1 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +4 -0
- package/dist/interpolation-BmgrXVQ7.js +5859 -0
- package/dist/interpolation-BmgrXVQ7.js.map +1 -0
- package/dist/interpolation-Cz29Pgpr.cjs +8 -0
- package/dist/interpolation-Cz29Pgpr.cjs.map +1 -0
- package/dist/lib/ConnectedMotionGroup.d.ts +2 -3
- package/dist/lib/ConnectedMotionGroup.d.ts.map +1 -1
- package/dist/lib/MotionStreamConnection.d.ts +0 -1
- package/dist/lib/MotionStreamConnection.d.ts.map +1 -1
- package/dist/themes/createDarkTheme.d.ts.map +1 -1
- package/dist/themes/themeTypes.d.ts +0 -4
- package/dist/themes/themeTypes.d.ts.map +1 -1
- package/package.json +21 -24
- package/src/components/3d-viewport/CoordinateSystemTransform.tsx +29 -18
- package/src/components/3d-viewport/SafetyZonesRenderer.tsx +13 -96
- package/src/components/3d-viewport/TrajectoryRenderer.tsx +8 -8
- package/src/components/3d-viewport/collider/ColliderCollection.tsx +1 -1
- package/src/components/3d-viewport/collider/ColliderElement.tsx +1 -1
- package/src/components/3d-viewport/collider/CollisionSceneRenderer.tsx +2 -2
- package/src/components/3d-viewport/collider/colliderShapeToBufferGeometry.ts +1 -1
- package/src/components/jogging/JoggingStore.ts +5 -5
- package/src/components/utils/interpolation.test.ts +3 -3
- package/src/index.ts +0 -1
- package/src/lib/ConnectedMotionGroup.ts +0 -5
- package/src/lib/MotionStreamConnection.ts +0 -5
- package/src/themes/createDarkTheme.ts +1 -22
- package/src/themes/themeTypes.ts +0 -5
- package/dist/3d.cjs.js.map +0 -1
- package/dist/3d.es.js +0 -19
- package/dist/3d.es.js.map +0 -1
- package/dist/LoadingCover-B3UN1lnU.js +0 -81
- package/dist/LoadingCover-B3UN1lnU.js.map +0 -1
- package/dist/LoadingCover-DXcsXWDy.cjs +0 -2
- package/dist/LoadingCover-DXcsXWDy.cjs.map +0 -1
- package/dist/MotionGroupVisualizer-7Mw9PINy.js +0 -1366
- package/dist/MotionGroupVisualizer-7Mw9PINy.js.map +0 -1
- package/dist/MotionGroupVisualizer-C0ll-LQF.cjs +0 -2
- package/dist/MotionGroupVisualizer-C0ll-LQF.cjs.map +0 -1
- package/dist/WandelscriptEditor-6sAoniLC.cjs +0 -2
- package/dist/WandelscriptEditor-6sAoniLC.cjs.map +0 -1
- package/dist/WandelscriptEditor-kWC2VyG_.js +0 -140
- package/dist/WandelscriptEditor-kWC2VyG_.js.map +0 -1
- package/dist/auth0-spa-js.production.esm-DNao6_S5.js +0 -4064
- package/dist/auth0-spa-js.production.esm-DNao6_S5.js.map +0 -1
- package/dist/auth0-spa-js.production.esm-DaBMfOV8.cjs +0 -5
- package/dist/auth0-spa-js.production.esm-DaBMfOV8.cjs.map +0 -1
- package/dist/components/wandelscript-editor/WandelscriptEditor.d.ts +0 -16
- package/dist/components/wandelscript-editor/WandelscriptEditor.d.ts.map +0 -1
- package/dist/components/wandelscript-editor/wandelscript.tmLanguage.d.ts +0 -45
- package/dist/components/wandelscript-editor/wandelscript.tmLanguage.d.ts.map +0 -1
- package/dist/core.cjs.js.map +0 -1
- package/dist/core.es.js +0 -54
- package/dist/core.es.js.map +0 -1
- package/dist/externalizeComponent-B98tgTPP.cjs +0 -24
- package/dist/externalizeComponent-B98tgTPP.cjs.map +0 -1
- package/dist/externalizeComponent-BOqKMZMc.js +0 -526
- package/dist/externalizeComponent-BOqKMZMc.js.map +0 -1
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js +0 -72
- package/dist/index.es.js.map +0 -1
- package/dist/interpolation-B8AcxfdD.js +0 -7167
- package/dist/interpolation-B8AcxfdD.js.map +0 -1
- package/dist/interpolation-SWzo5zr4.cjs +0 -20
- package/dist/interpolation-SWzo5zr4.cjs.map +0 -1
- package/dist/theming-BKpqgTRM.js +0 -22360
- package/dist/theming-BKpqgTRM.js.map +0 -1
- package/dist/theming-CatQaIl_.cjs +0 -115
- package/dist/theming-CatQaIl_.cjs.map +0 -1
- package/dist/wandelscript.cjs.js +0 -2
- package/dist/wandelscript.cjs.js.map +0 -1
- package/dist/wandelscript.d.ts +0 -2
- package/dist/wandelscript.d.ts.map +0 -1
- package/dist/wandelscript.es.js +0 -5
- package/dist/wandelscript.es.js.map +0 -1
- package/src/components/wandelscript-editor/WandelscriptEditor.tsx +0 -142
- package/src/components/wandelscript-editor/wandelscript.tmLanguage.ts +0 -62
- package/src/wandelscript.ts +0 -2
|
@@ -42,7 +42,6 @@ export declare class ConnectedMotionGroup {
|
|
|
42
42
|
get motionGroupId(): string;
|
|
43
43
|
get controllerId(): string;
|
|
44
44
|
get modelFromController(): string;
|
|
45
|
-
get wandelscriptIdentifier(): string;
|
|
46
45
|
/** Jogging velocity in radians for rotation and joint movement */
|
|
47
46
|
get joggingVelocityRads(): number;
|
|
48
47
|
get joints(): {
|
|
@@ -54,10 +53,10 @@ export declare class ConnectedMotionGroup {
|
|
|
54
53
|
a?: number;
|
|
55
54
|
d?: number;
|
|
56
55
|
reverse_rotation_direction?: boolean;
|
|
57
|
-
type?: import("@wandelbots/nova-
|
|
56
|
+
type?: import("@wandelbots/nova-js/v2").JointTypeEnum;
|
|
58
57
|
}[] | undefined;
|
|
59
58
|
get safetyZones(): {
|
|
60
|
-
[key: string]: import("@wandelbots/nova-
|
|
59
|
+
[key: string]: import("@wandelbots/nova-js/v2").Collider;
|
|
61
60
|
} | undefined;
|
|
62
61
|
/** Gets the robot mounting position offset in 3D viz coordinates */
|
|
63
62
|
get mountingPosition(): [number, number, number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectedMotionGroup.d.ts","sourceRoot":"","sources":["../../src/lib/ConnectedMotionGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAEV,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EAEV,oBAAoB,EAErB,MAAM,wBA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YAOxB;IAED;;OAEG;IACH,IAAI,uBAAuB,YAS1B;IAED;;;OAGG;IACH,IAAI,UAAU,YAMb;IAEK,UAAU;IA2BV,QAAQ;IA2Bd,gBAAgB;IAQhB,OAAO;IAKP,kBAAkB,CAAC,QAAQ,EAAE,MAAM;CAGpC"}
|
|
@@ -15,7 +15,6 @@ export declare class MotionStreamConnection {
|
|
|
15
15
|
constructor(nova: NovaClient, controller: RobotControllerState, motionGroup: MotionGroupState, description: MotionGroupDescription, initialMotionState: MotionGroupState, motionStateSocket: AutoReconnectingWebsocket);
|
|
16
16
|
get motionGroupId(): string;
|
|
17
17
|
get controllerId(): string;
|
|
18
|
-
get wandelscriptIdentifier(): string;
|
|
19
18
|
get joints(): {
|
|
20
19
|
index: number;
|
|
21
20
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MotionStreamConnection.d.ts","sourceRoot":"","sources":["../../src/lib/MotionStreamConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAW/B;;GAEG;AACH,qBAAa,sBAAsB;IA2D/B,QAAQ,CAAC,IAAI,EAAE,UAAU;IACzB,QAAQ,CAAC,UAAU,EAAE,oBAAoB;IACzC,QAAQ,CAAC,WAAW,EAAE,gBAAgB;IACtC,QAAQ,CAAC,WAAW,EAAE,sBAAsB;IAC5C,QAAQ,CAAC,kBAAkB,EAAE,gBAAgB;IAC7C,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB;WA/D1C,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM;IAuDzD,0BAA0B,EAAE,gBAAgB,CAAA;gBAGjC,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,oBAAoB,EAChC,WAAW,EAAE,gBAAgB,EAC7B,WAAW,EAAE,sBAAsB,EACnC,kBAAkB,EAAE,gBAAgB,EACpC,iBAAiB,EAAE,yBAAyB;IA6EvD,IAAI,aAAa,WAEhB;IAED,IAAI,YAAY,WAEf;IAED,IAAI,
|
|
1
|
+
{"version":3,"file":"MotionStreamConnection.d.ts","sourceRoot":"","sources":["../../src/lib/MotionStreamConnection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EACV,sBAAsB,EACtB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACrB,MAAM,wBAAwB,CAAA;AAW/B;;GAEG;AACH,qBAAa,sBAAsB;IA2D/B,QAAQ,CAAC,IAAI,EAAE,UAAU;IACzB,QAAQ,CAAC,UAAU,EAAE,oBAAoB;IACzC,QAAQ,CAAC,WAAW,EAAE,gBAAgB;IACtC,QAAQ,CAAC,WAAW,EAAE,sBAAsB;IAC5C,QAAQ,CAAC,kBAAkB,EAAE,gBAAgB;IAC7C,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB;WA/D1C,IAAI,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM;IAuDzD,0BAA0B,EAAE,gBAAgB,CAAA;gBAGjC,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,oBAAoB,EAChC,WAAW,EAAE,gBAAgB,EAC7B,WAAW,EAAE,sBAAsB,EACnC,kBAAkB,EAAE,gBAAgB,EACpC,iBAAiB,EAAE,yBAAyB;IA6EvD,IAAI,aAAa,WAEhB;IAED,IAAI,YAAY,WAEf;IAED,IAAI,MAAM;;QAMT;IAED,OAAO;CAGR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDarkTheme.d.ts","sourceRoot":"","sources":["../../src/themes/createDarkTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,KAAK,EAAE,MAAM,eAAe,CAAA;AAEjE,wBAAgB,eAAe,IAAI,KAAK,
|
|
1
|
+
{"version":3,"file":"createDarkTheme.d.ts","sourceRoot":"","sources":["../../src/themes/createDarkTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyB,KAAK,KAAK,EAAE,MAAM,eAAe,CAAA;AAEjE,wBAAgB,eAAe,IAAI,KAAK,CAqVvC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { editor } from "monaco-editor";
|
|
2
1
|
type NovaColorPaletteExtension = {
|
|
3
2
|
paletteExt?: {
|
|
4
3
|
primary?: {
|
|
@@ -45,9 +44,6 @@ interface NovaComponentsExtension {
|
|
|
45
44
|
sliderLegendColor?: string;
|
|
46
45
|
};
|
|
47
46
|
};
|
|
48
|
-
WandelscriptEditor?: {
|
|
49
|
-
monacoTheme: editor.IStandaloneThemeData;
|
|
50
|
-
};
|
|
51
47
|
};
|
|
52
48
|
}
|
|
53
49
|
interface BackgroundPaperElevation {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themeTypes.d.ts","sourceRoot":"","sources":["../../src/themes/themeTypes.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"themeTypes.d.ts","sourceRoot":"","sources":["../../src/themes/themeTypes.ts"],"names":[],"mappings":"AAAA,KAAK,yBAAyB,GAAG;IAC/B,UAAU,CAAC,EAAE;QACX,OAAO,CAAC,EAAE;YACR,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,QAAQ,CAAC,EAAE,MAAM,CAAA;YACjB,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,YAAY,CAAC,EAAE,MAAM,CAAA;YACrB,aAAa,CAAC,EAAE,MAAM,CAAA;SACvB,CAAA;QACD,SAAS,CAAC,EAAE;YACV,KAAK,CAAC,EAAE,MAAM,CAAA;SACf,CAAA;KACF,CAAA;CACF,CAAA;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,C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A;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,OAAO;QACf,QAAQ,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;QAC5B,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;KACpD;IAED,UAAU,cAAc;QACtB,QAAQ,CAAC,EAAE,cAAc,CAAC,SAAS,CAAC,CAAA;QACpC,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;KACpD;IAED,UAAU,KAAM,SAAQ,uBAAuB,EAAE,yBAAyB;KAAG;IAE7E,UAAU,YACR,SAAQ,uBAAuB,EAC7B,yBAAyB;KAAG;CACjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.2-pr.dev-RB-3348-v1-clean-up.560.cbf9c17",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -26,19 +26,14 @@
|
|
|
26
26
|
"types": "./dist/3d.d.ts",
|
|
27
27
|
"import": "./dist/3d.es.js",
|
|
28
28
|
"require": "./dist/3d.cjs.js"
|
|
29
|
-
},
|
|
30
|
-
"./wandelscript": {
|
|
31
|
-
"types": "./dist/wandelscript.d.ts",
|
|
32
|
-
"import": "./dist/wandelscript.es.js",
|
|
33
|
-
"require": "./dist/wandelscript.cjs.js"
|
|
34
29
|
}
|
|
35
30
|
},
|
|
36
31
|
"types": "./dist/index.d.ts",
|
|
37
32
|
"scripts": {
|
|
38
33
|
"dev": "storybook dev -p 6006 --no-open",
|
|
39
|
-
"dev:pack": "nodemon -V -w src -e '*' -x \"
|
|
34
|
+
"dev:pack": "nodemon -V -w src -e '*' -x \"pnpm run build && pnpm pack\"",
|
|
40
35
|
"dev:build": "nodemon -V -w src -e '*' -x \"vite build && tsc --declaration --emitDeclarationOnly\"",
|
|
41
|
-
"dev:wbjs": "nodemon --watch $WBJS_PATH -e tgz --exec '
|
|
36
|
+
"dev:wbjs": "nodemon --watch $WBJS_PATH -e tgz --exec 'pnpm install file:$WBJS_PATH && storybook dev -p 6006 --no-open'",
|
|
42
37
|
"tsc": "tsc --pretty --noEmit -p stories/tsconfig.json",
|
|
43
38
|
"test": "test-storybook --url http://127.0.0.1:6006 --index-json --browsers chromium",
|
|
44
39
|
"test:unit": "vitest --workspace vitest.workspace.ts --project unit",
|
|
@@ -66,7 +61,7 @@
|
|
|
66
61
|
"license": "Apache-2.0",
|
|
67
62
|
"engines": {
|
|
68
63
|
"node": ">=18.14.0",
|
|
69
|
-
"
|
|
64
|
+
"pnpm": ">=10.0.0"
|
|
70
65
|
},
|
|
71
66
|
"devDependencies": {
|
|
72
67
|
"@emotion/react": "^11.14.0",
|
|
@@ -79,10 +74,11 @@
|
|
|
79
74
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
80
75
|
"@rollup/plugin-json": "^6.1.0",
|
|
81
76
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
82
|
-
"@rollup/plugin-terser": "^0.
|
|
77
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
83
78
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
84
|
-
"@shikijs/monaco": "^
|
|
79
|
+
"@shikijs/monaco": "^4.0.2",
|
|
85
80
|
"@storybook/addon-docs": "^10.2.3",
|
|
81
|
+
"@storybook/react": "^10.3.5",
|
|
86
82
|
"@storybook/react-vite": "^10.2.3",
|
|
87
83
|
"@storybook/test-runner": "^0.24.1",
|
|
88
84
|
"@svgr/rollup": "^8.1.0",
|
|
@@ -92,19 +88,20 @@
|
|
|
92
88
|
"@types/lodash-es": "^4.17.12",
|
|
93
89
|
"@types/react": "^19.1.8",
|
|
94
90
|
"@types/three": "^0.182.0",
|
|
95
|
-
"@vitejs/plugin-react": "^
|
|
91
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
96
92
|
"add": "^2.0.6",
|
|
97
93
|
"eslint-plugin-storybook": "^10.1.10",
|
|
98
94
|
"glob": "^13.0.0",
|
|
99
95
|
"http-server": "^14.1.1",
|
|
100
96
|
"husky": "^9.1.7",
|
|
101
|
-
"i18next": "^
|
|
97
|
+
"i18next": "^26.0.3",
|
|
102
98
|
"jest-simple-dot-reporter": "^1.0.5",
|
|
103
99
|
"jest-summary-reporter": "^0.0.2",
|
|
104
|
-
"jsdom": "^
|
|
100
|
+
"jsdom": "^29.0.1",
|
|
105
101
|
"monaco-editor": "^0.55.1",
|
|
106
102
|
"nodemon": "^3.1.9",
|
|
107
103
|
"npm-run-all": "^4.1.5",
|
|
104
|
+
"playwright": "^1.59.1",
|
|
108
105
|
"postcss": "^8.5.3",
|
|
109
106
|
"prettier-eslint": "^16.3.0",
|
|
110
107
|
"prop-types": "^15.8.1",
|
|
@@ -117,18 +114,18 @@
|
|
|
117
114
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
118
115
|
"rollup-plugin-postcss": "^4.0.2",
|
|
119
116
|
"semantic-release": "^25.0.2",
|
|
120
|
-
"shiki": "^
|
|
117
|
+
"shiki": "^4.0.2",
|
|
121
118
|
"storybook": "^10.2.3",
|
|
122
119
|
"storybook-preset-inline-svg": "^2.0.0",
|
|
123
|
-
"three": "^0.
|
|
120
|
+
"three": "^0.183.2",
|
|
124
121
|
"three-stdlib": "^2.35.14",
|
|
125
122
|
"ts-dedent": "^2.2.0",
|
|
126
123
|
"tsx": "^4.21.0",
|
|
127
|
-
"typescript": "^
|
|
128
|
-
"unplugin": "^
|
|
129
|
-
"vite": "^
|
|
130
|
-
"vite-plugin-svgr": "^
|
|
131
|
-
"vitest": "^
|
|
124
|
+
"typescript": "^6.0.2",
|
|
125
|
+
"unplugin": "^3.0.0",
|
|
126
|
+
"vite": "^8.0.4",
|
|
127
|
+
"vite-plugin-svgr": "^5.2.0",
|
|
128
|
+
"vitest": "^4.1.2",
|
|
132
129
|
"wait-on": "^9.0.3"
|
|
133
130
|
},
|
|
134
131
|
"peerDependencies": {
|
|
@@ -139,10 +136,10 @@
|
|
|
139
136
|
"@mui/material": "^6 || ^7",
|
|
140
137
|
"@react-three/drei": "^9.122.0 || ^10",
|
|
141
138
|
"@react-three/fiber": "^8 || ^9",
|
|
142
|
-
"@shikijs/monaco": "^
|
|
139
|
+
"@shikijs/monaco": "^4.0.2",
|
|
143
140
|
"react": "^18.0.0 || ^19.0.0",
|
|
144
141
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
145
|
-
"shiki": "^
|
|
142
|
+
"shiki": "^4.0.2",
|
|
146
143
|
"three": ">=0.182",
|
|
147
144
|
"three-stdlib": ">=2"
|
|
148
145
|
},
|
|
@@ -183,7 +180,7 @@
|
|
|
183
180
|
"mobx": "^6.13.6",
|
|
184
181
|
"mobx-react-lite": "^4.1.0",
|
|
185
182
|
"react-error-boundary": "^6.0.3",
|
|
186
|
-
"react-i18next": "^
|
|
183
|
+
"react-i18next": "^17.0.2",
|
|
187
184
|
"username": "^7.0.0"
|
|
188
185
|
},
|
|
189
186
|
"overrides": {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CoordinateSystem } from "@wandelbots/nova-js/
|
|
1
|
+
import type { CoordinateSystem } from "@wandelbots/nova-js/v2"
|
|
2
2
|
import type { ReactNode } from "react"
|
|
3
3
|
import { Quaternion, Vector3 } from "three"
|
|
4
4
|
|
|
@@ -14,28 +14,39 @@ export const CoordinateSystemTransform = ({
|
|
|
14
14
|
children: ReactNode
|
|
15
15
|
}) => {
|
|
16
16
|
const position = new Vector3(
|
|
17
|
-
(coordinateSystem?.position?.
|
|
18
|
-
(coordinateSystem?.position?.
|
|
19
|
-
(coordinateSystem?.position?.
|
|
17
|
+
(coordinateSystem?.position?.[0] ?? 0) / 1000,
|
|
18
|
+
(coordinateSystem?.position?.[1] ?? 0) / 1000,
|
|
19
|
+
(coordinateSystem?.position?.[2] ?? 0) / 1000,
|
|
20
20
|
)
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
const orientationType = coordinateSystem?.orientation_type
|
|
23
|
+
|
|
24
|
+
let quaternion: Quaternion
|
|
25
|
+
|
|
26
|
+
if (orientationType === "QUATERNION") {
|
|
27
|
+
quaternion = new Quaternion(
|
|
28
|
+
coordinateSystem?.orientation?.[0] ?? 0,
|
|
29
|
+
coordinateSystem?.orientation?.[1] ?? 0,
|
|
30
|
+
coordinateSystem?.orientation?.[2] ?? 0,
|
|
31
|
+
coordinateSystem?.orientation?.[3] ?? 1,
|
|
27
32
|
)
|
|
28
|
-
|
|
33
|
+
} else {
|
|
34
|
+
if (orientationType && orientationType !== "ROTATION_VECTOR") {
|
|
35
|
+
console.warn(
|
|
36
|
+
`Unsupported orientation type ${orientationType}. Only ROTATION_VECTOR and QUATERNION are supported.`,
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
// Default to ROTATION_VECTOR
|
|
40
|
+
const rotationVector = new Vector3(
|
|
41
|
+
coordinateSystem?.orientation?.[0] ?? 0,
|
|
42
|
+
coordinateSystem?.orientation?.[1] ?? 0,
|
|
43
|
+
coordinateSystem?.orientation?.[2] ?? 0,
|
|
44
|
+
)
|
|
45
|
+
const magnitude = rotationVector.length()
|
|
46
|
+
const axis = rotationVector.normalize()
|
|
47
|
+
quaternion = new Quaternion().setFromAxisAngle(axis, magnitude)
|
|
29
48
|
}
|
|
30
49
|
|
|
31
|
-
const rotationVector = new Vector3(
|
|
32
|
-
rotation?.angles[0] ?? 0,
|
|
33
|
-
rotation?.angles[1] ?? 0,
|
|
34
|
-
rotation?.angles[2] ?? 0,
|
|
35
|
-
)
|
|
36
|
-
const magnitude = rotationVector.length()
|
|
37
|
-
const axis = rotationVector.normalize()
|
|
38
|
-
const quaternion = new Quaternion().setFromAxisAngle(axis, magnitude)
|
|
39
50
|
return (
|
|
40
51
|
<group position={position} quaternion={quaternion}>
|
|
41
52
|
{children}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useMemo } from "react"
|
|
2
2
|
import { type ThreeElements } from "@react-three/fiber"
|
|
3
3
|
import * as THREE from "three"
|
|
4
4
|
import { ConvexGeometry, RoundedBoxGeometry } from "three-stdlib"
|
|
@@ -12,12 +12,11 @@ import type {
|
|
|
12
12
|
Capsule,
|
|
13
13
|
RectangularCapsule,
|
|
14
14
|
} from "@wandelbots/nova-js/v2"
|
|
15
|
-
import type { Geometry, SafetySetupSafetyZone } from "@wandelbots/nova-js/v1"
|
|
16
15
|
|
|
17
16
|
import { dhParametersToPlaneSize, orientationToQuaternion, verticesToCoplanarity } from "../utils/converters"
|
|
18
17
|
|
|
19
18
|
export type SafetyZonesRendererProps = {
|
|
20
|
-
safetyZones:
|
|
19
|
+
safetyZones: MotionGroupDescription["safety_zones"]
|
|
21
20
|
dhParameters?: DHParameter[]
|
|
22
21
|
} & ThreeElements["group"]
|
|
23
22
|
|
|
@@ -45,14 +44,6 @@ export function SafetyZonesRenderer({
|
|
|
45
44
|
*/
|
|
46
45
|
const planeSize = dhParametersToPlaneSize(dhParameters ?? [])
|
|
47
46
|
|
|
48
|
-
/**
|
|
49
|
-
* Warning during runtime stating the deprecation of the V1 safety zones
|
|
50
|
-
*/
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
Array.isArray(safetyZones) &&
|
|
53
|
-
console.warn("SafetyZonesRenderer: The support of V1 safety zones is deprecated. Please migrate to V2 safety zones.")
|
|
54
|
-
}, [safetyZones])
|
|
55
|
-
|
|
56
47
|
/**
|
|
57
48
|
* Helper function to render plane, sphere, and capsule meshes
|
|
58
49
|
* @param id number
|
|
@@ -134,13 +125,18 @@ export function SafetyZonesRenderer({
|
|
|
134
125
|
* Basically a rounded box with a rectangular cross-section.
|
|
135
126
|
*/
|
|
136
127
|
case "rectangular_capsule": {
|
|
137
|
-
const shape =
|
|
128
|
+
const shape = zone.shape as RectangularCapsule
|
|
138
129
|
const rcRadius = shape.radius / 1000
|
|
139
130
|
const width = shape.sphere_center_distance_x / 1000
|
|
140
131
|
const height = shape.sphere_center_distance_y / 1000
|
|
141
132
|
const depth = rcRadius * 2
|
|
142
133
|
|
|
143
|
-
geometry =
|
|
134
|
+
geometry = (
|
|
135
|
+
<primitive
|
|
136
|
+
object={new RoundedBoxGeometry(width, height, depth, 2, rcRadius)}
|
|
137
|
+
attach="geometry"
|
|
138
|
+
/>
|
|
139
|
+
)
|
|
144
140
|
break
|
|
145
141
|
}
|
|
146
142
|
|
|
@@ -158,98 +154,19 @@ export function SafetyZonesRenderer({
|
|
|
158
154
|
quaternion={orientationToQuaternion(orientation)}
|
|
159
155
|
>
|
|
160
156
|
{geometry}
|
|
161
|
-
<meshStandardMaterial
|
|
162
|
-
{...materialProps}
|
|
163
|
-
polygonOffsetFactor={-id}
|
|
164
|
-
/>
|
|
157
|
+
<meshStandardMaterial {...materialProps} polygonOffsetFactor={-id} />
|
|
165
158
|
</mesh>
|
|
166
159
|
)
|
|
167
160
|
}
|
|
168
161
|
|
|
169
162
|
/**
|
|
170
|
-
* Helper
|
|
163
|
+
* Helper variable render safety zones
|
|
171
164
|
*/
|
|
172
|
-
const
|
|
165
|
+
const renderedSafetyZones = useMemo(() => {
|
|
173
166
|
return Object.values(safetyZones ?? {}).map((zone: Collider, index: number) => {
|
|
174
167
|
return renderMesh(index, zone)
|
|
175
168
|
})
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Helper function to V1 safety zones
|
|
180
|
-
* @deprecated this render function is to be seen as a temporary measure, as the support
|
|
181
|
-
* for the V1 safety zones is to be removed in the future
|
|
182
|
-
*/
|
|
183
|
-
const renderV1SafetyZones = () => {
|
|
184
|
-
if (Array.isArray(safetyZones)) {
|
|
185
|
-
return (safetyZones as SafetySetupSafetyZone[]).map((zone: SafetySetupSafetyZone, index) => {
|
|
186
|
-
let geometries: Geometry[] = []
|
|
187
|
-
if (zone.geometry) {
|
|
188
|
-
if (zone.geometry.compound) {
|
|
189
|
-
geometries = zone.geometry.compound.child_geometries
|
|
190
|
-
} else if (zone.geometry.convex_hull) {
|
|
191
|
-
geometries = [zone.geometry]
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
return geometries.map((geometry, i) => {
|
|
196
|
-
if (!geometry.convex_hull) return null
|
|
197
|
-
|
|
198
|
-
const vertices = geometry.convex_hull.vertices.map(
|
|
199
|
-
(v) => new THREE.Vector3(v.x / 1000, v.y / 1000, v.z / 1000),
|
|
200
|
-
)
|
|
201
|
-
|
|
202
|
-
// Check if the vertices are on the same plane and only define a plane
|
|
203
|
-
// Algorithm has troubles with vertices that are on the same plane so we
|
|
204
|
-
// add a new vertex slightly moved along the normal direction
|
|
205
|
-
const coplanarityResult = verticesToCoplanarity(vertices)
|
|
206
|
-
|
|
207
|
-
if (coplanarityResult.isCoplanar && coplanarityResult.normal) {
|
|
208
|
-
// Add a new vertex slightly moved along the normal direction
|
|
209
|
-
const offset = 0.0001
|
|
210
|
-
const newVertex = new THREE.Vector3().addVectors(
|
|
211
|
-
vertices[0],
|
|
212
|
-
coplanarityResult.normal.multiplyScalar(offset),
|
|
213
|
-
)
|
|
214
|
-
vertices.push(newVertex)
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
let convexGeometry
|
|
218
|
-
try {
|
|
219
|
-
convexGeometry = new ConvexGeometry(vertices)
|
|
220
|
-
} catch (error) {
|
|
221
|
-
console.log("Error creating ConvexGeometry:", error)
|
|
222
|
-
return null
|
|
223
|
-
}
|
|
224
|
-
return (
|
|
225
|
-
<mesh key={`${index}-${i}`} geometry={convexGeometry}>
|
|
226
|
-
<meshStandardMaterial
|
|
227
|
-
key={index}
|
|
228
|
-
attach="material"
|
|
229
|
-
color="#009f4d"
|
|
230
|
-
opacity={0.2}
|
|
231
|
-
depthTest={false}
|
|
232
|
-
depthWrite={false}
|
|
233
|
-
transparent
|
|
234
|
-
polygonOffset
|
|
235
|
-
polygonOffsetFactor={-i}
|
|
236
|
-
/>
|
|
237
|
-
</mesh>
|
|
238
|
-
)
|
|
239
|
-
})
|
|
240
|
-
})
|
|
241
|
-
}
|
|
242
|
-
return null
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/**
|
|
246
|
-
* Helper variable to render both api versions of safety zones
|
|
247
|
-
*/
|
|
248
|
-
const renderedSafetyZones = useMemo(() => {
|
|
249
|
-
return Array.isArray(safetyZones)
|
|
250
|
-
? renderV1SafetyZones()
|
|
251
|
-
: renderV2SafetyZones()
|
|
252
|
-
}, [safetyZones, renderV1SafetyZones, renderV2SafetyZones])
|
|
169
|
+
}, [safetyZones, planeSize])
|
|
253
170
|
|
|
254
171
|
return (
|
|
255
172
|
<group {...props}>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Line } from "@react-three/drei"
|
|
2
|
-
import type {
|
|
2
|
+
import type { Pose } from "@wandelbots/nova-js/v2"
|
|
3
3
|
import * as THREE from "three"
|
|
4
4
|
|
|
5
5
|
export type TrajectoryRendererProps = {
|
|
6
|
-
trajectory:
|
|
6
|
+
trajectory: Pose[]
|
|
7
7
|
} & React.JSX.IntrinsicElements["group"]
|
|
8
8
|
|
|
9
9
|
export function TrajectoryRenderer({
|
|
@@ -11,13 +11,13 @@ export function TrajectoryRenderer({
|
|
|
11
11
|
...props
|
|
12
12
|
}: TrajectoryRendererProps) {
|
|
13
13
|
const points =
|
|
14
|
-
trajectory
|
|
15
|
-
?.map((
|
|
16
|
-
if (
|
|
14
|
+
trajectory
|
|
15
|
+
?.map((pose: Pose) => {
|
|
16
|
+
if (pose.position?.length) {
|
|
17
17
|
return new THREE.Vector3(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
18
|
+
pose.position[0] / 1000,
|
|
19
|
+
pose.position[2] / 1000,
|
|
20
|
+
-pose.position[1] / 1000,
|
|
21
21
|
)
|
|
22
22
|
}
|
|
23
23
|
return null
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CollisionSetup } from "@wandelbots/nova-js/v2"
|
|
2
2
|
import ColliderCollection, {
|
|
3
3
|
type MeshChildrenProvider,
|
|
4
4
|
} from "./ColliderCollection"
|
|
5
5
|
|
|
6
6
|
type CollisionSceneRendererProps = {
|
|
7
|
-
scene:
|
|
7
|
+
scene: CollisionSetup
|
|
8
8
|
meshChildrenProvider: MeshChildrenProvider
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -219,7 +219,7 @@ export class JoggingStore {
|
|
|
219
219
|
this.jogger.dispose()
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
get coordSystemCountByName() {
|
|
222
|
+
get coordSystemCountByName(): Record<string, number> {
|
|
223
223
|
return countBy(this.coordSystems, (cs) => cs.name)
|
|
224
224
|
}
|
|
225
225
|
|
|
@@ -328,11 +328,11 @@ export class JoggingStore {
|
|
|
328
328
|
return discreteIncrementOptions
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
get incrementOptionsById() {
|
|
331
|
+
get incrementOptionsById(): Record<string, IncrementOption> {
|
|
332
332
|
return keyBy(this.incrementOptions, (o) => o.id)
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
get tabsById() {
|
|
335
|
+
get tabsById(): Record<string, { id: TabType; label: string }> {
|
|
336
336
|
return keyBy(this.tabs, (t) => t.id)
|
|
337
337
|
}
|
|
338
338
|
|
|
@@ -344,7 +344,7 @@ export class JoggingStore {
|
|
|
344
344
|
return this.tabs.indexOf(this.currentTab)
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
get coordSystemsById() {
|
|
347
|
+
get coordSystemsById(): Record<string, CoordinateSystem> {
|
|
348
348
|
return keyBy(this.coordSystems, (cs) => cs.coordinate_system)
|
|
349
349
|
}
|
|
350
350
|
|
|
@@ -363,7 +363,7 @@ export class JoggingStore {
|
|
|
363
363
|
: this.selectedCoordSystemId
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
get tcpsById() {
|
|
366
|
+
get tcpsById(): Record<string, RobotTcp> {
|
|
367
367
|
return keyBy(this.tcps, (tcp) => tcp.id)
|
|
368
368
|
}
|
|
369
369
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"
|
|
1
|
+
import { afterEach, beforeEach, describe, expect, it, type MockedFunction, vi } from "vitest"
|
|
2
2
|
import { ValueInterpolator } from "./interpolation"
|
|
3
3
|
|
|
4
4
|
describe("ValueInterpolator", () => {
|
|
5
5
|
let interpolator: ValueInterpolator
|
|
6
|
-
let mockOnChange:
|
|
7
|
-
let mockOnComplete:
|
|
6
|
+
let mockOnChange: MockedFunction<(values: number[]) => void>
|
|
7
|
+
let mockOnComplete: MockedFunction<(values: number[]) => void>
|
|
8
8
|
|
|
9
9
|
beforeEach(() => {
|
|
10
10
|
mockOnChange = vi.fn()
|
package/src/index.ts
CHANGED
|
@@ -258,11 +258,6 @@ export class ConnectedMotionGroup {
|
|
|
258
258
|
return this.description.motion_group_model
|
|
259
259
|
}
|
|
260
260
|
|
|
261
|
-
get wandelscriptIdentifier() {
|
|
262
|
-
const num = this.motionGroupId.split("@")[0]
|
|
263
|
-
return `${this.controllerId.replace(/-/g, "_")}_${num}`
|
|
264
|
-
}
|
|
265
|
-
|
|
266
261
|
/** Jogging velocity in radians for rotation and joint movement */
|
|
267
262
|
get joggingVelocityRads() {
|
|
268
263
|
return (this.joggingVelocity * Math.PI) / 180
|
|
@@ -170,11 +170,6 @@ export class MotionStreamConnection {
|
|
|
170
170
|
return this.controller.controller
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
get wandelscriptIdentifier() {
|
|
174
|
-
const num = this.motionGroupId.split("@")[0]
|
|
175
|
-
return `${this.controllerId.replace(/-/g, "_")}_${num}`
|
|
176
|
-
}
|
|
177
|
-
|
|
178
173
|
get joints() {
|
|
179
174
|
return this.initialMotionState.joint_position.map((_, i) => {
|
|
180
175
|
return {
|
|
@@ -338,28 +338,7 @@ export function createDarkTheme(): Theme {
|
|
|
338
338
|
VelocitySlider: {
|
|
339
339
|
sliderLegendColor: baseTheme.palette.text.primary,
|
|
340
340
|
},
|
|
341
|
-
}
|
|
342
|
-
WandelscriptEditor: {
|
|
343
|
-
monacoTheme: {
|
|
344
|
-
base: "vs-dark",
|
|
345
|
-
inherit: true,
|
|
346
|
-
rules: [
|
|
347
|
-
{
|
|
348
|
-
token: "keyword",
|
|
349
|
-
foreground: "#b349a9ff",
|
|
350
|
-
},
|
|
351
|
-
],
|
|
352
|
-
colors: {
|
|
353
|
-
"editor.background": rgbToHex(
|
|
354
|
-
baseTheme.palette.backgroundPaperElevation?.[5] ?? "",
|
|
355
|
-
),
|
|
356
|
-
"editor.foreground": "#d4d4d4",
|
|
357
|
-
"editorLineNumber.foreground": "#797979",
|
|
358
|
-
"editorLineNumber.activeForeground": "#e9e9e9",
|
|
359
|
-
"editor.lineHighlightBorder": "#e9e9e911",
|
|
360
|
-
},
|
|
361
|
-
},
|
|
362
|
-
},
|
|
341
|
+
}
|
|
363
342
|
},
|
|
364
343
|
} as Theme
|
|
365
344
|
}
|
package/src/themes/themeTypes.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { editor } from "monaco-editor"
|
|
2
|
-
|
|
3
1
|
type NovaColorPaletteExtension = {
|
|
4
2
|
paletteExt?: {
|
|
5
3
|
primary?: {
|
|
@@ -48,9 +46,6 @@ interface NovaComponentsExtension {
|
|
|
48
46
|
sliderLegendColor?: string
|
|
49
47
|
}
|
|
50
48
|
}
|
|
51
|
-
WandelscriptEditor?: {
|
|
52
|
-
monacoTheme: editor.IStandaloneThemeData
|
|
53
|
-
}
|
|
54
49
|
}
|
|
55
50
|
}
|
|
56
51
|
|
package/dist/3d.cjs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"3d.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|