@pascal-app/nodes 1.0.0-beta.4 → 1.0.0-beta.5

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 (56) hide show
  1. package/dist/cabinet/flame-index.d.ts +3 -0
  2. package/dist/cabinet/flame-index.d.ts.map +1 -0
  3. package/dist/cabinet/flame-index.js +13 -0
  4. package/dist/cabinet/system.d.ts +2 -0
  5. package/dist/cabinet/system.d.ts.map +1 -1
  6. package/dist/cabinet/system.js +28 -8
  7. package/dist/cabinet/tool.d.ts.map +1 -1
  8. package/dist/cabinet/tool.js +2 -1
  9. package/dist/ceiling/panel.d.ts.map +1 -1
  10. package/dist/ceiling/panel.js +8 -2
  11. package/dist/ceiling/parametrics.js +1 -1
  12. package/dist/column/panel.js +1 -1
  13. package/dist/column/parametrics.js +1 -1
  14. package/dist/dormer/placement-guides.d.ts.map +1 -1
  15. package/dist/dormer/placement-guides.js +5 -4
  16. package/dist/elevator/definition.d.ts.map +1 -1
  17. package/dist/elevator/definition.js +2 -0
  18. package/dist/fence/curve-tool.d.ts.map +1 -1
  19. package/dist/fence/curve-tool.js +14 -9
  20. package/dist/fence/move-control-point-tool.d.ts.map +1 -1
  21. package/dist/fence/move-control-point-tool.js +13 -8
  22. package/dist/fence/move-tangent-tool.d.ts.map +1 -1
  23. package/dist/fence/move-tangent-tool.js +13 -8
  24. package/dist/fence/tool.d.ts.map +1 -1
  25. package/dist/fence/tool.js +8 -11
  26. package/dist/measurement/renderer.d.ts.map +1 -1
  27. package/dist/measurement/renderer.js +6 -5
  28. package/dist/measurement/surface-query.js +5 -5
  29. package/dist/measurement/tool.d.ts.map +1 -1
  30. package/dist/measurement/tool.js +7 -5
  31. package/dist/ridge-vent/renderer.d.ts.map +1 -1
  32. package/dist/ridge-vent/renderer.js +2 -2
  33. package/dist/shared/mep-ghost.d.ts.map +1 -1
  34. package/dist/shared/mep-ghost.js +19 -1
  35. package/dist/slab/panel.d.ts.map +1 -1
  36. package/dist/slab/panel.js +1 -1
  37. package/dist/wall/curve-tool.d.ts +3 -4
  38. package/dist/wall/curve-tool.d.ts.map +1 -1
  39. package/dist/wall/curve-tool.js +17 -13
  40. package/dist/wall/panel.d.ts.map +1 -1
  41. package/dist/wall/panel.js +56 -14
  42. package/dist/wall/parametrics.js +1 -1
  43. package/dist/wall/system.d.ts +3 -0
  44. package/dist/wall/system.d.ts.map +1 -1
  45. package/dist/wall/system.js +5 -1
  46. package/dist/wall/tool.d.ts.map +1 -1
  47. package/dist/wall/tool.js +24 -27
  48. package/dist/wall/wall-batch-system.d.ts +23 -0
  49. package/dist/wall/wall-batch-system.d.ts.map +1 -0
  50. package/dist/wall/wall-batch-system.js +389 -0
  51. package/dist/wall/wall-batch.d.ts +66 -0
  52. package/dist/wall/wall-batch.d.ts.map +1 -0
  53. package/dist/wall/wall-batch.js +169 -0
  54. package/dist/zone/quantities-panel.d.ts.map +1 -1
  55. package/dist/zone/quantities-panel.js +4 -3
  56. package/package.json +7 -7
