blue-chestnut-solar-expert 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2703,20 +2703,20 @@ const MapDraw = class {
2703
2703
  render() {
2704
2704
  const t = getLanguageStrings(state.settings.language);
2705
2705
  const currentPolygon = this.getCurrentPolygon();
2706
- return (h("div", { key: 'c909d5a97064fa3cdd6dc523a6fc008ae0f4eb4b', class: "flex flex-col justify-center items-center w-full h-full gap-4", id: "map-draw" }, this.showInstructions && (h("div", { key: '641af22702eb5ccb98618e030eda43981571aa77', class: "w-full rounded-4xl p-4 bg-gray-200" }, t.mapDraw.instructions.parts.roof, " ", h("button", { key: '79a81eb26eacf2f1e4a6d321a18b1bd447cd9d49', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(roofTool) }, h("icon-selector", { key: 'da51a5883548acd60780fe30c078ce83099e6e7b', name: "house", inline: true })), " ", t.mapDraw.instructions.parts.obstruction, " ", h("button", { key: '8af6583c912e19df892668517f40c8d01faf25bd', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(obstructionTool) }, h("icon-selector", { key: '23f2535939ccd6d999555f43e821d8bcfe94cd8c', name: "octagon-minus", inline: true })), " ", t.mapDraw.instructions.parts.delete, " ", h("button", { key: '66fb9e4abdf08f79b6f41e2589a5b418270761e4', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(deleteTool) }, h("icon-selector", { key: '400060c953b30e505dccebd6ad4cc0b1071649ec', name: "eraser", inline: true })), " ", t.mapDraw.instructions.parts.move, " ", h("button", { key: 'a2c2f661617531ea412e727d916339a33847717c', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(moveTool) }, h("icon-selector", { key: '13e116507cf81879b2586ba3ba67255f94551471', name: "move", inline: true })), " ", t.mapDraw.instructions.parts.end)), h("div", { key: 'e0cb25c8b6a5fd36bcfb45d4280f8b917e2b7c22', class: "w-full flex flex-row justify-between items-center" }, this.showInstructions
2707
- ? (h("button", { class: "px-4 py-2 rounded-4xl hover:bg-gray-300 transition-colors duration-200 bg-gray-200 p-4", onClick: () => this.showInstructions = false }, t.mapDraw.instructions.hide))
2708
- : (h("button", { class: "px-4 py-2 rounded-4xl hover:bg-gray-300 transition-colors duration-200 bg-gray-200 p-4", onClick: () => this.showInstructions = true }, t.mapDraw.instructions.show)), h("button", { key: '2aa25808ea6cb6dff23e6263c7e45ab58f3f7c9a', class: "flex items-center gap-2 bg-gray-200 p-2 rounded-4xl hover:bg-gray-300", onClick: this.handleSettingsClick }, h("settings-icon", { key: '381cb1f71d747b24789f18a5b6748501ca4fedf7' }))), h("div", { key: 'ca71cd7101699222dd8846f1d85a62c8d7c69a09', class: "w-full" }, h("tool-box", { key: '78b769b0fdcc0cffefe9a75cbc031e3a24d5c054', currentTool: this.currentTool, onToolSelect: (tool) => this.handleToolSelect(tool) })), this.loadingState === "empty" && (h("div", { key: '91e13a71d1a471116073858fef6b544ceecb90a7', class: "w-full" }, h("p", { key: '8e6531b9cee50da1bceb9961e7ffa152efd1c2c7', class: "text-white text-center flex items-center justify-center rounded-4xl p-4 w-full", style: {
2706
+ return (h("div", { key: 'd07de924756053a22246dfe365cb9a3e4d804e14', class: "flex flex-col justify-center items-center w-full h-full gap-4", id: "map-draw" }, this.showInstructions && (h("div", { key: '35da1ca1f6c6ecb2b5f9ac8200fd1d375c4b3e39', class: "w-full rounded-4xl p-4 bg-white" }, t.mapDraw.instructions.parts.roof, " ", h("button", { key: '7a091abdbc451b86b0386744fabb407f93d280d7', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(roofTool) }, h("icon-selector", { key: '5072d7cb08b0338667a5cc32cd217919d570babb', name: "house", inline: true })), " ", t.mapDraw.instructions.parts.obstruction, " ", h("button", { key: '7ef36ac3d64c8cc50dcf716bc9501fe291fca64e', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(obstructionTool) }, h("icon-selector", { key: '46ea7197bb95ad6b5d5863847e6250b94a9efe38', name: "octagon-minus", inline: true })), " ", t.mapDraw.instructions.parts.delete, " ", h("button", { key: '4988fd2d6183c360305e6987b5928e72fc099a53', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(deleteTool) }, h("icon-selector", { key: '9dc9aa801e6c2013495894c96c18a4e4c586a503', name: "eraser", inline: true })), " ", t.mapDraw.instructions.parts.move, " ", h("button", { key: '71f92584748cc7d80fa98f89ee30aad2f34ef708', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-gray-300 transition-colors", onClick: () => this.handleToolSelect(moveTool) }, h("icon-selector", { key: 'd46e966016652a8d1ec5f9ab32254b9f1d5c783f', name: "move", inline: true })), " ", t.mapDraw.instructions.parts.end)), h("div", { key: 'e482db8518551447d2de2e01ca55dc9610ffc19e', class: "w-full flex flex-row justify-between items-center" }, this.showInstructions
2707
+ ? (h("button", { class: "px-4 py-2 rounded-4xl hover:bg-gray-300 transition-colors duration-200 bg-white p-4", onClick: () => this.showInstructions = false }, t.mapDraw.instructions.hide))
2708
+ : (h("button", { class: "px-4 py-2 rounded-4xl hover:bg-gray-300 transition-colors duration-200 bg-white p-4", onClick: () => this.showInstructions = true }, t.mapDraw.instructions.show)), h("button", { key: 'c58a7cdcb0b00ffe477add863e6f57ab07da9d4e', class: "flex items-center gap-2 bg-white p-2 rounded-4xl hover:bg-gray-300", onClick: this.handleSettingsClick }, h("settings-icon", { key: 'a3b876e00784f02eaafea25491a361f9da42b966' }))), h("div", { key: 'd0daea2194a023ddbe3884d720575f959ef6afb2', class: "w-full" }, h("tool-box", { key: '3f573a87ebc0b57f340a74a2a0ad67d9e5ba3f89', currentTool: this.currentTool, onToolSelect: (tool) => this.handleToolSelect(tool) })), this.loadingState === "empty" && (h("div", { key: '779841f8febd6e97385b57847724881c37d353b0', class: "w-full" }, h("p", { key: '6f1b56ef9d898530de16d8431adc678b9ec0340f', class: "text-white text-center flex items-center justify-center rounded-4xl p-4 w-full", style: {
2709
2709
  backgroundColor: "rgba(0, 0, 0, 0.5)",
2710
2710
  } }, t.mapDraw.noAddressSelected))), (state.latitude && state.longitude &&
2711
- this.loadingState === "loading") && (h("div", { key: '2e2d05625bc659290b1b1218a3328184cb1d190c', class: "flex items-center justify-center w-full bg-opacity-75 z-20 pt-7 rounded-4xl" }, h("div", { key: 'c563ceb1e938387ff7016af6f8660adcfa66b48a', class: "animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-[#271200]" }))), h("div", { key: '8010ef992b5dda62db8591763192635a7da932f1', class: "flex items-start justify-center h-full w-full bg-[#f3ebda] rounded-4xl" }, h("div", { key: 'ddf26061fcb2a5f3823b63f49b2de7a0f1e2ff0e', class: "relative h-full flex items-center justify-center w-full rounded-4xl bg-[#271200]", style: {
2711
+ this.loadingState === "loading") && (h("div", { key: '1c6a9efd98acf4ef17b0c2895b1bf099c2f71ba6', class: "flex items-center justify-center w-full bg-opacity-75 z-20 pt-7 rounded-4xl" }, h("div", { key: '5f37f48a3d88c51b40870341ecfd2fc27df55148', class: "animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-[#271200]" }))), h("div", { key: '0a016b607d2ee950d1e79b4fd02e5bb62e6172cc', class: "flex items-start justify-center h-full w-full bg-[#f3ebda] rounded-4xl" }, h("div", { key: '2befcf578ecc366bdf7ac03d5b01512e96973e44', class: "relative h-full flex items-center justify-center w-full rounded-4xl bg-[#271200]", style: {
2712
2712
  aspectRatio: this.rgbTiff
2713
2713
  ? `${this.rgbTiff.width}/${this.rgbTiff.height}`
2714
2714
  : "1/1",
2715
- } }, h("canvas", { key: 'e1c0ffea0cb39f162ca27485edbaf281815cd2be', ref: (el) => this.canvasElement = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", id: "map-draw-canvas", style: {
2715
+ } }, h("canvas", { key: '6084cc3040923ec095f2b633d82d993c1ec8a63d', ref: (el) => this.canvasElement = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", id: "map-draw-canvas", style: {
2716
2716
  cursor: this.currentTool.cursor,
2717
- } }), h("canvas", { key: '9ff7b430103952c506b396172533ca8ce2b1e6d6', ref: (el) => this.polygonCanvas = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", style: {
2717
+ } }), h("canvas", { key: '81d60c93c923b80494b6efaa231c192a308d618b', ref: (el) => this.polygonCanvas = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", style: {
2718
2718
  cursor: this.currentTool.cursor,
2719
- } }), currentPolygon?.details && (h("button", { key: 'e7af501bb2da5ab3509735f380be0f3d97b26df9', class: "absolute bottom-4 right-4 px-4 py-2 bg-[#f3ebda] rounded-4xl hover:bg-[#ffffff] text-[#271200] transition-colors duration-200 z-10 text-xs", onClick: () => this.calculateSolarPanels() }, t.mapDraw.calculateSolarPanels)))), h("div", { key: 'ed39eb99efc16e95cda1e962501046e2e43c2d40', class: "flex gap-4 flex-row justify-center items-center w-full" }, h("div", { key: '977fdd5926a658290ef3f90be1e7e50f140c238b', class: "w-full bg-[#f3ebda] rounded-4xl p-4" }, h("h3", { key: '7353723050d99e4afbc6a44ef6297bc708b36890', class: "text-lg font-semibold mb-4 text-center" }, t.mapDraw.information), currentPolygon?.details
2719
+ } }), currentPolygon?.details && (h("button", { key: 'f2f4c937f2fa739d4583cd14bc1d34e849f750cb', class: "absolute bottom-4 right-4 px-4 py-2 bg-[#f3ebda] rounded-4xl hover:bg-[#ffffff] text-[#271200] transition-colors duration-200 z-10 text-xs", onClick: () => this.calculateSolarPanels() }, t.mapDraw.calculateSolarPanels)))), h("div", { key: '5cc85ab4ac0d0d471f56f423b688eb6417bd9690', class: "flex gap-4 flex-row justify-center items-center w-full" }, h("div", { key: '4baafe4af834391336049f22d5270c8a10e210c3', class: "w-full bg-[#f3ebda] rounded-4xl p-4" }, h("h3", { key: '9e29671cbac1b52359772a71af0a79159d3493e7', class: "text-lg font-semibold mb-4 text-center" }, t.mapDraw.information), currentPolygon?.details
2720
2720
  ? (h("div", { class: "space-y-4" }, h("div", null, h("div", { class: "grid grid-cols-2 gap-2" }, h("div", null, h("h4", { class: "text-sm font-medium text-gray-600" }, t.mapDraw.area), h("p", { class: "text-lg" }, currentPolygon.details
2721
2721
  ?.area
2722
2722
  .toFixed(2), " m\u00B2")), h("div", null, h("div", null, h("h4", { class: "text-sm font-medium text-gray-600" }, t.mapDraw.panels), h("p", { class: "text-lg" }, this
@@ -2768,7 +2768,7 @@ const MapDraw = class {
2768
2768
  this.calculateSolarPanels();
2769
2769
  }
2770
2770
  } }))))
2771
- : (h("p", { class: "text-gray-500 text-center" }, t.mapDraw.noPolygonSelected)))), h("div", { key: '07fc3f8cbfd49df5ba7b6d895e3249ec457cc374', class: "w-full" }, h("solar-system-form", { key: '70a316f21e5149b50fa52fb5466c4b0828a0418a', systemConfigs: this.roofPolygonsSolarPanels, roofPolygons: this.roofPolygons, obstructionPolygons: this.obstructionPolygons })), this.showSettings && (h("settings-modal", { key: '5a82362108a124f2854b05687a992c587a150d75', settings: state.settings, onClose: this.handleSettingsClose, onSave: this.handleSettingsSave }))));
2771
+ : (h("p", { class: "text-gray-500 text-center" }, t.mapDraw.noPolygonSelected)))), h("div", { key: '5d0dde89de88f0b3609bc262a1d78e436f25c0fb', class: "w-full" }, h("solar-system-form", { key: '8883ac75cd7fcb32724bd72b5a9f6638c03052a4', systemConfigs: this.roofPolygonsSolarPanels, roofPolygons: this.roofPolygons, obstructionPolygons: this.obstructionPolygons })), this.showSettings && (h("settings-modal", { key: '00c8a929cdc1eb0bc05c5805986135bcebceea2d', settings: state.settings, onClose: this.handleSettingsClose, onSave: this.handleSettingsSave }))));
2772
2772
  }
2773
2773
  static get watchers() { return {
2774
2774
  "rgbTiff": ["drawMap"],