@lahat-group/cli 1.1.3 → 1.1.4
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/index.js +38 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7555,7 +7555,8 @@ var ShelfModuleSchema = BaseModuleSchema.extend({
|
|
|
7555
7555
|
});
|
|
7556
7556
|
var RailModuleSchema = BaseModuleSchema.extend({
|
|
7557
7557
|
type: external_exports.literal("rail"),
|
|
7558
|
-
railVariant: external_exports.enum(["tall", "short"]).optional()
|
|
7558
|
+
railVariant: external_exports.enum(["tall", "short"]).optional(),
|
|
7559
|
+
railKind: external_exports.enum(["standard", "pull-down"]).optional()
|
|
7559
7560
|
});
|
|
7560
7561
|
var DrawerInternalModuleSchema = BaseModuleSchema.extend({
|
|
7561
7562
|
type: external_exports.literal("drawer-internal"),
|
|
@@ -9064,6 +9065,19 @@ function getColumnDoorCount(bodyWidthCm) {
|
|
|
9064
9065
|
|
|
9065
9066
|
// ../../packages/shared/src/describe.ts
|
|
9066
9067
|
init_esm_shims();
|
|
9068
|
+
|
|
9069
|
+
// ../../packages/shared/src/hangingRail.ts
|
|
9070
|
+
init_esm_shims();
|
|
9071
|
+
var FRONTAL_RAIL_MAX_BODY_DEPTH_CM = 55;
|
|
9072
|
+
function allowsPullDownRail(bodyDepthCm) {
|
|
9073
|
+
return bodyDepthCm > FRONTAL_RAIL_MAX_BODY_DEPTH_CM;
|
|
9074
|
+
}
|
|
9075
|
+
function resolveRailPieceKind(railKind, bodyDepthCm) {
|
|
9076
|
+
if (!allowsPullDownRail(bodyDepthCm)) return "frontal";
|
|
9077
|
+
return railKind === "pull-down" ? "pull-down" : "standard";
|
|
9078
|
+
}
|
|
9079
|
+
|
|
9080
|
+
// ../../packages/shared/src/describe.ts
|
|
9067
9081
|
var POSITION_LABELS = {
|
|
9068
9082
|
"left-corner": "Left corner",
|
|
9069
9083
|
"right-corner": "Right corner",
|
|
@@ -9246,7 +9260,8 @@ function groupModulesEn(modules, columnDepthCm, hasDoors) {
|
|
|
9246
9260
|
break;
|
|
9247
9261
|
case "rail": {
|
|
9248
9262
|
const variant = mod.railVariant ?? "tall";
|
|
9249
|
-
|
|
9263
|
+
const kind = resolveRailPieceKind(mod.railKind, columnDepthCm);
|
|
9264
|
+
rails.push(kind === "standard" ? variant : `${variant}, ${kind}`);
|
|
9250
9265
|
break;
|
|
9251
9266
|
}
|
|
9252
9267
|
case "drawer-internal":
|
|
@@ -9276,6 +9291,7 @@ function groupModulesHe(modules, columnDepthCm, hasDoors) {
|
|
|
9276
9291
|
const rails = [];
|
|
9277
9292
|
const drawersByHeight = /* @__PURE__ */ new Map();
|
|
9278
9293
|
const RAIL_VARIANT_HE = { tall: "\u05D2\u05D1\u05D5\u05D4", short: "\u05E0\u05DE\u05D5\u05DA" };
|
|
9294
|
+
const RAIL_KIND_HE = { "pull-down": "\u05E1\u05E8\u05D5\u05D5\u05D8\u05D5", frontal: "\u05DE\u05D5\u05D8 \u05EA\u05DC\u05D9\u05D9\u05D4 \u05E7\u05D3\u05DE\u05D9" };
|
|
9279
9295
|
const derivedDepth = deriveDrawerDepthCm(columnDepthCm * 10, hasDoors);
|
|
9280
9296
|
for (const mod of modules) {
|
|
9281
9297
|
switch (mod.type) {
|
|
@@ -9284,7 +9300,9 @@ function groupModulesHe(modules, columnDepthCm, hasDoors) {
|
|
|
9284
9300
|
break;
|
|
9285
9301
|
case "rail": {
|
|
9286
9302
|
const variant = mod.railVariant ?? "tall";
|
|
9287
|
-
|
|
9303
|
+
const variantHe = RAIL_VARIANT_HE[variant] ?? variant;
|
|
9304
|
+
const kindHe = RAIL_KIND_HE[resolveRailPieceKind(mod.railKind, columnDepthCm)];
|
|
9305
|
+
rails.push(kindHe ? `${variantHe}, ${kindHe}` : variantHe);
|
|
9288
9306
|
break;
|
|
9289
9307
|
}
|
|
9290
9308
|
case "drawer-internal":
|
|
@@ -9804,13 +9822,19 @@ var POOL_SIZE_MULTIPLIER = 128;
|
|
|
9804
9822
|
var pool;
|
|
9805
9823
|
var poolOffset;
|
|
9806
9824
|
function fillPool(bytes) {
|
|
9807
|
-
if (
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
|
|
9813
|
-
poolOffset
|
|
9825
|
+
if (bytes < 0) throw new RangeError("Wrong ID size");
|
|
9826
|
+
try {
|
|
9827
|
+
if (!pool || pool.length < bytes) {
|
|
9828
|
+
pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER);
|
|
9829
|
+
crypto.getRandomValues(pool);
|
|
9830
|
+
poolOffset = 0;
|
|
9831
|
+
} else if (poolOffset + bytes > pool.length) {
|
|
9832
|
+
crypto.getRandomValues(pool);
|
|
9833
|
+
poolOffset = 0;
|
|
9834
|
+
}
|
|
9835
|
+
} catch (e) {
|
|
9836
|
+
pool = void 0;
|
|
9837
|
+
throw e;
|
|
9814
9838
|
}
|
|
9815
9839
|
poolOffset += bytes;
|
|
9816
9840
|
}
|
|
@@ -10484,6 +10508,7 @@ function placementsToModules(placements, H) {
|
|
|
10484
10508
|
type: "rail",
|
|
10485
10509
|
height: 0,
|
|
10486
10510
|
railVariant: p.railVariant ?? "tall",
|
|
10511
|
+
railKind: p.railKind ?? "standard",
|
|
10487
10512
|
spacingAbove,
|
|
10488
10513
|
spacingBelow
|
|
10489
10514
|
});
|
|
@@ -10582,7 +10607,7 @@ function generateCustomLayout(options, H) {
|
|
|
10582
10607
|
const clearance = railType === "tall" ? RAIL_CLEARANCE_TALL_CM : RAIL_CLEARANCE_SHORT_CM;
|
|
10583
10608
|
const n1 = options.railUpperShelfCount ?? 0;
|
|
10584
10609
|
const railY = options.railAtCeiling ? H - RAIL_CLEARANCE_ABOVE_MIN_CM : grid[Math.max(0, grid.length - 1 - n1)] - RAIL_CLEARANCE_ABOVE_MIN_CM;
|
|
10585
|
-
placements.push({ type: "rail", y: railY, height: 0, railVariant: railType });
|
|
10610
|
+
placements.push({ type: "rail", y: railY, height: 0, railVariant: railType, railKind: options.railKind });
|
|
10586
10611
|
hangingZones.push({ top: railY, bottom: railY - clearance });
|
|
10587
10612
|
if (options.hasSecondRail && options.secondRailType) {
|
|
10588
10613
|
const secondClearance = options.secondRailType === "tall" ? RAIL_CLEARANCE_TALL_CM : RAIL_CLEARANCE_SHORT_CM;
|
|
@@ -10593,7 +10618,7 @@ function generateCustomLayout(options, H) {
|
|
|
10593
10618
|
if (anchorIdx2 >= 0) {
|
|
10594
10619
|
const secondRailY = grid[anchorIdx2] - RAIL_CLEARANCE_ABOVE_MIN_CM;
|
|
10595
10620
|
if (secondRailY > 0) {
|
|
10596
|
-
placements.push({ type: "rail", y: secondRailY, height: 0, railVariant: options.secondRailType });
|
|
10621
|
+
placements.push({ type: "rail", y: secondRailY, height: 0, railVariant: options.secondRailType, railKind: options.secondRailKind });
|
|
10597
10622
|
hangingZones.push({ top: secondRailY, bottom: secondRailY - secondClearance });
|
|
10598
10623
|
}
|
|
10599
10624
|
}
|
|
@@ -11866,7 +11891,7 @@ async function formatCliError(err, json) {
|
|
|
11866
11891
|
|
|
11867
11892
|
// src/version.ts
|
|
11868
11893
|
init_esm_shims();
|
|
11869
|
-
var CLI_VERSION = "1.1.
|
|
11894
|
+
var CLI_VERSION = "1.1.4";
|
|
11870
11895
|
|
|
11871
11896
|
// src/index.ts
|
|
11872
11897
|
program.name("wardrobe").description("Wardrobe configurator CLI").version(CLI_VERSION);
|