@@ -5,7 +5,7 @@ import { formatAreaLabel, formatLinearMeasurement, formatVolumeLabel, MetricCont
5
5
  import { useViewer } from '@pascal-app/viewer';
6
6
  import { useEffect, useMemo, useRef, useState } from 'react';
7
7
  import { useShallow } from 'zustand/react/shallow';
8
- function ZonePlanSketch({ edgeLengths, polygon, unit, }) {
8
+ function ZonePlanSketch({ edgeLengths, metricNotation, polygon, unit, }) {
9
9
  if (polygon.length < 3) {
10
10
  return (_jsx("div", { className: "flex h-28 items-center justify-center rounded-md border border-border/50 text-muted-foreground text-xs", children: "Zone boundary unavailable" }));
11
11
  }
@@ -36,7 +36,7 @@ function ZonePlanSketch({ edgeLengths, polygon, unit, }) {
36
36
  midpoint[0] + (fromCenter[0] / directionLength) * 15,
37
37
  midpoint[1] + (fromCenter[1] / directionLength) * 15,
38
38
  ];
39
- const label = formatLinearMeasurement(edgeLengths[index] ?? 0, unit);
39
+ const label = formatLinearMeasurement(edgeLengths[index] ?? 0, unit, metricNotation);
40
40
  const labelWidth = Math.max(24, label.length * 5.5 + 8);
41
41
  return (_jsxs("g", { children: [_jsx("circle", { cx: start[0], cy: start[1], fill: "#f8faf7", r: "2.5", stroke: "#0e7490" }), _jsx("rect", { fill: "#f8faf7", height: "13", rx: "2", stroke: "#0e7490", strokeOpacity: "0.25", width: labelWidth, x: labelPoint[0] - labelWidth / 2, y: labelPoint[1] - 7 }), _jsx("text", { dominantBaseline: "middle", fill: "#164e63", fontFamily: "ui-monospace, SFMono-Regular, monospace", fontSize: "7.5", textAnchor: "middle", x: labelPoint[0], y: labelPoint[1], children: label })] }, `${start[0]}-${start[1]}-${index}`));
42
42
  })] }));
