@uipath/apollo-react 4.46.0 → 4.47.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/canvas/components/ButtonHandle/ButtonHandle.cjs +2 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandle.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandle.js +2 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.cjs +0 -33
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.d.ts +0 -2
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/ButtonHandleStyleUtils.js +1 -28
- package/dist/canvas/components/ButtonHandle/SmartHandle.cjs +2 -1
- package/dist/canvas/components/ButtonHandle/SmartHandle.d.ts.map +1 -1
- package/dist/canvas/components/ButtonHandle/SmartHandle.js +2 -1
- package/dist/canvas/styles/tailwind.canvas.css +1 -1
- package/dist/canvas/utils/handle-positioning.cjs +62 -0
- package/dist/canvas/utils/handle-positioning.d.ts +2 -0
- package/dist/canvas/utils/handle-positioning.d.ts.map +1 -0
- package/dist/canvas/utils/handle-positioning.js +28 -0
- package/dist/canvas/utils/index.cjs +21 -14
- package/dist/canvas/utils/index.d.ts +1 -0
- package/dist/canvas/utils/index.d.ts.map +1 -1
- package/dist/canvas/utils/index.js +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
5
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: definition[key]
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
})();
|
|
11
|
+
(()=>{
|
|
12
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
13
|
+
})();
|
|
14
|
+
(()=>{
|
|
15
|
+
__webpack_require__.r = (exports1)=>{
|
|
16
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
17
|
+
value: 'Module'
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
20
|
+
value: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
})();
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
+
calculateGridAlignedHandlePositions: ()=>calculateGridAlignedHandlePositions
|
|
28
|
+
});
|
|
29
|
+
const external_constants_cjs_namespaceObject = require("../constants.cjs");
|
|
30
|
+
const snapToGrid = (value, gridSize = external_constants_cjs_namespaceObject.GRID_SPACING)=>Math.round(value / gridSize) * gridSize;
|
|
31
|
+
const calculateGridAlignedHandlePositions = (nodeSize, numHandles, gridSize = external_constants_cjs_namespaceObject.GRID_SPACING)=>{
|
|
32
|
+
if (0 === numHandles) return [];
|
|
33
|
+
if (nodeSize <= 0) return [];
|
|
34
|
+
if (1 === numHandles) return [
|
|
35
|
+
snapToGrid(nodeSize / 2, gridSize)
|
|
36
|
+
];
|
|
37
|
+
const idealSpacing = nodeSize / (numHandles + 1);
|
|
38
|
+
if (nodeSize % gridSize !== 0) {
|
|
39
|
+
const positions = [];
|
|
40
|
+
for(let i = 0; i < numHandles; i++)positions.push(idealSpacing * (i + 1));
|
|
41
|
+
return positions;
|
|
42
|
+
}
|
|
43
|
+
const roundedSpacing = Math.round(idealSpacing / gridSize) * gridSize;
|
|
44
|
+
let gridAlignedSpacing = Math.max(gridSize, roundedSpacing);
|
|
45
|
+
let totalSpan = (numHandles - 1) * gridAlignedSpacing;
|
|
46
|
+
let startPosition = (nodeSize - totalSpan) / 2;
|
|
47
|
+
if (startPosition % gridSize !== 0 && gridAlignedSpacing > gridSize) {
|
|
48
|
+
gridAlignedSpacing -= gridSize;
|
|
49
|
+
totalSpan = (numHandles - 1) * gridAlignedSpacing;
|
|
50
|
+
startPosition = (nodeSize - totalSpan) / 2;
|
|
51
|
+
}
|
|
52
|
+
const positions = [];
|
|
53
|
+
for(let i = 0; i < numHandles; i++)positions.push(startPosition + i * gridAlignedSpacing);
|
|
54
|
+
return positions;
|
|
55
|
+
};
|
|
56
|
+
exports.calculateGridAlignedHandlePositions = __webpack_exports__.calculateGridAlignedHandlePositions;
|
|
57
|
+
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
58
|
+
"calculateGridAlignedHandlePositions"
|
|
59
|
+
].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
60
|
+
Object.defineProperty(exports, '__esModule', {
|
|
61
|
+
value: true
|
|
62
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handle-positioning.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/handle-positioning.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,mCAAmC,GAC9C,UAAU,MAAM,EAChB,YAAY,MAAM,EAClB,WAAU,MAAqB,KAC9B,MAAM,EA6CR,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GRID_SPACING } from "../constants.js";
|
|
2
|
+
const snapToGrid = (value, gridSize = GRID_SPACING)=>Math.round(value / gridSize) * gridSize;
|
|
3
|
+
const calculateGridAlignedHandlePositions = (nodeSize, numHandles, gridSize = GRID_SPACING)=>{
|
|
4
|
+
if (0 === numHandles) return [];
|
|
5
|
+
if (nodeSize <= 0) return [];
|
|
6
|
+
if (1 === numHandles) return [
|
|
7
|
+
snapToGrid(nodeSize / 2, gridSize)
|
|
8
|
+
];
|
|
9
|
+
const idealSpacing = nodeSize / (numHandles + 1);
|
|
10
|
+
if (nodeSize % gridSize !== 0) {
|
|
11
|
+
const positions = [];
|
|
12
|
+
for(let i = 0; i < numHandles; i++)positions.push(idealSpacing * (i + 1));
|
|
13
|
+
return positions;
|
|
14
|
+
}
|
|
15
|
+
const roundedSpacing = Math.round(idealSpacing / gridSize) * gridSize;
|
|
16
|
+
let gridAlignedSpacing = Math.max(gridSize, roundedSpacing);
|
|
17
|
+
let totalSpan = (numHandles - 1) * gridAlignedSpacing;
|
|
18
|
+
let startPosition = (nodeSize - totalSpan) / 2;
|
|
19
|
+
if (startPosition % gridSize !== 0 && gridAlignedSpacing > gridSize) {
|
|
20
|
+
gridAlignedSpacing -= gridSize;
|
|
21
|
+
totalSpan = (numHandles - 1) * gridAlignedSpacing;
|
|
22
|
+
startPosition = (nodeSize - totalSpan) / 2;
|
|
23
|
+
}
|
|
24
|
+
const positions = [];
|
|
25
|
+
for(let i = 0; i < numHandles; i++)positions.push(startPosition + i * gridAlignedSpacing);
|
|
26
|
+
return positions;
|
|
27
|
+
};
|
|
28
|
+
export { calculateGridAlignedHandlePositions };
|
|
@@ -48,6 +48,9 @@ var __webpack_modules__ = {
|
|
|
48
48
|
"./export-canvas" (module) {
|
|
49
49
|
module.exports = require("./export-canvas.cjs");
|
|
50
50
|
},
|
|
51
|
+
"./handle-positioning" (module) {
|
|
52
|
+
module.exports = require("./handle-positioning.cjs");
|
|
53
|
+
},
|
|
51
54
|
"./icon-registry" (module) {
|
|
52
55
|
module.exports = require("./icon-registry.cjs");
|
|
53
56
|
},
|
|
@@ -156,33 +159,37 @@ var __webpack_exports__ = {};
|
|
|
156
159
|
var __rspack_reexport = {};
|
|
157
160
|
for(const __rspack_import_key in _GroupModificationUtils__rspack_import_12)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_GroupModificationUtils__rspack_import_12[__rspack_import_key];
|
|
158
161
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
159
|
-
var
|
|
162
|
+
var _handle_positioning__rspack_import_13 = __webpack_require__("./handle-positioning");
|
|
163
|
+
var __rspack_reexport = {};
|
|
164
|
+
for(const __rspack_import_key in _handle_positioning__rspack_import_13)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_handle_positioning__rspack_import_13[__rspack_import_key];
|
|
165
|
+
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
166
|
+
var _icon_registry__rspack_import_14 = __webpack_require__("./icon-registry");
|
|
160
167
|
var __rspack_reexport = {};
|
|
161
|
-
for(const __rspack_import_key in
|
|
168
|
+
for(const __rspack_import_key in _icon_registry__rspack_import_14)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_icon_registry__rspack_import_14[__rspack_import_key];
|
|
162
169
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
163
|
-
var
|
|
170
|
+
var _manifest_resolver__rspack_import_15 = __webpack_require__("./manifest-resolver");
|
|
164
171
|
var __rspack_reexport = {};
|
|
165
|
-
for(const __rspack_import_key in
|
|
172
|
+
for(const __rspack_import_key in _manifest_resolver__rspack_import_15)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_manifest_resolver__rspack_import_15[__rspack_import_key];
|
|
166
173
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
167
|
-
var
|
|
174
|
+
var _NodeUtils__rspack_import_16 = __webpack_require__("./NodeUtils");
|
|
168
175
|
var __rspack_reexport = {};
|
|
169
|
-
for(const __rspack_import_key in
|
|
176
|
+
for(const __rspack_import_key in _NodeUtils__rspack_import_16)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_NodeUtils__rspack_import_16[__rspack_import_key];
|
|
170
177
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
171
|
-
var
|
|
178
|
+
var _props_helpers__rspack_import_17 = __webpack_require__("./props-helpers");
|
|
172
179
|
var __rspack_reexport = {};
|
|
173
|
-
for(const __rspack_import_key in
|
|
180
|
+
for(const __rspack_import_key in _props_helpers__rspack_import_17)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_props_helpers__rspack_import_17[__rspack_import_key];
|
|
174
181
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
175
|
-
var
|
|
182
|
+
var _resource_operations__rspack_import_18 = __webpack_require__("./resource-operations");
|
|
176
183
|
var __rspack_reexport = {};
|
|
177
|
-
for(const __rspack_import_key in
|
|
184
|
+
for(const __rspack_import_key in _resource_operations__rspack_import_18)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_resource_operations__rspack_import_18[__rspack_import_key];
|
|
178
185
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
179
|
-
var
|
|
186
|
+
var _Storage__rspack_import_19 = __webpack_require__("./Storage");
|
|
180
187
|
var __rspack_reexport = {};
|
|
181
|
-
for(const __rspack_import_key in
|
|
188
|
+
for(const __rspack_import_key in _Storage__rspack_import_19)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_Storage__rspack_import_19[__rspack_import_key];
|
|
182
189
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
183
|
-
var
|
|
190
|
+
var _StyleUtil__rspack_import_20 = __webpack_require__("./StyleUtil");
|
|
184
191
|
var __rspack_reexport = {};
|
|
185
|
-
for(const __rspack_import_key in
|
|
192
|
+
for(const __rspack_import_key in _StyleUtil__rspack_import_20)if ("default" !== __rspack_import_key) __rspack_reexport[__rspack_import_key] = ()=>_StyleUtil__rspack_import_20[__rspack_import_key];
|
|
186
193
|
__webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
187
194
|
})();
|
|
188
195
|
for(var __rspack_i in __webpack_exports__)exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
@@ -11,6 +11,7 @@ export * from './createPreviewGraph';
|
|
|
11
11
|
export * from './createPreviewNode';
|
|
12
12
|
export * from './export-canvas';
|
|
13
13
|
export * from './GroupModificationUtils';
|
|
14
|
+
export * from './handle-positioning';
|
|
14
15
|
export * from './icon-registry';
|
|
15
16
|
export * from './manifest-resolver';
|
|
16
17
|
export * from './NodeUtils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,WAAW,CAAC;AAC1B,cAAc,0BAA0B,CAAC;AACzC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,YAAY,CAAC;AAC3B,cAAc,wBAAwB,CAAC;AACvC,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
|
|
@@ -11,6 +11,7 @@ export * from "./createPreviewGraph.js";
|
|
|
11
11
|
export * from "./createPreviewNode.js";
|
|
12
12
|
export * from "./export-canvas.js";
|
|
13
13
|
export * from "./GroupModificationUtils.js";
|
|
14
|
+
export * from "./handle-positioning.js";
|
|
14
15
|
export * from "./icon-registry.js";
|
|
15
16
|
export * from "./manifest-resolver.js";
|
|
16
17
|
export * from "./NodeUtils.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/apollo-react",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.47.0",
|
|
4
4
|
"description": "Apollo Design System - React component library with Material UI theming",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
"zod": "^4.3.5",
|
|
218
218
|
"zustand": "^5.0.9",
|
|
219
219
|
"@uipath/apollo-core": "5.10.0",
|
|
220
|
-
"@uipath/apollo-wind": "2.19.
|
|
220
|
+
"@uipath/apollo-wind": "2.19.1"
|
|
221
221
|
},
|
|
222
222
|
"devDependencies": {
|
|
223
223
|
"@lingui/cli": "^5.6.1",
|