kitchen-simulator 11.30.3 → 11.32.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.
Files changed (77) hide show
  1. package/es/assets/img/svg/accessories.svg +4 -4
  2. package/es/assets/img/svg/bottombar/elevation-back.svg +6 -6
  3. package/es/assets/img/svg/bottombar/elevation-front.svg +6 -6
  4. package/es/assets/img/svg/bottombar/elevation-left.svg +6 -6
  5. package/es/assets/img/svg/bottombar/elevation-right.svg +7 -7
  6. package/es/assets/img/svg/bottombar/elevation.svg +13 -13
  7. package/es/assets/img/svg/detail.svg +77 -77
  8. package/es/assets/img/svg/filtersActive.svg +19 -19
  9. package/es/assets/img/svg/invert.svg +12 -12
  10. package/es/assets/img/svg/menubar/login.svg +84 -84
  11. package/es/assets/img/svg/menubar/my_projects.svg +85 -85
  12. package/es/assets/img/svg/menubar/new_project.svg +110 -110
  13. package/es/assets/img/svg/menubar/save_project.svg +84 -84
  14. package/es/assets/img/svg/options.svg +3 -3
  15. package/es/assets/img/svg/positioning.svg +3 -3
  16. package/es/assets/img/svg/toggleFilters.svg +19 -19
  17. package/es/assets/img/svg/toolbar/shopping-cart.svg +13 -13
  18. package/es/assets/img/svg/wizardstep/detail_view.svg +87 -87
  19. package/es/assets/img/svg/wizardstep/tile_view.svg +95 -95
  20. package/es/catalog/utils/exporter.js +2 -0
  21. package/es/catalog/utils/item-loader.js +9 -4
  22. package/es/class/item.js +1 -0
  23. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +556 -556
  24. package/es/components/viewer3d/scene-creator.js +5 -5
  25. package/es/constants.js +1 -0
  26. package/es/engine/2d/viewer-utils.js +11 -11
  27. package/es/events/external/handleExternalEvent.util.js +80 -66
  28. package/es/events/external/handlers.changeDoorStyle.js +8 -15
  29. package/es/events/external/handlers.loadProject.js +8 -15
  30. package/es/mappings/external-events/mapExternalEventPayload.js +4 -4
  31. package/es/mappings/external-events/mappers/addItemMapper.js +9 -9
  32. package/es/mappings/external-events/mappers/ccdfMapper.js +7 -13
  33. package/es/models.js +2 -0
  34. package/es/shared/concurrency/async-pool.js +71 -0
  35. package/es/shared/domain/asset/sanitize-asset-url.js +5 -5
  36. package/es/shared/math/line-metrics.js +11 -11
  37. package/es/utils/geometry.js +6 -4
  38. package/es/utils/skinPanelEngine.js +14 -14
  39. package/lib/assets/img/svg/accessories.svg +4 -4
  40. package/lib/assets/img/svg/bottombar/elevation-back.svg +6 -6
  41. package/lib/assets/img/svg/bottombar/elevation-front.svg +6 -6
  42. package/lib/assets/img/svg/bottombar/elevation-left.svg +6 -6
  43. package/lib/assets/img/svg/bottombar/elevation-right.svg +7 -7
  44. package/lib/assets/img/svg/bottombar/elevation.svg +13 -13
  45. package/lib/assets/img/svg/detail.svg +77 -77
  46. package/lib/assets/img/svg/filtersActive.svg +19 -19
  47. package/lib/assets/img/svg/invert.svg +12 -12
  48. package/lib/assets/img/svg/menubar/login.svg +84 -84
  49. package/lib/assets/img/svg/menubar/my_projects.svg +85 -85
  50. package/lib/assets/img/svg/menubar/new_project.svg +110 -110
  51. package/lib/assets/img/svg/menubar/save_project.svg +84 -84
  52. package/lib/assets/img/svg/options.svg +3 -3
  53. package/lib/assets/img/svg/positioning.svg +3 -3
  54. package/lib/assets/img/svg/toggleFilters.svg +19 -19
  55. package/lib/assets/img/svg/toolbar/shopping-cart.svg +13 -13
  56. package/lib/assets/img/svg/wizardstep/detail_view.svg +87 -87
  57. package/lib/assets/img/svg/wizardstep/tile_view.svg +95 -95
  58. package/lib/catalog/utils/exporter.js +2 -0
  59. package/lib/catalog/utils/item-loader.js +9 -4
  60. package/lib/class/item.js +1 -0
  61. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +556 -556
  62. package/lib/components/viewer3d/scene-creator.js +5 -5
  63. package/lib/constants.js +5 -4
  64. package/lib/engine/2d/viewer-utils.js +11 -11
  65. package/lib/events/external/handleExternalEvent.util.js +80 -66
  66. package/lib/events/external/handlers.changeDoorStyle.js +8 -15
  67. package/lib/events/external/handlers.loadProject.js +8 -15
  68. package/lib/mappings/external-events/mapExternalEventPayload.js +4 -4
  69. package/lib/mappings/external-events/mappers/addItemMapper.js +9 -9
  70. package/lib/mappings/external-events/mappers/ccdfMapper.js +7 -13
  71. package/lib/models.js +2 -0
  72. package/lib/shared/concurrency/async-pool.js +78 -0
  73. package/lib/shared/domain/asset/sanitize-asset-url.js +5 -5
  74. package/lib/shared/math/line-metrics.js +11 -11
  75. package/lib/utils/geometry.js +5 -3
  76. package/lib/utils/skinPanelEngine.js +14 -14
  77. package/package.json +1 -1
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.asyncPool = asyncPool;
8
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
+ /**
11
+ * Run async work over a list with a concurrency limit.
12
+ *
13
+ * @template T,R
14
+ * @param {number} limit number of concurrently executing promises
15
+ * @param {T[]} items input items
16
+ * @param {(item: T, index: number) => Promise<R>} iteratorFn async function
17
+ * @returns {Promise<R[]>} results in input order
18
+ */
19
+ function asyncPool(_x, _x2, _x3) {
20
+ return _asyncPool.apply(this, arguments);
21
+ }
22
+ function _asyncPool() {
23
+ _asyncPool = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(limit, items, iteratorFn) {
24
+ var safeLimit, ret, executing, _loop, i, _items$length;
25
+ return _regenerator["default"].wrap(function (_context2) {
26
+ while (1) switch (_context2.prev = _context2.next) {
27
+ case 0:
28
+ safeLimit = Math.max(1, Number(limit) || 1);
29
+ ret = [];
30
+ executing = new Set();
31
+ _loop = /*#__PURE__*/_regenerator["default"].mark(function _loop(i) {
32
+ var item, p, cleanup;
33
+ return _regenerator["default"].wrap(function (_context) {
34
+ while (1) switch (_context.prev = _context.next) {
35
+ case 0:
36
+ item = items[i];
37
+ p = Promise.resolve().then(function () {
38
+ return iteratorFn(item, i);
39
+ });
40
+ ret.push(p);
41
+ executing.add(p);
42
+ cleanup = function cleanup() {
43
+ return executing["delete"](p);
44
+ };
45
+ p.then(cleanup)["catch"](cleanup);
46
+ if (!(executing.size >= safeLimit)) {
47
+ _context.next = 1;
48
+ break;
49
+ }
50
+ _context.next = 1;
51
+ return Promise.race(executing);
52
+ case 1:
53
+ case "end":
54
+ return _context.stop();
55
+ }
56
+ }, _loop);
57
+ });
58
+ i = 0;
59
+ case 1:
60
+ if (!(i < ((_items$length = items === null || items === void 0 ? void 0 : items.length) !== null && _items$length !== void 0 ? _items$length : 0))) {
61
+ _context2.next = 3;
62
+ break;
63
+ }
64
+ return _context2.delegateYield(_loop(i), "t0", 2);
65
+ case 2:
66
+ i++;
67
+ _context2.next = 1;
68
+ break;
69
+ case 3:
70
+ return _context2.abrupt("return", Promise.all(ret));
71
+ case 4:
72
+ case "end":
73
+ return _context2.stop();
74
+ }
75
+ }, _callee);
76
+ }));
77
+ return _asyncPool.apply(this, arguments);
78
+ }
@@ -4,11 +4,11 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.sanitizeAssetUrl = void 0;
7
- /**
8
- * Strip stray dots from the **path portion** of a GLTF/BIN URL.
9
- * e.g. `…/B36_36x34.5x24.gltf` → `…/B36_36x345x24.gltf`
10
- *
11
- * Leaves the protocol/domain and the final file extension untouched.
7
+ /**
8
+ * Strip stray dots from the **path portion** of a GLTF/BIN URL.
9
+ * e.g. `…/B36_36x34.5x24.gltf` → `…/B36_36x345x24.gltf`
10
+ *
11
+ * Leaves the protocol/domain and the final file extension untouched.
12
12
  */
