schematex 0.9.8 → 0.9.10
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/ai/ai-sdk.cjs +7 -7
- package/dist/ai/ai-sdk.d.cts +2 -2
- package/dist/ai/ai-sdk.d.ts +2 -2
- package/dist/ai/ai-sdk.js +2 -2
- package/dist/ai/index.cjs +16 -16
- package/dist/ai/index.js +3 -3
- package/dist/browser.cjs +8 -8
- package/dist/browser.js +2 -2
- package/dist/{chunk-2LVU75P3.cjs → chunk-CA54ESRT.cjs} +62 -14
- package/dist/chunk-CA54ESRT.cjs.map +1 -0
- package/dist/{chunk-33BFUEYU.js → chunk-CXA45HIT.js} +60 -12
- package/dist/chunk-CXA45HIT.js.map +1 -0
- package/dist/{chunk-BEPVTFXK.cjs → chunk-OY2CXLVY.cjs} +165 -18
- package/dist/{chunk-BEPVTFXK.cjs.map → chunk-OY2CXLVY.cjs.map} +1 -1
- package/dist/{chunk-4QLIFOKH.js → chunk-T5QOVX2I.js} +165 -18
- package/dist/{chunk-4QLIFOKH.js.map → chunk-T5QOVX2I.js.map} +1 -1
- package/dist/index.cjs +35 -35
- package/dist/index.js +2 -2
- package/dist/react.cjs +2 -2
- package/dist/react.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2LVU75P3.cjs.map +0 -1
- package/dist/chunk-33BFUEYU.js.map +0 -1
|
@@ -38354,14 +38354,39 @@ function chairAt(px, cx, cy, deg) {
|
|
|
38354
38354
|
const rot = Math.round(deg * 10) / 10;
|
|
38355
38355
|
return chunk3WNW5Y7P_cjs.el("g", { transform: `translate(${px(cx)},${px(cy)}) rotate(${rot})` }, [body]);
|
|
38356
38356
|
}
|
|
38357
|
-
|
|
38357
|
+
var SEAT_FS = 0.17;
|
|
38358
|
+
var SEAT_FS_MIN = 0.085;
|
|
38359
|
+
function seatName(c, cx, cy, name, slotW) {
|
|
38360
|
+
if (!name) return "";
|
|
38361
|
+
const unitW = chunkQC2RICQ4_cjs.estimateTextWidth(name, 1);
|
|
38362
|
+
let fs = SEAT_FS;
|
|
38363
|
+
if (unitW > 0 && unitW * fs > slotW) fs = Math.max(SEAT_FS_MIN, slotW / unitW);
|
|
38364
|
+
return chunk3WNW5Y7P_cjs.text(
|
|
38365
|
+
{
|
|
38366
|
+
class: "sx-fp-seat-name",
|
|
38367
|
+
x: c.px(cx),
|
|
38368
|
+
y: c.px(cy),
|
|
38369
|
+
"text-anchor": "middle",
|
|
38370
|
+
"dominant-baseline": "central",
|
|
38371
|
+
"font-size": c.px(fs)
|
|
38372
|
+
},
|
|
38373
|
+
name
|
|
38374
|
+
);
|
|
38375
|
+
}
|
|
38376
|
+
function edgeChairs(c, top, bottom, seats) {
|
|
38358
38377
|
const n = Math.max(1, Math.round(c.w / 0.65));
|
|
38378
|
+
const slotW = c.w / n * 0.96;
|
|
38359
38379
|
const out = [];
|
|
38360
|
-
|
|
38361
|
-
|
|
38362
|
-
|
|
38363
|
-
|
|
38364
|
-
|
|
38380
|
+
let s = 0;
|
|
38381
|
+
const row = (cy, deg) => {
|
|
38382
|
+
for (let i = 0; i < n; i++) {
|
|
38383
|
+
const cx = (i + 0.5) / n * c.w;
|
|
38384
|
+
out.push(chairAt(c.px, cx, cy, deg));
|
|
38385
|
+
if (seats) out.push(seatName(c, cx, cy, seats[s++], slotW));
|
|
38386
|
+
}
|
|
38387
|
+
};
|
|
38388
|
+
if (top) row(-CHAIR_GAP, 0);
|
|
38389
|
+
row(c.h + CHAIR_GAP, 180);
|
|
38365
38390
|
return out.join("");
|
|
38366
38391
|
}
|
|
38367
38392
|
function box(c, cls = "sx-fp-furn", rx = 0) {
|
|
@@ -38443,19 +38468,21 @@ function roundTable(seats, diaM) {
|
|
|
38443
38468
|
const r7 = half - ring;
|
|
38444
38469
|
const cx = c.w / 2;
|
|
38445
38470
|
const cy = c.h / 2;
|
|
38471
|
+
const slotW = 2 * (r7 + ring * 0.55) * Math.sin(Math.PI / seats);
|
|
38446
38472
|
const parts = [chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn", cx: c.px(cx), cy: c.px(cy), r: c.px(r7) })];
|
|
38447
38473
|
for (let i = 0; i < seats; i++) {
|
|
38448
38474
|
const a = i / seats * 2 * Math.PI - Math.PI / 2;
|
|
38449
38475
|
const px0 = cx + (r7 + ring * 0.55) * Math.cos(a);
|
|
38450
38476
|
const py0 = cy + (r7 + ring * 0.55) * Math.sin(a);
|
|
38451
38477
|
parts.push(chairAt(c.px, px0, py0, a * 180 / Math.PI + 90));
|
|
38478
|
+
if (c.seats) parts.push(seatName(c, px0, py0, c.seats[i], slotW));
|
|
38452
38479
|
}
|
|
38453
38480
|
return parts.join("");
|
|
38454
38481
|
}
|
|
38455
38482
|
};
|
|
38456
38483
|
}
|
|
38457
38484
|
function tableDraw(top, bottom) {
|
|
38458
|
-
return (c) => box(c) + edgeChairs(c, top);
|
|
38485
|
+
return (c) => box(c) + edgeChairs(c, top, bottom, c.seats);
|
|
38459
38486
|
}
|
|
38460
38487
|
var TREAD = 0.28;
|
|
38461
38488
|
function treadLines(c, vert, fixed0, fixed1, from, to, dashedFrom) {
|
|
@@ -38705,7 +38732,7 @@ var FLOORPLAN_SYMBOLS = {
|
|
|
38705
38732
|
return parts.join("");
|
|
38706
38733
|
}
|
|
38707
38734
|
},
|
|
38708
|
-
"dining-table": { w: 1.6, h: 0.9, envelope: [CHAIR_OVERHANG, 0, CHAIR_OVERHANG, 0], draw: tableDraw(true) },
|
|
38735
|
+
"dining-table": { w: 1.6, h: 0.9, envelope: [CHAIR_OVERHANG, 0, CHAIR_OVERHANG, 0], draw: tableDraw(true, true) },
|
|
38709
38736
|
sectional: {
|
|
38710
38737
|
w: 2.6,
|
|
38711
38738
|
h: 2,
|
|
@@ -39137,10 +39164,10 @@ var FLOORPLAN_SYMBOLS = {
|
|
|
39137
39164
|
"round-table-6": roundTable(6, 1.52),
|
|
39138
39165
|
"round-table-8": roundTable(8, 1.52),
|
|
39139
39166
|
"round-table-10": roundTable(10, 1.83),
|
|
39140
|
-
"conference-table": { w: 2.4, h: 1.2, envelope: [CHAIR_OVERHANG, 0, CHAIR_OVERHANG, 0], draw: tableDraw(true) },
|
|
39167
|
+
"conference-table": { w: 2.4, h: 1.2, envelope: [CHAIR_OVERHANG, 0, CHAIR_OVERHANG, 0], draw: tableDraw(true, true) },
|
|
39141
39168
|
// ── event / banquet ──
|
|
39142
|
-
"banquet-table": { w: 2.44, h: 0.76, envelope: [CHAIR_OVERHANG, 0, CHAIR_OVERHANG, 0], draw: tableDraw(true) },
|
|
39143
|
-
"head-table": { w: 3.7, h: 0.76, envelope: [0, 0, CHAIR_OVERHANG, 0], draw: tableDraw(false) },
|
|
39169
|
+
"banquet-table": { w: 2.44, h: 0.76, envelope: [CHAIR_OVERHANG, 0, CHAIR_OVERHANG, 0], draw: tableDraw(true, true) },
|
|
39170
|
+
"head-table": { w: 3.7, h: 0.76, envelope: [0, 0, CHAIR_OVERHANG, 0], draw: tableDraw(false, true) },
|
|
39144
39171
|
stage: {
|
|
39145
39172
|
w: 4,
|
|
39146
39173
|
h: 2,
|
|
@@ -39390,6 +39417,118 @@ var FLOORPLAN_SYMBOLS = {
|
|
|
39390
39417
|
underlay: true,
|
|
39391
39418
|
draw: (c) => chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-dash", x: 0, y: 0, width: c.px(c.w), height: c.px(c.h), rx: c.px(0.08) })
|
|
39392
39419
|
},
|
|
39420
|
+
// ── restaurant / commercial kitchen ──
|
|
39421
|
+
// Restaurant booth: two facing benches (chair fill) with a table between.
|
|
39422
|
+
// Default seats 4 (two per bench); benches are not auto-named seats.
|
|
39423
|
+
booth: {
|
|
39424
|
+
w: 1.4,
|
|
39425
|
+
h: 1.6,
|
|
39426
|
+
envelope: [0, 0, 0, 0],
|
|
39427
|
+
draw: (c) => {
|
|
39428
|
+
const benchH = Math.min(0.45, c.h * 0.28);
|
|
39429
|
+
const inset = c.w * 0.12;
|
|
39430
|
+
return [
|
|
39431
|
+
chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-chair", x: 0, y: 0, width: c.px(c.w), height: c.px(benchH), rx: c.px(0.06) }),
|
|
39432
|
+
chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-chair", x: 0, y: c.px(c.h - benchH), width: c.px(c.w), height: c.px(benchH), rx: c.px(0.06) }),
|
|
39433
|
+
chunk3WNW5Y7P_cjs.rect({
|
|
39434
|
+
class: "sx-fp-furn",
|
|
39435
|
+
x: c.px(inset),
|
|
39436
|
+
y: c.px(benchH + 0.06),
|
|
39437
|
+
width: c.px(c.w - 2 * inset),
|
|
39438
|
+
height: c.px(Math.max(0.1, c.h - 2 * benchH - 0.12)),
|
|
39439
|
+
rx: c.px(0.04)
|
|
39440
|
+
})
|
|
39441
|
+
].join("");
|
|
39442
|
+
}
|
|
39443
|
+
},
|
|
39444
|
+
// Stainless prep / work table: solid top with a dashed under-shelf outline.
|
|
39445
|
+
"prep-table": {
|
|
39446
|
+
w: 1.5,
|
|
39447
|
+
h: 0.75,
|
|
39448
|
+
draw: (c) => box(c) + chunk3WNW5Y7P_cjs.rect({
|
|
39449
|
+
class: "sx-fp-furn-dash",
|
|
39450
|
+
x: c.px(0.08),
|
|
39451
|
+
y: c.px(0.08),
|
|
39452
|
+
width: c.px(Math.max(0.1, c.w - 0.16)),
|
|
39453
|
+
height: c.px(Math.max(0.1, c.h - 0.16))
|
|
39454
|
+
})
|
|
39455
|
+
},
|
|
39456
|
+
// Commercial range: 6 burners (2 rows × 3 cols) over an oven (front line).
|
|
39457
|
+
range: {
|
|
39458
|
+
w: 0.9,
|
|
39459
|
+
h: 0.85,
|
|
39460
|
+
draw: (c) => {
|
|
39461
|
+
const parts = [box(c)];
|
|
39462
|
+
const r7 = Math.min(c.w / 6, c.h / 8);
|
|
39463
|
+
for (let row = 0; row < 2; row++) {
|
|
39464
|
+
for (let col = 0; col < 3; col++) {
|
|
39465
|
+
const cx = (col + 0.5) / 3 * c.w;
|
|
39466
|
+
const cy = (row + 0.5) / 4 * c.h;
|
|
39467
|
+
parts.push(chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-line", cx: c.px(cx), cy: c.px(cy), r: c.px(r7) }));
|
|
39468
|
+
}
|
|
39469
|
+
}
|
|
39470
|
+
parts.push(chunk3WNW5Y7P_cjs.line({ class: "sx-fp-furn-line", x1: 0, y1: c.px(c.h * 0.62), x2: c.px(c.w), y2: c.px(c.h * 0.62) }));
|
|
39471
|
+
return parts.join("");
|
|
39472
|
+
}
|
|
39473
|
+
},
|
|
39474
|
+
// Walk-in cooler/freezer: insulated double-wall box with a door gap + label.
|
|
39475
|
+
"walk-in": {
|
|
39476
|
+
w: 2.4,
|
|
39477
|
+
h: 2,
|
|
39478
|
+
draw: (c) => {
|
|
39479
|
+
const t = Math.min(0.12, c.w * 0.06);
|
|
39480
|
+
const doorW = Math.min(0.9, c.w * 0.4);
|
|
39481
|
+
const parts = [
|
|
39482
|
+
box(c),
|
|
39483
|
+
chunk3WNW5Y7P_cjs.rect({
|
|
39484
|
+
class: "sx-fp-furn-line",
|
|
39485
|
+
x: c.px(t),
|
|
39486
|
+
y: c.px(t),
|
|
39487
|
+
width: c.px(Math.max(0.1, c.w - 2 * t)),
|
|
39488
|
+
height: c.px(Math.max(0.1, c.h - 2 * t))
|
|
39489
|
+
}),
|
|
39490
|
+
// door gap on the bottom wall + a hinged leaf
|
|
39491
|
+
chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-solid", x: c.px((c.w - doorW) / 2), y: c.px(c.h - t), width: c.px(doorW), height: c.px(t) }),
|
|
39492
|
+
chunk3WNW5Y7P_cjs.line({
|
|
39493
|
+
class: "sx-fp-door-leaf",
|
|
39494
|
+
x1: c.px((c.w - doorW) / 2),
|
|
39495
|
+
y1: c.px(c.h),
|
|
39496
|
+
x2: c.px((c.w - doorW) / 2),
|
|
39497
|
+
y2: c.px(c.h + doorW * 0.6)
|
|
39498
|
+
}),
|
|
39499
|
+
glyphText(c, "WALK-IN")
|
|
39500
|
+
];
|
|
39501
|
+
return parts.join("");
|
|
39502
|
+
}
|
|
39503
|
+
},
|
|
39504
|
+
// Three-compartment commercial sink: three basins + a faucet dot per basin.
|
|
39505
|
+
"commercial-sink": {
|
|
39506
|
+
w: 1.8,
|
|
39507
|
+
h: 0.6,
|
|
39508
|
+
draw: (c) => {
|
|
39509
|
+
const parts = [box(c)];
|
|
39510
|
+
const gap = c.w * 0.04;
|
|
39511
|
+
const bw = (c.w - 4 * gap) / 3;
|
|
39512
|
+
for (let i = 0; i < 3; i++) {
|
|
39513
|
+
const bx = gap + i * (bw + gap);
|
|
39514
|
+
parts.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-line", x: c.px(bx), y: c.px(c.h * 0.18), width: c.px(bw), height: c.px(c.h * 0.64), rx: c.px(0.03) }));
|
|
39515
|
+
parts.push(chunk3WNW5Y7P_cjs.circle({ class: "sx-fp-furn-dot", cx: c.px(bx + bw / 2), cy: c.px(c.h * 0.12), r: c.px(0.04) }));
|
|
39516
|
+
}
|
|
39517
|
+
return parts.join("");
|
|
39518
|
+
}
|
|
39519
|
+
},
|
|
39520
|
+
// Deep fryer: two fry vats with handles.
|
|
39521
|
+
fryer: {
|
|
39522
|
+
w: 0.4,
|
|
39523
|
+
h: 0.8,
|
|
39524
|
+
draw: (c) => {
|
|
39525
|
+
const parts = [box(c)];
|
|
39526
|
+
for (const cy of [c.h * 0.28, c.h * 0.72]) {
|
|
39527
|
+
parts.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-furn-line", x: c.px(c.w * 0.18), y: c.px(cy - c.h * 0.16), width: c.px(c.w * 0.64), height: c.px(c.h * 0.32), rx: c.px(0.02) }));
|
|
39528
|
+
}
|
|
39529
|
+
return parts.join("");
|
|
39530
|
+
}
|
|
39531
|
+
},
|
|
39393
39532
|
// ── site / outdoor ──
|
|
39394
39533
|
// Tree in plan: a canopy disc with a foliage ring and a trunk dot.
|
|
39395
39534
|
tree: {
|
|
@@ -39637,7 +39776,14 @@ function parseFurniture(tok, ast, ln) {
|
|
|
39637
39776
|
f.y = c.y;
|
|
39638
39777
|
} else if (t.word === "size") f.size = parseDims(tok.shift(), "size", ln);
|
|
39639
39778
|
else if (t.word === "rotate") f.rotate = parseNum2(tok.shift(), "rotate", ln);
|
|
39640
|
-
else
|
|
39779
|
+
else if (t.word === "seats") {
|
|
39780
|
+
const names = [];
|
|
39781
|
+
while (isStr(tok[0])) names.push(tok.shift().str);
|
|
39782
|
+
if (names.length === 0) {
|
|
39783
|
+
throw new FloorplanParseError(`"seats" expects one or more quoted names`, ln);
|
|
39784
|
+
}
|
|
39785
|
+
f.seats = names;
|
|
39786
|
+
} else throw new FloorplanParseError(`furniture: unexpected token "${t.word}"`, ln);
|
|
39641
39787
|
}
|
|
39642
39788
|
ast.furniture.push(f);
|
|
39643
39789
|
}
|
|
@@ -40067,11 +40213,11 @@ function layoutFloorplan(ast) {
|
|
|
40067
40213
|
}
|
|
40068
40214
|
const items = [];
|
|
40069
40215
|
const seqByType = /* @__PURE__ */ new Map();
|
|
40070
|
-
const place = (type, roomIdx, localX, localY, w, h, rotate, label) => {
|
|
40216
|
+
const place = (type, roomIdx, localX, localY, w, h, rotate, label, seats) => {
|
|
40071
40217
|
const room = rooms[roomIdx];
|
|
40072
40218
|
const seq = (seqByType.get(type) ?? 0) + 1;
|
|
40073
40219
|
seqByType.set(type, seq);
|
|
40074
|
-
items.push({ type, x: room.x + localX, y: room.y + localY, w, h, rotate, label, roomId: room.id, seq });
|
|
40220
|
+
items.push({ type, x: room.x + localX, y: room.y + localY, w, h, rotate, label, seats, roomId: room.id, seq });
|
|
40075
40221
|
};
|
|
40076
40222
|
const roomIdxOf = (stmt, roomId, line2) => {
|
|
40077
40223
|
if (!roomId) {
|
|
@@ -40091,7 +40237,7 @@ function layoutFloorplan(ast) {
|
|
|
40091
40237
|
if (idx === void 0) continue;
|
|
40092
40238
|
const w = f.size ? f.size.w * u : def.w;
|
|
40093
40239
|
const h = f.size ? f.size.h * u : def.h;
|
|
40094
|
-
place(f.type, idx, f.x * u, f.y * u, w, h, f.rotate, f.label);
|
|
40240
|
+
place(f.type, idx, f.x * u, f.y * u, w, h, f.rotate, f.label, f.seats);
|
|
40095
40241
|
}
|
|
40096
40242
|
for (const a of ast.arrays) {
|
|
40097
40243
|
const def = FLOORPLAN_SYMBOLS[a.type];
|
|
@@ -40412,6 +40558,7 @@ function buildCss13(t) {
|
|
|
40412
40558
|
.sx-fp-hatch { fill: none; stroke: ${t.hatchStroke}; stroke-width: 1; }
|
|
40413
40559
|
.sx-fp-furn-text { font-weight: 600; font-family: sans-serif; fill: ${t.furnLabel}; paint-order: stroke; stroke: ${t.floorFill}; stroke-width: 2.5px; stroke-linejoin: round; }
|
|
40414
40560
|
.sx-fp-furn-label { font: 11px sans-serif; fill: ${t.furnLabel}; paint-order: stroke; stroke: ${t.floorFill}; stroke-width: 3px; stroke-linejoin: round; }
|
|
40561
|
+
.sx-fp-seat-name { font-family: sans-serif; fill: ${t.furnLabel}; paint-order: stroke; stroke: ${t.floorFill}; stroke-width: 2px; stroke-linejoin: round; }
|
|
40415
40562
|
.sx-fp-door-leaf { fill: none; stroke: ${t.doorLeaf}; stroke-width: 1.6; }
|
|
40416
40563
|
.sx-fp-door-arc { fill: none; stroke: ${t.doorArc}; stroke-width: 1; }
|
|
40417
40564
|
.sx-fp-window { fill: none; stroke: ${t.windowStroke}; stroke-width: 1.3; }
|
|
@@ -40697,7 +40844,7 @@ function renderFloorplanLayout(lay, config) {
|
|
|
40697
40844
|
const cx = r24(X(it.x) + wpx / 2);
|
|
40698
40845
|
const cy = r24(Y(it.y) + hpx / 2);
|
|
40699
40846
|
const rot = Math.round(it.rotate * 10) / 10;
|
|
40700
|
-
const children = [def.draw({ w: it.w, h: it.h, px, label: it.label })];
|
|
40847
|
+
const children = [def.draw({ w: it.w, h: it.h, px, label: it.label, seats: it.seats })];
|
|
40701
40848
|
if (warnSet.has(idx)) {
|
|
40702
40849
|
children.push(chunk3WNW5Y7P_cjs.rect({ class: "sx-fp-warn-item", x: -1, y: -1, width: r24(wpx + 2), height: r24(hpx + 2) }));
|
|
40703
40850
|
}
|
|
@@ -42590,5 +42737,5 @@ exports.timeline = timeline;
|
|
|
42590
42737
|
exports.umlclass = umlclass;
|
|
42591
42738
|
exports.usecase = usecase;
|
|
42592
42739
|
exports.welding = welding;
|
|
42593
|
-
//# sourceMappingURL=chunk-
|
|
42594
|
-
//# sourceMappingURL=chunk-
|
|
42740
|
+
//# sourceMappingURL=chunk-OY2CXLVY.cjs.map
|
|
42741
|
+
//# sourceMappingURL=chunk-OY2CXLVY.cjs.map
|