blue-chestnut-solar-expert 0.0.32 → 0.0.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/cjs/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.cjs.js.map +1 -1
  2. package/dist/cjs/eraser-icon_16.cjs.entry.js +117 -61
  3. package/dist/cjs/eraser-icon_16.cjs.entry.js.map +1 -1
  4. package/dist/collection/components/map-draw/map-draw.js +7 -7
  5. package/dist/collection/components/map-draw/map-draw.js.map +1 -1
  6. package/dist/collection/components/solar-expert/solar-expert.js +12 -4
  7. package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
  8. package/dist/collection/components/solar-system-form/solar-system-form.js +35 -25
  9. package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
  10. package/dist/collection/config.js +31 -0
  11. package/dist/collection/config.js.map +1 -1
  12. package/dist/collection/utils/theme.js +34 -26
  13. package/dist/collection/utils/theme.js.map +1 -1
  14. package/dist/components/map-draw.js +1 -1
  15. package/dist/components/{p-r9wMCtI3.js → p-ClYOM_0b.js} +10 -10
  16. package/dist/components/{p-r9wMCtI3.js.map → p-ClYOM_0b.js.map} +1 -1
  17. package/dist/components/{p-ao6bHDbv.js → p-CrzEBN9H.js} +69 -28
  18. package/dist/components/p-CrzEBN9H.js.map +1 -0
  19. package/dist/components/solar-expert.js +46 -31
  20. package/dist/components/solar-expert.js.map +1 -1
  21. package/dist/components/solar-system-form.js +1 -1
  22. package/dist/esm/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.js.map +1 -1
  23. package/dist/esm/eraser-icon_16.entry.js +117 -61
  24. package/dist/esm/eraser-icon_16.entry.js.map +1 -1
  25. package/dist/stencil-library/eraser-icon.house-icon.icon-selector.map-draw.map-selector.move-icon.octagon-minus-icon.polygon-buttons.polygon-information.search-icon.settings-icon.settings-modal.solar-expert.solar-system-form.tool-box.undo-icon.entry.esm.js.map +1 -1
  26. package/dist/stencil-library/p-3d7da486.entry.js +2 -0
  27. package/dist/stencil-library/p-3d7da486.entry.js.map +1 -0
  28. package/dist/stencil-library/stencil-library.esm.js +1 -1
  29. package/dist/types/config.d.ts +1 -0
  30. package/dist/types/utils/theme.d.ts +7 -0
  31. package/package.json +1 -1
  32. package/dist/components/p-ao6bHDbv.js.map +0 -1
  33. package/dist/stencil-library/p-141320bb.entry.js +0 -2
  34. package/dist/stencil-library/p-141320bb.entry.js.map +0 -1
@@ -6,84 +6,92 @@
6
6
  * @param colorScheme - The color scheme object containing theme colors
7
7
  */
