kitchen-simulator 11.30.2 → 11.31.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 (73) 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/components/viewer2d/viewer2d.js +7 -22
  21. package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +556 -556
  22. package/es/components/viewer3d/scene-creator.js +11 -10
  23. package/es/constants/applianceCategories.js +19 -0
  24. package/es/constants.js +1 -0
  25. package/es/engine/2d/viewer-utils.js +20 -0
  26. package/es/events/external/handleExternalEvent.util.js +80 -66
  27. package/es/events/external/handlers.changeDoorStyle.js +8 -15
  28. package/es/events/external/handlers.loadProject.js +8 -15
  29. package/es/mappings/external-events/mapExternalEventPayload.js +4 -4
  30. package/es/mappings/external-events/mappers/addItemMapper.js +9 -9
  31. package/es/mappings/external-events/mappers/ccdfMapper.js +7 -13
  32. package/es/shared/concurrency/async-pool.js +71 -0
  33. package/es/shared/domain/asset/sanitize-asset-url.js +5 -5
  34. package/es/shared/math/line-metrics.js +11 -11
  35. package/es/utils/geometry.js +19 -16
  36. package/es/utils/skinPanelEngine.js +14 -14
  37. package/lib/assets/img/svg/accessories.svg +4 -4
  38. package/lib/assets/img/svg/bottombar/elevation-back.svg +6 -6
  39. package/lib/assets/img/svg/bottombar/elevation-front.svg +6 -6
  40. package/lib/assets/img/svg/bottombar/elevation-left.svg +6 -6
  41. package/lib/assets/img/svg/bottombar/elevation-right.svg +7 -7
  42. package/lib/assets/img/svg/bottombar/elevation.svg +13 -13
  43. package/lib/assets/img/svg/detail.svg +77 -77
  44. package/lib/assets/img/svg/filtersActive.svg +19 -19
  45. package/lib/assets/img/svg/invert.svg +12 -12
  46. package/lib/assets/img/svg/menubar/login.svg +84 -84
  47. package/lib/assets/img/svg/menubar/my_projects.svg +85 -85
  48. package/lib/assets/img/svg/menubar/new_project.svg +110 -110
  49. package/lib/assets/img/svg/menubar/save_project.svg +84 -84
  50. package/lib/assets/img/svg/options.svg +3 -3
  51. package/lib/assets/img/svg/positioning.svg +3 -3
  52. package/lib/assets/img/svg/toggleFilters.svg +19 -19
  53. package/lib/assets/img/svg/toolbar/shopping-cart.svg +13 -13
  54. package/lib/assets/img/svg/wizardstep/detail_view.svg +87 -87
  55. package/lib/assets/img/svg/wizardstep/tile_view.svg +95 -95
  56. package/lib/components/viewer2d/viewer2d.js +7 -22
  57. package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +556 -556
  58. package/lib/components/viewer3d/scene-creator.js +11 -10
  59. package/lib/constants/applianceCategories.js +25 -0
  60. package/lib/constants.js +5 -4
  61. package/lib/engine/2d/viewer-utils.js +25 -0
  62. package/lib/events/external/handleExternalEvent.util.js +80 -66
  63. package/lib/events/external/handlers.changeDoorStyle.js +8 -15
  64. package/lib/events/external/handlers.loadProject.js +8 -15
  65. package/lib/mappings/external-events/mapExternalEventPayload.js +4 -4
  66. package/lib/mappings/external-events/mappers/addItemMapper.js +9 -9
  67. package/lib/mappings/external-events/mappers/ccdfMapper.js +7 -13
  68. package/lib/shared/concurrency/async-pool.js +78 -0
  69. package/lib/shared/domain/asset/sanitize-asset-url.js +5 -5
  70. package/lib/shared/math/line-metrics.js +11 -11
  71. package/lib/utils/geometry.js +18 -15
  72. package/lib/utils/skinPanelEngine.js +14 -14
  73. package/package.json +1 -1
@@ -5,9 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.ccdfMapper = ccdfMapper;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
8
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
10
  var _utils = require("../../../components/viewer2d/utils");
10
11
  var _immutable = require("../../../shared/objects/immutable");