@@ -91,6 +91,7 @@ function RoomDocumentationPanel({ zone }) {
91
91
  export default function ZoneQuantitiesPanel() {
92
92
  const selectedZoneId = useViewer((state) => state.selection.zoneId);
93
93
  const unit = useViewer((state) => state.unit);
94
+ const metricNotation = useViewer((state) => state.metricNotation);
94
95
  const nodes = useScene((state) => state.nodes);
95
96
  const zone = selectedZoneId ? nodes[selectedZoneId] : undefined;
96
97
  const livePolygon = useLiveNodeOverrides((state) => selectedZoneId ? state.overrides.get(selectedZoneId)?.polygon : undefined);
@@ -123,5 +124,5 @@ export default function ZoneQuantitiesPanel() {
123
124
  const report = useMemo(() => (effectiveZone ? deriveZoneQuantityReport(effectiveZone, effectiveNodes) : null), [effectiveNodes, effectiveZone]);
124
125
  if (!effectiveZone || !report)
125
126
  return null;
126
- return (_jsxs(_Fragment, { children: [_jsx(RoomDocumentationPanel, { zone: effectiveZone }), _jsxs(PanelSection, { title: effectiveZone.spaceRole === 'room' ? 'Room quantities' : 'Zone quantities', children: [_jsxs("div", { className: "overflow-hidden rounded-md border border-cyan-950/20 bg-[#f8faf7] text-slate-950", children: [_jsxs("div", { className: "flex items-center border-cyan-950/15 border-b px-2.5 py-2", children: [_jsx("span", { className: "font-semibold text-[11px]", children: effectiveZone.name }), _jsx("span", { className: "ml-auto rounded-full border border-cyan-800/25 bg-cyan-50 px-2 py-0.5 text-cyan-900 text-[9px]", children: report.classification === 'enclosed-room' ? 'Enclosed room' : 'Footprint only' })] }), _jsxs("div", { className: "flex items-baseline gap-2 px-2.5 py-2 font-mono text-[10px]", children: [_jsx("span", { className: "text-cyan-800", children: "A" }), _jsx("span", { children: formatAreaLabel(report.footprintArea, unit, 2) }), _jsx("span", { className: "ml-auto text-slate-600", children: "P" }), _jsx("span", { children: formatLinearMeasurement(report.perimeter, unit) })] })] }), _jsx(ZonePlanSketch, { edgeLengths: report.edgeLengths, polygon: effectiveZone.polygon, unit: unit }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(QuantityRow, { abbreviation: "Aw", format: (value) => formatAreaLabel(value, unit, 2), label: "Wall surface", quantity: report.wallSurface }), _jsx(QuantityRow, { abbreviation: "Af", format: (value) => formatAreaLabel(value, unit, 2), label: "Floor surface", quantity: report.floorSurface }), _jsx(QuantityRow, { abbreviation: "V", format: (value) => formatVolumeLabel(value, unit, 2), label: "Volume", quantity: report.volume })] })] })] }));
127
+ return (_jsxs(_Fragment, { children: [_jsx(RoomDocumentationPanel, { zone: effectiveZone }), _jsxs(PanelSection, { title: effectiveZone.spaceRole === 'room' ? 'Room quantities' : 'Zone quantities', children: [_jsxs("div", { className: "overflow-hidden rounded-md border border-cyan-950/20 bg-[#f8faf7] text-slate-950", children: [_jsxs("div", { className: "flex items-center border-cyan-950/15 border-b px-2.5 py-2", children: [_jsx("span", { className: "font-semibold text-[11px]", children: effectiveZone.name }), _jsx("span", { className: "ml-auto rounded-full border border-cyan-800/25 bg-cyan-50 px-2 py-0.5 text-cyan-900 text-[9px]", children: report.classification === 'enclosed-room' ? 'Enclosed room' : 'Footprint only' })] }), _jsxs("div", { className: "flex items-baseline gap-2 px-2.5 py-2 font-mono text-[10px]", children: [_jsx("span", { className: "text-cyan-800", children: "A" }), _jsx("span", { children: formatAreaLabel(report.footprintArea, unit, 2) }), _jsx("span", { className: "ml-auto text-slate-600", children: "P" }), _jsx("span", { children: formatLinearMeasurement(report.perimeter, unit, metricNotation) })] })] }), _jsx(ZonePlanSketch, { edgeLengths: report.edgeLengths, metricNotation: metricNotation, polygon: effectiveZone.polygon, unit: unit }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(QuantityRow, { abbreviation: "Aw", format: (value) => formatAreaLabel(value, unit, 2), label: "Wall surface", quantity: report.wallSurface }), _jsx(QuantityRow, { abbreviation: "Af", format: (value) => formatAreaLabel(value, unit, 2), label: "Floor surface", quantity: report.floorSurface }), _jsx(QuantityRow, { abbreviation: "V", format: (value) => formatVolumeLabel(value, unit, 2), label: "Volume", quantity: report.volume })] })] })] }));
127
128
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pascal-app/nodes",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.5",
4
4
  "description": "Built-in node bundles for the Pascal 3D editor — one folder per kind, exported as `builtinPlugin`",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -23,9 +23,9 @@
23
23
  "prepublishOnly": "bun run build && bun test"
24
24
  },
25
25
  "peerDependencies": {
26
- "@pascal-app/core": "^1.0.0-beta.4",
27
- "@pascal-app/editor": "^1.0.0-beta.4",
28
- "@pascal-app/viewer": "^1.0.0-beta.4",
26
+ "@pascal-app/core": "^1.0.0-beta.5",
27
+ "@pascal-app/editor": "^1.0.0-beta.5",
28
+ "@pascal-app/viewer": "^1.0.0-beta.5",
29
29
  "@react-three/drei": "^10",
30
30
  "@react-three/fiber": "^9",
31
31
  "lucide-react": "^1",
@@ -34,9 +34,9 @@
34
34
  "zustand": "^5"
35
35
  },
36
36
  "devDependencies": {
37
- "@pascal-app/core": "^1.0.0-beta.4",
38
- "@pascal-app/editor": "^1.0.0-beta.4",
39
- "@pascal-app/viewer": "^1.0.0-beta.4",
37
+ "@pascal-app/core": "^1.0.0-beta.5",
38
+ "@pascal-app/editor": "^1.0.0-beta.5",
39
+ "@pascal-app/viewer": "^1.0.0-beta.5",
40
40
  "@pascal/typescript-config": "*",
41
41
  "@types/bun": "^1.3.0",
42
42
  "@types/node": "^22.19.12",