8
8
  export function applyThemeGlobally(colorScheme) {
9
- const documentElement = document.documentElement;
10
- // Set CSS custom properties on the document root
9
+ applyThemeToElement(document.documentElement, colorScheme);
10
+ }
11
+ /**
12
+ * Applies a color scheme theme to a specific element (useful for Shadow DOM).
13
+ *
14
+ * @param element - The element to apply the theme to (e.g., Shadow DOM host)
15
+ * @param colorScheme - The color scheme object containing theme colors
16
+ */
17
+ export function applyThemeToElement(element, colorScheme) {
18
+ // Set CSS custom properties on the specified element
11
19
  if (colorScheme.primary) {
12
- documentElement.style.setProperty('--color-primary', colorScheme.primary);
20
+ element.style.setProperty('--color-primary', colorScheme.primary);
13
21
  }
14
22
  if (colorScheme.primaryForeground) {
15
- documentElement.style.setProperty('--color-primary-foreground', colorScheme.primaryForeground);
23
+ element.style.setProperty('--color-primary-foreground', colorScheme.primaryForeground);
16
24
  }
17
25
  if (colorScheme.secondary) {
18
- documentElement.style.setProperty('--color-secondary', colorScheme.secondary);
26
+ element.style.setProperty('--color-secondary', colorScheme.secondary);
19
27
  }
20
28
  if (colorScheme.secondaryForeground) {
21
- documentElement.style.setProperty('--color-secondary-foreground', colorScheme.secondaryForeground);
29
+ element.style.setProperty('--color-secondary-foreground', colorScheme.secondaryForeground);
22
30
  }
23
31
  if (colorScheme.tertiary) {
24
- documentElement.style.setProperty('--color-tertiary', colorScheme.tertiary);
32
+ element.style.setProperty('--color-tertiary', colorScheme.tertiary);
25
33
  }
26
34
  if (colorScheme.tertiaryForeground) {
27
- documentElement.style.setProperty('--color-tertiary-foreground', colorScheme.tertiaryForeground);
35
+ element.style.setProperty('--color-tertiary-foreground', colorScheme.tertiaryForeground);
28
36
  }
29
37
  if (colorScheme.muted) {
30
- documentElement.style.setProperty('--color-muted', colorScheme.muted);
38
+ element.style.setProperty('--color-muted', colorScheme.muted);
31
39
  }
32
40
  if (colorScheme.mutedForeground) {
33
- documentElement.style.setProperty('--color-muted-foreground', colorScheme.mutedForeground);
41
+ element.style.setProperty('--color-muted-foreground', colorScheme.mutedForeground);
34
42
  }
35
43
  if (colorScheme.error) {
36
- documentElement.style.setProperty('--color-error', colorScheme.error);
44
+ element.style.setProperty('--color-error', colorScheme.error);
37
45
  }
38
46
  if (colorScheme.errorForeground) {
39
- documentElement.style.setProperty('--color-error-foreground', colorScheme.errorForeground);
47
+ element.style.setProperty('--color-error-foreground', colorScheme.errorForeground);
40
48
  }
41
49
  // Surface colors
42
50
  if (colorScheme.surface) {
43
- documentElement.style.setProperty('--color-surface', colorScheme.surface);
51
+ element.style.setProperty('--color-surface', colorScheme.surface);
44
52
  }
45
53
  if (colorScheme.surfaceHover) {
46
- documentElement.style.setProperty('--color-surface-hover', colorScheme.surfaceHover);
54
+ element.style.setProperty('--color-surface-hover', colorScheme.surfaceHover);
47
55
  }
48
56
  if (colorScheme.surfaceActive) {
49
- documentElement.style.setProperty('--color-surface-active', colorScheme.surfaceActive);
57
+ element.style.setProperty('--color-surface-active', colorScheme.surfaceActive);
50
58
  }
51
59
  // Text colors
52
60
  if (colorScheme.textMuted) {
53
- documentElement.style.setProperty('--color-text-muted', colorScheme.textMuted);
61
+ element.style.setProperty('--color-text-muted', colorScheme.textMuted);
54
62
  }
55
63
  if (colorScheme.textSecondary) {
56
- documentElement.style.setProperty('--color-text-secondary', colorScheme.textSecondary);
64
+ element.style.setProperty('--color-text-secondary', colorScheme.textSecondary);
57
65
  }
58
66
  if (colorScheme.textPlaceholder) {
59
- documentElement.style.setProperty('--color-text-placeholder', colorScheme.textPlaceholder);
67
+ element.style.setProperty('--color-text-placeholder', colorScheme.textPlaceholder);
60
68
  }
61
69
  // Border colors
62
70
  if (colorScheme.border) {
63
- documentElement.style.setProperty('--color-border', colorScheme.border);
71
+ element.style.setProperty('--color-border', colorScheme.border);
64
72
  }
65
73
  if (colorScheme.borderLight) {
66
- documentElement.style.setProperty('--color-border-light', colorScheme.borderLight);
74
+ element.style.setProperty('--color-border-light', colorScheme.borderLight);
67
75
  }
68
76
  // Status colors
69
77
  if (colorScheme.success) {
70
- documentElement.style.setProperty('--color-success', colorScheme.success);
78
+ element.style.setProperty('--color-success', colorScheme.success);
71
79
  }
72
80
  if (colorScheme.info) {
73
- documentElement.style.setProperty('--color-info', colorScheme.info);
81
+ element.style.setProperty('--color-info', colorScheme.info);
74
82
  }
75
83
  // Interactive colors
76
84
  if (colorScheme.hover) {
77
- documentElement.style.setProperty('--color-hover', colorScheme.hover);
85
+ element.style.setProperty('--color-hover', colorScheme.hover);
78
86
  }
79
87
  if (colorScheme.hoverDark) {
80
- documentElement.style.setProperty('--color-hover-dark', colorScheme.hoverDark);
88
+ element.style.setProperty('--color-hover-dark', colorScheme.hoverDark);
81
89
  }
82
90
  if (colorScheme.overlay) {
83
- documentElement.style.setProperty('--color-overlay', colorScheme.overlay);
91
+ element.style.setProperty('--color-overlay', colorScheme.overlay);
84
92
  }
85
93
  if (colorScheme.tooltip) {
86
- documentElement.style.setProperty('--color-tooltip', colorScheme.tooltip);
94
+ element.style.setProperty('--color-tooltip', colorScheme.tooltip);
87
95
  }
88
96
  }
