floor-editor-ts 1.1.3 → 1.1.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.
- package/dist/floor-editor.es.js +599 -445
- package/dist/floor-editor.es.js.map +1 -1
- package/dist/src/lib/models/types.d.ts +2 -0
- package/dist/src/lib/packageDefaults.d.ts +7 -0
- package/dist/src/lib/utils/canvasRenderer.d.ts +7 -1
- package/dist/src/lib/utils/furnitureIcons.d.ts +1 -1
- package/dist/src/lib/utils/shortcuts.d.ts +2 -0
- package/package.json +1 -1
package/dist/floor-editor.es.js
CHANGED
|
@@ -6951,6 +6951,54 @@ var localStore = {
|
|
|
6951
6951
|
}
|
|
6952
6952
|
};
|
|
6953
6953
|
//#endregion
|
|
6954
|
+
//#region src/lib/packageDefaults.ts
|
|
6955
|
+
var DEFAULT_CONFIG = {
|
|
6956
|
+
viewOnly: false,
|
|
6957
|
+
floorMaxWidth: 600,
|
|
6958
|
+
floorMaxHeight: 400,
|
|
6959
|
+
heatmapEnabled: false,
|
|
6960
|
+
heatmapMatrix: [],
|
|
6961
|
+
projectName: void 0,
|
|
6962
|
+
selectedCameraSerial: null,
|
|
6963
|
+
showCameraCones: false,
|
|
6964
|
+
showCameraLabels: true,
|
|
6965
|
+
cameraHeatmapMatrix: []
|
|
6966
|
+
};
|
|
6967
|
+
function normalizeConfig(value) {
|
|
6968
|
+
if (!value || typeof value !== "object") return { ...DEFAULT_CONFIG };
|
|
6969
|
+
return {
|
|
6970
|
+
...DEFAULT_CONFIG,
|
|
6971
|
+
...value
|
|
6972
|
+
};
|
|
6973
|
+
}
|
|
6974
|
+
function normalizeFloorData(data) {
|
|
6975
|
+
if (!data || typeof data !== "object") return createDefaultProject();
|
|
6976
|
+
if (!Array.isArray(data.floors) || data.floors.length === 0) return createDefaultProject();
|
|
6977
|
+
if (!data.activeFloorId || !data.floors.some((f) => f.id === data.activeFloorId)) return {
|
|
6978
|
+
...createDefaultProject(),
|
|
6979
|
+
...data,
|
|
6980
|
+
floors: data.floors,
|
|
6981
|
+
activeFloorId: data.floors[0].id
|
|
6982
|
+
};
|
|
6983
|
+
return data;
|
|
6984
|
+
}
|
|
6985
|
+
var RUNTIME_FURNITURE_FIELDS = [
|
|
6986
|
+
"showHeatmap",
|
|
6987
|
+
"heatmapMatrix",
|
|
6988
|
+
"hasPerson"
|
|
6989
|
+
];
|
|
6990
|
+
/** Strip runtime-only fields before persisting or dispatching floor:save. */
|
|
6991
|
+
function exportProjectForSave(project) {
|
|
6992
|
+
const exported = JSON.parse(JSON.stringify(project));
|
|
6993
|
+
exported.updatedAt = /* @__PURE__ */ new Date();
|
|
6994
|
+
for (const floor of exported.floors) floor.furniture = floor.furniture.map((item) => {
|
|
6995
|
+
const clean = { ...item };
|
|
6996
|
+
for (const key of RUNTIME_FURNITURE_FIELDS) delete clean[key];
|
|
6997
|
+
return clean;
|
|
6998
|
+
});
|
|
6999
|
+
return exported;
|
|
7000
|
+
}
|
|
7001
|
+
//#endregion
|
|
6954
7002
|
//#region src/lib/utils/furnitureCatalog.ts
|
|
6955
7003
|
var furnitureCatalog = [
|
|
6956
7004
|
{
|
|
@@ -56762,7 +56810,7 @@ async function autoSave(onDispatch) {
|
|
|
56762
56810
|
try {
|
|
56763
56811
|
const thumbnail = captureThumbnail(p.id);
|
|
56764
56812
|
onDispatch("floor:autoSave", { data: {
|
|
56765
|
-
...p,
|
|
56813
|
+
...exportProjectForSave(p),
|
|
56766
56814
|
thumbnail
|
|
56767
56815
|
} });
|
|
56768
56816
|
saveState.set("saved");
|
|
@@ -56901,7 +56949,7 @@ var root_7$4 = /* @__PURE__ */ from_html(`<div class="absolute right-0 top-full
|
|
|
56901
56949
|
var root_1$10 = /* @__PURE__ */ from_html(`<div class="h-12 bg-gradient-to-r from-slate-800 to-slate-700 flex items-center px-4 gap-3 shrink-0 shadow-sm"><!> <div class="h-5 w-px bg-white/20"></div> <div class="flex items-center gap-1"><!> <button class="text-white/80 hover:text-white text-xs hover:bg-white/10 px-1.5 py-0.5 rounded transition-colors" title="Add Floor" aria-label="Add Floor">+</button> <span class="text-white/40 text-[10px] ml-1"> </span></div> <div class="flex-1"></div> <button class="p-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Undo (Ctrl+Z)" aria-label="Undo"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="1 4 1 10 7 10"></polyline><path d="M3.51 15a9 9 0 1 0 2.13-9.36L1 10"></path></svg></button> <button class="p-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Redo (Ctrl+Y)" aria-label="Redo"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.13-9.36L23 10"></path></svg></button> <div class="h-5 w-px bg-white/20"></div> <button aria-label="Snap to Grid"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg></button> <!> <button aria-label="Toggle Furniture"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="2" y="12" width="20" height="8" rx="1"></rect><path d="M4 12V7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v5"></path><line x1="12" y1="12" x2="12" y2="20"></line></svg></button> <div class="h-5 w-px bg-white/20"></div> <!> <button class="p-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Version History" aria-label="Version History"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><polyline points="12 6 12 12 16 14"></polyline></svg></button> <button class="px-2 py-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Area Summary" aria-label="Area Summary"><svg width="16" height="16" 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"></rect><path d="M3 9h18"></path><path d="M9 3v18"></path></svg></button> <button class="px-2 py-1.5 text-white/80 hover:text-white hover:bg-white/10 rounded transition-colors" title="Settings" aria-label="Settings"><svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg></button> <div class="h-5 w-px bg-white/20"></div> <div class="relative"><button class="px-3 py-1.5 text-sm text-white/90 hover:text-white hover:bg-white/10 rounded transition-colors flex items-center gap-1.5"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg> Export</button> <!></div> <span><!></span> <button class="px-3 py-1.5 text-sm bg-white text-slate-800 font-semibold rounded-lg hover:bg-blue-50 transition-colors shadow-sm">Save</button></div>`);
|
|
56902
56950
|
var root_13$2 = /* @__PURE__ */ from_html(`<div class="absolute right-0 top-full mt-1 bg-white rounded-lg shadow-lg border border-gray-200 py-1 w-48 z-50"><button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="6 9 6 2 18 2 18 9"></polyline><path d="M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2"></path><rect x="6" y="14" width="12" height="8"></rect></svg> Print Layout</button> <div class="h-px bg-gray-100 my-1"></div> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><path d="M21 15l-5-5L5 21"></path></svg> Export 2D as PNG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2L2 7l10 5 10-5-10-5z"></path><path d="M2 17l10 5 10-5"></path><path d="M2 12l10 5 10-5"></path></svg> Export 3D as PNG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 19V5"></path><path d="M5 12l7-7 7 7"></path></svg> Export as SVG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M8 16h2"></path><path d="M14 16h2"></path></svg> Export as DXF</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M9 16h6"></path></svg> Export as DWG</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path><path d="M16 11v6"></path><path d="M8 11v6"></path><path d="M12 11v6"></path></svg> Export as PDF</button> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><path d="M14 2v6h6"></path></svg> Download JSON</button> <div class="h-px bg-gray-100 my-1"></div> <button class="w-full px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 text-left flex items-center gap-2"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg> Import JSON</button></div>`);
|
|
56903
56951
|
var root_12$2 = /* @__PURE__ */ from_html(`<div class="h-12 bg-gradient-to-r from-slate-800 to-slate-700 flex items-center justify-between px-4 gap-3 shrink-0 shadow-sm"><span class="font-semibold text-white text-sm px-2 py-0.5 rounded transition-colors"> </span> <div class="relative"><button class="px-3 py-1.5 text-sm text-white/90 hover:text-white hover:bg-white/10 rounded transition-colors flex items-center gap-1.5"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg> Import</button> <!></div></div>`);
|
|
56904
|
-
var root_14$
|
|
56952
|
+
var root_14$2 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/40"><div class="bg-white rounded-xl shadow-2xl w-[420px] max-h-[80vh] overflow-hidden"><div class="flex items-center justify-between px-5 py-3 border-b border-gray-200"><h2 class="text-base font-semibold text-gray-800">📐 Area Summary</h2> <button class="text-gray-400 hover:text-gray-600 text-xl leading-none">×</button></div> <div class="overflow-y-auto max-h-[calc(80vh-52px)] p-1"><!></div></div></div>`);
|
|
56905
56953
|
var root$5 = /* @__PURE__ */ from_html(`<!> <!> <!> <!>`, 1);
|
|
56906
56954
|
function TopBar($$anchor, $$props) {
|
|
56907
56955
|
push($$props, true);
|
|
@@ -56947,9 +56995,10 @@ function TopBar($$anchor, $$props) {
|
|
|
56947
56995
|
}
|
|
56948
56996
|
async function save() {
|
|
56949
56997
|
const p = get$1(currentProject);
|
|
56998
|
+
if (!p) return;
|
|
56950
56999
|
const thumbnail = captureThumbnail(p.id);
|
|
56951
57000
|
$$props.onDispatch("floor:save", { data: {
|
|
56952
|
-
...p,
|
|
57001
|
+
...exportProjectForSave(p),
|
|
56953
57002
|
thumbnail
|
|
56954
57003
|
} });
|
|
56955
57004
|
}
|
|
@@ -57345,7 +57394,7 @@ function TopBar($$anchor, $$props) {
|
|
|
57345
57394
|
});
|
|
57346
57395
|
var node_11 = sibling(node_10, 2);
|
|
57347
57396
|
var consequent_9 = ($$anchor) => {
|
|
57348
|
-
var div_9 = root_14$
|
|
57397
|
+
var div_9 = root_14$2();
|
|
57349
57398
|
var div_10 = child(div_9);
|
|
57350
57399
|
var div_11 = child(div_10);
|
|
57351
57400
|
var button_37 = sibling(child(div_11), 2);
|
|
@@ -58016,16 +58065,16 @@ var root_1$8 = /* @__PURE__ */ from_html(`<div class="space-y-1"><h3 class="text
|
|
|
58016
58065
|
var root_6$4 = /* @__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>`);
|
|
58017
58066
|
var root_7$3 = /* @__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>`);
|
|
58018
58067
|
var root_5$4 = /* @__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>`);
|
|
58019
|
-
var root_16$
|
|
58020
|
-
var root_17$
|
|
58068
|
+
var root_16$2 = /* @__PURE__ */ from_html(`<button class="absolute right-2 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-600 w-5 h-5 flex items-center justify-center rounded-full hover:bg-gray-100" title="Clear search"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>`);
|
|
58069
|
+
var root_17$1 = /* @__PURE__ */ from_html(`<div class="text-[10px] text-gray-400 px-1"> </div>`);
|
|
58021
58070
|
var root_18$2 = /* @__PURE__ */ from_html(`<button> </button>`);
|
|
58022
58071
|
var root_20$2 = /* @__PURE__ */ from_html(`<button draggable="true"><span role="button" tabindex="0"> </span> <div class="w-8 h-8 rounded-lg flex items-center justify-center"><div class="w-4 h-4 rounded-sm"></div></div> <span class="text-[10px] font-medium text-gray-600 leading-tight text-center"> </span></button>`);
|
|
58023
58072
|
var root_19$2 = /* @__PURE__ */ from_html(`<div class="mt-1"><h4 class="text-[10px] font-semibold text-gray-400 uppercase mb-1.5">Recent</h4> <div class="grid grid-cols-2 gap-2"></div></div> <hr class="border-gray-100"/>`, 1);
|
|
58024
58073
|
var root_22$2 = /* @__PURE__ */ from_html(`<span class="text-xs font-medium text-gray-600"> <mark class="bg-yellow-200 text-gray-800 rounded-sm px-0.5"> </mark> </span>`);
|
|
58025
|
-
var root_23$
|
|
58074
|
+
var root_23$2 = /* @__PURE__ */ from_html(`<span class="text-xs font-medium text-gray-600"> </span>`);
|
|
58026
58075
|
var root_21$2 = /* @__PURE__ */ from_html(`<button draggable="true"><span role="button" tabindex="0"> </span> <div class="w-10 h-10 rounded-lg flex items-center justify-center"><div class="w-5 h-5 rounded-sm"></div></div> <!> <span class="text-[10px] text-gray-400"> </span></button>`);
|
|
58027
|
-
var root_15$
|
|
58028
|
-
var root_24 = /* @__PURE__ */ from_html(`<div class="fixed z-50 pointer-events-none"><div class="bg-white rounded-xl shadow-2xl border border-gray-200 overflow-hidden" style="width: 220px;"><div class="w-full h-[120px] bg-gray-50 flex items-center justify-center p-3"><div class="w-16 h-16 rounded-xl flex items-center justify-center"><div class="w-10 h-10 rounded-md"></div></div></div> <div class="p-3 space-y-1.5"><div class="flex items-center gap-2"><span class="text-sm font-semibold text-gray-800"> </span> <span class="px-1.5 py-0.5 rounded-full text-[9px] font-semibold text-white"> </span></div> <div class="text-xs text-gray-500"> </div></div></div></div>`);
|
|
58076
|
+
var root_15$1 = /* @__PURE__ */ from_html(`<div class="space-y-2"><div class="relative"><input type="text" placeholder="Search furniture..." class="w-full px-3 py-2 pr-8 border border-gray-200 rounded-lg text-sm focus:ring-2 focus:ring-blue-200 focus:border-blue-400 outline-none"/> <!></div> <!> <div class="flex flex-wrap gap-1 max-h-24 overflow-y-auto"><button>All</button> <button> </button> <!></div> <!> <div class="grid grid-cols-2 gap-2 mt-2"></div></div>`);
|
|
58077
|
+
var root_24$1 = /* @__PURE__ */ from_html(`<div class="fixed z-50 pointer-events-none"><div class="bg-white rounded-xl shadow-2xl border border-gray-200 overflow-hidden" style="width: 220px;"><div class="w-full h-[120px] bg-gray-50 flex items-center justify-center p-3"><div class="w-16 h-16 rounded-xl flex items-center justify-center"><div class="w-10 h-10 rounded-md"></div></div></div> <div class="p-3 space-y-1.5"><div class="flex items-center gap-2"><span class="text-sm font-semibold text-gray-800"> </span> <span class="px-1.5 py-0.5 rounded-full text-[9px] font-semibold text-white"> </span></div> <div class="text-xs text-gray-500"> </div></div></div></div>`);
|
|
58029
58078
|
var root_25 = /* @__PURE__ */ from_html(`<div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center"><div class="bg-white rounded-xl shadow-2xl w-80 p-5"><h3 class="text-sm font-bold text-gray-800 mb-1">Import RoomPlan</h3> <p class="text-xs text-gray-400 mb-4"> </p> <div class="space-y-3"><label class="flex items-start gap-2.5 cursor-pointer"><input type="checkbox" class="accent-blue-500 mt-0.5"/> <div><div class="text-sm font-medium text-gray-700">Straighten walls</div> <div class="text-xs text-gray-400">Snap near-horizontal/vertical walls to axis</div></div></label> <label class="flex items-start gap-2.5 cursor-pointer"><input type="checkbox" class="accent-blue-500 mt-0.5"/> <div><div class="text-sm font-medium text-gray-700">Enforce orthogonal <span class="text-xs text-blue-400 font-mono"> </span></div> <div class="text-xs text-gray-400">Force all walls to 90°/180° angles</div></div></label> <label class="block"><div class="text-xs text-gray-500 mb-1">Corner merge distance (cm)</div> <input type="number" min="0" max="50" step="5" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div> <div class="flex gap-2 mt-5"><button class="flex-1 px-3 py-2 border border-gray-200 rounded-lg text-sm text-gray-600 hover:bg-gray-50 transition-colors">Cancel</button> <button class="flex-1 px-3 py-2 bg-blue-500 text-white rounded-lg text-sm font-medium hover:bg-blue-600 transition-colors">Import</button></div></div></div>`);
|
|
58030
58079
|
var root$4 = /* @__PURE__ */ from_html(`<div class="relative w-64 bg-white border-r border-gray-200 flex flex-col h-full overflow-hidden"><div class="flex border-b border-gray-200"><button>Build</button> <button>Rooms</button> <button>Objects</button></div> <div class="flex-1 overflow-y-auto p-3"><!></div> <button title="Layers Panel (L)" aria-label="Toggle Layers Panel">🗂</button> <button title="Undo History" aria-label="Toggle Undo History">⟲</button> <button class="absolute bottom-4 left-4 w-8 h-8 rounded-full bg-slate-700 text-white text-sm font-bold shadow-lg hover:bg-slate-600 transition-colors z-50" title="Keyboard Shortcuts (?)" aria-label="Keyboard Shortcuts">?</button></div> <!> <!>`, 1);
|
|
58031
58080
|
function BuildPanel($$anchor, $$props) {
|
|
@@ -58570,13 +58619,13 @@ function BuildPanel($$anchor, $$props) {
|
|
|
58570
58619
|
append($$anchor, div_16);
|
|
58571
58620
|
};
|
|
58572
58621
|
var consequent_13 = ($$anchor) => {
|
|
58573
|
-
var div_21 = root_15$
|
|
58622
|
+
var div_21 = root_15$1();
|
|
58574
58623
|
var div_22 = child(div_21);
|
|
58575
58624
|
var input_1 = child(div_22);
|
|
58576
58625
|
remove_input_defaults(input_1);
|
|
58577
58626
|
var node_3 = sibling(input_1, 2);
|
|
58578
58627
|
var consequent_9 = ($$anchor) => {
|
|
58579
|
-
var button_18 = root_16$
|
|
58628
|
+
var button_18 = root_16$2();
|
|
58580
58629
|
delegated("click", button_18, () => set(search, ""));
|
|
58581
58630
|
append($$anchor, button_18);
|
|
58582
58631
|
};
|
|
@@ -58586,7 +58635,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
58586
58635
|
reset(div_22);
|
|
58587
58636
|
var node_4 = sibling(div_22, 2);
|
|
58588
58637
|
var consequent_10 = ($$anchor) => {
|
|
58589
|
-
var div_23 = root_17$
|
|
58638
|
+
var div_23 = root_17$1();
|
|
58590
58639
|
var text_17 = child(div_23);
|
|
58591
58640
|
reset(div_23);
|
|
58592
58641
|
template_effect(() => {
|
|
@@ -58711,7 +58760,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
58711
58760
|
};
|
|
58712
58761
|
var d = /* @__PURE__ */ user_derived(() => get(s) && get(item).name.toLowerCase().includes(get(s)));
|
|
58713
58762
|
var alternate_1 = ($$anchor) => {
|
|
58714
|
-
var span_12 = root_23$
|
|
58763
|
+
var span_12 = root_23$2();
|
|
58715
58764
|
var text_26 = child(span_12, true);
|
|
58716
58765
|
reset(span_12);
|
|
58717
58766
|
template_effect(() => set_text(text_26, get(item).name));
|
|
@@ -58788,7 +58837,7 @@ function BuildPanel($$anchor, $$props) {
|
|
|
58788
58837
|
var node_8 = sibling(div, 2);
|
|
58789
58838
|
var consequent_14 = ($$anchor) => {
|
|
58790
58839
|
const item = /* @__PURE__ */ user_derived(() => get(hoveredItem));
|
|
58791
|
-
var div_32 = root_24();
|
|
58840
|
+
var div_32 = root_24$1();
|
|
58792
58841
|
var div_33 = child(div_32);
|
|
58793
58842
|
var div_34 = child(div_33);
|
|
58794
58843
|
var div_35 = child(div_34);
|
|
@@ -59159,19 +59208,20 @@ var root_5$3 = /* @__PURE__ */ from_html(`<div class="space-y-2"><span class="te
|
|
|
59159
59208
|
var root_1$7 = /* @__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> Wall Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" disabled="" class="w-full px-2 py-1 border border-gray-200 rounded text-sm bg-gray-50"/></label> <label class="block"><span class="text-xs text-gray-500"> </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"> </span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div class="flex items-center gap-2"><span class="text-xs text-gray-500">Curved</span> <button> </button></div> <div><div class="flex border-b border-gray-200 mb-3"><button>Interior</button> <button>Exterior</button></div> <!></div></div>`, 1);
|
|
59160
59209
|
var root_8$1 = /* @__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-amber-100 rounded flex items-center justify-center text-xs">🚪</span> Door Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="1" 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" 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" 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" 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">Type</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>Single</option><option>Double</option><option>Sliding</option><option>French</option><option>Pocket</option><option>Bifold</option></select></label> <label class="block"><span class="text-xs text-gray-500">Hinge Side</span> <div class="flex gap-2"><button>Left</button> <button>Right</button></div></label> <label class="block"><span class="text-xs text-gray-500">Opens</span> <div class="flex gap-2"><button>Inward</button> <button>Outward</button></div></label></div>`, 1);
|
|
59161
59210
|
var root_9$1 = /* @__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-cyan-100 rounded flex items-center justify-center text-xs">🪟</span> Window Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Type</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>Standard</option><option>Fixed</option><option>Casement</option><option>Sliding</option><option>Bay</option></select></label> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="1" 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" 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" 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" 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" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div>`, 1);
|
|
59162
|
-
var root_11$1 = /* @__PURE__ */ from_html(`<
|
|
59163
|
-
var
|
|
59164
|
-
var
|
|
59165
|
-
var root_14 = /* @__PURE__ */ from_html(`<
|
|
59166
|
-
var
|
|
59167
|
-
var
|
|
59168
|
-
var
|
|
59169
|
-
var
|
|
59170
|
-
var
|
|
59171
|
-
var root_21$1 = /* @__PURE__ */ from_html(`<
|
|
59172
|
-
var
|
|
59173
|
-
var
|
|
59174
|
-
var root_23 = /* @__PURE__ */ from_html(`<div class="
|
|
59211
|
+
var root_11$1 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-xs text-gray-500">Camera Name</span> <input type="text" placeholder="Display name" 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">Camera Serial</span> <input type="text" placeholder="Device serial" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label>`, 1);
|
|
59212
|
+
var root_12$1 = /* @__PURE__ */ from_html(`<button></button>`);
|
|
59213
|
+
var root_10$1 = /* @__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-purple-100 rounded flex items-center justify-center text-xs"> </span> <button> </button></h3> <div class="space-y-3"><!> <div><div class="flex items-center gap-1 mb-2"><span class="text-xs text-gray-500">Color</span> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-gray-400"><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="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> <label class="block"><span class="text-xs text-gray-500"> </span> <input type="number" min="1" 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="1" 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="1" 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">Material</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>Wood</option><option>Metal</option><option>Fabric</option><option>Leather</option><option>Glass</option><option>Plastic</option><option>Stone</option><option>Ceramic</option></select></label> <label class="block"><span class="text-xs text-gray-500">Rotation (degrees)</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label> <div class="flex gap-1"><button class="flex-1 px-2 py-1.5 border border-gray-200 rounded text-sm hover:bg-gray-50 transition-colors" title="Rotate 90° left">↺ 90°</button> <button class="flex-1 px-2 py-1.5 border border-gray-200 rounded text-sm hover:bg-gray-50 transition-colors" title="Rotate 90° right">↻ 90°</button></div> <div class="flex gap-1"><button class="flex-1 px-2 py-1.5 border border-gray-200 rounded text-sm hover:bg-gray-50 transition-colors" title="Flip horizontally">↔ Flip H</button> <button class="flex-1 px-2 py-1.5 border border-gray-200 rounded text-sm hover:bg-gray-50 transition-colors" title="Flip vertically">↕ Flip V</button></div> <button class="w-full px-2 py-1.5 border border-gray-300 rounded text-sm text-gray-600 hover:bg-gray-50 transition-colors">Reset to defaults</button></div>`, 1);
|
|
59214
|
+
var root_14$1 = /* @__PURE__ */ from_html(`<option> </option>`);
|
|
59215
|
+
var root_15 = /* @__PURE__ */ from_html(`<button></button>`);
|
|
59216
|
+
var root_18$1 = /* @__PURE__ */ from_html(`<button><div class="w-full h-12 rounded-md mb-1 overflow-hidden"></div> <div class="text-center leading-3 text-[10px] text-gray-600 truncate"> </div></button>`);
|
|
59217
|
+
var root_16$1 = /* @__PURE__ */ from_html(`<div><span class="text-xs font-medium text-gray-600 mb-1.5 block"> </span> <div class="grid grid-cols-3 gap-1.5"></div></div>`);
|
|
59218
|
+
var root_13$1 = /* @__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-green-100 rounded flex items-center justify-center text-xs">⬜</span> Room Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Room Type</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"></select></label> <label class="block"><span class="text-xs text-gray-500">Room Name</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">Category</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>🏠 Indoor</option><option>🌳 Outdoor</option><option>🚗 Garage</option><option>🔧 Utility</option></select></label> <div><span class="text-xs text-gray-500">Area</span> <p class="text-sm text-gray-700"> </p></div> <div><span class="text-xs text-gray-500 mb-1.5 block">Room 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><div class="flex items-center gap-1 mb-2"><span class="text-xs text-gray-500">Floor Material</span> <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="text-gray-400"><path d="M3 3h18v18H3z"></path><path d="M8 8h8v8H8z"></path></svg></div> <div class="space-y-3"></div></div></div>`, 1);
|
|
59219
|
+
var root_19$1 = /* @__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> Stair Properties</h3> <div class="space-y-3"><label class="block"><span class="text-xs text-gray-500">Type</span> <select class="w-full px-2 py-1 border border-gray-200 rounded text-sm"><option>Straight</option><option>L-Shaped</option><option>U-Shaped</option><option>Spiral</option></select></label> <label class="block"><span class="text-xs text-gray-500"> </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"> </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">Risers</span> <input type="number" min="3" max="30" 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">Direction</span> <div class="flex gap-2"><button>Up ↑</button> <button>Down ↓</button></div></label> <label class="block"><span class="text-xs text-gray-500">Rotation (degrees)</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label></div>`, 1);
|
|
59220
|
+
var root_21$1 = /* @__PURE__ */ from_html(`<button></button>`);
|
|
59221
|
+
var root_22$1 = /* @__PURE__ */ from_html(`<label class="block"><span class="text-xs text-gray-500">Rotation (degrees)</span> <input type="number" class="w-full px-2 py-1 border border-gray-200 rounded text-sm"/></label>`);
|
|
59222
|
+
var root_20$1 = /* @__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);
|
|
59223
|
+
var root_23$1 = /* @__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>`);
|
|
59224
|
+
var root_24 = /* @__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>`);
|
|
59175
59225
|
var root$3 = /* @__PURE__ */ from_html(`<div style="top: 48px; bottom: 36px;"><!> <!></div>`);
|
|
59176
59226
|
function PropertiesPanel($$anchor, $$props) {
|
|
59177
59227
|
push($$props, true);
|
|
@@ -59337,6 +59387,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
59337
59387
|
if (!get(selectedFurniture)) return;
|
|
59338
59388
|
updateFurniture(get(selectedFurniture).id, { rotation: Number(e.target.value) });
|
|
59339
59389
|
}
|
|
59390
|
+
function onFurnitureName(e) {
|
|
59391
|
+
if (!get(selectedFurniture)) return;
|
|
59392
|
+
updateFurniture(get(selectedFurniture).id, { name: e.target.value });
|
|
59393
|
+
}
|
|
59394
|
+
function onFurnitureSerial(e) {
|
|
59395
|
+
if (!get(selectedFurniture)) return;
|
|
59396
|
+
updateFurniture(get(selectedFurniture).id, { serial: e.target.value });
|
|
59397
|
+
}
|
|
59340
59398
|
function resetFurnitureDefaults() {
|
|
59341
59399
|
if (!get(selectedFurniture)) return;
|
|
59342
59400
|
updateFurniture(get(selectedFurniture).id, {
|
|
@@ -60026,7 +60084,7 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60026
60084
|
delegated("input", input_13, onWindowSill);
|
|
60027
60085
|
append($$anchor, fragment_2);
|
|
60028
60086
|
};
|
|
60029
|
-
var
|
|
60087
|
+
var consequent_5 = ($$anchor) => {
|
|
60030
60088
|
var fragment_3 = root_10$1();
|
|
60031
60089
|
var h3 = first_child(fragment_3);
|
|
60032
60090
|
var span_14 = child(h3);
|
|
@@ -60038,7 +60096,30 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60038
60096
|
reset(button_13);
|
|
60039
60097
|
reset(h3);
|
|
60040
60098
|
var div_15 = sibling(h3, 2);
|
|
60041
|
-
var
|
|
60099
|
+
var node_4 = child(div_15);
|
|
60100
|
+
var consequent_4 = ($$anchor) => {
|
|
60101
|
+
var fragment_4 = root_11$1();
|
|
60102
|
+
var label_18 = first_child(fragment_4);
|
|
60103
|
+
var input_14 = sibling(child(label_18), 2);
|
|
60104
|
+
remove_input_defaults(input_14);
|
|
60105
|
+
reset(label_18);
|
|
60106
|
+
var label_19 = sibling(label_18, 2);
|
|
60107
|
+
var input_15 = sibling(child(label_19), 2);
|
|
60108
|
+
remove_input_defaults(input_15);
|
|
60109
|
+
reset(label_19);
|
|
60110
|
+
template_effect(() => {
|
|
60111
|
+
var _$$get$name, _$$get$serial;
|
|
60112
|
+
set_value(input_14, (_$$get$name = get(selectedFurniture).name) !== null && _$$get$name !== void 0 ? _$$get$name : "");
|
|
60113
|
+
set_value(input_15, (_$$get$serial = get(selectedFurniture).serial) !== null && _$$get$serial !== void 0 ? _$$get$serial : "");
|
|
60114
|
+
});
|
|
60115
|
+
delegated("input", input_14, onFurnitureName);
|
|
60116
|
+
delegated("input", input_15, onFurnitureSerial);
|
|
60117
|
+
append($$anchor, fragment_4);
|
|
60118
|
+
};
|
|
60119
|
+
if_block(node_4, ($$render) => {
|
|
60120
|
+
if (get(selectedFurniture).catalogId === "camera") $$render(consequent_4);
|
|
60121
|
+
});
|
|
60122
|
+
var div_16 = sibling(node_4, 2);
|
|
60042
60123
|
var div_17 = sibling(child(div_16), 2);
|
|
60043
60124
|
each(div_17, 20, () => [
|
|
60044
60125
|
"#ffffff",
|
|
@@ -60052,7 +60133,7 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60052
60133
|
"#dc143c",
|
|
60053
60134
|
"#228b22"
|
|
60054
60135
|
], index$1, ($$anchor, color) => {
|
|
60055
|
-
var button_14 =
|
|
60136
|
+
var button_14 = root_12$1();
|
|
60056
60137
|
template_effect(($0) => {
|
|
60057
60138
|
set_class(button_14, 1, `w-6 h-6 rounded border-2 hover:border-gray-300 transition-colors ${$0 !== null && $0 !== void 0 ? $0 : ""}`);
|
|
60058
60139
|
set_style(button_14, `background-color: ${color !== null && color !== void 0 ? color : ""}`);
|
|
@@ -60066,33 +60147,33 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60066
60147
|
});
|
|
60067
60148
|
reset(div_17);
|
|
60068
60149
|
var div_18 = sibling(div_17, 2);
|
|
60069
|
-
var
|
|
60070
|
-
remove_input_defaults(
|
|
60150
|
+
var input_16 = sibling(child(div_18), 2);
|
|
60151
|
+
remove_input_defaults(input_16);
|
|
60071
60152
|
reset(div_18);
|
|
60072
60153
|
reset(div_16);
|
|
60073
|
-
var
|
|
60074
|
-
var span_15 = child(
|
|
60154
|
+
var label_20 = sibling(div_16, 2);
|
|
60155
|
+
var span_15 = child(label_20);
|
|
60075
60156
|
var text_18 = child(span_15);
|
|
60076
60157
|
reset(span_15);
|
|
60077
|
-
var
|
|
60078
|
-
remove_input_defaults(
|
|
60079
|
-
reset(
|
|
60080
|
-
var
|
|
60081
|
-
var span_16 = child(
|
|
60158
|
+
var input_17 = sibling(span_15, 2);
|
|
60159
|
+
remove_input_defaults(input_17);
|
|
60160
|
+
reset(label_20);
|
|
60161
|
+
var label_21 = sibling(label_20, 2);
|
|
60162
|
+
var span_16 = child(label_21);
|
|
60082
60163
|
var text_19 = child(span_16);
|
|
60083
60164
|
reset(span_16);
|
|
60084
|
-
var
|
|
60085
|
-
remove_input_defaults(
|
|
60086
|
-
reset(
|
|
60087
|
-
var
|
|
60088
|
-
var span_17 = child(
|
|
60165
|
+
var input_18 = sibling(span_16, 2);
|
|
60166
|
+
remove_input_defaults(input_18);
|
|
60167
|
+
reset(label_21);
|
|
60168
|
+
var label_22 = sibling(label_21, 2);
|
|
60169
|
+
var span_17 = child(label_22);
|
|
60089
60170
|
var text_20 = child(span_17);
|
|
60090
60171
|
reset(span_17);
|
|
60091
|
-
var
|
|
60092
|
-
remove_input_defaults(
|
|
60093
|
-
reset(
|
|
60094
|
-
var
|
|
60095
|
-
var select_2 = sibling(child(
|
|
60172
|
+
var input_19 = sibling(span_17, 2);
|
|
60173
|
+
remove_input_defaults(input_19);
|
|
60174
|
+
reset(label_22);
|
|
60175
|
+
var label_23 = sibling(label_22, 2);
|
|
60176
|
+
var select_2 = sibling(child(label_23), 2);
|
|
60096
60177
|
var option_11 = child(select_2);
|
|
60097
60178
|
option_11.value = option_11.__value = "Wood";
|
|
60098
60179
|
var option_12 = sibling(option_11);
|
|
@@ -60112,12 +60193,12 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60112
60193
|
reset(select_2);
|
|
60113
60194
|
var select_2_value;
|
|
60114
60195
|
init_select(select_2);
|
|
60115
|
-
reset(
|
|
60116
|
-
var
|
|
60117
|
-
var
|
|
60118
|
-
remove_input_defaults(
|
|
60119
|
-
reset(
|
|
60120
|
-
var div_19 = sibling(
|
|
60196
|
+
reset(label_23);
|
|
60197
|
+
var label_24 = sibling(label_23, 2);
|
|
60198
|
+
var input_20 = sibling(child(label_24), 2);
|
|
60199
|
+
remove_input_defaults(input_20);
|
|
60200
|
+
reset(label_24);
|
|
60201
|
+
var div_19 = sibling(label_24, 2);
|
|
60121
60202
|
var button_15 = child(div_19);
|
|
60122
60203
|
var button_16 = sibling(button_15, 2);
|
|
60123
60204
|
reset(div_19);
|
|
@@ -60134,18 +60215,18 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60134
60215
|
set_class(button_13, 1, `ml-auto px-1.5 py-0.5 rounded text-xs border transition-colors ${get(selectedFurniture).locked ? "bg-amber-100 border-amber-400 text-amber-700" : "border-gray-200 hover:bg-gray-50 text-gray-500"}`);
|
|
60135
60216
|
set_attribute(button_13, "title", get(selectedFurniture).locked ? "Unlock (Ctrl+L)" : "Lock (Ctrl+L)");
|
|
60136
60217
|
set_text(text_17, get(selectedFurniture).locked ? "🔒 Locked" : "🔓");
|
|
60137
|
-
set_value(
|
|
60218
|
+
set_value(input_16, $2);
|
|
60138
60219
|
set_text(text_18, `Width (${$3 !== null && $3 !== void 0 ? $3 : ""})`);
|
|
60139
|
-
set_value(
|
|
60220
|
+
set_value(input_17, $4);
|
|
60140
60221
|
set_text(text_19, `Depth (${$5 !== null && $5 !== void 0 ? $5 : ""})`);
|
|
60141
|
-
set_value(
|
|
60222
|
+
set_value(input_18, $6);
|
|
60142
60223
|
set_text(text_20, `Height (${$7 !== null && $7 !== void 0 ? $7 : ""})`);
|
|
60143
|
-
set_value(
|
|
60224
|
+
set_value(input_19, $8);
|
|
60144
60225
|
if (select_2_value !== (select_2_value = (_$$get$material = get(selectedFurniture).material) !== null && _$$get$material !== void 0 ? _$$get$material : "Wood")) {
|
|
60145
60226
|
var _select_2$__value, _$$get$material2, _$$get$material3;
|
|
60146
60227
|
select_2.value = (_select_2$__value = select_2.__value = (_$$get$material2 = get(selectedFurniture).material) !== null && _$$get$material2 !== void 0 ? _$$get$material2 : "Wood") !== null && _select_2$__value !== void 0 ? _select_2$__value : "", select_option(select_2, (_$$get$material3 = get(selectedFurniture).material) !== null && _$$get$material3 !== void 0 ? _$$get$material3 : "Wood");
|
|
60147
60228
|
}
|
|
60148
|
-
set_value(
|
|
60229
|
+
set_value(input_20, $9);
|
|
60149
60230
|
}, [
|
|
60150
60231
|
() => {
|
|
60151
60232
|
var _getCatalogItem$icon, _getCatalogItem2;
|
|
@@ -60179,12 +60260,12 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60179
60260
|
delegated("click", button_13, () => {
|
|
60180
60261
|
if (get(selectedFurniture)) toggleFurnitureLock(get(selectedFurniture).id);
|
|
60181
60262
|
});
|
|
60182
|
-
delegated("input",
|
|
60183
|
-
delegated("input",
|
|
60184
|
-
delegated("input",
|
|
60185
|
-
delegated("input",
|
|
60263
|
+
delegated("input", input_16, (e) => onFurnitureColor(e.target.value));
|
|
60264
|
+
delegated("input", input_17, onFurnitureWidth);
|
|
60265
|
+
delegated("input", input_18, onFurnitureDepth);
|
|
60266
|
+
delegated("input", input_19, onFurnitureHeight);
|
|
60186
60267
|
delegated("change", select_2, onFurnitureMaterial);
|
|
60187
|
-
delegated("input",
|
|
60268
|
+
delegated("input", input_20, onFurnitureRotation);
|
|
60188
60269
|
delegated("click", button_15, () => {
|
|
60189
60270
|
if (get(selectedFurniture)) updateFurniture(get(selectedFurniture).id, { rotation: get(selectedFurniture).rotation - 90 });
|
|
60190
60271
|
});
|
|
@@ -60214,13 +60295,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60214
60295
|
delegated("click", button_19, resetFurnitureDefaults);
|
|
60215
60296
|
append($$anchor, fragment_3);
|
|
60216
60297
|
};
|
|
60217
|
-
var
|
|
60218
|
-
var
|
|
60219
|
-
var div_21 = sibling(first_child(
|
|
60220
|
-
var
|
|
60221
|
-
var select_3 = sibling(child(
|
|
60298
|
+
var consequent_7 = ($$anchor) => {
|
|
60299
|
+
var fragment_5 = root_13$1();
|
|
60300
|
+
var div_21 = sibling(first_child(fragment_5), 2);
|
|
60301
|
+
var label_25 = child(div_21);
|
|
60302
|
+
var select_3 = sibling(child(label_25), 2);
|
|
60222
60303
|
each(select_3, 21, () => roomTypes, index$1, ($$anchor, rt) => {
|
|
60223
|
-
var option_19 =
|
|
60304
|
+
var option_19 = root_14$1();
|
|
60224
60305
|
var text_21 = child(option_19);
|
|
60225
60306
|
reset(option_19);
|
|
60226
60307
|
var option_19_value = {};
|
|
@@ -60237,13 +60318,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60237
60318
|
reset(select_3);
|
|
60238
60319
|
var select_3_value;
|
|
60239
60320
|
init_select(select_3);
|
|
60240
|
-
reset(
|
|
60241
|
-
var
|
|
60242
|
-
var
|
|
60243
|
-
remove_input_defaults(
|
|
60244
|
-
reset(
|
|
60245
|
-
var
|
|
60246
|
-
var select_4 = sibling(child(
|
|
60321
|
+
reset(label_25);
|
|
60322
|
+
var label_26 = sibling(label_25, 2);
|
|
60323
|
+
var input_21 = sibling(child(label_26), 2);
|
|
60324
|
+
remove_input_defaults(input_21);
|
|
60325
|
+
reset(label_26);
|
|
60326
|
+
var label_27 = sibling(label_26, 2);
|
|
60327
|
+
var select_4 = sibling(child(label_27), 2);
|
|
60247
60328
|
var option_20 = child(select_4);
|
|
60248
60329
|
option_20.value = option_20.__value = "indoor";
|
|
60249
60330
|
var option_21 = sibling(option_20);
|
|
@@ -60255,8 +60336,8 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60255
60336
|
reset(select_4);
|
|
60256
60337
|
var select_4_value;
|
|
60257
60338
|
init_select(select_4);
|
|
60258
|
-
reset(
|
|
60259
|
-
var div_22 = sibling(
|
|
60339
|
+
reset(label_27);
|
|
60340
|
+
var div_22 = sibling(label_27, 2);
|
|
60260
60341
|
var p = sibling(child(div_22), 2);
|
|
60261
60342
|
var text_22 = child(p, true);
|
|
60262
60343
|
reset(p);
|
|
@@ -60264,7 +60345,7 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60264
60345
|
var div_23 = sibling(div_22, 2);
|
|
60265
60346
|
var div_24 = sibling(child(div_23), 2);
|
|
60266
60347
|
each(div_24, 21, () => roomColorPresets, index$1, ($$anchor, preset) => {
|
|
60267
|
-
var button_20 =
|
|
60348
|
+
var button_20 = root_15();
|
|
60268
60349
|
template_effect(() => {
|
|
60269
60350
|
var _$$get$color5;
|
|
60270
60351
|
set_class(button_20, 1, `w-7 h-7 rounded-md border-2 hover:border-gray-300 transition-colors ${get(selectedRoom).color === get(preset).color ? "border-blue-500 ring-1 ring-blue-200" : "border-gray-200"}`);
|
|
@@ -60276,28 +60357,28 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60276
60357
|
});
|
|
60277
60358
|
reset(div_24);
|
|
60278
60359
|
var div_25 = sibling(div_24, 2);
|
|
60279
|
-
var
|
|
60280
|
-
remove_input_defaults(
|
|
60360
|
+
var input_22 = sibling(child(div_25), 2);
|
|
60361
|
+
remove_input_defaults(input_22);
|
|
60281
60362
|
reset(div_25);
|
|
60282
60363
|
reset(div_23);
|
|
60283
60364
|
var div_26 = sibling(div_23, 2);
|
|
60284
60365
|
var div_27 = sibling(child(div_26), 2);
|
|
60285
60366
|
each(div_27, 21, () => textureGroups, index$1, ($$anchor, group) => {
|
|
60286
|
-
var div_28 =
|
|
60367
|
+
var div_28 = root_16$1();
|
|
60287
60368
|
var span_18 = child(div_28);
|
|
60288
60369
|
var text_23 = child(span_18, true);
|
|
60289
60370
|
reset(span_18);
|
|
60290
60371
|
var div_29 = sibling(span_18, 2);
|
|
60291
60372
|
each(div_29, 21, () => get(group).ids, index$1, ($$anchor, matId) => {
|
|
60292
60373
|
const mat = /* @__PURE__ */ user_derived(() => floorMaterials.find((m) => m.id === get(matId)));
|
|
60293
|
-
var
|
|
60294
|
-
var
|
|
60295
|
-
var
|
|
60374
|
+
var fragment_6 = comment();
|
|
60375
|
+
var node_5 = first_child(fragment_6);
|
|
60376
|
+
var consequent_6 = ($$anchor) => {
|
|
60296
60377
|
const texPath = /* @__PURE__ */ user_derived(() => {
|
|
60297
60378
|
var _floorTexPaths$$$get$;
|
|
60298
60379
|
return (_floorTexPaths$$$get$ = floorTexPaths[get(mat).id]) !== null && _floorTexPaths$$$get$ !== void 0 ? _floorTexPaths$$$get$ : "";
|
|
60299
60380
|
});
|
|
60300
|
-
var button_21 =
|
|
60381
|
+
var button_21 = root_18$1();
|
|
60301
60382
|
var div_30 = child(button_21);
|
|
60302
60383
|
var div_31 = sibling(div_30, 2);
|
|
60303
60384
|
var text_24 = child(div_31, true);
|
|
@@ -60312,10 +60393,10 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60312
60393
|
delegated("click", button_21, () => onRoomFloor(get(mat).id));
|
|
60313
60394
|
append($$anchor, button_21);
|
|
60314
60395
|
};
|
|
60315
|
-
if_block(
|
|
60316
|
-
if (get(mat)) $$render(
|
|
60396
|
+
if_block(node_5, ($$render) => {
|
|
60397
|
+
if (get(mat)) $$render(consequent_6);
|
|
60317
60398
|
});
|
|
60318
|
-
append($$anchor,
|
|
60399
|
+
append($$anchor, fragment_6);
|
|
60319
60400
|
});
|
|
60320
60401
|
reset(div_29);
|
|
60321
60402
|
reset(div_28);
|
|
@@ -60331,16 +60412,16 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60331
60412
|
var _select_3$__value;
|
|
60332
60413
|
select_3.value = (_select_3$__value = select_3.__value = $0) !== null && _select_3$__value !== void 0 ? _select_3$__value : "", select_option(select_3, $0);
|
|
60333
60414
|
}
|
|
60334
|
-
set_value(
|
|
60415
|
+
set_value(input_21, get(selectedRoom).name);
|
|
60335
60416
|
if (select_4_value !== (select_4_value = (_$$get$roomType = get(selectedRoom).roomType) !== null && _$$get$roomType !== void 0 ? _$$get$roomType : "indoor")) {
|
|
60336
60417
|
var _select_4$__value, _$$get$roomType2, _$$get$roomType3;
|
|
60337
60418
|
select_4.value = (_select_4$__value = select_4.__value = (_$$get$roomType2 = get(selectedRoom).roomType) !== null && _$$get$roomType2 !== void 0 ? _$$get$roomType2 : "indoor") !== null && _select_4$__value !== void 0 ? _select_4$__value : "", select_option(select_4, (_$$get$roomType3 = get(selectedRoom).roomType) !== null && _$$get$roomType3 !== void 0 ? _$$get$roomType3 : "indoor");
|
|
60338
60419
|
}
|
|
60339
60420
|
set_text(text_22, $1);
|
|
60340
|
-
set_value(
|
|
60421
|
+
set_value(input_22, (_$$get$color6 = get(selectedRoom).color) !== null && _$$get$color6 !== void 0 ? _$$get$color6 : "#ffffff");
|
|
60341
60422
|
}, [() => get(selectedRoomType)(), () => formatArea(get(selectedRoom).area, get(settings).units)]);
|
|
60342
60423
|
delegated("change", select_3, onRoomType);
|
|
60343
|
-
delegated("input",
|
|
60424
|
+
delegated("input", input_21, onRoomName);
|
|
60344
60425
|
delegated("change", select_4, (e) => {
|
|
60345
60426
|
if (get(selectedRoom)) {
|
|
60346
60427
|
const v = e.target.value;
|
|
@@ -60348,14 +60429,14 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60348
60429
|
updateDetectedRoom(get(selectedRoom).id, { roomType: v });
|
|
60349
60430
|
}
|
|
60350
60431
|
});
|
|
60351
|
-
delegated("input",
|
|
60352
|
-
append($$anchor,
|
|
60432
|
+
delegated("input", input_22, (e) => onRoomColor(e.target.value));
|
|
60433
|
+
append($$anchor, fragment_5);
|
|
60353
60434
|
};
|
|
60354
|
-
var
|
|
60355
|
-
var
|
|
60356
|
-
var div_32 = sibling(first_child(
|
|
60357
|
-
var
|
|
60358
|
-
var select_5 = sibling(child(
|
|
60435
|
+
var consequent_8 = ($$anchor) => {
|
|
60436
|
+
var fragment_7 = root_19$1();
|
|
60437
|
+
var div_32 = sibling(first_child(fragment_7), 2);
|
|
60438
|
+
var label_28 = child(div_32);
|
|
60439
|
+
var select_5 = sibling(child(label_28), 2);
|
|
60359
60440
|
var option_24 = child(select_5);
|
|
60360
60441
|
option_24.value = option_24.__value = "straight";
|
|
60361
60442
|
var option_25 = sibling(option_24);
|
|
@@ -60367,35 +60448,35 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60367
60448
|
reset(select_5);
|
|
60368
60449
|
var select_5_value;
|
|
60369
60450
|
init_select(select_5);
|
|
60370
|
-
reset(label_26);
|
|
60371
|
-
var label_27 = sibling(label_26, 2);
|
|
60372
|
-
var span_19 = child(label_27);
|
|
60373
|
-
var text_25 = child(span_19);
|
|
60374
|
-
reset(span_19);
|
|
60375
|
-
var input_21 = sibling(span_19, 2);
|
|
60376
|
-
remove_input_defaults(input_21);
|
|
60377
|
-
reset(label_27);
|
|
60378
|
-
var label_28 = sibling(label_27, 2);
|
|
60379
|
-
var span_20 = child(label_28);
|
|
60380
|
-
var text_26 = child(span_20);
|
|
60381
|
-
reset(span_20);
|
|
60382
|
-
var input_22 = sibling(span_20, 2);
|
|
60383
|
-
remove_input_defaults(input_22);
|
|
60384
60451
|
reset(label_28);
|
|
60385
60452
|
var label_29 = sibling(label_28, 2);
|
|
60386
|
-
var
|
|
60453
|
+
var span_19 = child(label_29);
|
|
60454
|
+
var text_25 = child(span_19);
|
|
60455
|
+
reset(span_19);
|
|
60456
|
+
var input_23 = sibling(span_19, 2);
|
|
60387
60457
|
remove_input_defaults(input_23);
|
|
60388
60458
|
reset(label_29);
|
|
60389
60459
|
var label_30 = sibling(label_29, 2);
|
|
60390
|
-
var
|
|
60391
|
-
var
|
|
60392
|
-
|
|
60393
|
-
|
|
60460
|
+
var span_20 = child(label_30);
|
|
60461
|
+
var text_26 = child(span_20);
|
|
60462
|
+
reset(span_20);
|
|
60463
|
+
var input_24 = sibling(span_20, 2);
|
|
60464
|
+
remove_input_defaults(input_24);
|
|
60394
60465
|
reset(label_30);
|
|
60395
60466
|
var label_31 = sibling(label_30, 2);
|
|
60396
|
-
var
|
|
60397
|
-
remove_input_defaults(
|
|
60467
|
+
var input_25 = sibling(child(label_31), 2);
|
|
60468
|
+
remove_input_defaults(input_25);
|
|
60398
60469
|
reset(label_31);
|
|
60470
|
+
var label_32 = sibling(label_31, 2);
|
|
60471
|
+
var div_33 = sibling(child(label_32), 2);
|
|
60472
|
+
var button_22 = child(div_33);
|
|
60473
|
+
var button_23 = sibling(button_22, 2);
|
|
60474
|
+
reset(div_33);
|
|
60475
|
+
reset(label_32);
|
|
60476
|
+
var label_33 = sibling(label_32, 2);
|
|
60477
|
+
var input_26 = sibling(child(label_33), 2);
|
|
60478
|
+
remove_input_defaults(input_26);
|
|
60479
|
+
reset(label_33);
|
|
60399
60480
|
reset(div_32);
|
|
60400
60481
|
template_effect(($0, $1, $2, $3) => {
|
|
60401
60482
|
if (select_5_value !== (select_5_value = get(selectedStair).stairType || "straight")) {
|
|
@@ -60403,13 +60484,13 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60403
60484
|
select_5.value = (_select_5$__value = select_5.__value = get(selectedStair).stairType || "straight") !== null && _select_5$__value !== void 0 ? _select_5$__value : "", select_option(select_5, get(selectedStair).stairType || "straight");
|
|
60404
60485
|
}
|
|
60405
60486
|
set_text(text_25, `Width (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
|
|
60406
|
-
set_value(
|
|
60487
|
+
set_value(input_23, $1);
|
|
60407
60488
|
set_text(text_26, `Depth (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
|
|
60408
|
-
set_value(
|
|
60409
|
-
set_value(
|
|
60489
|
+
set_value(input_24, $3);
|
|
60490
|
+
set_value(input_25, get(selectedStair).riserCount);
|
|
60410
60491
|
set_class(button_22, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${get(selectedStair).direction === "up" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
60411
60492
|
set_class(button_23, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${get(selectedStair).direction === "down" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
60412
|
-
set_value(
|
|
60493
|
+
set_value(input_26, get(selectedStair).rotation);
|
|
60413
60494
|
}, [
|
|
60414
60495
|
() => unitLabel(),
|
|
60415
60496
|
() => displayValue(get(selectedStair).width),
|
|
@@ -60417,41 +60498,41 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60417
60498
|
() => displayValue(get(selectedStair).depth)
|
|
60418
60499
|
]);
|
|
60419
60500
|
delegated("change", select_5, (e) => updateStair(get(selectedStair).id, { stairType: e.target.value }));
|
|
60420
|
-
delegated("input",
|
|
60421
|
-
delegated("input",
|
|
60422
|
-
delegated("input",
|
|
60501
|
+
delegated("input", input_23, (e) => updateStair(get(selectedStair).id, { width: inputToCm(Number(e.target.value)) }));
|
|
60502
|
+
delegated("input", input_24, (e) => updateStair(get(selectedStair).id, { depth: inputToCm(Number(e.target.value)) }));
|
|
60503
|
+
delegated("input", input_25, (e) => updateStair(get(selectedStair).id, { riserCount: Number(e.target.value) }));
|
|
60423
60504
|
delegated("click", button_22, () => updateStair(get(selectedStair).id, { direction: "up" }));
|
|
60424
60505
|
delegated("click", button_23, () => updateStair(get(selectedStair).id, { direction: "down" }));
|
|
60425
|
-
delegated("input",
|
|
60426
|
-
append($$anchor,
|
|
60506
|
+
delegated("input", input_26, (e) => updateStair(get(selectedStair).id, { rotation: Number(e.target.value) }));
|
|
60507
|
+
append($$anchor, fragment_7);
|
|
60427
60508
|
};
|
|
60428
|
-
var
|
|
60429
|
-
var
|
|
60430
|
-
var div_34 = sibling(first_child(
|
|
60431
|
-
var
|
|
60432
|
-
var div_35 = sibling(child(
|
|
60509
|
+
var consequent_10 = ($$anchor) => {
|
|
60510
|
+
var fragment_8 = root_20$1();
|
|
60511
|
+
var div_34 = sibling(first_child(fragment_8), 2);
|
|
60512
|
+
var label_34 = child(div_34);
|
|
60513
|
+
var div_35 = sibling(child(label_34), 2);
|
|
60433
60514
|
var button_24 = child(div_35);
|
|
60434
60515
|
var button_25 = sibling(button_24, 2);
|
|
60435
60516
|
reset(div_35);
|
|
60436
|
-
reset(
|
|
60437
|
-
var
|
|
60438
|
-
var span_21 = child(
|
|
60517
|
+
reset(label_34);
|
|
60518
|
+
var label_35 = sibling(label_34, 2);
|
|
60519
|
+
var span_21 = child(label_35);
|
|
60439
60520
|
var text_27 = child(span_21);
|
|
60440
60521
|
reset(span_21);
|
|
60441
|
-
var
|
|
60442
|
-
remove_input_defaults(
|
|
60443
|
-
reset(
|
|
60444
|
-
var
|
|
60445
|
-
var span_22 = child(
|
|
60522
|
+
var input_27 = sibling(span_21, 2);
|
|
60523
|
+
remove_input_defaults(input_27);
|
|
60524
|
+
reset(label_35);
|
|
60525
|
+
var label_36 = sibling(label_35, 2);
|
|
60526
|
+
var span_22 = child(label_36);
|
|
60446
60527
|
var text_28 = child(span_22);
|
|
60447
60528
|
reset(span_22);
|
|
60448
|
-
var
|
|
60449
|
-
remove_input_defaults(
|
|
60450
|
-
reset(
|
|
60451
|
-
var div_36 = sibling(
|
|
60529
|
+
var input_28 = sibling(span_22, 2);
|
|
60530
|
+
remove_input_defaults(input_28);
|
|
60531
|
+
reset(label_36);
|
|
60532
|
+
var div_36 = sibling(label_36, 2);
|
|
60452
60533
|
var div_37 = sibling(child(div_36), 2);
|
|
60453
60534
|
each(div_37, 21, () => columnColorPresets, index$1, ($$anchor, preset) => {
|
|
60454
|
-
var button_26 =
|
|
60535
|
+
var button_26 = root_21$1();
|
|
60455
60536
|
template_effect(() => {
|
|
60456
60537
|
var _$$get$color7;
|
|
60457
60538
|
set_class(button_26, 1, `w-7 h-7 rounded-md border-2 hover:border-gray-300 transition-colors ${get(selectedColumn).color === get(preset).color ? "border-blue-500 ring-1 ring-blue-200" : "border-gray-200"}`);
|
|
@@ -60463,32 +60544,32 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60463
60544
|
});
|
|
60464
60545
|
reset(div_37);
|
|
60465
60546
|
var div_38 = sibling(div_37, 2);
|
|
60466
|
-
var
|
|
60467
|
-
remove_input_defaults(
|
|
60547
|
+
var input_29 = sibling(child(div_38), 2);
|
|
60548
|
+
remove_input_defaults(input_29);
|
|
60468
60549
|
reset(div_38);
|
|
60469
60550
|
reset(div_36);
|
|
60470
|
-
var
|
|
60471
|
-
var
|
|
60472
|
-
var
|
|
60473
|
-
var
|
|
60474
|
-
remove_input_defaults(
|
|
60475
|
-
reset(
|
|
60476
|
-
template_effect(() => set_value(
|
|
60477
|
-
delegated("input",
|
|
60478
|
-
append($$anchor,
|
|
60551
|
+
var node_6 = sibling(div_36, 2);
|
|
60552
|
+
var consequent_9 = ($$anchor) => {
|
|
60553
|
+
var label_37 = root_22$1();
|
|
60554
|
+
var input_30 = sibling(child(label_37), 2);
|
|
60555
|
+
remove_input_defaults(input_30);
|
|
60556
|
+
reset(label_37);
|
|
60557
|
+
template_effect(() => set_value(input_30, get(selectedColumn).rotation));
|
|
60558
|
+
delegated("input", input_30, (e) => updateColumn(get(selectedColumn).id, { rotation: Number(e.target.value) }));
|
|
60559
|
+
append($$anchor, label_37);
|
|
60479
60560
|
};
|
|
60480
|
-
if_block(
|
|
60481
|
-
if (get(selectedColumn).shape === "square") $$render(
|
|
60561
|
+
if_block(node_6, ($$render) => {
|
|
60562
|
+
if (get(selectedColumn).shape === "square") $$render(consequent_9);
|
|
60482
60563
|
});
|
|
60483
60564
|
reset(div_34);
|
|
60484
60565
|
template_effect(($0, $1, $2, $3) => {
|
|
60485
60566
|
set_class(button_24, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${get(selectedColumn).shape === "round" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
60486
60567
|
set_class(button_25, 1, `flex-1 px-2 py-1.5 border rounded text-sm transition-colors ${get(selectedColumn).shape === "square" ? "bg-blue-100 border-blue-400 text-blue-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
60487
60568
|
set_text(text_27, `${get(selectedColumn).shape === "round" ? "Diameter" : "Side Length"} (${$0 !== null && $0 !== void 0 ? $0 : ""})`);
|
|
60488
|
-
set_value(
|
|
60569
|
+
set_value(input_27, $1);
|
|
60489
60570
|
set_text(text_28, `Height (${$2 !== null && $2 !== void 0 ? $2 : ""})`);
|
|
60490
|
-
set_value(
|
|
60491
|
-
set_value(
|
|
60571
|
+
set_value(input_28, $3);
|
|
60572
|
+
set_value(input_29, get(selectedColumn).color);
|
|
60492
60573
|
}, [
|
|
60493
60574
|
() => unitLabel(),
|
|
60494
60575
|
() => displayValue(get(selectedColumn).diameter),
|
|
@@ -60497,87 +60578,87 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60497
60578
|
]);
|
|
60498
60579
|
delegated("click", button_24, () => updateColumn(get(selectedColumn).id, { shape: "round" }));
|
|
60499
60580
|
delegated("click", button_25, () => updateColumn(get(selectedColumn).id, { shape: "square" }));
|
|
60500
|
-
delegated("input",
|
|
60501
|
-
delegated("input",
|
|
60502
|
-
delegated("input",
|
|
60503
|
-
append($$anchor,
|
|
60581
|
+
delegated("input", input_27, (e) => updateColumn(get(selectedColumn).id, { diameter: inputToCm(Number(e.target.value)) }));
|
|
60582
|
+
delegated("input", input_28, (e) => updateColumn(get(selectedColumn).id, { height: inputToCm(Number(e.target.value)) }));
|
|
60583
|
+
delegated("input", input_29, (e) => updateColumn(get(selectedColumn).id, { color: e.target.value }));
|
|
60584
|
+
append($$anchor, fragment_8);
|
|
60504
60585
|
};
|
|
60505
|
-
var
|
|
60506
|
-
var div_39 =
|
|
60507
|
-
var
|
|
60508
|
-
var
|
|
60509
|
-
remove_input_defaults(input_29);
|
|
60510
|
-
reset(label_36);
|
|
60511
|
-
var label_37 = sibling(label_36, 2);
|
|
60512
|
-
var input_30 = sibling(child(label_37), 2);
|
|
60513
|
-
remove_input_defaults(input_30);
|
|
60514
|
-
reset(label_37);
|
|
60515
|
-
var label_38 = sibling(label_37, 2);
|
|
60516
|
-
var div_40 = sibling(child(label_38), 2);
|
|
60517
|
-
var input_31 = child(div_40);
|
|
60586
|
+
var consequent_11 = ($$anchor) => {
|
|
60587
|
+
var div_39 = root_23$1();
|
|
60588
|
+
var label_38 = sibling(child(div_39), 2);
|
|
60589
|
+
var input_31 = sibling(child(label_38), 2);
|
|
60518
60590
|
remove_input_defaults(input_31);
|
|
60519
|
-
var span_23 = sibling(input_31, 2);
|
|
60520
|
-
var text_29 = child(span_23, true);
|
|
60521
|
-
reset(span_23);
|
|
60522
|
-
reset(div_40);
|
|
60523
60591
|
reset(label_38);
|
|
60524
60592
|
var label_39 = sibling(label_38, 2);
|
|
60525
60593
|
var input_32 = sibling(child(label_39), 2);
|
|
60526
60594
|
remove_input_defaults(input_32);
|
|
60527
60595
|
reset(label_39);
|
|
60528
60596
|
var label_40 = sibling(label_39, 2);
|
|
60529
|
-
var
|
|
60597
|
+
var div_40 = sibling(child(label_40), 2);
|
|
60598
|
+
var input_33 = child(div_40);
|
|
60530
60599
|
remove_input_defaults(input_33);
|
|
60600
|
+
var span_23 = sibling(input_33, 2);
|
|
60601
|
+
var text_29 = child(span_23, true);
|
|
60602
|
+
reset(span_23);
|
|
60603
|
+
reset(div_40);
|
|
60531
60604
|
reset(label_40);
|
|
60532
60605
|
var label_41 = sibling(label_40, 2);
|
|
60533
60606
|
var input_34 = sibling(child(label_41), 2);
|
|
60534
60607
|
remove_input_defaults(input_34);
|
|
60535
60608
|
reset(label_41);
|
|
60609
|
+
var label_42 = sibling(label_41, 2);
|
|
60610
|
+
var input_35 = sibling(child(label_42), 2);
|
|
60611
|
+
remove_input_defaults(input_35);
|
|
60612
|
+
reset(label_42);
|
|
60613
|
+
var label_43 = sibling(label_42, 2);
|
|
60614
|
+
var input_36 = sibling(child(label_43), 2);
|
|
60615
|
+
remove_input_defaults(input_36);
|
|
60616
|
+
reset(label_43);
|
|
60536
60617
|
reset(div_39);
|
|
60537
60618
|
template_effect(($0, $1) => {
|
|
60538
|
-
set_value(
|
|
60539
|
-
set_value(
|
|
60540
|
-
set_value(
|
|
60619
|
+
set_value(input_31, get(selectedTextAnnotation).text);
|
|
60620
|
+
set_value(input_32, get(selectedTextAnnotation).fontSize);
|
|
60621
|
+
set_value(input_33, get(selectedTextAnnotation).color);
|
|
60541
60622
|
set_text(text_29, get(selectedTextAnnotation).color);
|
|
60542
|
-
set_value(
|
|
60543
|
-
set_value(
|
|
60544
|
-
set_value(
|
|
60623
|
+
set_value(input_34, get(selectedTextAnnotation).rotation);
|
|
60624
|
+
set_value(input_35, $0);
|
|
60625
|
+
set_value(input_36, $1);
|
|
60545
60626
|
}, [() => Math.round(get(selectedTextAnnotation).x), () => Math.round(get(selectedTextAnnotation).y)]);
|
|
60546
|
-
delegated("input",
|
|
60547
|
-
delegated("input",
|
|
60548
|
-
delegated("input",
|
|
60549
|
-
delegated("input",
|
|
60550
|
-
delegated("input",
|
|
60551
|
-
delegated("input",
|
|
60627
|
+
delegated("input", input_31, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { text: e.target.value }));
|
|
60628
|
+
delegated("input", input_32, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { fontSize: Number(e.target.value) }));
|
|
60629
|
+
delegated("input", input_33, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { color: e.target.value }));
|
|
60630
|
+
delegated("input", input_34, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { rotation: Number(e.target.value) }));
|
|
60631
|
+
delegated("input", input_35, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { x: Number(e.target.value) }));
|
|
60632
|
+
delegated("input", input_36, (e) => updateTextAnnotation(get(selectedTextAnnotation).id, { y: Number(e.target.value) }));
|
|
60552
60633
|
append($$anchor, div_39);
|
|
60553
60634
|
};
|
|
60554
60635
|
if_block(node, ($$render) => {
|
|
60555
60636
|
if (get(selectedWall)) $$render(consequent_1);
|
|
60556
60637
|
else if (get(selectedDoor)) $$render(consequent_2, 1);
|
|
60557
60638
|
else if (get(selectedWindow)) $$render(consequent_3, 2);
|
|
60558
|
-
else if (get(selectedFurniture)) $$render(
|
|
60559
|
-
else if (get(selectedRoom)) $$render(
|
|
60560
|
-
else if (get(selectedStair)) $$render(
|
|
60561
|
-
else if (get(selectedColumn)) $$render(
|
|
60562
|
-
else if (get(selectedTextAnnotation)) $$render(
|
|
60639
|
+
else if (get(selectedFurniture)) $$render(consequent_5, 3);
|
|
60640
|
+
else if (get(selectedRoom)) $$render(consequent_7, 4);
|
|
60641
|
+
else if (get(selectedStair)) $$render(consequent_8, 5);
|
|
60642
|
+
else if (get(selectedColumn)) $$render(consequent_10, 6);
|
|
60643
|
+
else if (get(selectedTextAnnotation)) $$render(consequent_11, 7);
|
|
60563
60644
|
});
|
|
60564
|
-
var
|
|
60565
|
-
var
|
|
60566
|
-
var div_41 =
|
|
60645
|
+
var node_7 = sibling(node, 2);
|
|
60646
|
+
var consequent_12 = ($$anchor) => {
|
|
60647
|
+
var div_41 = root_24();
|
|
60567
60648
|
var div_42 = sibling(child(div_41), 2);
|
|
60568
|
-
var
|
|
60569
|
-
var input_35 = sibling(child(label_42), 2);
|
|
60570
|
-
remove_input_defaults(input_35);
|
|
60571
|
-
reset(label_42);
|
|
60572
|
-
var label_43 = sibling(label_42, 2);
|
|
60573
|
-
var input_36 = sibling(child(label_43), 2);
|
|
60574
|
-
remove_input_defaults(input_36);
|
|
60575
|
-
reset(label_43);
|
|
60576
|
-
var label_44 = sibling(label_43, 2);
|
|
60649
|
+
var label_44 = child(div_42);
|
|
60577
60650
|
var input_37 = sibling(child(label_44), 2);
|
|
60578
60651
|
remove_input_defaults(input_37);
|
|
60579
60652
|
reset(label_44);
|
|
60580
|
-
var
|
|
60653
|
+
var label_45 = sibling(label_44, 2);
|
|
60654
|
+
var input_38 = sibling(child(label_45), 2);
|
|
60655
|
+
remove_input_defaults(input_38);
|
|
60656
|
+
reset(label_45);
|
|
60657
|
+
var label_46 = sibling(label_45, 2);
|
|
60658
|
+
var input_39 = sibling(child(label_46), 2);
|
|
60659
|
+
remove_input_defaults(input_39);
|
|
60660
|
+
reset(label_46);
|
|
60661
|
+
var div_43 = sibling(label_46, 2);
|
|
60581
60662
|
var button_27 = child(div_43);
|
|
60582
60663
|
var text_30 = child(button_27, true);
|
|
60583
60664
|
reset(button_27);
|
|
@@ -60587,15 +60668,15 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60587
60668
|
reset(div_42);
|
|
60588
60669
|
reset(div_41);
|
|
60589
60670
|
template_effect(() => {
|
|
60590
|
-
set_value(
|
|
60591
|
-
set_value(
|
|
60592
|
-
set_value(
|
|
60671
|
+
set_value(input_37, get(floor).backgroundImage.opacity);
|
|
60672
|
+
set_value(input_38, get(floor).backgroundImage.scale);
|
|
60673
|
+
set_value(input_39, get(floor).backgroundImage.rotation);
|
|
60593
60674
|
set_class(button_27, 1, `flex-1 px-2 py-1.5 border rounded text-sm ${get(floor).backgroundImage.locked ? "bg-amber-100 border-amber-400 text-amber-700" : "border-gray-200 hover:bg-gray-50"}`);
|
|
60594
60675
|
set_text(text_30, get(floor).backgroundImage.locked ? "🔒 Locked" : "🔓 Unlocked");
|
|
60595
60676
|
});
|
|
60596
|
-
delegated("input",
|
|
60597
|
-
delegated("input",
|
|
60598
|
-
delegated("input",
|
|
60677
|
+
delegated("input", input_37, (e) => updateBackgroundImage({ opacity: Number(e.target.value) }));
|
|
60678
|
+
delegated("input", input_38, (e) => updateBackgroundImage({ scale: Number(e.target.value) }));
|
|
60679
|
+
delegated("input", input_39, (e) => updateBackgroundImage({ rotation: Number(e.target.value) }));
|
|
60599
60680
|
delegated("click", button_27, () => updateBackgroundImage({ locked: !get(floor).backgroundImage.locked }));
|
|
60600
60681
|
delegated("click", button_28, () => {
|
|
60601
60682
|
calibrationPoints.set([]);
|
|
@@ -60604,9 +60685,9 @@ function PropertiesPanel($$anchor, $$props) {
|
|
|
60604
60685
|
delegated("click", button_29, () => setBackgroundImage(void 0));
|
|
60605
60686
|
append($$anchor, div_41);
|
|
60606
60687
|
};
|
|
60607
|
-
if_block(
|
|
60688
|
+
if_block(node_7, ($$render) => {
|
|
60608
60689
|
var _$$get16;
|
|
60609
|
-
if (get(hasBgImage) && ((_$$get16 = get(floor)) === null || _$$get16 === void 0 ? void 0 : _$$get16.backgroundImage)) $$render(
|
|
60690
|
+
if (get(hasBgImage) && ((_$$get16 = get(floor)) === null || _$$get16 === void 0 ? void 0 : _$$get16.backgroundImage)) $$render(consequent_12);
|
|
60610
60691
|
});
|
|
60611
60692
|
reset(div);
|
|
60612
60693
|
template_effect(() => classes = set_class(div, 1, `${is3D() ? "w-80" : "w-64"} shrink-0 bg-white border-l border-gray-200 flex flex-col overflow-y-auto p-3 fixed right-0 z-40 shadow-lg`, null, classes, { hidden: !get(hasSelection) }));
|
|
@@ -61704,17 +61785,19 @@ function getHeatmapColor(t, alpha = 1) {
|
|
|
61704
61785
|
}
|
|
61705
61786
|
return `rgba(${r}, ${g}, ${b}, ${alpha})`;
|
|
61706
61787
|
}
|
|
61707
|
-
var drawCamera = (ctx, w, d, color, heatmapMatrix, hasPerson = false, showHeatmap = false) => {
|
|
61788
|
+
var drawCamera = (ctx, w, d, color, heatmapMatrix, hasPerson = false, showHeatmap = false, showCameraCones = false, highlighted = false) => {
|
|
61708
61789
|
const bodyRadius = 4;
|
|
61709
61790
|
const lensR = Math.min(w, d) * .25;
|
|
61710
61791
|
const range = Math.max(w, d) * 6;
|
|
61711
61792
|
const fov = Math.PI / 2;
|
|
61712
|
-
if (showHeatmap) {
|
|
61793
|
+
if (showHeatmap || showCameraCones) {
|
|
61713
61794
|
var _heatmapMatrix$;
|
|
61714
61795
|
ctx.save();
|
|
61715
61796
|
const coneGradient = ctx.createRadialGradient(0, 0, 0, 0, 0, range);
|
|
61716
|
-
|
|
61717
|
-
|
|
61797
|
+
const innerAlpha = highlighted ? "88" : showHeatmap ? "55" : "22";
|
|
61798
|
+
const midAlpha = highlighted ? "55" : showHeatmap ? "22" : "11";
|
|
61799
|
+
coneGradient.addColorStop(0, color + innerAlpha);
|
|
61800
|
+
coneGradient.addColorStop(.45, color + midAlpha);
|
|
61718
61801
|
coneGradient.addColorStop(1, color + "00");
|
|
61719
61802
|
ctx.fillStyle = coneGradient;
|
|
61720
61803
|
ctx.globalCompositeOperation = "lighter";
|
|
@@ -61723,8 +61806,18 @@ var drawCamera = (ctx, w, d, color, heatmapMatrix, hasPerson = false, showHeatma
|
|
|
61723
61806
|
ctx.arc(0, 0, range, -fov / 2, fov / 2);
|
|
61724
61807
|
ctx.closePath();
|
|
61725
61808
|
ctx.fill();
|
|
61809
|
+
if (highlighted) {
|
|
61810
|
+
ctx.strokeStyle = "#fbbf24";
|
|
61811
|
+
ctx.lineWidth = 2.5;
|
|
61812
|
+
ctx.globalCompositeOperation = "source-over";
|
|
61813
|
+
ctx.beginPath();
|
|
61814
|
+
ctx.moveTo(0, 0);
|
|
61815
|
+
ctx.arc(0, 0, range, -fov / 2, fov / 2);
|
|
61816
|
+
ctx.closePath();
|
|
61817
|
+
ctx.stroke();
|
|
61818
|
+
}
|
|
61726
61819
|
ctx.restore();
|
|
61727
|
-
if ((heatmapMatrix === null || heatmapMatrix === void 0 ? void 0 : heatmapMatrix.length) && ((_heatmapMatrix$ = heatmapMatrix[0]) === null || _heatmapMatrix$ === void 0 ? void 0 : _heatmapMatrix$.length)) {
|
|
61820
|
+
if (showHeatmap && (heatmapMatrix === null || heatmapMatrix === void 0 ? void 0 : heatmapMatrix.length) && ((_heatmapMatrix$ = heatmapMatrix[0]) === null || _heatmapMatrix$ === void 0 ? void 0 : _heatmapMatrix$.length)) {
|
|
61728
61821
|
const rows = heatmapMatrix.length;
|
|
61729
61822
|
const cols = heatmapMatrix[0].length;
|
|
61730
61823
|
const maxValue = Math.max(...heatmapMatrix.flat());
|
|
@@ -61754,7 +61847,7 @@ var drawCamera = (ctx, w, d, color, heatmapMatrix, hasPerson = false, showHeatma
|
|
|
61754
61847
|
ctx.restore();
|
|
61755
61848
|
}
|
|
61756
61849
|
}
|
|
61757
|
-
if (hasPerson) {
|
|
61850
|
+
if (showHeatmap && hasPerson) {
|
|
61758
61851
|
const now = Date.now();
|
|
61759
61852
|
if (persons.length < MAX_PERSONS && now - lastSpawnTime > SPAWN_INTERVAL) {
|
|
61760
61853
|
lastSpawnTime = now;
|
|
@@ -61794,7 +61887,7 @@ var drawCamera = (ctx, w, d, color, heatmapMatrix, hasPerson = false, showHeatma
|
|
|
61794
61887
|
ctx.restore();
|
|
61795
61888
|
return true;
|
|
61796
61889
|
});
|
|
61797
|
-
} else persons = [];
|
|
61890
|
+
} else if (showHeatmap) persons = [];
|
|
61798
61891
|
} else persons = [];
|
|
61799
61892
|
ctx.fillStyle = color + "40";
|
|
61800
61893
|
ctx.strokeStyle = color;
|
|
@@ -61890,12 +61983,12 @@ var iconDrawers = {
|
|
|
61890
61983
|
* @param w - pixel width (catalogWidth * zoom)
|
|
61891
61984
|
* @param d - pixel depth (catalogDepth * zoom)
|
|
61892
61985
|
*/
|
|
61893
|
-
function drawFurnitureIcon(ctx, catalogId, w, d, color, strokeColor, heatmapMatrix, hasPerson = false, showHeatmap = false) {
|
|
61986
|
+
function drawFurnitureIcon(ctx, catalogId, w, d, color, strokeColor, heatmapMatrix, hasPerson = false, showHeatmap = false, showCameraCones = false, highlighted = false) {
|
|
61894
61987
|
ctx.fillStyle = color + "60";
|
|
61895
61988
|
ctx.strokeStyle = strokeColor;
|
|
61896
61989
|
ctx.lineWidth = 1;
|
|
61897
61990
|
const drawer = iconDrawers[catalogId];
|
|
61898
|
-
if (drawer) drawer(ctx, w, d, color, heatmapMatrix, hasPerson, showHeatmap);
|
|
61991
|
+
if (drawer) drawer(ctx, w, d, color, heatmapMatrix, hasPerson, showHeatmap, showCameraCones, highlighted);
|
|
61899
61992
|
else {
|
|
61900
61993
|
roundRect(ctx, -w / 2, -d / 2, w, d, 2);
|
|
61901
61994
|
ctx.fill();
|
|
@@ -61904,8 +61997,17 @@ function drawFurnitureIcon(ctx, catalogId, w, d, color, strokeColor, heatmapMatr
|
|
|
61904
61997
|
}
|
|
61905
61998
|
//#endregion
|
|
61906
61999
|
//#region src/lib/utils/shortcuts.ts
|
|
62000
|
+
/** True when the user is typing in a form field — canvas shortcuts should not run. */
|
|
62001
|
+
function isEditableTarget(e) {
|
|
62002
|
+
const el = e.target;
|
|
62003
|
+
if (!el) return false;
|
|
62004
|
+
const tag = el.tagName;
|
|
62005
|
+
if (tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT") return true;
|
|
62006
|
+
if (el.isContentEditable) return true;
|
|
62007
|
+
return !!el.closest("[contenteditable=\"true\"]");
|
|
62008
|
+
}
|
|
61907
62009
|
function handleGlobalShortcut(e, ctx = {}) {
|
|
61908
|
-
|
|
62010
|
+
if (isEditableTarget(e)) return false;
|
|
61909
62011
|
const mod = e.metaKey || e.ctrlKey;
|
|
61910
62012
|
if (mod && e.key === "z" && !e.shiftKey) {
|
|
61911
62013
|
e.preventDefault();
|
|
@@ -61926,8 +62028,6 @@ function handleGlobalShortcut(e, ctx = {}) {
|
|
|
61926
62028
|
}
|
|
61927
62029
|
return true;
|
|
61928
62030
|
}
|
|
61929
|
-
const tag = (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.tagName;
|
|
61930
|
-
if (tag === "INPUT" || tag === "TEXTAREA" || tag === "SELECT") return false;
|
|
61931
62031
|
if (e.key === "Escape") {
|
|
61932
62032
|
selectedTool.set("select");
|
|
61933
62033
|
selectedElementId.set(null);
|
|
@@ -63311,8 +63411,8 @@ function drawWindowDistanceDimensions(cs, wall, window, dimSettings) {
|
|
|
63311
63411
|
ctx.fillText(labelText, midPoint.x, midPoint.y);
|
|
63312
63412
|
}
|
|
63313
63413
|
}
|
|
63314
|
-
function drawFurnitureItem(cs, item, selected) {
|
|
63315
|
-
var _item$scale$x, _item$scale, _item$scale$y, _item$scale2, _item$width, _item$depth, _item$color;
|
|
63414
|
+
function drawFurnitureItem(cs, item, selected, options) {
|
|
63415
|
+
var _item$scale$x, _item$scale, _item$scale$y, _item$scale2, _item$width, _item$depth, _options$showCameraCo, _options$showCameraLa, _options$cameraHeatma, _item$color;
|
|
63316
63416
|
const { ctx, zoom } = cs;
|
|
63317
63417
|
const cat = getCatalogItem(item.catalogId);
|
|
63318
63418
|
if (!cat) return;
|
|
@@ -63322,6 +63422,13 @@ function drawFurnitureItem(cs, item, selected) {
|
|
|
63322
63422
|
const w = ((_item$width = item.width) !== null && _item$width !== void 0 ? _item$width : cat.width) * Math.abs(sx) * zoom;
|
|
63323
63423
|
const d = ((_item$depth = item.depth) !== null && _item$depth !== void 0 ? _item$depth : cat.depth) * Math.abs(sy) * zoom;
|
|
63324
63424
|
const angle = item.rotation * Math.PI / 180;
|
|
63425
|
+
const highlighted = !!((options === null || options === void 0 ? void 0 : options.selectedCameraSerial) && item.serial && item.serial === options.selectedCameraSerial);
|
|
63426
|
+
const showCameraCones = (_options$showCameraCo = options === null || options === void 0 ? void 0 : options.showCameraCones) !== null && _options$showCameraCo !== void 0 ? _options$showCameraCo : false;
|
|
63427
|
+
const showCameraLabels = (_options$showCameraLa = options === null || options === void 0 ? void 0 : options.showCameraLabels) !== null && _options$showCameraLa !== void 0 ? _options$showCameraLa : true;
|
|
63428
|
+
const isCamera = item.catalogId === "camera";
|
|
63429
|
+
const useConfigHeatmap = isCamera && highlighted && !!(options === null || options === void 0 || (_options$cameraHeatma = options.cameraHeatmapMatrix) === null || _options$cameraHeatma === void 0 ? void 0 : _options$cameraHeatma.length);
|
|
63430
|
+
const drawHeatmapMatrix = useConfigHeatmap ? options.cameraHeatmapMatrix : item.heatmapMatrix;
|
|
63431
|
+
const drawShowHeatmap = item.showHeatmap || useConfigHeatmap;
|
|
63325
63432
|
ctx.save();
|
|
63326
63433
|
ctx.translate(s.x, s.y);
|
|
63327
63434
|
ctx.rotate(angle);
|
|
@@ -63329,14 +63436,17 @@ function drawFurnitureItem(cs, item, selected) {
|
|
|
63329
63436
|
const itemColor = (_item$color = item.color) !== null && _item$color !== void 0 ? _item$color : cat.color;
|
|
63330
63437
|
const strokeColor = selected ? "#3b82f6" : itemColor;
|
|
63331
63438
|
ctx.lineWidth = selected ? 2 : 1;
|
|
63332
|
-
drawFurnitureIcon(ctx, item.catalogId, w, d, itemColor, strokeColor,
|
|
63439
|
+
drawFurnitureIcon(ctx, item.catalogId, w, d, itemColor, strokeColor, drawHeatmapMatrix, item.hasPerson, drawShowHeatmap, isCamera ? showCameraCones : false, isCamera ? highlighted : false);
|
|
63333
63440
|
const fontSize = Math.max(8, Math.min(12, Math.min(w, d) * .2));
|
|
63334
|
-
if (Math.min(w, d) > 20) {
|
|
63335
|
-
|
|
63441
|
+
if (showCameraLabels && Math.min(w, d) > 20) {
|
|
63442
|
+
var _item$name;
|
|
63443
|
+
const label = isCamera ? (_item$name = item.name) !== null && _item$name !== void 0 ? _item$name : cat.name : cat.name;
|
|
63444
|
+
ctx.fillStyle = highlighted ? "#b45309" : "#374151";
|
|
63336
63445
|
ctx.font = `${fontSize * .7}px sans-serif`;
|
|
63337
63446
|
ctx.textAlign = "center";
|
|
63338
63447
|
ctx.textBaseline = "middle";
|
|
63339
|
-
ctx.fillText(
|
|
63448
|
+
if (isCamera) ctx.fillText(label, -w / 2 - fontSize * 1.2, 0);
|
|
63449
|
+
else ctx.fillText(label, 0, d / 2 + fontSize * .8);
|
|
63340
63450
|
}
|
|
63341
63451
|
if (selected) {
|
|
63342
63452
|
ctx.strokeStyle = "#3b82f6";
|
|
@@ -64506,34 +64616,36 @@ function hitTestTextAnnotation(wp, floor, ctx, zoom) {
|
|
|
64506
64616
|
//#region src/lib/components/editor/FloorPlanCanvas.svelte
|
|
64507
64617
|
init_client();
|
|
64508
64618
|
init_index_client();
|
|
64509
|
-
var
|
|
64619
|
+
var root_1$4 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-2 z-10 px-2 py-1 bg-white/85 rounded text-sm font-semibold text-gray-700 shadow pointer-events-none"> </div>`);
|
|
64510
64620
|
var root_3$3 = /* @__PURE__ */ from_html(`<input type="text" class="absolute bg-white border-2 border-blue-500 rounded px-2 py-1 text-sm text-center shadow-lg outline-none"/>`);
|
|
64511
|
-
var root_4$2 = /* @__PURE__ */ from_html(`<
|
|
64512
|
-
var root_5 = /* @__PURE__ */ from_html(`<
|
|
64513
|
-
var root_6$1 = /* @__PURE__ */ from_html(`<
|
|
64514
|
-
var
|
|
64621
|
+
var root_4$2 = /* @__PURE__ */ from_html(`<input type="text" class="absolute bg-white border-2 border-blue-500 rounded px-2 py-1 text-sm text-center shadow-lg outline-none"/>`);
|
|
64622
|
+
var root_5 = /* @__PURE__ */ from_html(`<div class="absolute inset-0 flex items-center justify-center pointer-events-none"><div class="text-center opacity-60"><div class="text-5xl mb-3">🏠</div> <div class="text-sm font-medium text-gray-500">Start building your floor plan</div> <div class="text-xs text-gray-400 mt-1">Draw walls with <span class="font-mono bg-gray-100 px-1 rounded">W</span> or drag items from the sidebar</div></div></div>`);
|
|
64623
|
+
var root_6$1 = /* @__PURE__ */ from_html(`<canvas width="180" height="120" class="absolute bottom-10 right-2 rounded-lg shadow-lg border border-gray-300 cursor-crosshair bg-white" style="z-index: 15;"></canvas>`);
|
|
64624
|
+
var root_7 = /* @__PURE__ */ from_html(`<span> </span> <span> </span> <span class="text-gray-300">|</span>`, 1);
|
|
64515
64625
|
var root_9 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
64516
64626
|
var root_10 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
64517
|
-
var
|
|
64518
|
-
var
|
|
64519
|
-
var
|
|
64520
|
-
var
|
|
64521
|
-
var
|
|
64522
|
-
var root_17 = /* @__PURE__ */ from_html(`<button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700" title="
|
|
64523
|
-
var
|
|
64524
|
-
var
|
|
64627
|
+
var root_11 = /* @__PURE__ */ from_html(`<span> </span>`);
|
|
64628
|
+
var root_8 = /* @__PURE__ */ from_html(`<span> </span> <!> <!> <!> <span class="text-gray-300">|</span>`, 1);
|
|
64629
|
+
var root_12 = /* @__PURE__ */ from_html(`<span class="text-blue-600 font-medium"> </span> <span class="text-gray-300">|</span>`, 1);
|
|
64630
|
+
var root_14 = /* @__PURE__ */ from_html(`<label class="flex items-center gap-2 py-0.5 cursor-pointer hover:bg-gray-50 rounded px-1"><input type="checkbox" class="accent-blue-500"/> <span> </span></label>`);
|
|
64631
|
+
var root_13 = /* @__PURE__ */ from_html(`<div class="absolute bottom-12 right-2 z-20 bg-white rounded-lg shadow-lg border border-gray-200 p-3 text-xs min-w-[160px]"><div class="font-semibold text-gray-700 mb-2">Layers</div> <!> <hr class="my-1 border-gray-100"/> <label class="flex items-center gap-2 py-0.5 cursor-pointer hover:bg-gray-50 rounded px-1"><input type="checkbox" class="accent-blue-500"/> <span>Room Labels</span></label> <label class="flex items-center gap-2 py-0.5 cursor-pointer hover:bg-gray-50 rounded px-1"><input type="checkbox" class="accent-blue-500"/> <span>Dimensions</span></label></div>`);
|
|
64632
|
+
var root_17 = /* @__PURE__ */ from_html(`<button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700" title="Flip swing" aria-label="Flip swing"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M7 16V4m0 0L3 8m4-4l4 4M17 8v12m0 0l4-4m-4 4l-4-4"></path></svg></button>`);
|
|
64633
|
+
var root_18 = /* @__PURE__ */ from_html(`<button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700" title="Split wall at midpoint" aria-label="Split wall at midpoint"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2v20M4 12h4M16 12h4"></path></svg></button>`);
|
|
64634
|
+
var root_16 = /* @__PURE__ */ from_html(`<div class="absolute z-40 flex items-center gap-0.5 bg-white rounded-lg shadow-lg border border-gray-200 px-1 py-0.5"><button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700" title="Duplicate" aria-label="Duplicate"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="9" y="9" width="13" height="13" rx="2"></rect><path d="M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"></path></svg></button> <!> <!> <div class="w-px h-5 bg-gray-200 mx-0.5"></div> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-red-50 text-gray-400 hover:text-red-600" title="Delete" aria-label="Delete"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M3 6h18M8 6V4a2 2 0 012-2h4a2 2 0 012 2v2m3 0v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6h14"></path></svg></button></div>`);
|
|
64635
|
+
var root_19 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-blue-600 text-white px-3 py-1 rounded-full text-xs shadow">Click to add wall segment · Double-click to finish · C to close loop ·
|
|
64525
64636
|
Esc to cancel</div>`);
|
|
64526
|
-
var
|
|
64527
|
-
var
|
|
64528
|
-
var
|
|
64529
|
-
var
|
|
64530
|
-
var
|
|
64531
|
-
var root$1 = /* @__PURE__ */ from_html(`<div class="w-full h-full relative overflow-hidden" role="application"><div><canvas aria-label="Floor plan editor canvas"></canvas></div> <!></div>`);
|
|
64637
|
+
var root_20 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-purple-600 text-white px-3 py-1 rounded-full text-xs shadow"> </div>`);
|
|
64638
|
+
var root_21 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-red-600 text-white px-3 py-1 rounded-full text-xs shadow">Right-click two points to measure · M to exit · Esc to cancel</div>`);
|
|
64639
|
+
var root_22 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-emerald-600 text-white px-3 py-1 rounded-full text-xs shadow">Click to place text label · Esc to cancel</div>`);
|
|
64640
|
+
var root_23 = /* @__PURE__ */ from_html(`<div class="absolute top-2 left-1/2 -translate-x-1/2 bg-indigo-600 text-white px-3 py-1 rounded-full text-xs shadow"> </div>`);
|
|
64641
|
+
var root_2$3 = /* @__PURE__ */ from_html(`<!> <!> <!> <!> <div class="absolute bottom-2 right-2 bg-white/80 rounded px-2 py-1 text-xs text-gray-500 flex gap-3"><!> <!> <!> <span> </span> <button class="hover:text-gray-700" title="Zoom to Fit (F)">⊞ Fit</button> <button class="hover:text-gray-700" title="Toggle Grid (G)"> </button> <button class="hover:text-gray-700" title="Toggle Snap to Grid (S)"> </button> <button class="hover:text-gray-700" title="Toggle Furniture"> </button> <button class="hover:text-gray-700" title="Layer Visibility">🗂 Layers</button> <button class="hover:text-gray-700" title="Toggle Rulers"> </button> <button class="hover:text-gray-700" title="Toggle Mini-map"> </button></div> <!> <!> <!> <!> <!> <!> <!> <div class="absolute bottom-3 left-3 z-20 flex items-center gap-1 bg-white rounded-lg shadow-lg border border-gray-200 px-1 py-0.5"><button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-600 hover:text-gray-800 font-bold text-lg" title="Zoom Out (−)" aria-label="Zoom out">−</button> <button class="min-w-[3.5rem] h-7 flex items-center justify-center rounded hover:bg-gray-100 text-xs font-medium text-gray-600 hover:text-gray-800 tabular-nums" title="Reset to 100%" aria-label="Zoom to 100%"> </button> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-600 hover:text-gray-800 font-bold text-lg" title="Zoom In (+)" aria-label="Zoom in">+</button> <div class="w-px h-5 bg-gray-200"></div> <button class="w-7 h-7 flex items-center justify-center rounded hover:bg-gray-100 text-gray-500 hover:text-gray-700 text-sm" title="Zoom to Fit (F)" aria-label="Zoom to fit">⊞</button></div> <!>`, 1);
|
|
64642
|
+
var root$1 = /* @__PURE__ */ from_html(`<div class="w-full h-full relative overflow-hidden" role="application"><div><canvas aria-label="Floor plan editor canvas"></canvas></div> <!> <!></div>`);
|
|
64532
64643
|
function FloorPlanCanvas($$anchor, $$props) {
|
|
64533
64644
|
push($$props, true);
|
|
64534
64645
|
const $panMode = () => store_get(panMode, "$panMode", $$stores);
|
|
64535
64646
|
const $projectSettings = () => store_get(projectSettings, "$projectSettings", $$stores);
|
|
64536
64647
|
const [$$stores, $$cleanup] = setup_stores();
|
|
64648
|
+
let selectedCameraSerial = prop($$props, "selectedCameraSerial", 3, null), showCameraCones = prop($$props, "showCameraCones", 3, false), showCameraLabels = prop($$props, "showCameraLabels", 3, true), cameraHeatmapMatrix = prop($$props, "cameraHeatmapMatrix", 19, () => []);
|
|
64537
64649
|
let canvas;
|
|
64538
64650
|
let ctx;
|
|
64539
64651
|
let width = /* @__PURE__ */ state(800);
|
|
@@ -64621,6 +64733,16 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
64621
64733
|
user_effect(() => {
|
|
64622
64734
|
if ($$props.viewOnly) set(showRulers, false);
|
|
64623
64735
|
});
|
|
64736
|
+
user_effect(() => {
|
|
64737
|
+
selectedCameraSerial();
|
|
64738
|
+
showCameraCones();
|
|
64739
|
+
showCameraLabels();
|
|
64740
|
+
cameraHeatmapMatrix();
|
|
64741
|
+
$$props.projectName;
|
|
64742
|
+
$$props.heatmapEnabled;
|
|
64743
|
+
$$props.heatmapMatrix;
|
|
64744
|
+
markDirty();
|
|
64745
|
+
});
|
|
64624
64746
|
let layerVis = /* @__PURE__ */ state(proxy({
|
|
64625
64747
|
walls: true,
|
|
64626
64748
|
doors: true,
|
|
@@ -65056,7 +65178,12 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
65056
65178
|
drawWindowOnWall(getCS(), wall, win);
|
|
65057
65179
|
}
|
|
65058
65180
|
function drawFurniture(item, selected) {
|
|
65059
|
-
drawFurnitureItem(getCS(), item, selected
|
|
65181
|
+
drawFurnitureItem(getCS(), item, selected, {
|
|
65182
|
+
selectedCameraSerial: selectedCameraSerial(),
|
|
65183
|
+
showCameraCones: showCameraCones(),
|
|
65184
|
+
showCameraLabels: showCameraLabels(),
|
|
65185
|
+
cameraHeatmapMatrix: cameraHeatmapMatrix()
|
|
65186
|
+
});
|
|
65060
65187
|
}
|
|
65061
65188
|
let placementWallSnap = /* @__PURE__ */ state(null);
|
|
65062
65189
|
function drawFurniturePreview() {
|
|
@@ -68439,6 +68566,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
68439
68566
|
}
|
|
68440
68567
|
function onKeyDown(e) {
|
|
68441
68568
|
if ($$props.viewOnly) return;
|
|
68569
|
+
if (isEditableTarget(e)) return;
|
|
68442
68570
|
set(shiftDown, e.shiftKey, true);
|
|
68443
68571
|
if (e.code === "Space") {
|
|
68444
68572
|
set(spaceDown, true);
|
|
@@ -68974,11 +69102,22 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
68974
69102
|
bind_this(canvas_1, ($$value) => canvas = $$value, () => canvas);
|
|
68975
69103
|
reset(div_1);
|
|
68976
69104
|
var node = sibling(div_1, 2);
|
|
68977
|
-
var
|
|
68978
|
-
var
|
|
68979
|
-
var
|
|
68980
|
-
|
|
68981
|
-
|
|
69105
|
+
var consequent = ($$anchor) => {
|
|
69106
|
+
var div_2 = root_1$4();
|
|
69107
|
+
var text_1 = child(div_2, true);
|
|
69108
|
+
reset(div_2);
|
|
69109
|
+
template_effect(() => set_text(text_1, $$props.projectName));
|
|
69110
|
+
append($$anchor, div_2);
|
|
69111
|
+
};
|
|
69112
|
+
if_block(node, ($$render) => {
|
|
69113
|
+
if ($$props.viewOnly && $$props.projectName) $$render(consequent);
|
|
69114
|
+
});
|
|
69115
|
+
var node_1 = sibling(node, 2);
|
|
69116
|
+
var consequent_21 = ($$anchor) => {
|
|
69117
|
+
var fragment = root_2$3();
|
|
69118
|
+
var node_2 = first_child(fragment);
|
|
69119
|
+
var consequent_1 = ($$anchor) => {
|
|
69120
|
+
var input = root_3$3();
|
|
68982
69121
|
remove_input_defaults(input);
|
|
68983
69122
|
autofocus(input, true);
|
|
68984
69123
|
template_effect(() => {
|
|
@@ -69011,12 +69150,12 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69011
69150
|
});
|
|
69012
69151
|
append($$anchor, input);
|
|
69013
69152
|
};
|
|
69014
|
-
if_block(
|
|
69015
|
-
if (get(editingRoomId)) $$render(
|
|
69153
|
+
if_block(node_2, ($$render) => {
|
|
69154
|
+
if (get(editingRoomId)) $$render(consequent_1);
|
|
69016
69155
|
});
|
|
69017
|
-
var
|
|
69018
|
-
var
|
|
69019
|
-
var input_1 =
|
|
69156
|
+
var node_3 = sibling(node_2, 2);
|
|
69157
|
+
var consequent_2 = ($$anchor) => {
|
|
69158
|
+
var input_1 = root_4$2();
|
|
69020
69159
|
remove_input_defaults(input_1);
|
|
69021
69160
|
autofocus(input_1, true);
|
|
69022
69161
|
template_effect(() => {
|
|
@@ -69063,148 +69202,148 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69063
69202
|
});
|
|
69064
69203
|
append($$anchor, input_1);
|
|
69065
69204
|
};
|
|
69066
|
-
if_block(node_2, ($$render) => {
|
|
69067
|
-
if (get(editingTextAnnotationId)) $$render(consequent_1);
|
|
69068
|
-
});
|
|
69069
|
-
var node_3 = sibling(node_2, 2);
|
|
69070
|
-
var consequent_2 = ($$anchor) => {
|
|
69071
|
-
append($$anchor, root_4$2());
|
|
69072
|
-
};
|
|
69073
69205
|
if_block(node_3, ($$render) => {
|
|
69074
|
-
if (get(
|
|
69206
|
+
if (get(editingTextAnnotationId)) $$render(consequent_2);
|
|
69075
69207
|
});
|
|
69076
69208
|
var node_4 = sibling(node_3, 2);
|
|
69077
69209
|
var consequent_3 = ($$anchor) => {
|
|
69078
|
-
|
|
69210
|
+
append($$anchor, root_5());
|
|
69211
|
+
};
|
|
69212
|
+
if_block(node_4, ($$render) => {
|
|
69213
|
+
if (get(currentFloor) && get(currentFloor).walls.length === 0 && get(currentFloor).furniture.length === 0 && get(currentFloor).doors.length === 0 && !$$props.viewOnly) $$render(consequent_3);
|
|
69214
|
+
});
|
|
69215
|
+
var node_5 = sibling(node_4, 2);
|
|
69216
|
+
var consequent_4 = ($$anchor) => {
|
|
69217
|
+
var canvas_2 = root_6$1();
|
|
69079
69218
|
bind_this(canvas_2, ($$value) => minimapCanvas = $$value, () => minimapCanvas);
|
|
69080
69219
|
delegated("click", canvas_2, onMinimapClick);
|
|
69081
69220
|
append($$anchor, canvas_2);
|
|
69082
69221
|
};
|
|
69083
|
-
if_block(
|
|
69084
|
-
if (get(showMinimap) && get(currentFloor) && get(currentFloor).walls.length > 0) $$render(
|
|
69222
|
+
if_block(node_5, ($$render) => {
|
|
69223
|
+
if (get(showMinimap) && get(currentFloor) && get(currentFloor).walls.length > 0) $$render(consequent_4);
|
|
69085
69224
|
});
|
|
69086
|
-
var
|
|
69087
|
-
var
|
|
69088
|
-
var
|
|
69089
|
-
var fragment_1 =
|
|
69225
|
+
var div_4 = sibling(node_5, 2);
|
|
69226
|
+
var node_6 = child(div_4);
|
|
69227
|
+
var consequent_5 = ($$anchor) => {
|
|
69228
|
+
var fragment_1 = root_7();
|
|
69090
69229
|
var span = first_child(fragment_1);
|
|
69091
|
-
var
|
|
69230
|
+
var text_2 = child(span);
|
|
69092
69231
|
reset(span);
|
|
69093
69232
|
var span_1 = sibling(span, 2);
|
|
69094
|
-
var
|
|
69233
|
+
var text_3 = child(span_1, true);
|
|
69095
69234
|
reset(span_1);
|
|
69096
69235
|
next(2);
|
|
69097
69236
|
template_effect(($0) => {
|
|
69098
69237
|
var _$$get$length;
|
|
69099
|
-
set_text(
|
|
69100
|
-
set_text(
|
|
69238
|
+
set_text(text_2, `${(_$$get$length = get(detectedRooms).length) !== null && _$$get$length !== void 0 ? _$$get$length : ""} room${get(detectedRooms).length !== 1 ? "s" : ""}`);
|
|
69239
|
+
set_text(text_3, $0);
|
|
69101
69240
|
}, [() => formatArea(get(detectedRooms).reduce((s, r) => s + r.area, 0), $projectSettings().units)]);
|
|
69102
69241
|
append($$anchor, fragment_1);
|
|
69103
69242
|
};
|
|
69104
|
-
if_block(
|
|
69105
|
-
if (get(detectedRooms).length > 0) $$render(
|
|
69243
|
+
if_block(node_6, ($$render) => {
|
|
69244
|
+
if (get(detectedRooms).length > 0) $$render(consequent_5);
|
|
69106
69245
|
});
|
|
69107
|
-
var
|
|
69108
|
-
var
|
|
69109
|
-
var fragment_2 =
|
|
69246
|
+
var node_7 = sibling(node_6, 2);
|
|
69247
|
+
var consequent_9 = ($$anchor) => {
|
|
69248
|
+
var fragment_2 = root_8();
|
|
69110
69249
|
var span_2 = first_child(fragment_2);
|
|
69111
|
-
var
|
|
69250
|
+
var text_4 = child(span_2);
|
|
69112
69251
|
reset(span_2);
|
|
69113
|
-
var
|
|
69114
|
-
var
|
|
69115
|
-
var span_3 =
|
|
69116
|
-
var
|
|
69252
|
+
var node_8 = sibling(span_2, 2);
|
|
69253
|
+
var consequent_6 = ($$anchor) => {
|
|
69254
|
+
var span_3 = root_9();
|
|
69255
|
+
var text_5 = child(span_3);
|
|
69117
69256
|
reset(span_3);
|
|
69118
69257
|
template_effect(() => {
|
|
69119
69258
|
var _$$get$doors$length;
|
|
69120
|
-
return set_text(
|
|
69259
|
+
return set_text(text_5, `${(_$$get$doors$length = get(currentFloor).doors.length) !== null && _$$get$doors$length !== void 0 ? _$$get$doors$length : ""} door${get(currentFloor).doors.length !== 1 ? "s" : ""}`);
|
|
69121
69260
|
});
|
|
69122
69261
|
append($$anchor, span_3);
|
|
69123
69262
|
};
|
|
69124
|
-
if_block(
|
|
69125
|
-
if (get(currentFloor).doors.length > 0) $$render(
|
|
69263
|
+
if_block(node_8, ($$render) => {
|
|
69264
|
+
if (get(currentFloor).doors.length > 0) $$render(consequent_6);
|
|
69126
69265
|
});
|
|
69127
|
-
var
|
|
69128
|
-
var
|
|
69129
|
-
var span_4 =
|
|
69130
|
-
var
|
|
69266
|
+
var node_9 = sibling(node_8, 2);
|
|
69267
|
+
var consequent_7 = ($$anchor) => {
|
|
69268
|
+
var span_4 = root_10();
|
|
69269
|
+
var text_6 = child(span_4);
|
|
69131
69270
|
reset(span_4);
|
|
69132
69271
|
template_effect(() => {
|
|
69133
69272
|
var _$$get$windows$length;
|
|
69134
|
-
return set_text(
|
|
69273
|
+
return set_text(text_6, `${(_$$get$windows$length = get(currentFloor).windows.length) !== null && _$$get$windows$length !== void 0 ? _$$get$windows$length : ""} window${get(currentFloor).windows.length !== 1 ? "s" : ""}`);
|
|
69135
69274
|
});
|
|
69136
69275
|
append($$anchor, span_4);
|
|
69137
69276
|
};
|
|
69138
|
-
if_block(
|
|
69139
|
-
if (get(currentFloor).windows.length > 0) $$render(
|
|
69277
|
+
if_block(node_9, ($$render) => {
|
|
69278
|
+
if (get(currentFloor).windows.length > 0) $$render(consequent_7);
|
|
69140
69279
|
});
|
|
69141
|
-
var
|
|
69142
|
-
var
|
|
69143
|
-
var span_5 =
|
|
69144
|
-
var
|
|
69280
|
+
var node_10 = sibling(node_9, 2);
|
|
69281
|
+
var consequent_8 = ($$anchor) => {
|
|
69282
|
+
var span_5 = root_11();
|
|
69283
|
+
var text_7 = child(span_5);
|
|
69145
69284
|
reset(span_5);
|
|
69146
69285
|
template_effect(() => {
|
|
69147
69286
|
var _$$get$furniture$leng;
|
|
69148
|
-
return set_text(
|
|
69287
|
+
return set_text(text_7, `${(_$$get$furniture$leng = get(currentFloor).furniture.length) !== null && _$$get$furniture$leng !== void 0 ? _$$get$furniture$leng : ""} object${get(currentFloor).furniture.length !== 1 ? "s" : ""}`);
|
|
69149
69288
|
});
|
|
69150
69289
|
append($$anchor, span_5);
|
|
69151
69290
|
};
|
|
69152
|
-
if_block(
|
|
69153
|
-
if (get(currentFloor).furniture.length > 0) $$render(
|
|
69291
|
+
if_block(node_10, ($$render) => {
|
|
69292
|
+
if (get(currentFloor).furniture.length > 0) $$render(consequent_8);
|
|
69154
69293
|
});
|
|
69155
69294
|
next(2);
|
|
69156
69295
|
template_effect(() => {
|
|
69157
69296
|
var _$$get$walls$length;
|
|
69158
|
-
return set_text(
|
|
69297
|
+
return set_text(text_4, `${(_$$get$walls$length = get(currentFloor).walls.length) !== null && _$$get$walls$length !== void 0 ? _$$get$walls$length : ""} wall${get(currentFloor).walls.length !== 1 ? "s" : ""}`);
|
|
69159
69298
|
});
|
|
69160
69299
|
append($$anchor, fragment_2);
|
|
69161
69300
|
};
|
|
69162
|
-
if_block(
|
|
69163
|
-
if (get(currentFloor)) $$render(
|
|
69301
|
+
if_block(node_7, ($$render) => {
|
|
69302
|
+
if (get(currentFloor)) $$render(consequent_9);
|
|
69164
69303
|
});
|
|
69165
|
-
var
|
|
69166
|
-
var
|
|
69167
|
-
var fragment_3 =
|
|
69304
|
+
var node_11 = sibling(node_7, 2);
|
|
69305
|
+
var consequent_10 = ($$anchor) => {
|
|
69306
|
+
var fragment_3 = root_12();
|
|
69168
69307
|
var span_6 = first_child(fragment_3);
|
|
69169
|
-
var
|
|
69308
|
+
var text_8 = child(span_6);
|
|
69170
69309
|
reset(span_6);
|
|
69171
69310
|
next(2);
|
|
69172
69311
|
template_effect(() => {
|
|
69173
69312
|
var _$$get$size;
|
|
69174
|
-
return set_text(
|
|
69313
|
+
return set_text(text_8, `${(_$$get$size = get(currentSelectedIds).size) !== null && _$$get$size !== void 0 ? _$$get$size : ""} selected`);
|
|
69175
69314
|
});
|
|
69176
69315
|
append($$anchor, fragment_3);
|
|
69177
69316
|
};
|
|
69178
|
-
if_block(
|
|
69179
|
-
if (get(currentSelectedIds).size > 1) $$render(
|
|
69317
|
+
if_block(node_11, ($$render) => {
|
|
69318
|
+
if (get(currentSelectedIds).size > 1) $$render(consequent_10);
|
|
69180
69319
|
});
|
|
69181
|
-
var span_7 = sibling(
|
|
69182
|
-
var
|
|
69320
|
+
var span_7 = sibling(node_11, 2);
|
|
69321
|
+
var text_9 = child(span_7);
|
|
69183
69322
|
reset(span_7);
|
|
69184
69323
|
var button = sibling(span_7, 2);
|
|
69185
69324
|
var button_1 = sibling(button, 2);
|
|
69186
|
-
var
|
|
69325
|
+
var text_10 = child(button_1);
|
|
69187
69326
|
reset(button_1);
|
|
69188
69327
|
var button_2 = sibling(button_1, 2);
|
|
69189
|
-
var
|
|
69328
|
+
var text_11 = child(button_2);
|
|
69190
69329
|
reset(button_2);
|
|
69191
69330
|
var button_3 = sibling(button_2, 2);
|
|
69192
|
-
var
|
|
69331
|
+
var text_12 = child(button_3);
|
|
69193
69332
|
reset(button_3);
|
|
69194
69333
|
var button_4 = sibling(button_3, 2);
|
|
69195
69334
|
var button_5 = sibling(button_4, 2);
|
|
69196
|
-
var
|
|
69335
|
+
var text_13 = child(button_5);
|
|
69197
69336
|
reset(button_5);
|
|
69198
69337
|
var button_6 = sibling(button_5, 2);
|
|
69199
|
-
var
|
|
69200
|
-
|
|
69338
|
+
var text_14 = child(button_6);
|
|
69339
|
+
text_14.nodeValue = "🗺 Map";
|
|
69201
69340
|
reset(button_6);
|
|
69202
|
-
reset(
|
|
69203
|
-
var
|
|
69204
|
-
var
|
|
69205
|
-
var
|
|
69206
|
-
var
|
|
69207
|
-
each(
|
|
69341
|
+
reset(div_4);
|
|
69342
|
+
var node_12 = sibling(div_4, 2);
|
|
69343
|
+
var consequent_11 = ($$anchor) => {
|
|
69344
|
+
var div_5 = root_13();
|
|
69345
|
+
var node_13 = sibling(child(div_5), 2);
|
|
69346
|
+
each(node_13, 16, () => [
|
|
69208
69347
|
["walls", "Walls"],
|
|
69209
69348
|
["doors", "Doors"],
|
|
69210
69349
|
["windows", "Windows"],
|
|
@@ -69217,16 +69356,16 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69217
69356
|
var $$array = /* @__PURE__ */ user_derived(() => to_array($$item, 2));
|
|
69218
69357
|
let key = () => get($$array)[0];
|
|
69219
69358
|
let label = () => get($$array)[1];
|
|
69220
|
-
var label_1 =
|
|
69359
|
+
var label_1 = root_14();
|
|
69221
69360
|
var input_2 = child(label_1);
|
|
69222
69361
|
remove_input_defaults(input_2);
|
|
69223
69362
|
var span_8 = sibling(input_2, 2);
|
|
69224
|
-
var
|
|
69363
|
+
var text_15 = child(span_8, true);
|
|
69225
69364
|
reset(span_8);
|
|
69226
69365
|
reset(label_1);
|
|
69227
69366
|
template_effect(() => {
|
|
69228
69367
|
set_checked(input_2, get(layerVis)[key()]);
|
|
69229
|
-
set_text(
|
|
69368
|
+
set_text(text_15, label());
|
|
69230
69369
|
});
|
|
69231
69370
|
delegated("change", input_2, () => layerVisibility.update((v) => ({
|
|
69232
69371
|
...v,
|
|
@@ -69234,7 +69373,7 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69234
69373
|
})));
|
|
69235
69374
|
append($$anchor, label_1);
|
|
69236
69375
|
});
|
|
69237
|
-
var label_2 = sibling(
|
|
69376
|
+
var label_2 = sibling(node_13, 4);
|
|
69238
69377
|
var input_3 = child(label_2);
|
|
69239
69378
|
remove_input_defaults(input_3);
|
|
69240
69379
|
next(2);
|
|
@@ -69244,16 +69383,16 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69244
69383
|
remove_input_defaults(input_4);
|
|
69245
69384
|
next(2);
|
|
69246
69385
|
reset(label_3);
|
|
69247
|
-
reset(
|
|
69386
|
+
reset(div_5);
|
|
69248
69387
|
bind_checked(input_3, () => get(showRoomLabels), ($$value) => set(showRoomLabels, $$value));
|
|
69249
69388
|
bind_checked(input_4, () => get(showDimensions), ($$value) => set(showDimensions, $$value));
|
|
69250
|
-
append($$anchor,
|
|
69389
|
+
append($$anchor, div_5);
|
|
69251
69390
|
};
|
|
69252
|
-
if_block(
|
|
69253
|
-
if (get(showLayerPanel)) $$render(
|
|
69391
|
+
if_block(node_12, ($$render) => {
|
|
69392
|
+
if (get(showLayerPanel)) $$render(consequent_11);
|
|
69254
69393
|
});
|
|
69255
|
-
var
|
|
69256
|
-
var
|
|
69394
|
+
var node_14 = sibling(node_12, 2);
|
|
69395
|
+
var consequent_15 = ($$anchor) => {
|
|
69257
69396
|
const el = /* @__PURE__ */ user_derived(() => (() => {
|
|
69258
69397
|
const f = get(currentFloor);
|
|
69259
69398
|
const wall = f.walls.find((w) => w.id === get(currentSelectedId));
|
|
@@ -69286,24 +69425,24 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69286
69425
|
return null;
|
|
69287
69426
|
})());
|
|
69288
69427
|
var fragment_4 = comment();
|
|
69289
|
-
var
|
|
69290
|
-
var
|
|
69291
|
-
var
|
|
69292
|
-
var button_7 = child(
|
|
69293
|
-
var
|
|
69294
|
-
var
|
|
69295
|
-
var button_8 =
|
|
69428
|
+
var node_15 = first_child(fragment_4);
|
|
69429
|
+
var consequent_14 = ($$anchor) => {
|
|
69430
|
+
var div_6 = root_16();
|
|
69431
|
+
var button_7 = child(div_6);
|
|
69432
|
+
var node_16 = sibling(button_7, 2);
|
|
69433
|
+
var consequent_12 = ($$anchor) => {
|
|
69434
|
+
var button_8 = root_17();
|
|
69296
69435
|
delegated("click", button_8, () => {
|
|
69297
69436
|
if (get(el).door) updateDoor(get(el).door.id, { swingDirection: get(el).door.swingDirection === "left" ? "right" : "left" });
|
|
69298
69437
|
});
|
|
69299
69438
|
append($$anchor, button_8);
|
|
69300
69439
|
};
|
|
69301
|
-
if_block(
|
|
69302
|
-
if (get(el).type === "door" && get(el).door) $$render(
|
|
69440
|
+
if_block(node_16, ($$render) => {
|
|
69441
|
+
if (get(el).type === "door" && get(el).door) $$render(consequent_12);
|
|
69303
69442
|
});
|
|
69304
|
-
var
|
|
69305
|
-
var
|
|
69306
|
-
var button_9 =
|
|
69443
|
+
var node_17 = sibling(node_16, 2);
|
|
69444
|
+
var consequent_13 = ($$anchor) => {
|
|
69445
|
+
var button_9 = root_18();
|
|
69307
69446
|
delegated("click", button_9, () => {
|
|
69308
69447
|
if (get(currentSelectedId)) {
|
|
69309
69448
|
if (splitWall(get(currentSelectedId), .5)) selectedElementId.set(null);
|
|
@@ -69311,14 +69450,14 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69311
69450
|
});
|
|
69312
69451
|
append($$anchor, button_9);
|
|
69313
69452
|
};
|
|
69314
|
-
if_block(
|
|
69315
|
-
if (get(el).type === "wall" && get(currentSelectedId) && get(currentSelectedIds).size === 0) $$render(
|
|
69453
|
+
if_block(node_17, ($$render) => {
|
|
69454
|
+
if (get(el).type === "wall" && get(currentSelectedId) && get(currentSelectedIds).size === 0) $$render(consequent_13);
|
|
69316
69455
|
});
|
|
69317
|
-
var button_10 = sibling(
|
|
69318
|
-
reset(
|
|
69456
|
+
var button_10 = sibling(node_17, 4);
|
|
69457
|
+
reset(div_6);
|
|
69319
69458
|
template_effect(() => {
|
|
69320
69459
|
var _$$get$pos$x;
|
|
69321
|
-
return set_style(
|
|
69460
|
+
return set_style(div_6, `left: ${(_$$get$pos$x = get(el).pos.x) !== null && _$$get$pos$x !== void 0 ? _$$get$pos$x : ""}px; top: ${get(el).pos.y - 44}px; transform: translateX(-50%);`);
|
|
69322
69461
|
});
|
|
69323
69462
|
delegated("click", button_7, () => {
|
|
69324
69463
|
if (!get(currentSelectedId) || !get(currentFloor)) return;
|
|
@@ -69341,72 +69480,72 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69341
69480
|
selectedElementId.set(null);
|
|
69342
69481
|
}
|
|
69343
69482
|
});
|
|
69344
|
-
append($$anchor,
|
|
69483
|
+
append($$anchor, div_6);
|
|
69345
69484
|
};
|
|
69346
|
-
if_block(
|
|
69347
|
-
if (get(el)) $$render(
|
|
69485
|
+
if_block(node_15, ($$render) => {
|
|
69486
|
+
if (get(el)) $$render(consequent_14);
|
|
69348
69487
|
});
|
|
69349
69488
|
append($$anchor, fragment_4);
|
|
69350
69489
|
};
|
|
69351
|
-
if_block(
|
|
69352
|
-
if ((get(currentSelectedId) || get(currentSelectedIds).size > 0) && get(currentFloor) && get(currentTool) === "select") $$render(
|
|
69353
|
-
});
|
|
69354
|
-
var node_17 = sibling(node_13, 2);
|
|
69355
|
-
var consequent_15 = ($$anchor) => {
|
|
69356
|
-
append($$anchor, root_18());
|
|
69357
|
-
};
|
|
69358
|
-
if_block(node_17, ($$render) => {
|
|
69359
|
-
if (get(currentTool) === "wall" && get(wallStart)) $$render(consequent_15);
|
|
69490
|
+
if_block(node_14, ($$render) => {
|
|
69491
|
+
if ((get(currentSelectedId) || get(currentSelectedIds).size > 0) && get(currentFloor) && get(currentTool) === "select") $$render(consequent_15);
|
|
69360
69492
|
});
|
|
69361
|
-
var node_18 = sibling(
|
|
69493
|
+
var node_18 = sibling(node_14, 2);
|
|
69362
69494
|
var consequent_16 = ($$anchor) => {
|
|
69363
|
-
|
|
69364
|
-
var text_15 = child(div_7);
|
|
69365
|
-
reset(div_7);
|
|
69366
|
-
template_effect(() => {
|
|
69367
|
-
var _$$get13;
|
|
69368
|
-
return set_text(text_15, `Click to place · Scroll or R to rotate (${(_$$get13 = get(currentPlacingRotation)) !== null && _$$get13 !== void 0 ? _$$get13 : ""}°) · Esc
|
|
69369
|
-
to cancel`);
|
|
69370
|
-
});
|
|
69371
|
-
append($$anchor, div_7);
|
|
69495
|
+
append($$anchor, root_19());
|
|
69372
69496
|
};
|
|
69373
69497
|
if_block(node_18, ($$render) => {
|
|
69374
|
-
if (get(
|
|
69498
|
+
if (get(currentTool) === "wall" && get(wallStart)) $$render(consequent_16);
|
|
69375
69499
|
});
|
|
69376
69500
|
var node_19 = sibling(node_18, 2);
|
|
69377
69501
|
var consequent_17 = ($$anchor) => {
|
|
69378
|
-
|
|
69502
|
+
var div_8 = root_20();
|
|
69503
|
+
var text_16 = child(div_8);
|
|
69504
|
+
reset(div_8);
|
|
69505
|
+
template_effect(() => {
|
|
69506
|
+
var _$$get13;
|
|
69507
|
+
return set_text(text_16, `Click to place · Scroll or R to rotate (${(_$$get13 = get(currentPlacingRotation)) !== null && _$$get13 !== void 0 ? _$$get13 : ""}°) · Esc
|
|
69508
|
+
to cancel`);
|
|
69509
|
+
});
|
|
69510
|
+
append($$anchor, div_8);
|
|
69379
69511
|
};
|
|
69380
69512
|
if_block(node_19, ($$render) => {
|
|
69381
|
-
if (get(
|
|
69513
|
+
if (get(currentPlacingId) && get(currentTool) === "furniture") $$render(consequent_17);
|
|
69382
69514
|
});
|
|
69383
69515
|
var node_20 = sibling(node_19, 2);
|
|
69384
69516
|
var consequent_18 = ($$anchor) => {
|
|
69385
69517
|
append($$anchor, root_21());
|
|
69386
69518
|
};
|
|
69387
69519
|
if_block(node_20, ($$render) => {
|
|
69388
|
-
if (get(
|
|
69520
|
+
if (get(measuring)) $$render(consequent_18);
|
|
69389
69521
|
});
|
|
69390
69522
|
var node_21 = sibling(node_20, 2);
|
|
69391
69523
|
var consequent_19 = ($$anchor) => {
|
|
69392
|
-
|
|
69393
|
-
var text_16 = child(div_10);
|
|
69394
|
-
reset(div_10);
|
|
69395
|
-
template_effect(() => set_text(text_16, `${get(annotationStart) ? "Click second point to create annotation" : "Click first point"} · N to exit · Esc to cancel`));
|
|
69396
|
-
append($$anchor, div_10);
|
|
69524
|
+
append($$anchor, root_22());
|
|
69397
69525
|
};
|
|
69398
69526
|
if_block(node_21, ($$render) => {
|
|
69399
|
-
if (get(
|
|
69527
|
+
if (get(textAnnotationMode)) $$render(consequent_19);
|
|
69528
|
+
});
|
|
69529
|
+
var node_22 = sibling(node_21, 2);
|
|
69530
|
+
var consequent_20 = ($$anchor) => {
|
|
69531
|
+
var div_11 = root_23();
|
|
69532
|
+
var text_17 = child(div_11);
|
|
69533
|
+
reset(div_11);
|
|
69534
|
+
template_effect(() => set_text(text_17, `${get(annotationStart) ? "Click second point to create annotation" : "Click first point"} · N to exit · Esc to cancel`));
|
|
69535
|
+
append($$anchor, div_11);
|
|
69536
|
+
};
|
|
69537
|
+
if_block(node_22, ($$render) => {
|
|
69538
|
+
if (get(annotating)) $$render(consequent_20);
|
|
69400
69539
|
});
|
|
69401
|
-
var
|
|
69402
|
-
var button_11 = child(
|
|
69540
|
+
var div_12 = sibling(node_22, 2);
|
|
69541
|
+
var button_11 = child(div_12);
|
|
69403
69542
|
var button_12 = sibling(button_11, 2);
|
|
69404
|
-
var
|
|
69543
|
+
var text_18 = child(button_12);
|
|
69405
69544
|
reset(button_12);
|
|
69406
69545
|
var button_13 = sibling(button_12, 2);
|
|
69407
69546
|
var button_14 = sibling(button_13, 4);
|
|
69408
|
-
reset(
|
|
69409
|
-
ContextMenu(sibling(
|
|
69547
|
+
reset(div_12);
|
|
69548
|
+
ContextMenu(sibling(div_12, 2), {
|
|
69410
69549
|
get x() {
|
|
69411
69550
|
return get(ctxMenuX);
|
|
69412
69551
|
},
|
|
@@ -69440,12 +69579,12 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69440
69579
|
onaction: handleContextMenuAction
|
|
69441
69580
|
});
|
|
69442
69581
|
template_effect(($0, $1) => {
|
|
69443
|
-
set_text(
|
|
69444
|
-
set_text(
|
|
69445
|
-
set_text(
|
|
69446
|
-
set_text(
|
|
69447
|
-
set_text(
|
|
69448
|
-
set_text(
|
|
69582
|
+
set_text(text_9, `Zoom: ${$0 !== null && $0 !== void 0 ? $0 : ""}%`);
|
|
69583
|
+
set_text(text_10, `${get(showGrid) ? "▦" : "▢"} Grid`);
|
|
69584
|
+
set_text(text_11, `${get(currentSnapToGrid) ? "🧲" : "↔"} Snap`);
|
|
69585
|
+
set_text(text_12, `${get(showFurniture) ? "🪑" : "👻"} Furniture`);
|
|
69586
|
+
set_text(text_13, `${get(showRulers) ? "📏" : "📐"} Rulers`);
|
|
69587
|
+
set_text(text_18, `${$1 !== null && $1 !== void 0 ? $1 : ""}%`);
|
|
69449
69588
|
}, [() => Math.round(get(zoom) * 100), () => Math.round(get(zoom) * 100)]);
|
|
69450
69589
|
delegated("click", button, () => zoomToFit());
|
|
69451
69590
|
delegated("click", button_1, () => set(showGrid, !get(showGrid)));
|
|
@@ -69477,8 +69616,8 @@ function FloorPlanCanvas($$anchor, $$props) {
|
|
|
69477
69616
|
delegated("click", button_14, () => zoomToFit());
|
|
69478
69617
|
append($$anchor, fragment);
|
|
69479
69618
|
};
|
|
69480
|
-
if_block(
|
|
69481
|
-
if (!$$props.viewOnly) $$render(
|
|
69619
|
+
if_block(node_1, ($$render) => {
|
|
69620
|
+
if (!$$props.viewOnly) $$render(consequent_21);
|
|
69482
69621
|
});
|
|
69483
69622
|
reset(div);
|
|
69484
69623
|
template_effect(($0) => {
|
|
@@ -70475,33 +70614,6 @@ function OnboardingTooltip($$anchor, $$props) {
|
|
|
70475
70614
|
}
|
|
70476
70615
|
delegate(["click"]);
|
|
70477
70616
|
//#endregion
|
|
70478
|
-
//#region src/lib/packageDefaults.ts
|
|
70479
|
-
var DEFAULT_CONFIG = {
|
|
70480
|
-
viewOnly: false,
|
|
70481
|
-
floorMaxWidth: 600,
|
|
70482
|
-
floorMaxHeight: 400,
|
|
70483
|
-
heatmapEnabled: false,
|
|
70484
|
-
heatmapMatrix: []
|
|
70485
|
-
};
|
|
70486
|
-
function normalizeConfig(value) {
|
|
70487
|
-
if (!value || typeof value !== "object") return { ...DEFAULT_CONFIG };
|
|
70488
|
-
return {
|
|
70489
|
-
...DEFAULT_CONFIG,
|
|
70490
|
-
...value
|
|
70491
|
-
};
|
|
70492
|
-
}
|
|
70493
|
-
function normalizeFloorData(data) {
|
|
70494
|
-
if (!data || typeof data !== "object") return createDefaultProject();
|
|
70495
|
-
if (!Array.isArray(data.floors) || data.floors.length === 0) return createDefaultProject();
|
|
70496
|
-
if (!data.activeFloorId || !data.floors.some((f) => f.id === data.activeFloorId)) return {
|
|
70497
|
-
...createDefaultProject(),
|
|
70498
|
-
...data,
|
|
70499
|
-
floors: data.floors,
|
|
70500
|
-
activeFloorId: data.floors[0].id
|
|
70501
|
-
};
|
|
70502
|
-
return data;
|
|
70503
|
-
}
|
|
70504
|
-
//#endregion
|
|
70505
70617
|
//#region src/App.svelte
|
|
70506
70618
|
init_client();
|
|
70507
70619
|
init_index_client();
|
|
@@ -70527,6 +70639,13 @@ function App($$anchor, $$props) {
|
|
|
70527
70639
|
user_effect(() => {
|
|
70528
70640
|
currentProject.set(normalizeFloorData(get(floorData)));
|
|
70529
70641
|
});
|
|
70642
|
+
user_effect(() => {
|
|
70643
|
+
if (!get(config).projectName) return;
|
|
70644
|
+
currentProject.update((p) => p ? {
|
|
70645
|
+
...p,
|
|
70646
|
+
name: get(config).projectName
|
|
70647
|
+
} : p);
|
|
70648
|
+
});
|
|
70530
70649
|
onMount(() => {
|
|
70531
70650
|
let saveTimeout;
|
|
70532
70651
|
const unsub = currentProject.subscribe((p) => {
|
|
@@ -70541,12 +70660,12 @@ function App($$anchor, $$props) {
|
|
|
70541
70660
|
});
|
|
70542
70661
|
var fragment = root();
|
|
70543
70662
|
event("keydown", $window, (e) => {
|
|
70544
|
-
|
|
70663
|
+
if (isEditableTarget(e)) return;
|
|
70545
70664
|
if (e.key === "p" && (e.ctrlKey || e.metaKey)) {
|
|
70546
70665
|
e.preventDefault();
|
|
70547
70666
|
set(printOpen, true);
|
|
70548
70667
|
}
|
|
70549
|
-
if (e.key === "k" && (e.ctrlKey || e.metaKey) || e.key === "/" && !e.ctrlKey && !e.metaKey
|
|
70668
|
+
if (e.key === "k" && (e.ctrlKey || e.metaKey) || e.key === "/" && !e.ctrlKey && !e.metaKey) {
|
|
70550
70669
|
e.preventDefault();
|
|
70551
70670
|
set(commandPaletteOpen, !get(commandPaletteOpen));
|
|
70552
70671
|
}
|
|
@@ -70555,7 +70674,7 @@ function App($$anchor, $$props) {
|
|
|
70555
70674
|
e.preventDefault();
|
|
70556
70675
|
}
|
|
70557
70676
|
if (e.key === "Escape" && get(showHelp)) set(showHelp, false);
|
|
70558
|
-
if (e.key === "l" && !e.ctrlKey && !e.metaKey && !e.altKey
|
|
70677
|
+
if (e.key === "l" && !e.ctrlKey && !e.metaKey && !e.altKey) set(showLayers, !get(showLayers));
|
|
70559
70678
|
});
|
|
70560
70679
|
var div = first_child(fragment);
|
|
70561
70680
|
var node = child(div);
|
|
@@ -70626,6 +70745,26 @@ function App($$anchor, $$props) {
|
|
|
70626
70745
|
var _$$get6;
|
|
70627
70746
|
return (_$$get6 = get(config)) === null || _$$get6 === void 0 ? void 0 : _$$get6.heatmapEnabled;
|
|
70628
70747
|
});
|
|
70748
|
+
let $5 = /* @__PURE__ */ user_derived(() => {
|
|
70749
|
+
var _$$get7;
|
|
70750
|
+
return (_$$get7 = get(config)) === null || _$$get7 === void 0 ? void 0 : _$$get7.projectName;
|
|
70751
|
+
});
|
|
70752
|
+
let $6 = /* @__PURE__ */ user_derived(() => {
|
|
70753
|
+
var _$$get8;
|
|
70754
|
+
return (_$$get8 = get(config)) === null || _$$get8 === void 0 ? void 0 : _$$get8.selectedCameraSerial;
|
|
70755
|
+
});
|
|
70756
|
+
let $7 = /* @__PURE__ */ user_derived(() => {
|
|
70757
|
+
var _$$get9;
|
|
70758
|
+
return (_$$get9 = get(config)) === null || _$$get9 === void 0 ? void 0 : _$$get9.showCameraCones;
|
|
70759
|
+
});
|
|
70760
|
+
let $8 = /* @__PURE__ */ user_derived(() => {
|
|
70761
|
+
var _$$get10;
|
|
70762
|
+
return (_$$get10 = get(config)) === null || _$$get10 === void 0 ? void 0 : _$$get10.showCameraLabels;
|
|
70763
|
+
});
|
|
70764
|
+
let $9 = /* @__PURE__ */ user_derived(() => {
|
|
70765
|
+
var _$$get11;
|
|
70766
|
+
return (_$$get11 = get(config)) === null || _$$get11 === void 0 ? void 0 : _$$get11.cameraHeatmapMatrix;
|
|
70767
|
+
});
|
|
70629
70768
|
FloorPlanCanvas(node_3, {
|
|
70630
70769
|
get viewOnly() {
|
|
70631
70770
|
return get($0);
|
|
@@ -70641,6 +70780,21 @@ function App($$anchor, $$props) {
|
|
|
70641
70780
|
},
|
|
70642
70781
|
get heatmapEnabled() {
|
|
70643
70782
|
return get($4);
|
|
70783
|
+
},
|
|
70784
|
+
get projectName() {
|
|
70785
|
+
return get($5);
|
|
70786
|
+
},
|
|
70787
|
+
get selectedCameraSerial() {
|
|
70788
|
+
return get($6);
|
|
70789
|
+
},
|
|
70790
|
+
get showCameraCones() {
|
|
70791
|
+
return get($7);
|
|
70792
|
+
},
|
|
70793
|
+
get showCameraLabels() {
|
|
70794
|
+
return get($8);
|
|
70795
|
+
},
|
|
70796
|
+
get cameraHeatmapMatrix() {
|
|
70797
|
+
return get($9);
|
|
70644
70798
|
}
|
|
70645
70799
|
});
|
|
70646
70800
|
}
|