floor-editor-ts 1.3.14 → 1.3.15

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.
@@ -5977,13 +5977,13 @@ var DEFAULT_ZONE_FILL_OPACITY = .1;
5977
5977
  function nextZoneColor(existingCount) {
5978
5978
  return ZONE_COLOR_PALETTE[existingCount % ZONE_COLOR_PALETTE.length];
5979
5979
  }
5980
- /** Resolve area label + color from host assigned camera fields. */
5980
+ /** Resolve zone label + color from host assigned camera fields (`zone` / `zoneColor`). */
5981
5981
  function resolveCameraAreaStyle(source, fallbackIndex = 0) {
5982
- var _source$props$area, _source$props, _source$props$areaCol, _source$props2;
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
- 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;
5982
+ var _source$props$zone, _source$props, _source$props$zoneCol, _source$props2;
5983
+ const nameRaw = (_source$props$zone = source === null || source === void 0 || (_source$props = source.props) === null || _source$props === void 0 ? void 0 : _source$props.zone) !== null && _source$props$zone !== void 0 ? _source$props$zone : source && "zone" in source ? source.zone : void 0;
5984
+ const colorRaw = (_source$props$zoneCol = source === null || source === void 0 || (_source$props2 = source.props) === null || _source$props2 === void 0 ? void 0 : _source$props2.zoneColor) !== null && _source$props$zoneCol !== void 0 ? _source$props$zoneCol : source && "zoneColor" in source ? source.zoneColor : void 0;
5985
5985
  return {
5986
- name: String(areaRaw !== null && areaRaw !== void 0 ? areaRaw : "").trim() || "Zone",
5986
+ name: String(nameRaw !== null && nameRaw !== void 0 ? nameRaw : "").trim() || "Zone",
5987
5987
  color: String(colorRaw !== null && colorRaw !== void 0 ? colorRaw : "").trim() || nextZoneColor(fallbackIndex)
5988
5988
  };
5989
5989
  }
@@ -7405,8 +7405,8 @@ function assignedCameraToProps(cam) {
7405
7405
  return props;
7406
7406
  }
7407
7407
  function formatCameraPropLabel(key) {
7408
- if (key === "area") return "Zone";
7409
- if (key === "areaColor") return "Zone Color";
7408
+ if (key === "zone") return "Zone";
7409
+ if (key === "zoneColor") 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 = {
@@ -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 / areaColor"));
59082
+ append($$anchor, text$1("Drag to draw · name/color from camera zone / zoneColor"));
59083
59083
  };
59084
59084
  var consequent_1 = ($$anchor) => {
59085
59085
  append($$anchor, text$1("Click to place · then drag vertices"));
@@ -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> 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>`);
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.zone 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>`);
@@ -60222,7 +60222,7 @@ function PropertiesPanel($$anchor, $$props) {
60222
60222
  const props = get(selectedFurniture).props;
60223
60223
  if (props && Object.keys(props).length > 0) {
60224
60224
  const keys = Object.keys(props);
60225
- const rank = (k) => k === "serial" ? 0 : k === "name" ? 1 : k === "area" ? 2 : k === "areaColor" ? 3 : 10;
60225
+ const rank = (k) => k === "serial" ? 0 : k === "name" ? 1 : k === "zone" ? 2 : k === "zoneColor" ? 3 : 10;
60226
60226
  keys.sort((a, b) => {
60227
60227
  const d = rank(a) - rank(b);
60228
60228
  return d !== 0 ? d : a.localeCompare(b);
@@ -71089,7 +71089,7 @@ function syncAssignedCameras(assigned) {
71089
71089
  setAssignedCamerasSyncing(false);
71090
71090
  }
71091
71091
  }
71092
- /** Push area / areaColor onto linked zones; remove areas whose camera was unassigned. */
71092
+ /** Push zone / zoneColor onto linked zones; remove zones whose camera was unassigned. */
71093
71093
  function syncZonesFromAssigned(assignedBySerial, hostDrivesAssignment) {
71094
71094
  var _floor$zones2, _floor2$zones;
71095
71095
  const floor = get$1(activeFloor);