89
97
  //# sourceMappingURL=theme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js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root.\r\n * Since all components use global CSS (shadow: false), this will automatically \r\n * update the theme for all components.\r\n * \r\n * @param colorScheme - The color scheme object containing theme colors\r\n */\r\nexport function applyThemeGlobally(colorScheme: Partial<ColorScheme>): void {\r\n const documentElement = document.documentElement;\r\n \r\n // Set CSS custom properties on the document root\r\n if (colorScheme.primary) {\r\n documentElement.style.setProperty('--color-primary', colorScheme.primary);\r\n }\r\n if (colorScheme.primaryForeground) {\r\n documentElement.style.setProperty('--color-primary-foreground', colorScheme.primaryForeground);\r\n }\r\n if (colorScheme.secondary) {\r\n documentElement.style.setProperty('--color-secondary', colorScheme.secondary);\r\n }\r\n if (colorScheme.secondaryForeground) {\r\n documentElement.style.setProperty('--color-secondary-foreground', colorScheme.secondaryForeground);\r\n }\r\n if (colorScheme.tertiary) {\r\n documentElement.style.setProperty('--color-tertiary', colorScheme.tertiary);\r\n }\r\n if (colorScheme.tertiaryForeground) {\r\n documentElement.style.setProperty('--color-tertiary-foreground', colorScheme.tertiaryForeground);\r\n }\r\n if (colorScheme.muted) {\r\n documentElement.style.setProperty('--color-muted', colorScheme.muted);\r\n }\r\n if (colorScheme.mutedForeground) { \r\n documentElement.style.setProperty('--color-muted-foreground', colorScheme.mutedForeground);\r\n }\r\n if (colorScheme.error) {\r\n documentElement.style.setProperty('--color-error', colorScheme.error);\r\n }\r\n if (colorScheme.errorForeground) {\r\n documentElement.style.setProperty('--color-error-foreground', colorScheme.errorForeground);\r\n }\r\n \r\n // Surface colors\r\n if (colorScheme.surface) {\r\n documentElement.style.setProperty('--color-surface', colorScheme.surface);\r\n }\r\n if (colorScheme.surfaceHover) {\r\n documentElement.style.setProperty('--color-surface-hover', colorScheme.surfaceHover);\r\n }\r\n if (colorScheme.surfaceActive) {\r\n documentElement.style.setProperty('--color-surface-active', colorScheme.surfaceActive);\r\n }\r\n \r\n // Text colors\r\n if (colorScheme.textMuted) {\r\n documentElement.style.setProperty('--color-text-muted', colorScheme.textMuted);\r\n }\r\n if (colorScheme.textSecondary) {\r\n documentElement.style.setProperty('--color-text-secondary', colorScheme.textSecondary);\r\n }\r\n if (colorScheme.textPlaceholder) {\r\n documentElement.style.setProperty('--color-text-placeholder', colorScheme.textPlaceholder);\r\n }\r\n \r\n // Border colors\r\n if (colorScheme.border) {\r\n documentElement.style.setProperty('--color-border', colorScheme.border);\r\n }\r\n if (colorScheme.borderLight) {\r\n documentElement.style.setProperty('--color-border-light', colorScheme.borderLight);\r\n }\r\n \r\n // Status colors\r\n if (colorScheme.success) {\r\n documentElement.style.setProperty('--color-success', colorScheme.success);\r\n }\r\n if (colorScheme.info) {\r\n documentElement.style.setProperty('--color-info', colorScheme.info);\r\n }\r\n \r\n // Interactive colors\r\n if (colorScheme.hover) {\r\n documentElement.style.setProperty('--color-hover', colorScheme.hover);\r\n }\r\n if (colorScheme.hoverDark) {\r\n documentElement.style.setProperty('--color-hover-dark', colorScheme.hoverDark);\r\n }\r\n if (colorScheme.overlay) {\r\n documentElement.style.setProperty('--color-overlay', colorScheme.overlay);\r\n }\r\n if (colorScheme.tooltip) {\r\n documentElement.style.setProperty('--color-tooltip', colorScheme.tooltip);\r\n }\r\n}"]}
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAiC;IAChE,mBAAmB,CAAC,QAAQ,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;AAC/D,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAoB,EAAE,WAAiC;IACvF,qDAAqD;IACrD,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,WAAW,CAAC,iBAAiB,EAAE,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,4BAA4B,EAAE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,OAAO,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC;QACnB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,cAAc,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;IAChE,CAAC;IAED,qBAAqB;IACrB,IAAI,WAAW,CAAC,KAAK,EAAE,CAAC;QACpB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,eAAe,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IACD,IAAI,WAAW,CAAC,SAAS,EAAE,CAAC;QACxB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,oBAAoB,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAC3E,CAAC;IACD,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;QACtB,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,iBAAiB,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACtE,CAAC;AACL,CAAC","sourcesContent":["import { ColorScheme } from \"../config\";\r\n\r\n/**\r\n * Applies a color scheme theme globally to the document root.\r\n * Since all components use global CSS (shadow: false), this will automatically \r\n * update the theme for all components.\r\n * \r\n * @param colorScheme - The color scheme object containing theme colors\r\n */\r\nexport function applyThemeGlobally(colorScheme: Partial<ColorScheme>): void {\r\n applyThemeToElement(document.documentElement, colorScheme);\r\n}\r\n\r\n/**\r\n * Applies a color scheme theme to a specific element (useful for Shadow DOM).\r\n * \r\n * @param element - The element to apply the theme to (e.g., Shadow DOM host)\r\n * @param colorScheme - The color scheme object containing theme colors\r\n */\r\nexport function applyThemeToElement(element: HTMLElement, colorScheme: Partial<ColorScheme>): void {\r\n // Set CSS custom properties on the specified element\r\n if (colorScheme.primary) {\r\n element.style.setProperty('--color-primary', colorScheme.primary);\r\n }\r\n if (colorScheme.primaryForeground) {\r\n element.style.setProperty('--color-primary-foreground', colorScheme.primaryForeground);\r\n }\r\n if (colorScheme.secondary) {\r\n element.style.setProperty('--color-secondary', colorScheme.secondary);\r\n }\r\n if (colorScheme.secondaryForeground) {\r\n element.style.setProperty('--color-secondary-foreground', colorScheme.secondaryForeground);\r\n }\r\n if (colorScheme.tertiary) {\r\n element.style.setProperty('--color-tertiary', colorScheme.tertiary);\r\n }\r\n if (colorScheme.tertiaryForeground) {\r\n element.style.setProperty('--color-tertiary-foreground', colorScheme.tertiaryForeground);\r\n }\r\n if (colorScheme.muted) {\r\n element.style.setProperty('--color-muted', colorScheme.muted);\r\n }\r\n if (colorScheme.mutedForeground) { \r\n element.style.setProperty('--color-muted-foreground', colorScheme.mutedForeground);\r\n }\r\n if (colorScheme.error) {\r\n element.style.setProperty('--color-error', colorScheme.error);\r\n }\r\n if (colorScheme.errorForeground) {\r\n element.style.setProperty('--color-error-foreground', colorScheme.errorForeground);\r\n }\r\n \r\n // Surface colors\r\n if (colorScheme.surface) {\r\n element.style.setProperty('--color-surface', colorScheme.surface);\r\n }\r\n if (colorScheme.surfaceHover) {\r\n element.style.setProperty('--color-surface-hover', colorScheme.surfaceHover);\r\n }\r\n if (colorScheme.surfaceActive) {\r\n element.style.setProperty('--color-surface-active', colorScheme.surfaceActive);\r\n }\r\n \r\n // Text colors\r\n if (colorScheme.textMuted) {\r\n element.style.setProperty('--color-text-muted', colorScheme.textMuted);\r\n }\r\n if (colorScheme.textSecondary) {\r\n element.style.setProperty('--color-text-secondary', colorScheme.textSecondary);\r\n }\r\n if (colorScheme.textPlaceholder) {\r\n element.style.setProperty('--color-text-placeholder', colorScheme.textPlaceholder);\r\n }\r\n \r\n // Border colors\r\n if (colorScheme.border) {\r\n element.style.setProperty('--color-border', colorScheme.border);\r\n }\r\n if (colorScheme.borderLight) {\r\n element.style.setProperty('--color-border-light', colorScheme.borderLight);\r\n }\r\n \r\n // Status colors\r\n if (colorScheme.success) {\r\n element.style.setProperty('--color-success', colorScheme.success);\r\n }\r\n if (colorScheme.info) {\r\n element.style.setProperty('--color-info', colorScheme.info);\r\n }\r\n \r\n // Interactive colors\r\n if (colorScheme.hover) {\r\n element.style.setProperty('--color-hover', colorScheme.hover);\r\n }\r\n if (colorScheme.hoverDark) {\r\n element.style.setProperty('--color-hover-dark', colorScheme.hoverDark);\r\n }\r\n if (colorScheme.overlay) {\r\n element.style.setProperty('--color-overlay', colorScheme.overlay);\r\n }\r\n if (colorScheme.tooltip) {\r\n element.style.setProperty('--color-tooltip', colorScheme.tooltip);\r\n }\r\n}"]}
@@ -1,4 +1,4 @@
1
- import { M as MapDraw$1, d as defineCustomElement$1 } from './p-r9wMCtI3.js';
1
+ import { M as MapDraw$1, d as defineCustomElement$1 } from './p-ClYOM_0b.js';
2
2
 
