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.
- 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
- package/dist/cjs/eraser-icon_16.cjs.entry.js +117 -61
- package/dist/cjs/eraser-icon_16.cjs.entry.js.map +1 -1
- package/dist/collection/components/map-draw/map-draw.js +7 -7
- package/dist/collection/components/map-draw/map-draw.js.map +1 -1
- package/dist/collection/components/solar-expert/solar-expert.js +12 -4
- package/dist/collection/components/solar-expert/solar-expert.js.map +1 -1
- package/dist/collection/components/solar-system-form/solar-system-form.js +35 -25
- package/dist/collection/components/solar-system-form/solar-system-form.js.map +1 -1
- package/dist/collection/config.js +31 -0
- package/dist/collection/config.js.map +1 -1
- package/dist/collection/utils/theme.js +34 -26
- package/dist/collection/utils/theme.js.map +1 -1
- package/dist/components/map-draw.js +1 -1
- package/dist/components/{p-r9wMCtI3.js → p-ClYOM_0b.js} +10 -10
- package/dist/components/{p-r9wMCtI3.js.map → p-ClYOM_0b.js.map} +1 -1
- package/dist/components/{p-ao6bHDbv.js → p-CrzEBN9H.js} +69 -28
- package/dist/components/p-CrzEBN9H.js.map +1 -0
- package/dist/components/solar-expert.js +46 -31
- package/dist/components/solar-expert.js.map +1 -1
- package/dist/components/solar-system-form.js +1 -1
- 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
- package/dist/esm/eraser-icon_16.entry.js +117 -61
- package/dist/esm/eraser-icon_16.entry.js.map +1 -1
- 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
- package/dist/stencil-library/p-3d7da486.entry.js +2 -0
- package/dist/stencil-library/p-3d7da486.entry.js.map +1 -0
- package/dist/stencil-library/stencil-library.esm.js +1 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/types/utils/theme.d.ts +7 -0
- package/package.json +1 -1
- package/dist/components/p-ao6bHDbv.js.map +0 -1
- package/dist/stencil-library/p-141320bb.entry.js +0 -2
- 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
|
-
|
|
10
|
-
|
|
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
|
-
|
|
20
|
+
element.style.setProperty('--color-primary', colorScheme.primary);
|
|
13
21
|
}
|
|
14
22
|
if (colorScheme.primaryForeground) {
|
|
15
|
-
|
|
23
|
+
element.style.setProperty('--color-primary-foreground', colorScheme.primaryForeground);
|
|
16
24
|
}
|
|
17
25
|
if (colorScheme.secondary) {
|
|
18
|
-
|
|
26
|
+
element.style.setProperty('--color-secondary', colorScheme.secondary);
|
|
19
27
|
}
|
|
20
28
|
if (colorScheme.secondaryForeground) {
|
|
21
|
-
|
|
29
|
+
element.style.setProperty('--color-secondary-foreground', colorScheme.secondaryForeground);
|
|
22
30
|
}
|
|
23
31
|
if (colorScheme.tertiary) {
|
|
24
|
-
|
|
32
|
+
element.style.setProperty('--color-tertiary', colorScheme.tertiary);
|
|
25
33
|
}
|
|
26
34
|
if (colorScheme.tertiaryForeground) {
|
|
27
|
-
|
|
35
|
+
element.style.setProperty('--color-tertiary-foreground', colorScheme.tertiaryForeground);
|
|
28
36
|
}
|
|
29
37
|
if (colorScheme.muted) {
|
|
30
|
-
|
|
38
|
+
element.style.setProperty('--color-muted', colorScheme.muted);
|
|
31
39
|
}
|
|
32
40
|
if (colorScheme.mutedForeground) {
|
|
33
|
-
|
|
41
|
+
element.style.setProperty('--color-muted-foreground', colorScheme.mutedForeground);
|
|
34
42
|
}
|
|
35
43
|
if (colorScheme.error) {
|
|
36
|
-
|
|
44
|
+
element.style.setProperty('--color-error', colorScheme.error);
|
|
37
45
|
}
|
|
38
46
|
if (colorScheme.errorForeground) {
|
|
39
|
-
|
|
47
|
+
element.style.setProperty('--color-error-foreground', colorScheme.errorForeground);
|
|
40
48
|
}
|
|
41
49
|
// Surface colors
|
|
42
50
|
if (colorScheme.surface) {
|
|
43
|
-
|
|
51
|
+
element.style.setProperty('--color-surface', colorScheme.surface);
|
|
44
52
|
}
|
|
45
53
|
if (colorScheme.surfaceHover) {
|
|
46
|
-
|
|
54
|
+
element.style.setProperty('--color-surface-hover', colorScheme.surfaceHover);
|
|
47
55
|
}
|
|
48
56
|
if (colorScheme.surfaceActive) {
|
|
49
|
-
|
|
57
|
+
element.style.setProperty('--color-surface-active', colorScheme.surfaceActive);
|
|
50
58
|
}
|
|
51
59
|
// Text colors
|
|
52
60
|
if (colorScheme.textMuted) {
|
|
53
|
-
|
|
61
|
+
element.style.setProperty('--color-text-muted', colorScheme.textMuted);
|
|
54
62
|
}
|
|
55
63
|
if (colorScheme.textSecondary) {
|
|
56
|
-
|
|
64
|
+
element.style.setProperty('--color-text-secondary', colorScheme.textSecondary);
|
|
57
65
|
}
|
|
58
66
|
if (colorScheme.textPlaceholder) {
|
|
59
|
-
|
|
67
|
+
element.style.setProperty('--color-text-placeholder', colorScheme.textPlaceholder);
|
|
60
68
|
}
|
|
61
69
|
// Border colors
|
|
62
70
|
if (colorScheme.border) {
|
|
63
|
-
|
|
71
|
+
element.style.setProperty('--color-border', colorScheme.border);
|
|
64
72
|
}
|
|
65
73
|
if (colorScheme.borderLight) {
|
|
66
|
-
|
|
74
|
+
element.style.setProperty('--color-border-light', colorScheme.borderLight);
|
|
67
75
|
}
|
|
68
76
|
// Status colors
|
|
69
77
|
if (colorScheme.success) {
|
|
70
|
-
|
|
78
|
+
element.style.setProperty('--color-success', colorScheme.success);
|
|
71
79
|
}
|
|
72
80
|
if (colorScheme.info) {
|
|
73
|
-
|
|
81
|
+
element.style.setProperty('--color-info', colorScheme.info);
|
|
74
82
|
}
|
|
75
83
|
// Interactive colors
|
|
76
84
|
if (colorScheme.hover) {
|
|
77
|
-
|
|
85
|
+
element.style.setProperty('--color-hover', colorScheme.hover);
|
|
78
86
|
}
|
|
79
87
|
if (colorScheme.hoverDark) {
|
|
80
|
-
|
|
88
|
+
element.style.setProperty('--color-hover-dark', colorScheme.hoverDark);
|
|
81
89
|
}
|
|
82
90
|
if (colorScheme.overlay) {
|
|
83
|
-
|
|
91
|
+
element.style.setProperty('--color-overlay', colorScheme.overlay);
|
|
84
92
|
}
|
|
85
93
|
if (colorScheme.tooltip) {
|
|
86
|
-
|
|
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","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAiC;IAChE,
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../src/utils/theme.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,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ies 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,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 {
|
|
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: '
|
|
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: '
|
|
1396
|
-
this.loadingState === "loading") && (h("div", { key: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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: '
|
|
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-
|
|
1526
|
+
//# sourceMappingURL=p-ClYOM_0b.js.map
|
|
1527
1527
|
|
|
1528
|
-
//# sourceMappingURL=p-
|
|
1528
|
+
//# sourceMappingURL=p-ClYOM_0b.js.map
|