12
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
14
  function ccdfMapper(ccdf_list, layer) {
12
15
  // This function make cabinet definition using ccdf, layer's item information and catalog
13
16
  // console.log(ccdf_list, catalog);
@@ -33,7 +36,7 @@ function ccdfMapper(ccdf_list, layer) {
33
36
  }
34
37
  var cd = layerJS.items[correctItemId];
35
38
  if (cd && !!(ccdf !== null && ccdf !== void 0 && ccdf.scene_cabinet_id) && (cd === null || cd === void 0 ? void 0 : cd.id) === ccdf.scene_cabinet_id) {
36
- var _ccdf$cabinet_id, _ccdf$long_name, _ccdf$sizeinfo, _ccdf$shape_svg, _ccdf$is_corner;
39
+ var _ccdf$cabinet_id, _ccdf$long_name, _ccdf$sizeinfo, _ccdf$shape_svg;
37
40
  if (!(0, _utils.isEmpty)(ccdf === null || ccdf === void 0 ? void 0 : ccdf.id)) {
38
41
  cdfId = ccdf.id;
39
42
  }
@@ -81,27 +84,18 @@ function ccdfMapper(ccdf_list, layer) {
81
84
  tempPlaceholders: tempPlaceholders
82
85
  };else structure_json = structure;
83
86
  // make cabinet definition using structure_json and catalog
84
- cabinetDefinition = {
87
+ cabinetDefinition = _objectSpread(_objectSpread({}, cd), {}, {
85
88
  type: cd.category,
86
89
  itemID: (_ccdf$cabinet_id = ccdf === null || ccdf === void 0 ? void 0 : ccdf.cabinet_id) !== null && _ccdf$cabinet_id !== void 0 ? _ccdf$cabinet_id : cd.itemID,
87
90
  // cd.itemID may be legacy from legacy project, so ccdf.cabinet_id is preferred if exists
88
- name: cd.name,
89
91
  long_name: (_ccdf$long_name = ccdf === null || ccdf === void 0 ? void 0 : ccdf.long_name) !== null && _ccdf$long_name !== void 0 ? _ccdf$long_name : cd.long_name,
90
92
  sizeinfo: (_ccdf$sizeinfo = ccdf === null || ccdf === void 0 ? void 0 : ccdf.sizeinfo) !== null && _ccdf$sizeinfo !== void 0 ? _ccdf$sizeinfo : cd.sizeinfo,
91
- description: cd.description,
92
- prototype: cd.prototype,
93
- base: cd.base,
94
- ccdf: cd.ccdf,
95
93
  shape_svg: (_ccdf$shape_svg = ccdf === null || ccdf === void 0 ? void 0 : ccdf.shape_svg) !== null && _ccdf$shape_svg !== void 0 ? _ccdf$shape_svg : cd.shape_svg,
96
94
  // If host provides cabinet base gltf/bin at CCDF top-level, prefer it.
97
95
  gltf: (ccdf === null || ccdf === void 0 ? void 0 : ccdf.gltf) || cd.gltf,
98
96
  bin: (ccdf === null || ccdf === void 0 ? void 0 : ccdf.bin) || (cd === null || cd === void 0 ? void 0 : cd.bin),
99
- structure_json: structure_json,
100
- layoutpos: cd.layoutpos,
101
- is_corner: (_ccdf$is_corner = ccdf === null || ccdf === void 0 ? void 0 : ccdf.is_corner) !== null && _ccdf$is_corner !== void 0 ? _ccdf$is_corner : cd.is_corner,
102
- obj_property: cd.obj_property,
103
- outline: cd.outline
104
- };
97
+ structure_json: structure_json
98
+ });
105
99
  }
106
100
  // make cabinet definition list using cabinetDefinition
107
101
  cabinetDefinitionList.push(cabinetDefinition);
@@ -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;
@@ -107,6 +107,8 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
107
107
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
108
108
  var _math = require("./math.js");
109
109
  var _constants = require("../constants");
110
+ var _applianceCategories = require("../constants/applianceCategories");
111
+ var _viewerUtils = require("../engine/2d/viewer-utils.js");
110
112
  var _convertUnitsLite = require("./convert-units-lite");
111
113
  var Three = _interopRequireWildcard(require("three"));
112
114
  var _utils = require("../components/viewer2d/utils.js");
@@ -248,8 +250,8 @@ function _twoLineSegmentsIntersection(p1, p2, p3, p4) {
248
250
  var denom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
249
251
  var numA = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3);
250
252
  var numB = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3);