13
13
  var sanitizeAssetUrl = exports.sanitizeAssetUrl = function sanitizeAssetUrl(url) {
14
14
  if (!url) return url;
@@ -14,17 +14,17 @@ function getVertex(vertices, vertexId) {
14
14
  return typeof vertices.get === 'function' ? vertices.get(vertexId) : vertices[vertexId];
15
15
  }
16
16
 
17
- /**
18
- * Computes a line length using its 2 vertices.
19
- *
20
- * Assumptions (matches existing DRAG logic):
21
- * - vertex coordinates are stored in centimeters
22
- * - result is converted to the provided unit
23
- *
24
- * @param {object} line - line object/record with `vertices` (array or immutable List)
25
- * @param {object} vertices - vertices collection (plain object map or immutable Map)
26
- * @param {string} unit - target unit (e.g. 'in', 'cm')
27
- * @returns {number|null}
17
+ /**
18
+ * Computes a line length using its 2 vertices.
19
+ *
20
+ * Assumptions (matches existing DRAG logic):
21
+ * - vertex coordinates are stored in centimeters
22
+ * - result is converted to the provided unit
23
+ *
24
+ * @param {object} line - line object/record with `vertices` (array or immutable List)
25
+ * @param {object} vertices - vertices collection (plain object map or immutable Map)
26
+ * @param {string} unit - target unit (e.g. 'in', 'cm')
27
+ * @returns {number|null}
28
28
  */
29
29
  function getLineLength(line, vertices) {
30
30
  var _v0$x, _v1$x, _v0$y, _v1$y;
@@ -250,8 +250,8 @@ function _twoLineSegmentsIntersection(p1, p2, p3, p4) {
250
250
  var denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
251
251
  var numA = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3);
252
252
  var numB = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3);
253
- if ((0, _math.fAbs)(denom) <= _constants.EPSILON) {
254
- if ((0, _math.fAbs)(numA) <= _constants.EPSILON && (0, _math.fAbs)(numB) <= _constants.EPSILON) {
253
+ if ((0, _math.fAbs)(denom) <= _constants.LINE_EPSILON) {
254
+ if ((0, _math.fAbs)(numA) <= _constants.LINE_EPSILON && (0, _math.fAbs)(numB) <= _constants.LINE_EPSILON) {
255
255
  var comparator = function comparator(pa, pb) {
256
256
  return pa.x === pb.x ? pa.y - pb.y : pa.x - pb.x;
257
257
  };
@@ -280,7 +280,7 @@ function _twoLineSegmentsIntersection(p1, p2, p3, p4) {
280
280
  }
281
281
  var uA = numA / denom;
282
282
  var uB = numB / denom;
283
- if (uA >= 0 - _constants.EPSILON && uA <= 1 + _constants.EPSILON && uB >= 0 - _constants.EPSILON && uB <= 1 + _constants.EPSILON) {
283
+ if (uA >= 0 - _constants.LINE_EPSILON && uA <= 1 + _constants.LINE_EPSILON && uB >= 0 - _constants.LINE_EPSILON && uB <= 1 + _constants.LINE_EPSILON) {
284
284
  var _point = {
285
285
  x: x1 + uA * (x2 - x1),
286
286
  y: y1 + uA * (y2 - y1)
@@ -3237,6 +3237,8 @@ function isOverlappedTwoItemsOnOneLine(layer, curLine, srcItem, desItem) {
3237
3237
  // | |__DI__| |
3238
3238
  // |_________SI_______|
3239
3239
  return true;
3240
+ } else if (minDisV0S - minDisV0D > _constants.EPSILON && maxDisV0D - maxDisV0S > _constants.EPSILON) {
3241
+ return true;
3240
3242
  } else if (minDisV0S < minDisV0D && maxDisV0S - minDisV0D > _constants.EPSILON) {
3241
3243
  // s0 d0 s1 d1 ===> maxDisV0S: v0s1, minDisV0S: v0s0, maxDisV0D: v0d1, minDisV0D: v0d0
3242
3244
  // v0 __________________________ v1
@@ -145,10 +145,10 @@ function isSnappedWithCornerCabient(srcItem, desItem) {
145
145
  } else return false;
146
146
  }
147
147
 
148
- /**
149
- * @param {*} faceSegs
150
- * @param {*} otherFaces
151
- * @returns
148
+ /**
149
+ * @param {*} faceSegs
150
+ * @param {*} otherFaces
151
+ * @returns
152
152
  */
153
153
  function getTrimmedFaceSegs(faceSegs, otherFaces, cnt) {
154
154
  try {
@@ -309,8 +309,8 @@ function applyGroupingRules(faces) {
309
309
  };
310
310
  }
311
311
 
312
- /**
313
- * Horizontal Grouping (for base cabinets back-to-back : BSV48 48" x 34.5")
312
+ /**
313
+ * Horizontal Grouping (for base cabinets back-to-back : BSV48 48" x 34.5")
314
314
  */
315
315
  function applyHorizontalGrouping(faces) {
316
316
  var removeIdxs = [];
@@ -352,8 +352,8 @@ function applyHorizontalGrouping(faces) {
352
352
  };
353
353
  }
354
354
 
355
- /**
356
- * Vertical Grouping (For CT3DR or CT2DR SKUs + stacked wall cabinets)
355
+ /**
356
+ * Vertical Grouping (For CT3DR or CT2DR SKUs + stacked wall cabinets)
357
357
  */
358
358
  function applyVerticalGrouping(faces) {
359
359
  var removeIdxs = [];
@@ -444,8 +444,8 @@ function buildMP3SkinPanelArray(bottomHeight, topHeight, mp3SkinPanelArray) {
444
444
  return skinPanelTypeArray;
445
445
  }
446
446
 
447
- /**
448
- * Decide which skin panel pieces are needed for a tall cabinet.
447
+ /**
448
+ * Decide which skin panel pieces are needed for a tall cabinet.
449
449
  */
450
450
  function resolveTallCabinetBundle(face) {
451
451
  var item = face.itemInfo;
@@ -465,8 +465,8 @@ function resolveTallCabinetBundle(face) {
465
465
  return face !== null && face !== void 0 && face.skinPanelSKU ? [face.skinPanelSKU] : [];
466
466
  }
467
467
 
468
- /**
469
- * Converts a face → list of SKUs
468
+ /**
469
+ * Converts a face → list of SKUs
470
470
  */
471
471
  function resolveSkinPanelSKU(face) {
472
472
  var layout = face.itemInfo.layoutpos;
@@ -476,8 +476,8 @@ function resolveSkinPanelSKU(face) {
476
476
  return [face.skinPanelSKU];
477
477
  }
478
478
 
479
- /**
480
- * Make skin panel data with grouping skinPanelSKU & doorStyle
479
+ /**
480
+ * Make skin panel data with grouping skinPanelSKU & doorStyle
481
481
  */
482
482
  function buildSkinPanelData(faces) {
483
483
  var tempResult = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kitchen-simulator",
3
- "version": "11.30.3",
3
+ "version": "11.32.0",
4
4
  "description": "It is a kitchen simulator (self-contained micro-frontend).",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",