floor-editor-ts 1.3.12 → 1.3.14

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.
@@ -5983,7 +5983,7 @@ function resolveCameraAreaStyle(source, fallbackIndex = 0) {
5983
5983
  const areaRaw = (_source$props$area = source === null || source === void 0 || (_source$props = source.props) === null || _source$props === void 0 ? void 0 : _source$props.area) !== null && _source$props$area !== void 0 ? _source$props$area : source && "area" in source ? source.area : void 0;
5984
5984
  const colorRaw = (_source$props$areaCol = source === null || source === void 0 || (_source$props2 = source.props) === null || _source$props2 === void 0 ? void 0 : _source$props2.areaColor) !== null && _source$props$areaCol !== void 0 ? _source$props$areaCol : source && "areaColor" in source ? source.areaColor : void 0;
5985
5985
  return {
5986
- name: String(areaRaw !== null && areaRaw !== void 0 ? areaRaw : "").trim() || "Area",
5986
+ name: String(areaRaw !== null && areaRaw !== void 0 ? areaRaw : "").trim() || "Zone",
5987
5987
  color: String(colorRaw !== null && colorRaw !== void 0 ? colorRaw : "").trim() || nextZoneColor(fallbackIndex)
5988
5988
  };
5989
5989
  }
@@ -7067,7 +7067,7 @@ function addZone(shape, points, nameOrOpts, colorArg) {
7067
7067
  const serial = ((_opts$cameraSerial = opts.cameraSerial) === null || _opts$cameraSerial === void 0 ? void 0 : _opts$cameraSerial.trim()) || void 0;
7068
7068
  f.zones.push({
7069
7069
  id,
7070
- name: ((_opts$name = opts.name) === null || _opts$name === void 0 ? void 0 : _opts$name.trim()) || `Area ${count + 1}`,
7070
+ name: ((_opts$name = opts.name) === null || _opts$name === void 0 ? void 0 : _opts$name.trim()) || `Zone ${count + 1}`,
7071
7071
  shape,
7072
7072
  points: points.map((p) => ({
7073
7073
  x: p.x,
@@ -7405,8 +7405,8 @@ function assignedCameraToProps(cam) {
7405
7405
  return props;
7406
7406
  }
7407
7407
  function formatCameraPropLabel(key) {
7408
- if (key === "area") return "Area";
7409
- if (key === "areaColor") return "Area Color";
7408
+ if (key === "area") return "Zone";
7409
+ if (key === "areaColor") return "Zone Color";
7410
7410
  return key.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[-_]+/g, " ").replace(/\b\w/g, (c) => c.toUpperCase()).trim();
7411
7411
  }
7412
7412
  var DEFAULT_CONFIG = {
@@ -58716,7 +58716,7 @@ init_index_client();
58716
58716
  var root_7$4 = /* @__PURE__ */ from_html(`<button draggable="true"><div class="w-9 h-9 rounded-lg bg-amber-50 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#92400e" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><path></path></svg></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
58717
58717
  var root_8$2 = /* @__PURE__ */ from_html(`<button draggable="true"><div class="w-9 h-9 rounded-lg bg-cyan-50 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#0e7490" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="18" height="16" rx="1"></rect><line x1="12" y1="4" x2="12" y2="20"></line><line x1="3" y1="12" x2="21" y2="12"></line></svg></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
58718
58718
  var root_6$3 = /* @__PURE__ */ from_html(`<div class="grid grid-cols-2 gap-2 mb-3"></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Windows</h3> <div class="grid grid-cols-2 gap-2"></div>`, 1);
58719
- var root_1$8 = /* @__PURE__ */ from_html(`<div class="space-y-1"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Tools</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg></div> <div class="text-left"><div class="font-medium">Select <span class="text-gray-400 text-xs ml-1">V</span></div> <div class="text-xs text-gray-400">Click to select elements</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="8" width="18" height="8" rx="1"></rect><line x1="7" y1="8" x2="7" y2="16"></line><line x1="12" y1="8" x2="12" y2="16"></line><line x1="17" y1="8" x2="17" y2="16"></line></svg></div> <div class="text-left"><div class="font-medium">Draw Wall <span class="text-gray-400 text-xs ml-1">W</span></div> <div class="text-xs text-gray-400">Click to draw, dbl-click to finish</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Area</h3> <div class="grid grid-cols-3 gap-1.5 mb-1"><button type="button" title="Drag to create rectangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><rect x="4" y="6" width="16" height="12" rx="1"></rect></svg> Rect</button> <button type="button" title="Click to place triangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M12 4 L20 19 L4 19 Z"></path></svg> Triangle</button> <button type="button" title="Click points; click first point or Enter to close"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M7 4 L17 6 L20 14 L12 20 L4 12 Z"></path></svg> Polygon</button></div> <p class="text-[10px] text-gray-400 mb-2 px-0.5"><!></p> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Structure</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 5h-5V2h-3v6h-4V5H7v6H2v3h5v3h3v-3h4v3h3v-6h5z"></path></svg></div> <div class="text-left"><div class="font-medium">Add Stairs</div> <div class="text-xs text-gray-400">Click to place stairs</div></div></button> <div class="flex gap-2"><button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="6"></circle><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Round Column</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="6" y="6" width="12" height="12"></rect><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Square Column</div></div></button></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Annotate</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7V4h16v3"></path><line x1="12" y1="4" x2="12" y2="20"></line><line x1="8" y1="20" x2="16" y2="20"></line></svg></div> <div class="text-left"><div class="font-medium">Text Label</div> <div class="text-xs text-gray-400">Add text annotations (T)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><line x1="16" y1="5" x2="22" y2="5"></line><line x1="19" y1="2" x2="19" y2="8"></line><line x1="3" y1="12" x2="12" y2="12"></line></svg></div> <div class="text-left"><div class="font-medium">Dimension</div> <div class="text-xs text-gray-400">Add dimension annotations (N)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12h5l2-7 4 14 2-7h7"></path></svg></div> <div class="text-left"><div class="font-medium">Measure</div> <div class="text-xs text-gray-400">Measure distances (M)</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Import</h3> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg></div> <div class="text-left"><div class="font-medium">Import Image</div> <div class="text-xs text-gray-400">Floor plan background</div></div></button> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg></div> <div class="text-left"><div class="font-medium">Import RoomPlan</div> <div class="text-xs text-gray-400">iOS LiDAR scan (.json/.zip)</div></div></button> <button class="w-full flex items-center justify-between px-1 py-2 mt-3"><h3 class="text-xs font-semibold text-gray-400 uppercase">Doors</h3> <span class="text-gray-400 text-xs"> </span></button> <!></div>`);
58719
+ var root_1$8 = /* @__PURE__ */ from_html(`<div class="space-y-1"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Tools</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 3l7.07 16.97 2.51-7.39 7.39-2.51L3 3z"></path><path d="M13 13l6 6"></path></svg></div> <div class="text-left"><div class="font-medium">Select <span class="text-gray-400 text-xs ml-1">V</span></div> <div class="text-xs text-gray-400">Click to select elements</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="8" width="18" height="8" rx="1"></rect><line x1="7" y1="8" x2="7" y2="16"></line><line x1="12" y1="8" x2="12" y2="16"></line><line x1="17" y1="8" x2="17" y2="16"></line></svg></div> <div class="text-left"><div class="font-medium">Draw Wall <span class="text-gray-400 text-xs ml-1">W</span></div> <div class="text-xs text-gray-400">Click to draw, dbl-click to finish</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Zone</h3> <div class="grid grid-cols-3 gap-1.5 mb-1"><button type="button" title="Drag to create rectangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><rect x="4" y="6" width="16" height="12" rx="1"></rect></svg> Rect</button> <button type="button" title="Click to place triangle area"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M12 4 L20 19 L4 19 Z"></path></svg> Triangle</button> <button type="button" title="Click points; click first point or Enter to close"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-dasharray="3 2"><path d="M7 4 L17 6 L20 14 L12 20 L4 12 Z"></path></svg> Polygon</button></div> <p class="text-[10px] text-gray-400 mb-2 px-0.5"><!></p> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Structure</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 5h-5V2h-3v6h-4V5H7v6H2v3h5v3h3v-3h4v3h3v-6h5z"></path></svg></div> <div class="text-left"><div class="font-medium">Add Stairs</div> <div class="text-xs text-gray-400">Click to place stairs</div></div></button> <div class="flex gap-2"><button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="6"></circle><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Round Column</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="6" y="6" width="12" height="12"></rect><line x1="6" y1="6" x2="18" y2="18"></line><line x1="18" y1="6" x2="6" y2="18"></line></svg></div> <div class="text-left"><div class="font-medium text-xs">Square Column</div></div></button></div> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Annotate</h3> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 7V4h16v3"></path><line x1="12" y1="4" x2="12" y2="20"></line><line x1="8" y1="20" x2="16" y2="20"></line></svg></div> <div class="text-left"><div class="font-medium">Text Label</div> <div class="text-xs text-gray-400">Add text annotations (T)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><line x1="16" y1="5" x2="22" y2="5"></line><line x1="19" y1="2" x2="19" y2="8"></line><line x1="3" y1="12" x2="12" y2="12"></line></svg></div> <div class="text-left"><div class="font-medium">Dimension</div> <div class="text-xs text-gray-400">Add dimension annotations (N)</div></div></button> <button><div><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2 12h5l2-7 4 14 2-7h7"></path></svg></div> <div class="text-left"><div class="font-medium">Measure</div> <div class="text-xs text-gray-400">Measure distances (M)</div></div></button> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2 mt-3">Import</h3> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="9" cy="9" r="2"></circle><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"></path></svg></div> <div class="text-left"><div class="font-medium">Import Image</div> <div class="text-xs text-gray-400">Floor plan background</div></div></button> <button class="w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm transition-colors hover:bg-gray-50 text-gray-700"><div class="w-9 h-9 rounded-lg bg-gray-100 flex items-center justify-center"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg></div> <div class="text-left"><div class="font-medium">Import RoomPlan</div> <div class="text-xs text-gray-400">iOS LiDAR scan (.json/.zip)</div></div></button> <button class="w-full flex items-center justify-between px-1 py-2 mt-3"><h3 class="text-xs font-semibold text-gray-400 uppercase">Doors</h3> <span class="text-gray-400 text-xs"> </span></button> <!></div>`);
58720
58720
  var root_10$2 = /* @__PURE__ */ from_html(`<button class="flex flex-col items-center gap-1.5 p-3 rounded-lg border-2 border-gray-100 hover:border-blue-300 hover:bg-blue-50 transition-colors cursor-grab active:cursor-grabbing" draggable="true"><div class="w-12 h-12 rounded-lg bg-gray-50 flex items-center justify-center text-2xl font-mono"> </div> <span class="text-xs font-medium text-gray-600"> </span></button>`);
58721
58721
  var root_11$2 = /* @__PURE__ */ from_html(`<button class="flex flex-col items-center gap-1.5 p-3 rounded-lg border-2 border-gray-100 hover:border-green-300 hover:bg-green-50 transition-colors cursor-grab active:cursor-grabbing" draggable="true"><div class="w-12 h-12 rounded-lg bg-green-50 flex items-center justify-center text-lg"><!></div> <span class="text-xs font-medium text-gray-600"> </span> <span class="text-[10px] text-gray-400"> </span></button>`);
58722
58722
  var root_9$2 = /* @__PURE__ */ from_html(`<div class="space-y-2"><h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Room Presets</h3> <p class="text-xs text-gray-400 mb-3">Click to add a room shape to the canvas</p> <div class="grid grid-cols-2 gap-2"></div> <hr class="my-3 border-gray-200"/> <h3 class="text-xs font-semibold text-gray-400 uppercase mb-2">Room Templates</h3> <p class="text-xs text-gray-400 mb-3">Pre-furnished rooms — walls + furniture in one click</p> <div class="grid grid-cols-2 gap-2"></div></div>`);
@@ -59079,7 +59079,7 @@ function BuildPanel($$anchor, $$props) {
59079
59079
  var p_1 = sibling(div_6, 2);
59080
59080
  var node_1 = child(p_1);
59081
59081
  var consequent = ($$anchor) => {
59082
- append($$anchor, text$1("Drag to draw · name/color from camera Area / Area Color"));
59082
+ append($$anchor, text$1("Drag to draw · name/color from camera area / areaColor"));
59083
59083
  };
59084
59084
  var consequent_1 = ($$anchor) => {
59085
59085
  append($$anchor, text$1("Click to place · then drag vertices"));
@@ -59088,7 +59088,7 @@ function BuildPanel($$anchor, $$props) {
59088
59088
  append($$anchor, text$1("Click vertices · Enter / click first point to close"));
59089
59089
  };
59090
59090
  var alternate = ($$anchor) => {
59091
- append($$anchor, text$1("Select a camera first, then draw its Area"));
59091
+ append($$anchor, text$1("Select a camera first, then draw its Zone"));
59092
59092
  };
59093
59093
  if_block(node_1, ($$render) => {
59094
59094
  if (get(currentTool) === "zone" && get(currentZoneShape) === "rectangle") $$render(consequent);
@@ -60033,7 +60033,7 @@ var root_26 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-
60033
60033
  var root_24 = /* @__PURE__ */ from_html(`<h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-gray-200 rounded flex items-center justify-center text-xs">🏛️</span> Column Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Shape</span> <div class="flex gap-2"><button>⭕ Round</button> <button>⬜ Square</button></div></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="10" max="200" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="50" max="1000" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div><span class="text-xs text-gray-500 mb-1.5 block">Color</span> <div class="grid grid-cols-5 gap-1.5 mb-2"></div> <div class="flex items-center gap-2"><span class="text-xs text-gray-500">Custom:</span> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></div> <!></div>`, 1);
60034
60034
  var root_28 = /* @__PURE__ */ from_html(`<div class="text-xs text-gray-500">Camera: <span class="text-gray-700 font-mono"> </span></div>`);
60035
60035
  var root_29 = /* @__PURE__ */ from_html(`<button type="button"></button>`);
60036
- var root_27 = /* @__PURE__ */ from_html(`<div class="space-y-3"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 rounded flex items-center justify-center text-xs">⬡</span> Area</h3> <label class="block"><span class="text-xs text-gray-500">Area</span> <input type="text" class="w-full px-2 py-1 border border-gray-200 rounded text-sm" title="From assignedCameras.area when linked"/></label> <!> <div class="text-xs text-gray-500">Shape: <span class="text-gray-700 capitalize"> </span></div> <label class="block"><span class="text-xs text-gray-500">Area Color</span> <div class="flex flex-wrap gap-1.5 mt-1"><!> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></label> <label class="block"><span class="text-xs text-gray-500">Fill opacity</span> <input type="range" min="0" max="0.4" step="0.02" class="w-full"/></label></div>`);
60036
+ var root_27 = /* @__PURE__ */ from_html(`<div class="space-y-3"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 rounded flex items-center justify-center text-xs">⬡</span> Zone</h3> <label class="block"><span class="text-xs text-gray-500">Name</span> <input type="text" class="w-full px-2 py-1 border border-gray-200 rounded text-sm" title="From assignedCameras.area when linked"/></label> <!> <div class="text-xs text-gray-500">Shape: <span class="text-gray-700 capitalize"> </span></div> <label class="block"><span class="text-xs text-gray-500">Color</span> <div class="flex flex-wrap gap-1.5 mt-1"><!> <input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/></div></label> <label class="block"><span class="text-xs text-gray-500">Fill opacity</span> <input type="range" min="0" max="0.4" step="0.02" class="w-full"/></label></div>`);
60037
60037
  var root_30 = /* @__PURE__ */ from_html(`<div class="space-y-3"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-emerald-100 rounded flex items-center justify-center text-xs">🏷️</span> Text Annotation</h3> <label class="block"><span class="text-xs text-gray-500">Text</span> <input type="text" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Font Size</span> <input type="number" min="8" max="72" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Color</span> <div class="flex items-center gap-2"><input type="color" class="w-8 h-6 rounded border border-gray-200 cursor-pointer"/> <span class="text-xs text-gray-400"> </span></div></label> <label class="block"><span class="text-xs text-gray-500">Rotation (°)</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">X</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <label class="block"><span class="text-xs text-gray-500">Y</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div>`);
60038
60038
  var root_31 = /* @__PURE__ */ from_html(`<div class="mt-4 pt-3 border-t border-gray-200"><h3 class="text-sm font-semibold text-gray-700 mb-3 flex items-center gap-2"><span class="w-6 h-6 bg-blue-100 rounded flex items-center justify-center text-xs">🖼️</span> Background Image</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Opacity</span> <input type="range" min="0.05" max="1" step="0.05" class="w-full"/></label> <label class="block"><span class="text-xs text-gray-500">Scale</span> <input type="range" min="0.1" max="5" step="0.05" class="w-full"/></label> <label class="block"><span class="text-xs text-gray-500">Rotation</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div class="flex gap-2"><button> </button> <button class="flex-1 px-2 py-1.5 border rounded text-sm border-gray-200 hover:bg-gray-50">📏 Set Scale</button></div> <button class="w-full px-2 py-1.5 border border-red-300 rounded text-sm text-red-600 hover:bg-red-50">Remove Image</button></div></div>`);
60039
60039
  var root$3 = /* @__PURE__ */ from_html(`<div data-properties-panel="" style="top: 0; bottom: 0;"><!> <!></div>`);
@@ -61839,7 +61839,7 @@ function LayersPanel($$anchor, $$props) {
61839
61839
  });
61840
61840
  if ((_$$get$zones = get(floor).zones) === null || _$$get$zones === void 0 ? void 0 : _$$get$zones.length) cats.push({
61841
61841
  key: "zones",
61842
- label: "Areas",
61842
+ label: "Zones",
61843
61843
  icon: "⬡",
61844
61844
  items: get(floor).zones.map((z) => ({
61845
61845
  id: z.id,
@@ -66100,7 +66100,7 @@ function FloorPlanCanvas($$anchor, $$props) {
66100
66100
  const step = get(currentSnapToGrid) ? get(currentGridSize) : SNAP;
66101
66101
  return Math.round(v / step) * step;
66102
66102
  }
66103
- /** Pick camera for new Area: selected camera, else first camera without an area. */
66103
+ /** Pick camera for new Zone: selected camera, else first camera without a zone. */
66104
66104
  function resolveAreaCameraTarget() {
66105
66105
  var _$$get$zones, _ref, _$$get$furniture$find;
66106
66106
  if (!get(currentFloor)) return null;
@@ -66125,7 +66125,7 @@ function FloorPlanCanvas($$anchor, $$props) {
66125
66125
  });
66126
66126
  }
66127
66127
  return addZone(shape, points, {
66128
- name: `Area ${idx + 1}`,
66128
+ name: `Zone ${idx + 1}`,
66129
66129
  color: nextZoneColor(idx)
66130
66130
  });
66131
66131
  }
@@ -67461,6 +67461,7 @@ function FloorPlanCanvas($$anchor, $$props) {
67461
67461
  const zoneSel = (_$$get7 = get(selectedZoneId)) !== null && _$$get7 !== void 0 ? _$$get7 : floor.zones.some((z) => z.id === get(currentSelectedId)) ? get(currentSelectedId) : null;
67462
67462
  drawZones(getCS(), floor, zoneSel);
67463
67463
  }
67464
+ if (get(showFurniture)) for (const fi of floor.furniture) drawFurniture(fi, isSelected(fi.id));
67464
67465
  if (get(currentTool) === "zone") {
67465
67466
  var _floor$zones$length, _floor$zones2, _floor$zones$length2, _floor$zones3;
67466
67467
  const draftCam = resolveAreaCameraTarget();
@@ -67917,27 +67918,29 @@ function FloorPlanCanvas($$anchor, $$props) {
67917
67918
  return;
67918
67919
  }
67919
67920
  if (tool === "select" && ((_$$get8 = get(currentFloor)) === null || _$$get8 === void 0 || (_$$get8 = _$$get8.zones) === null || _$$get8 === void 0 ? void 0 : _$$get8.length) && get(layerVis).zones) {
67920
- const zHit = findZoneAt(wp, get(currentFloor).zones, get(zoom));
67921
- if (zHit) {
67922
- set(selectedZoneId, zHit.id, true);
67923
- selectedElementId.set(zHit.id);
67924
- set(selectedTextAnnotationId, null);
67925
- set(selectedAnnotationId, null);
67926
- set(selectedMeasurementId, null);
67927
- const vIdx = findZoneVertexAt(wp, zHit, get(zoom));
67928
- beginUndoGroup();
67929
- if (vIdx >= 0) {
67930
- set(draggingZoneId, zHit.id, true);
67931
- set(draggingZoneVertex, vIdx, true);
67932
- } else {
67933
- set(draggingZoneId, zHit.id, true);
67934
- set(draggingZoneVertex, null);
67935
- set(zoneDragLast, {
67936
- x: wp.x,
67937
- y: wp.y
67938
- }, true);
67921
+ if (!(get(showFurniture) && !!findFurnitureAt$1(wp) || get(layerVis).columns && !!findColumnAt$1(wp) || get(showStairs) && !!findStairAt$1(wp))) {
67922
+ const zHit = findZoneAt(wp, get(currentFloor).zones, get(zoom));
67923
+ if (zHit) {
67924
+ set(selectedZoneId, zHit.id, true);
67925
+ selectedElementId.set(zHit.id);
67926
+ set(selectedTextAnnotationId, null);
67927
+ set(selectedAnnotationId, null);
67928
+ set(selectedMeasurementId, null);
67929
+ const vIdx = findZoneVertexAt(wp, zHit, get(zoom));
67930
+ beginUndoGroup();
67931
+ if (vIdx >= 0) {
67932
+ set(draggingZoneId, zHit.id, true);
67933
+ set(draggingZoneVertex, vIdx, true);
67934
+ } else {
67935
+ set(draggingZoneId, zHit.id, true);
67936
+ set(draggingZoneVertex, null);
67937
+ set(zoneDragLast, {
67938
+ x: wp.x,
67939
+ y: wp.y
67940
+ }, true);
67941
+ }
67942
+ return;
67939
67943
  }
67940
- return;
67941
67944
  }
67942
67945
  set(selectedZoneId, null);
67943
67946
  }
@@ -69670,7 +69673,7 @@ function FloorPlanCanvas($$anchor, $$props) {
69670
69673
  ["furniture", "Furniture"],
69671
69674
  ["stairs", "Stairs"],
69672
69675
  ["columns", "Columns"],
69673
- ["zones", "Areas"],
69676
+ ["zones", "Zones"],
69674
69677
  ["guides", "Guides"],
69675
69678
  ["measurements", "Measurements"]
69676
69679
  ], index$1, ($$anchor, $$item) => {
@@ -71141,16 +71144,29 @@ function App($$anchor, $$props) {
71141
71144
  }).join("&");
71142
71145
  }).filter(Boolean).sort().join("|");
71143
71146
  }
71147
+ function clearAssignedSyncTimer() {
71148
+ if (assignedSyncTimer != null) {
71149
+ clearTimeout(assignedSyncTimer);
71150
+ assignedSyncTimer = null;
71151
+ }
71152
+ }
71153
+ /**
71154
+ * viewOnly must never run assignedCameras sync.
71155
+ * Otherwise `assignedCameras: []` + leftover module `lastSyncedSerials`
71156
+ * (from an edit session / other instance) strips cameras loaded from floorData.
71157
+ */
71144
71158
  function scheduleAssignedCamerasSync(_reason) {
71145
71159
  var _$$get;
71160
+ if (get(config).viewOnly) return;
71146
71161
  const aKey = assignedKey(latestAssigned);
71147
71162
  const fKey = `${(_$$get = get(activeFloorId)) !== null && _$$get !== void 0 ? _$$get : ""}:${get(activeFloorWallCount)}`;
71148
71163
  if (aKey === lastScheduledAssignKey && fKey === lastScheduledFloorKey && assignedSyncTimer != null) return;
71149
71164
  lastScheduledAssignKey = aKey;
71150
71165
  lastScheduledFloorKey = fKey;
71151
- if (assignedSyncTimer != null) clearTimeout(assignedSyncTimer);
71166
+ clearAssignedSyncTimer();
71152
71167
  assignedSyncTimer = setTimeout(() => {
71153
71168
  assignedSyncTimer = null;
71169
+ if (get(config).viewOnly) return;
71154
71170
  syncAssignedCameras(latestAssigned);
71155
71171
  }, 0);
71156
71172
  }
@@ -71169,12 +71185,13 @@ function App($$anchor, $$props) {
71169
71185
  lastScheduledFloorKey = "";
71170
71186
  currentProject.set(normalizeFloorData(v));
71171
71187
  markClean();
71172
- scheduleAssignedCamerasSync("floor");
71188
+ if (!get(config).viewOnly) scheduleAssignedCamerasSync("floor");
71173
71189
  }
71174
71190
  (_$$props$stores = $$props.stores) === null || _$$props$stores === void 0 || _$$props$stores.floorData.subscribe((v) => applyFloorData(v));
71175
71191
  (_$$props$stores2 = $$props.stores) === null || _$$props$stores2 === void 0 || _$$props$stores2.config.subscribe((v) => {
71176
71192
  var _next$assignedCameras;
71177
71193
  const next = normalizeConfig(v);
71194
+ const wasViewOnly = get(config).viewOnly;
71178
71195
  set(config, next, true);
71179
71196
  latestAssigned = (_next$assignedCameras = next.assignedCameras) !== null && _next$assignedCameras !== void 0 ? _next$assignedCameras : [];
71180
71197
  if (next.cameraThumbnailOpacity != null && get$1(cameraThumbnailOpacity) !== next.cameraThumbnailOpacity) cameraThumbnailOpacity.set(next.cameraThumbnailOpacity);
@@ -71185,6 +71202,17 @@ function App($$anchor, $$props) {
71185
71202
  name: next.projectName
71186
71203
  } : p);
71187
71204
  }
71205
+ if (next.viewOnly) {
71206
+ resetAssignedCamerasSyncState();
71207
+ lastScheduledAssignKey = "";
71208
+ lastScheduledFloorKey = "";
71209
+ clearAssignedSyncTimer();
71210
+ return;
71211
+ }
71212
+ if (wasViewOnly && !next.viewOnly) {
71213
+ lastScheduledAssignKey = "";
71214
+ lastScheduledFloorKey = "";
71215
+ }
71188
71216
  scheduleAssignedCamerasSync("config");
71189
71217
  });
71190
71218
  activeFloor.subscribe((f) => {
@@ -71194,7 +71222,7 @@ function App($$anchor, $$props) {
71194
71222
  const floorChanged = id !== get(activeFloorId) || walls !== get(activeFloorWallCount);
71195
71223
  if (id !== get(activeFloorId)) set(activeFloorId, id, true);
71196
71224
  if (walls !== get(activeFloorWallCount)) set(activeFloorWallCount, walls, true);
71197
- if (floorChanged) scheduleAssignedCamerasSync("floor");
71225
+ if (floorChanged && !get(config).viewOnly) scheduleAssignedCamerasSync("floor");
71198
71226
  });
71199
71227
  user_effect(() => {
71200
71228
  setFloorCallbackDispatcher($$props.onDispatch ? (eventName, detail) => $$props.onDispatch(eventName, detail) : null);
@@ -71219,7 +71247,7 @@ function App($$anchor, $$props) {
71219
71247
  return () => {
71220
71248
  unsub();
71221
71249
  clearTimeout(saveTimeout);
71222
- if (assignedSyncTimer != null) clearTimeout(assignedSyncTimer);
71250
+ clearAssignedSyncTimer();
71223
71251
  };
71224
71252
  });
71225
71253
  var fragment = root();
@@ -71587,7 +71615,11 @@ var FloorEditor = class extends HTMLElement {
71587
71615
  _classPrivateFieldInitSpec(this, _wrapper, null);
71588
71616
  _classPrivateFieldInitSpec(this, _store, {
71589
71617
  floorData: writable(null),
71590
- config: writable(DEFAULT_CONFIG)
71618
+ /** Default viewOnly — host sets viewOnly:false for the editor instance. */
71619
+ config: writable({
71620
+ ...DEFAULT_CONFIG,
71621
+ viewOnly: true
71622
+ })
71591
71623
  });
71592
71624
  }
71593
71625
  connectedCallback() {