3
3
  const MapDraw = MapDraw$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, h } from './index.js';
2
2
  import { f as fetchSolarData, b as getBuildingImages } from './p-Dw7R29Cg.js';
3
- import { D as DOTTED_LINE_COLOR, C as COLUMN_SPACING, R as ROW_SPACING, d as defineCustomElement$3, a as DEFAULT_SOLAR_EXPERT_CONFIG, b as DEFAULT_SOLAR_PANEL_TYPE, c as DEFAULT_SUNNINESS, B as BORDER_INSET } from './p-ao6bHDbv.js';
3
+ import { a as DOTTED_LINE_COLOR, C as COLUMN_SPACING, R as ROW_SPACING, d as defineCustomElement$3, b as DEFAULT_SOLAR_EXPERT_CONFIG, c as DEFAULT_SOLAR_PANEL_TYPE, e as DEFAULT_SUNNINESS, B as BORDER_INSET } from './p-CrzEBN9H.js';
4
4
  import { d as defineCustomElement$2, r as roofTool, t as tools, o as obstructionTool, m as moveTool, a as markRoofEdgeTool, b as deleteTool } from './p-DMkbzkL_.js';
5
5
  import { l as latLngToPixel, d as defineCustomElement$7, g as getPixelInMeters, c as calculatePolygonArea } from './p-B1ywivYa.js';