251
- if ((0, _math.fAbs)(denom) <= _constants.EPSILON) {
252
- 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) {
253
255
  var comparator = function comparator(pa, pb) {
254
256
  return pa.x === pb.x ? pa.y - pb.y : pa.x - pb.x;
255
257
  };
@@ -278,7 +280,7 @@ function _twoLineSegmentsIntersection(p1, p2, p3, p4) {
278
280
  }
279
281
  var uA = numA / denom;
280
282
  var uB = numB / denom;
281
- 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) {
282
284
  var _point = {
283
285
  x: x1 + uA * (x2 - x1),
284
286
  y: y1 + uA * (y2 - y1)
@@ -833,8 +835,9 @@ function getAllItemSpecified(scene, catalog, filter) {
833
835
  };
834
836
  var curiteminfo;
835
837
  var iteminfo = [];
838
+ var excludedApplianceCategories = new Set(_applianceCategories.EXCLUDED_APPLIANCE_CATEGORIES);
836
839
  layer.items.forEach(function (item) {
837
- var _cat$obj;
840
+ var _cat$obj, _cat$obj2;
838
841
  if (!item) return;
839
842
  var val = {
840
843
  pos: {
@@ -860,11 +863,9 @@ function getAllItemSpecified(scene, catalog, filter) {
860
863
  val.item = item;
861
864
 
862
865
  // Filter check
863
- if (Array.isArray(filter)) {
864
- if (!val.layoutpos || !filter.includes(val.layoutpos)) return;
865
- } else if (val.layoutpos !== filter || (0, _helper.isEmpty)(cat) || (cat === null || cat === void 0 ? void 0 : cat.type) === 'appliance' && ['Cook Top', 'Microwave'].includes(cat === null || cat === void 0 || (_cat$obj = cat.obj) === null || _cat$obj === void 0 ? void 0 : _cat$obj.category)) {
866
- return;
867
- }
866
+ var isExcludedItem = (0, _helper.isEmpty)(cat) || (cat === null || cat === void 0 ? void 0 : cat.type) === 'appliance' && excludedApplianceCategories.has(cat === null || cat === void 0 || (_cat$obj = cat.obj) === null || _cat$obj === void 0 ? void 0 : _cat$obj.category) || excludedApplianceCategories.has(cat === null || cat === void 0 || (_cat$obj2 = cat.obj) === null || _cat$obj2 === void 0 ? void 0 : _cat$obj2.cabinet_category);
867
+ var layoutMatches = Array.isArray(filter) ? !!val.layoutpos && filter.includes(val.layoutpos) : val.layoutpos === filter;
868
+ if (!layoutMatches || isExcludedItem) return;
868
869
 
869
870
  // Current vs others
870
871
  var rect = getCalcRectFromItem3D(val);
@@ -1737,7 +1738,7 @@ function calcSnap2(allItemRect, allItemSnap, allLineRects, allLineSnap, allRect,
1737
1738
  rotRad = snap.rotRad;
1738
1739
  }
1739
1740
  });
1740
- if (allItemRect.cur.itemInfo.name.includes('Cook Top')) {
1741
+ if (allItemRect.cur.itemInfo.name.includes(_applianceCategories.APPLIANCE_CATEGORY_COOK_TOP)) {
1741
1742
  var intersects = allItemRect.others.filter(function (others) {
1742
1743
  return intersectRect(others.rect, curitem.rect);
1743
1744
  });
@@ -1749,12 +1750,12 @@ function calcSnap2(allItemRect, allItemSnap, allLineRects, allLineSnap, allRect,
1749
1750
  }
1750
1751
  });
1751
1752
  }
1752
- if (allItemRect.cur.itemInfo.name.includes('Hood') || allItemRect.cur.itemInfo.cabinet_category.toLowerCase().includes('hood') || allItemRect.cur.itemInfo.name.includes('Range') || allItemRect.cur.itemInfo.name.includes('Cook Top')) {
1753
+ if ((0, _viewerUtils.shouldBypassItemIntersectionValidation)(allItemRect.cur)) {
1753
1754
  var _intersects = allItemRect.others.filter(function (others) {
1754
1755
  return intersectRect(others.rect, curitem.rect);
1755
1756
  });
1756
1757
  _intersects.forEach(function (rect) {
1757
- if (isPointInArea(allArea, rect.itemInfo) || !allArea.length) if (rect.itemInfo.name.includes('Hood') || rect.itemInfo.cabinet_category.toLowerCase().includes('hood') || rect.itemInfo.name.includes('Range') || rect.itemInfo.name.includes('Cook Top')) {
1758
+ if ((isPointInArea(allArea, rect.itemInfo) || !allArea.length) && (0, _viewerUtils.shouldBypassItemIntersectionValidation)(rect)) {
1758
1759
  nx = rect.itemInfo.x;
1759
1760
  ny = rect.itemInfo.y;
1760
1761
  rotRad = rect.itemInfo.rotation * Math.PI / 180;
@@ -2143,9 +2144,9 @@ function needSnap(curItem, othItem) {
2143
2144
  var isBlsnapOth = othItem.item.category === 'cabinet' && othItem.item.layoutpos === _constants.BASE_CABINET_LAYOUTPOS && Math.abs(curFloor - otherFloor) >= delta;
2144
2145
  var isBlsnapCur = curItem.selectedItem.category === 'cabinet' && curItem.selectedItem.layoutpos === _constants.BASE_CABINET_LAYOUTPOS && Math.abs(curFloor - otherFloor) >= delta;
2145
2146
  if (curItem.cat.hasOwnProperty('long_name') || othItem.cat && othItem.cat.hasOwnProperty('long_name')) {
2146
- if (curItem.cat.long_name.includes('Hood') || othItem.cat && othItem.cat.long_name.includes('Hood')) blSnap = true;
2147
- if (curItem.cat.long_name.includes('Hood') && othItem.cat && isBlsnapOth || isBlsnapCur && othItem.cat.long_name.includes('Hood')) blSnap = false;
2148
- if (curItem.cat.long_name.includes('Cook Top') && othItem.cat && othItem.cat.long_name.includes('Cabinet') || curItem.cat.long_name.includes('Cabinet') && othItem.cat && othItem.cat.long_name.includes('Cook Top')) blSnap = true;
2147
+ if (curItem.cat.long_name.includes(_applianceCategories.APPLIANCE_CATEGORY_HOOD) || othItem.cat && othItem.cat.long_name.includes(_applianceCategories.APPLIANCE_CATEGORY_HOOD)) blSnap = true;
2148
+ if (curItem.cat.long_name.includes(_applianceCategories.APPLIANCE_CATEGORY_HOOD) && othItem.cat && isBlsnapOth || isBlsnapCur && othItem.cat.long_name.includes(_applianceCategories.APPLIANCE_CATEGORY_HOOD)) blSnap = false;
2149
+ if (curItem.cat.long_name.includes(_applianceCategories.APPLIANCE_CATEGORY_COOK_TOP) && othItem.cat && othItem.cat.long_name.includes('Cabinet') || curItem.cat.long_name.includes('Cabinet') && othItem.cat && othItem.cat.long_name.includes(_applianceCategories.APPLIANCE_CATEGORY_COOK_TOP)) blSnap = true;
2149
2150
  }
2150
2151
  return blSnap;
2151
2152
  }
@@ -3236,6 +3237,8 @@ function isOverlappedTwoItemsOnOneLine(layer, curLine, srcItem, desItem) {
3236
3237
  // | |__DI__| |
3237
3238
  // |_________SI_______|
3238
3239
  return true;
3240
+ } else if (minDisV0S - minDisV0D > _constants.EPSILON && maxDisV0D - maxDisV0S > _constants.EPSILON) {
3241
+ return true;
3239
3242
  } else if (minDisV0S < minDisV0D && maxDisV0S - minDisV0D > _constants.EPSILON) {
3240
3243
  // s0 d0 s1 d1 ===> maxDisV0S: v0s1, minDisV0S: v0s0, maxDisV0D: v0d1, minDisV0D: v0d0
3241
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.2",
3
+ "version": "11.31.0",
4
4
  "description": "It is a kitchen simulator (self-contained micro-frontend).",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",