6
6
  import { o as onChange, s as state, g as getLanguageStrings } from './p-BLXc1FjC.js';
@@ -1390,22 +1390,22 @@ const MapDraw = /*@__PURE__*/ proxyCustomElement(class MapDraw extends H {
1390
1390
  render() {
1391
1391
  const t = getLanguageStrings(state.settings.language);
1392
1392
  const currentPolygon = this.getCurrentPolygon();
1393
- return (h("div", { key: '8f3ead7eb4acb8b26cf9e8d3a7f9f1cb7027b06b', class: "flex flex-col justify-center items-center w-full h-full gap-4 bg-primary", id: "map-draw" }, this.showInstructions && !state.isMobile && (h("div", { key: '314f035a8f0bc087936041ec1249ddc12d27a43a', class: "w-full rounded-4xl p-4 bg-muted text-muted-foreground" }, t.mapDraw.instructions.parts.roof, " ", h("button", { key: '4b50b9afab6c7bfd180eedab22eaa7aed6346d26', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(roofTool) }, h("icon-selector", { key: '980fb93346b72807638793a711c3adf4f6c60fb8', name: "house", inline: true })), " ", t.mapDraw.instructions.parts.obstruction, " ", h("button", { key: 'c1d0edac8cbb504c8db4c57d6bb078c4c2746cd9', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(obstructionTool) }, h("icon-selector", { key: '12956e51ff2ed628980597746ee4853d93c7d19d', name: "octagon-minus", inline: true })), " ", t.mapDraw.instructions.parts.delete, " ", h("button", { key: 'fc0c507764c04fd1699024c00d708430a2275df1', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(deleteTool) }, h("icon-selector", { key: 'aabac0ddf1c029655accf3f4812219cad3744da5', name: "eraser", inline: true })), " ", t.mapDraw.instructions.parts.move, " ", h("button", { key: '850f0261e7b1da12cc1cc2b81356ece9d8ea1df8', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(moveTool) }, h("icon-selector", { key: 'a25004dca55e42a1e0f13806cdceb95d0f16c8b5', name: "move", inline: true })), " ", t.mapDraw.instructions.parts.end)), h("div", { key: '93e10a821a9d8ad5f6ad8c62bcf56a5c015ba6a3', class: "w-full flex flex-row justify-between items-center" }, !state.isMobile && (this.showInstructions
1393
+ return (h("div", { key: 'ebe7e96014e7ecb78818096b9cb391f07b9d06ec', class: "flex flex-col justify-center items-center w-full h-full gap-4", id: "map-draw" }, this.showInstructions && !state.isMobile && (h("div", { key: '70722b3127cefe195ccc74ab758de6ef8e032fde', class: "w-full rounded-4xl p-4 bg-muted text-muted-foreground" }, t.mapDraw.instructions.parts.roof, " ", h("button", { key: '10761447b11b001d74eb7386bdf0be80d53e091b', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(roofTool) }, h("icon-selector", { key: '4e5ac604551002d38b1c44b35de01c37412c74e6', name: "house", inline: true })), " ", t.mapDraw.instructions.parts.obstruction, " ", h("button", { key: '9dc52e0b6006a10221834c8a9d83234f9db0d319', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(obstructionTool) }, h("icon-selector", { key: '39ab111d5647f9981a5f5f91c45d925d46e3283d', name: "octagon-minus", inline: true })), " ", t.mapDraw.instructions.parts.delete, " ", h("button", { key: '8ad5281af91d5ee5597f957f59cd37027fbd505a', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(deleteTool) }, h("icon-selector", { key: '096b570b0ffa3bda667157d960ed89193a1caa12', name: "eraser", inline: true })), " ", t.mapDraw.instructions.parts.move, " ", h("button", { key: 'f1cbb3cbf71b13be266abdd049c2fd9b89cde715', class: "inline-flex items-center justify-center p-1 rounded-full hover:bg-surface-hover transition-colors", onClick: () => this.handleToolSelect(moveTool) }, h("icon-selector", { key: 'd9c6ba2268ab4a175ec15260f22bb03b19b8255a', name: "move", inline: true })), " ", t.mapDraw.instructions.parts.end)), h("div", { key: '10ac3758660b337a60934def1c9f2f35f36e60c5', class: "w-full flex flex-row justify-between items-center" }, !state.isMobile && (this.showInstructions
1394
1394
  ? (h("button", { class: "px-4 py-2 rounded-4xl hover:bg-surface-hover transition-colors duration-200 bg-muted p-4 text-muted-foreground", onClick: () => this.showInstructions = false }, t.mapDraw.instructions.hide))
1395
- : (h("button", { class: "px-4 py-2 rounded-4xl hover:bg-surface-hover transition-colors duration-200 bg-muted p-4 text-muted-foreground", onClick: () => this.showInstructions = true }, t.mapDraw.instructions.show))), h("button", { key: '7f6ec4e11d855a38563b9bb8d56f6d4c215e78e9', class: "flex items-center gap-2 bg-muted p-2 rounded-4xl hover:bg-surface-hover text-muted-foreground", onClick: this.handleSettingsClick }, h("settings-icon", { key: '34055a481938812d55f65295b045879649f99c35' }))), h("div", { key: '3a4f6caf453ccde75e4a1b80fa1fc78c39c82206', class: "w-full" }, !state.isMobile && (h("tool-box", { key: '6f95e7ace22619ff9472220f8119f4187622060a', currentTool: this.currentTool, onToolSelect: (tool) => this.handleToolSelect(tool), undoCallback: () => this.undo() }))), this.loadingState === "empty" && (h("div", { key: '6849146204c0ce8c9a674e28325f0c98c57dc251', class: "w-full" }, h("p", { key: 'd9b52b653f98f4b2775c1c371d4e3a5f024a0242', class: "text-muted text-center flex items-center justify-center rounded-4xl p-4 w-full bg-text-secondary" }, t.mapDraw.noAddressSelected))), (state.latitude && state.longitude &&
1396
- this.loadingState === "loading") && (h("div", { key: '7507c117e5816158b407b506b2e2280de4979009', class: "flex items-center justify-center w-full bg-opacity-75 z-20 pt-7 rounded-4xl" }, h("div", { key: 'fc8351bd8d0c3f4f18d1ca5a6ed360f6d647c219', class: "animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-secondary" }))), h("div", { key: '6f90d40009a0e8ceba3b94c4bd1b1c2e32962168', class: "flex items-start justify-center h-full w-full bg-primary rounded-4xl" }, h("div", { key: '256ee7feb26d9045312c588888dddc5db72eaeaa', class: "relative h-full flex items-center justify-center w-full rounded-4xl bg-secondary", style: {
1395
+ : (h("button", { class: "px-4 py-2 rounded-4xl hover:bg-surface-hover transition-colors duration-200 bg-muted p-4 text-muted-foreground", onClick: () => this.showInstructions = true }, t.mapDraw.instructions.show))), h("button", { key: 'e88a3957add7e0c36222962266913148020a2dee', class: "flex items-center gap-2 bg-muted p-2 rounded-4xl hover:bg-surface-hover text-muted-foreground", onClick: this.handleSettingsClick }, h("settings-icon", { key: '31df69629e4309e8d95e939a04c2dbba1fbc03ed' }))), h("div", { key: 'f724a52fefacbe5b60bd165de16f56ed345dfd11', class: "w-full" }, !state.isMobile && (h("tool-box", { key: 'd2477fcbd40d1a446f65bc2b42157006dde73acb', currentTool: this.currentTool, onToolSelect: (tool) => this.handleToolSelect(tool), undoCallback: () => this.undo() }))), this.loadingState === "empty" && (h("div", { key: '964f8012fae92090fad9b52f7dd664a7359e4365', class: "w-full" }, h("p", { key: '6adde4c4f3e24ed586f43d3f162f60fa5612bcce', class: "text-muted text-center flex items-center justify-center rounded-4xl p-4 w-full bg-text-secondary" }, t.mapDraw.noAddressSelected))), (state.latitude && state.longitude &&
1396
+ this.loadingState === "loading") && (h("div", { key: 'c0dfd656c2633f0c49a2ecb26d15550eba64ffb5', class: "flex items-center justify-center w-full bg-opacity-75 z-20 pt-7 rounded-4xl" }, h("div", { key: 'abe70b554757acd75988d439c6877af09f198d29', class: "animate-spin rounded-full h-16 w-16 border-t-2 border-b-2 border-secondary" }))), h("div", { key: '624e94cb3969d04ee6026353616ca39e772d1129', class: "flex items-start justify-center h-full w-full bg-primary rounded-4xl" }, h("div", { key: '43d96ad059a8b085f0d3b1a1fa6e1521da87410c', class: "relative h-full flex items-center justify-center w-full rounded-4xl bg-secondary", style: {
1397
1397
  aspectRatio: this.rgbTiff
1398
1398
  ? `${this.rgbTiff.width}/${this.rgbTiff.height}`
1399
1399
  : "1/1",
1400
- } }, h("canvas", { key: 'e4d3790a48ca3bb05106c93c1a0753e42168a6f0', ref: (el) => this.canvasElement = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", id: "map-draw-canvas", style: {
1400
+ } }, h("canvas", { key: '4b67bc938bcb9b25b4a52dd163fdba1a70324e63', ref: (el) => this.canvasElement = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", id: "map-draw-canvas", style: {
1401
1401
  cursor: this.currentTool.cursor,
1402
- } }), h("canvas", { key: '7831fb29a9b4bf1f396577ed9d2385dea40b4539', ref: (el) => this.polygonCanvas = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", style: {
1402
+ } }), h("canvas", { key: '2d549095d5a3af42a109ce043fd357d14309e311', ref: (el) => this.polygonCanvas = el, class: "absolute top-0 left-0 w-full h-full rounded-4xl", style: {
1403
1403
  cursor: this.currentTool.cursor,
1404
- } }))), currentPolygon?.closed && (h("div", { key: 'e703e5a2313f55d0dc08b8f44d63f469a91fd724', class: "w-full" }, h("polygon-buttons", { key: '1d679142b0f2223a76e29db21949841b94c96f81', currentTool: this.currentTool.name, calculateSolarPanels: () => this.calculateSolarPanels(), selectEdgeTool: () => this.handleToolSelect(markRoofEdgeTool) }))), !state.isMobile && (h("div", { key: 'bccf61ba5a86ad1b44a5b46d8c2b2027022dd8ba', class: "w-full" }, h("polygon-information", { key: 'bbd60623873d8c2249c5d7ab74e03a4bade998be', currentPolygon: currentPolygon, positionedPanels: currentPolygon
1404
+ } }))), currentPolygon?.closed && (h("div", { key: '8519b6421d6ef36672504f7d120bf170d7dbd6f0', class: "w-full" }, h("polygon-buttons", { key: '21e7b96ddb3d2a6add87d41a314a89d702a4dd42', currentTool: this.currentTool.name, calculateSolarPanels: () => this.calculateSolarPanels(), selectEdgeTool: () => this.handleToolSelect(markRoofEdgeTool) }))), !state.isMobile && (h("div", { key: '265211ded512cbe17a9aed997b439011b4d0b982', class: "w-full" }, h("polygon-information", { key: '923dd819af422124d5171a1199a2e852a466f54e', currentPolygon: currentPolygon, positionedPanels: currentPolygon
1405
1405
  ? this
1406
1406
  .roofPolygonsSolarPanels[currentPolygon._id]
1407
1407
  ?.positionedPanels
1408
- : undefined, handleAzimuthChange: (event) => this.handleAzimuthChange(event), handlePitchChange: (event) => this.handlePitchChange(event), calculateSolarPanels: () => this.calculateSolarPanels() }))), h("div", { key: '9b804506b0ed890f99ceaba92f18c87b06951728', class: "w-full" }, h("solar-system-form", { key: '5383943dde347f1b75f919f4817a8d33b4b66b92', systemConfigs: this.roofPolygonsSolarPanels, roofPolygons: this.roofPolygons, obstructionPolygons: this.obstructionPolygons })), this.showSettings && (h("settings-modal", { key: '2397b2ab774504e514db8b0fd9537d124dcb17ed', settings: state.settings, onClose: this.handleSettingsClose, onSave: this.handleSettingsSave }))));
1408
+ : undefined, handleAzimuthChange: (event) => this.handleAzimuthChange(event), handlePitchChange: (event) => this.handlePitchChange(event), calculateSolarPanels: () => this.calculateSolarPanels() }))), h("div", { key: 'bb8d6f3fb719403814fba5871a9fcdc923ee9255', class: "w-full" }, h("solar-system-form", { key: 'eb6423fd823816992fe10a9a457018afe08fb0ca', systemConfigs: this.roofPolygonsSolarPanels, roofPolygons: this.roofPolygons, obstructionPolygons: this.obstructionPolygons })), this.showSettings && (h("settings-modal", { key: 'f00648d12379fb6738168706ac8326587b613c8f', settings: state.settings, onClose: this.handleSettingsClose, onSave: this.handleSettingsSave }))));
1409
1409
  }
1410
1410
  static get watchers() { return {
1411
1411
  "rgbTiff": ["drawMap"],
@@ -1523,6 +1523,6 @@ function defineCustomElement() {
1523
1523
  defineCustomElement();
1524
1524
 
1525
1525
  export { MapDraw as M, defineCustomElement as d };
1526
- //# sourceMappingURL=p-r9wMCtI3.js.map
1526
+ //# sourceMappingURL=p-ClYOM_0b.js.map
1527
1527
 
1528
- //# sourceMappingURL=p-r9wMCtI3.js.map
1528
+ //# sourceMappingURL=p-ClYOM_0b.js.map