@fusedashlabs/widgets 0.4.3 → 0.4.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/CHANGELOG.md +12 -0
- package/dist/components/bar-chart/element/styles.js +3 -3
- package/dist/components/bar-chart/element/styles.js.map +1 -1
- package/dist/components/box-plot-chart/element/styles.js +3 -3
- package/dist/components/box-plot-chart/element/styles.js.map +1 -1
- package/dist/components/chart-renderer/element/styles.d.ts.map +1 -1
- package/dist/components/chart-renderer/element/styles.js +4 -1
- package/dist/components/chart-renderer/element/styles.js.map +1 -1
- package/dist/components/chart-renderer/element/ui9000-chart-renderer.d.ts.map +1 -1
- package/dist/components/chart-renderer/element/ui9000-chart-renderer.js +12 -0
- package/dist/components/chart-renderer/element/ui9000-chart-renderer.js.map +1 -1
- package/dist/components/chart-renderer/metadata.json.d.ts +6 -1
- package/dist/components/chart-renderer/metadata.json.js +1 -1
- package/dist/components/custom-widget/element/styles.d.ts +2 -0
- package/dist/components/custom-widget/element/styles.d.ts.map +1 -0
- package/dist/components/custom-widget/element/styles.js +286 -0
- package/dist/components/custom-widget/element/styles.js.map +1 -0
- package/dist/components/custom-widget/element/ui9000-custom-widget.d.ts +48 -0
- package/dist/components/custom-widget/element/ui9000-custom-widget.d.ts.map +1 -0
- package/dist/components/custom-widget/element/ui9000-custom-widget.js +265 -0
- package/dist/components/custom-widget/element/ui9000-custom-widget.js.map +1 -0
- package/dist/components/custom-widget/index.d.ts +4 -0
- package/dist/components/custom-widget/index.d.ts.map +1 -0
- package/dist/components/custom-widget/index.js +19 -0
- package/dist/components/custom-widget/index.js.map +1 -0
- package/dist/components/custom-widget/lib/content.d.ts +13 -0
- package/dist/components/custom-widget/lib/content.d.ts.map +1 -0
- package/dist/components/custom-widget/lib/content.js +22 -0
- package/dist/components/custom-widget/lib/content.js.map +1 -0
- package/dist/components/custom-widget/lib/index.d.ts +8 -0
- package/dist/components/custom-widget/lib/index.d.ts.map +1 -0
- package/dist/components/custom-widget/lib/layout.d.ts +35 -0
- package/dist/components/custom-widget/lib/layout.d.ts.map +1 -0
- package/dist/components/custom-widget/lib/layout.js +13 -0
- package/dist/components/custom-widget/lib/layout.js.map +1 -0
- package/dist/components/custom-widget/lib/markdown.d.ts +4 -0
- package/dist/components/custom-widget/lib/markdown.d.ts.map +1 -0
- package/dist/components/custom-widget/lib/markdown.js +125 -0
- package/dist/components/custom-widget/lib/markdown.js.map +1 -0
- package/dist/components/custom-widget/lib/normalize.d.ts +6 -0
- package/dist/components/custom-widget/lib/normalize.d.ts.map +1 -0
- package/dist/components/custom-widget/lib/normalize.js +144 -0
- package/dist/components/custom-widget/lib/normalize.js.map +1 -0
- package/dist/components/custom-widget/lib/table.d.ts +55 -0
- package/dist/components/custom-widget/lib/table.d.ts.map +1 -0
- package/dist/components/custom-widget/lib/table.js +181 -0
- package/dist/components/custom-widget/lib/table.js.map +1 -0
- package/dist/components/custom-widget/lib/types.d.ts +55 -0
- package/dist/components/custom-widget/lib/types.d.ts.map +1 -0
- package/dist/components/custom-widget/metadata.json.d.ts +96 -0
- package/dist/components/custom-widget/metadata.json.js +42 -0
- package/dist/components/custom-widget/metadata.json.js.map +1 -0
- package/dist/components/histogram-chart/element/styles.js +2 -2
- package/dist/components/histogram-chart/element/styles.js.map +1 -1
- package/dist/components/line-chart/element/styles.js +2 -2
- package/dist/components/line-chart/element/styles.js.map +1 -1
- package/dist/components/lollipop/element/styles.js +3 -3
- package/dist/components/lollipop/element/styles.js.map +1 -1
- package/dist/components/map-chart/lib/constants.d.ts +2 -0
- package/dist/components/map-chart/lib/constants.d.ts.map +1 -1
- package/dist/components/map-chart/lib/constants.js +6 -0
- package/dist/components/map-chart/lib/constants.js.map +1 -1
- package/dist/components/map-chart/lib/geo-index.d.ts.map +1 -1
- package/dist/components/map-chart/lib/geo-index.js +5 -1
- package/dist/components/map-chart/lib/geo-index.js.map +1 -1
- package/dist/components/step-line-chart/element/styles.js +2 -2
- package/dist/components/step-line-chart/element/styles.js.map +1 -1
- package/dist/element/chart-shell-styles.d.ts.map +1 -1
- package/dist/element/chart-shell-styles.js +11 -4
- package/dist/element/chart-shell-styles.js.map +1 -1
- package/dist/element/ui9000-chart-base.d.ts +5 -0
- package/dist/element/ui9000-chart-base.d.ts.map +1 -1
- package/dist/element/ui9000-chart-base.js +7 -1
- package/dist/element/ui9000-chart-base.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/lazy/custom-widget.d.ts +4 -0
- package/dist/lazy/custom-widget.d.ts.map +1 -0
- package/dist/lazy/index.d.ts +2 -1
- package/dist/lazy/index.d.ts.map +1 -1
- package/dist/lazy/index.js +8 -0
- package/dist/lazy/index.js.map +1 -1
- package/package.json +9 -1
|
@@ -5,7 +5,7 @@ const histogramStyles = css`
|
|
|
5
5
|
position: relative;
|
|
6
6
|
width: 100%;
|
|
7
7
|
height: 100%;
|
|
8
|
-
min-height: 220px;
|
|
8
|
+
min-height: var(--ui9000-host-min-height, 220px);
|
|
9
9
|
color: var(--ui9000-color-text, #111827);
|
|
10
10
|
font-family: var(--ui9000-font-family, system-ui, sans-serif);
|
|
11
11
|
box-sizing: border-box;
|
|
@@ -13,7 +13,7 @@ const histogramStyles = css`
|
|
|
13
13
|
.chart-root {
|
|
14
14
|
flex: 1 1 auto;
|
|
15
15
|
width: 100%;
|
|
16
|
-
min-height: 240px;
|
|
16
|
+
min-height: var(--ui9000-plot-min-height, 240px);
|
|
17
17
|
}
|
|
18
18
|
.tooltip {
|
|
19
19
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/components/histogram-chart/element/styles.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const histogramStyles = css`\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n min-height: 220px;\n color: var(--ui9000-color-text, #111827);\n font-family: var(--ui9000-font-family, system-ui, sans-serif);\n box-sizing: border-box;\n }\n .chart-root {\n flex: 1 1 auto;\n width: 100%;\n min-height: 240px;\n }\n .tooltip {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n padding: 6px 10px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.35;\n background: var(--ui9000-color-text, #111827);\n color: #fff;\n box-shadow: 0 4px 12px rgb(0 0 0 / 18%);\n transform: translate(-50%, calc(-100% - 10px));\n white-space: nowrap;\n }\n .tooltip .name {\n font-weight: 600;\n }\n .empty {\n display: grid;\n place-items: center;\n height: 100%;\n min-height: inherit;\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 0.875rem;\n }\n`;\n"],"names":[],"mappings":";AAEO,MAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/histogram-chart/element/styles.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const histogramStyles = css`\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n min-height: var(--ui9000-host-min-height, 220px);\n color: var(--ui9000-color-text, #111827);\n font-family: var(--ui9000-font-family, system-ui, sans-serif);\n box-sizing: border-box;\n }\n .chart-root {\n flex: 1 1 auto;\n width: 100%;\n min-height: var(--ui9000-plot-min-height, 240px);\n }\n .tooltip {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n padding: 6px 10px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.35;\n background: var(--ui9000-color-text, #111827);\n color: #fff;\n box-shadow: 0 4px 12px rgb(0 0 0 / 18%);\n transform: translate(-50%, calc(-100% - 10px));\n white-space: nowrap;\n }\n .tooltip .name {\n font-weight: 600;\n }\n .empty {\n display: grid;\n place-items: center;\n height: 100%;\n min-height: inherit;\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 0.875rem;\n }\n`;\n"],"names":[],"mappings":";AAEO,MAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -5,7 +5,7 @@ const lineChartStyles = css`
|
|
|
5
5
|
position: relative;
|
|
6
6
|
width: 100%;
|
|
7
7
|
height: 100%;
|
|
8
|
-
min-height: 220px;
|
|
8
|
+
min-height: var(--ui9000-host-min-height, 220px);
|
|
9
9
|
color: var(--ui9000-color-text, #111827);
|
|
10
10
|
font-family: var(--ui9000-font-family, system-ui, sans-serif);
|
|
11
11
|
box-sizing: border-box;
|
|
@@ -13,7 +13,7 @@ const lineChartStyles = css`
|
|
|
13
13
|
.chart-root {
|
|
14
14
|
flex: 1 1 auto;
|
|
15
15
|
width: 100%;
|
|
16
|
-
min-height: 240px;
|
|
16
|
+
min-height: var(--ui9000-plot-min-height, 240px);
|
|
17
17
|
}
|
|
18
18
|
.tooltip {
|
|
19
19
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/components/line-chart/element/styles.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const lineChartStyles = css`\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n min-height: 220px;\n color: var(--ui9000-color-text, #111827);\n font-family: var(--ui9000-font-family, system-ui, sans-serif);\n box-sizing: border-box;\n }\n .chart-root {\n flex: 1 1 auto;\n width: 100%;\n min-height: 240px;\n }\n .tooltip {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n padding: 6px 10px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.35;\n background: var(--ui9000-color-text, #111827);\n color: #fff;\n box-shadow: 0 4px 12px rgb(0 0 0 / 18%);\n transform: translate(-50%, calc(-100% - 10px));\n white-space: nowrap;\n }\n .tooltip .name {\n font-weight: 600;\n }\n .empty {\n display: grid;\n place-items: center;\n height: 100%;\n min-height: inherit;\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 0.875rem;\n }\n`;\n"],"names":[],"mappings":";AAEO,MAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/line-chart/element/styles.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const lineChartStyles = css`\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n min-height: var(--ui9000-host-min-height, 220px);\n color: var(--ui9000-color-text, #111827);\n font-family: var(--ui9000-font-family, system-ui, sans-serif);\n box-sizing: border-box;\n }\n .chart-root {\n flex: 1 1 auto;\n width: 100%;\n min-height: var(--ui9000-plot-min-height, 240px);\n }\n .tooltip {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n padding: 6px 10px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.35;\n background: var(--ui9000-color-text, #111827);\n color: #fff;\n box-shadow: 0 4px 12px rgb(0 0 0 / 18%);\n transform: translate(-50%, calc(-100% - 10px));\n white-space: nowrap;\n }\n .tooltip .name {\n font-weight: 600;\n }\n .empty {\n display: grid;\n place-items: center;\n height: 100%;\n min-height: inherit;\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 0.875rem;\n }\n`;\n"],"names":[],"mappings":";AAEO,MAAM,kBAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -12,13 +12,13 @@ const lollipopStyles = css`
|
|
|
12
12
|
}
|
|
13
13
|
.chart-body {
|
|
14
14
|
flex: 1 1 auto;
|
|
15
|
-
min-height: 240px;
|
|
15
|
+
min-height: var(--ui9000-plot-min-height, 240px);
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-direction: column;
|
|
18
18
|
}
|
|
19
19
|
.chart-scroll {
|
|
20
20
|
flex: 1 1 auto;
|
|
21
|
-
min-height: 200px;
|
|
21
|
+
min-height: var(--ui9000-plot-min-height, 200px);
|
|
22
22
|
overflow-y: auto;
|
|
23
23
|
overflow-x: hidden;
|
|
24
24
|
position: relative;
|
|
@@ -31,7 +31,7 @@ const lollipopStyles = css`
|
|
|
31
31
|
}
|
|
32
32
|
.chart-root {
|
|
33
33
|
width: 100%;
|
|
34
|
-
min-height: 240px;
|
|
34
|
+
min-height: var(--ui9000-plot-min-height, 240px);
|
|
35
35
|
}
|
|
36
36
|
.tooltip {
|
|
37
37
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/components/lollipop/element/styles.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const lollipopStyles = css`\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n min-height: 220px;\n color: var(--ui9000-color-text, #111827);\n font-family: var(--ui9000-font-family, system-ui, sans-serif);\n box-sizing: border-box;\n }\n .chart-body {\n flex: 1 1 auto;\n min-height: 240px;\n display: flex;\n flex-direction: column;\n }\n .chart-scroll {\n flex: 1 1 auto;\n min-height: 200px;\n overflow-y: auto;\n overflow-x: hidden;\n position: relative;\n }\n .chart-x-axis {\n flex-shrink: 0;\n width: 100%;\n min-height: 21px;\n overflow: hidden;\n }\n .chart-root {\n width: 100%;\n min-height: 240px;\n }\n .tooltip {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n padding: 6px 10px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.35;\n background: var(--ui9000-color-text, #111827);\n color: #fff;\n box-shadow: 0 4px 12px rgb(0 0 0 / 18%);\n transform: translate(-50%, calc(-100% - 10px));\n white-space: nowrap;\n }\n .tooltip .name {\n font-weight: 600;\n }\n .empty {\n display: grid;\n place-items: center;\n height: 100%;\n min-height: inherit;\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 0.875rem;\n }\n`;\n"],"names":[],"mappings":";AAEO,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/lollipop/element/styles.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const lollipopStyles = css`\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n min-height: 220px;\n color: var(--ui9000-color-text, #111827);\n font-family: var(--ui9000-font-family, system-ui, sans-serif);\n box-sizing: border-box;\n }\n .chart-body {\n flex: 1 1 auto;\n min-height: var(--ui9000-plot-min-height, 240px);\n display: flex;\n flex-direction: column;\n }\n .chart-scroll {\n flex: 1 1 auto;\n min-height: var(--ui9000-plot-min-height, 200px);\n overflow-y: auto;\n overflow-x: hidden;\n position: relative;\n }\n .chart-x-axis {\n flex-shrink: 0;\n width: 100%;\n min-height: 21px;\n overflow: hidden;\n }\n .chart-root {\n width: 100%;\n min-height: var(--ui9000-plot-min-height, 240px);\n }\n .tooltip {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n padding: 6px 10px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.35;\n background: var(--ui9000-color-text, #111827);\n color: #fff;\n box-shadow: 0 4px 12px rgb(0 0 0 / 18%);\n transform: translate(-50%, calc(-100% - 10px));\n white-space: nowrap;\n }\n .tooltip .name {\n font-weight: 600;\n }\n .empty {\n display: grid;\n place-items: center;\n height: 100%;\n min-height: inherit;\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 0.875rem;\n }\n`;\n"],"names":[],"mappings":";AAEO,MAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -31,4 +31,6 @@ export declare const MAP_STYLES: {
|
|
|
31
31
|
};
|
|
32
32
|
export declare const MAPBOX_CSS_HREF = "https://api.mapbox.com/mapbox-gl-js/v3.29.0/mapbox-gl.css";
|
|
33
33
|
export declare const COUNTRY_SYNONYMS: Record<string, string[]>;
|
|
34
|
+
/** Country-level labels only — do not reuse COUNTRY_SYNONYMS (admin-1 composites). */
|
|
35
|
+
export declare const COUNTRY_LABEL_ALIASES: Record<string, string[]>;
|
|
34
36
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/map-chart/lib/constants.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE9E,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE3F,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,EAAE,YAAY,EAOzC,CAAC;AAEF,eAAO,MAAM,oBAAoB,QAAkB,CAAC;AACpD,eAAO,MAAM,mBAAmB,QAAoB,CAAC;AAErD,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,MAAgD,CAAC;AAE3F,eAAO,MAAM,UAAU,GAAI,IAAI,MAAM,KAAG,MAA8C,CAAC;AAEvF,2FAA2F;AAC3F,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,UAAU,CAiDzD,CAAC;AAEF,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,eAAO,MAAM,mBAAmB,UAAkC,CAAC;AACnE,eAAO,MAAM,sBAAsB,UAAmC,CAAC;AACvE,eAAO,MAAM,aAAa,UAAoC,CAAC;AAC/D,eAAO,MAAM,mBAAmB,UAA+B,CAAC;AAChE,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,cAAc,2BAA2B,CAAC;AACvD,eA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a,UAAoC,CAAC;AAC/D,eAAO,MAAM,mBAAmB,UAA+B,CAAC;AAChE,eAAO,MAAM,aAAa,YAAY,CAAC;AACvC,eAAO,MAAM,cAAc,2BAA2B,CAAC;AACvD,eAAO,MAAM,UAAU,MAAM,CAAC;AAE9B,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAKxD,CAAC;AAEF,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX,eAAO,MAAM,eAAe,8DAA8D,CAAC;AAE3F,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAsBrD,CAAC;AAEF,sFAAsF;AACtF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAI1D,CAAC"}
|
|
@@ -101,8 +101,14 @@ const COUNTRY_SYNONYMS = {
|
|
|
101
101
|
Burma: ["Myanmar"],
|
|
102
102
|
"United Kingdom": ["UK", "Great Britain"]
|
|
103
103
|
};
|
|
104
|
+
const COUNTRY_LABEL_ALIASES = {
|
|
105
|
+
"Czech Rep.": ["Czechia", "Czech Republic"],
|
|
106
|
+
"Czech Republic": ["Czechia", "Czech Rep."],
|
|
107
|
+
Czechia: ["Czech Republic", "Czech Rep."]
|
|
108
|
+
};
|
|
104
109
|
export {
|
|
105
110
|
BUBBLE_RADIUS_STEPS,
|
|
111
|
+
COUNTRY_LABEL_ALIASES,
|
|
106
112
|
COUNTRY_SYNONYMS,
|
|
107
113
|
DEFAULT_BUBBLES_RADIUS,
|
|
108
114
|
DEFAULT_SPIKE_SIZES,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/components/map-chart/lib/constants.ts"],"sourcesContent":["export type MapVisualisation = 'choropleth' | 'bubbles' | 'spike' | 'markers';\n\nexport type MapAdminType = 'city' | 'county' | 'state' | 'country' | 'province' | 'region';\n\nexport interface RegionKeys {\n name: string;\n id: string;\n code: string;\n county: string;\n state: string;\n country: string;\n}\n\nexport const MAP_ADMIN_TYPES: MapAdminType[] = [\n 'city',\n 'county',\n 'state',\n 'province',\n 'region',\n 'country',\n];\n\nexport const SANITIZE_KEY_PATTERN = /[^a-zA-Z0-9]/g;\nexport const SANITIZE_ID_PATTERN = /[^a-zA-Z0-9_-]/g;\n\nexport const sanitizeKey = (key: string): string => key.replace(SANITIZE_KEY_PATTERN, '_');\n\nexport const sanitizeId = (id: string): string => id.replace(SANITIZE_ID_PATTERN, '_');\n\n/** Vendored from client MapBox/constants.ts — keep in lockstep with mcp-ui geojsonKeys. */\nexport const GEOJSON_KEYS: Record<MapAdminType, RegionKeys> = {\n city: {\n name: 'NAME_2',\n code: 'GID_0',\n id: 'GID_2',\n county: 'NAME_2',\n state: 'NAME_1',\n country: 'COUNTRY',\n },\n region: {\n name: 'name',\n code: 'iso_3166_2',\n id: 'iso_3166_2',\n county: 'name',\n state: 'name',\n country: 'admin',\n },\n county: {\n name: 'NAME_2',\n code: 'GID_0',\n id: 'GID_2',\n county: 'NAME_2',\n state: 'NAME_1',\n country: 'COUNTRY',\n },\n state: {\n name: 'NAME_1',\n code: 'GID_0',\n id: 'GID_1',\n county: 'NAME_2',\n state: 'NAME_1',\n country: 'COUNTRY',\n },\n country: {\n name: 'name',\n code: 'name',\n id: 'iso_a3',\n county: 'NAME_2',\n state: 'NAME_1',\n country: 'COUNTRY',\n },\n province: {\n name: 'name',\n code: 'iso_3166_2',\n id: 'iso_3166_2',\n county: 'name',\n state: 'name',\n country: 'admin',\n },\n};\n\nexport const MAX_COLOR_RANGE = 7;\nexport const DEFAULT_SPIKE_SIZES = [8, 12, 16, 22, 28, 34, 42, 54];\nexport const DEFAULT_BUBBLES_RADIUS = [10, 15, 20, 25, 30, 35, 40, 45];\nexport const SPIKE_HEIGHTS = [15, 25, 35, 40, 55, 70, 85, 100];\nexport const BUBBLE_RADIUS_STEPS = [10, 15, 20, 25, 30, 35, 40];\nexport const FALLBACK_FILL = '#DADAE1';\nexport const UNMATCHED_FILL = 'rgba(72, 70, 91, 0.15)';\nexport const MAX_SPIKES = 200;\n\nexport const LAYER_ORDER: Record<MapVisualisation, number> = {\n choropleth: 0,\n bubbles: 1,\n spike: 2,\n markers: 3,\n};\n\nexport const MAP_STYLES = {\n light: 'mapbox://styles/andyk1987/cm1kvt8ib00ie01pi1lty0ey4',\n dark: 'mapbox://styles/flc-designers/cm7j7z28n00ov01ryahkd2jqj',\n terrain: 'mapbox://styles/andyk1987/clnefgdzy01ze01qne2766ihi',\n} as const;\n\nexport const MAPBOX_CSS_HREF = 'https://api.mapbox.com/mapbox-gl-js/v3.29.0/mapbox-gl.css';\n\nexport const COUNTRY_SYNONYMS: Record<string, string[]> = {\n 'United States of America': ['United States', 'USA', 'US'],\n 'United Republic of Tanzania': ['Tanzania'],\n 'Hong Kong S.A.R.': ['Hong Kong'],\n 'Ivory Coast': [\"Côte d'Ivoire\", \"Cote d'Ivoire\"],\n 'Cape Verde': ['Cabo Verde'],\n 'Republic of the Congo': ['Congo', 'Congo-Brazzaville'],\n 'Democratic Republic of the Congo': ['DR Congo', 'DRC', 'Congo (Kinshasa)'],\n 'West Bank': ['Palestine', 'State of Palestine'],\n 'Caribbean Netherlands': ['Netherlands'],\n 'The Bahamas': ['Bahamas'],\n 'Republic of Serbia': ['Serbia'],\n Macedonia: ['North Macedonia'],\n 'East Timor': ['Timor-Leste', 'Timor Leste'],\n 'Federated States of Micronesia': ['Micronesia'],\n 'Guinea Bissau': ['Guinea-Bissau'],\n Swaziland: ['Eswatini'],\n 'Czech Republic': ['Czechia'],\n 'South Korea': ['Korea, Rep.', 'Republic of Korea'],\n 'North Korea': ['Korea, North', 'DPRK'],\n Burma: ['Myanmar'],\n 'United Kingdom': ['UK', 'Great Britain'],\n};\n"],"names":[],"mappings":"AAaO,MAAM,kBAAkC;AAAA,EAC7C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,uBAA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AACtB,MAAM,iBAAiB;AACvB,MAAM,aAAa;AAEnB,MAAM,cAAgD;AAAA,EAC3D,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AACX;AAEO,MAAM,aAAa;AAAA,EACxB,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AACX;AAEO,MAAM,kBAAkB;AAExB,MAAM,mBAA6C;AAAA,EACxD,4BAA4B,CAAC,iBAAiB,OAAO,IAAI;AAAA,EACzD,+BAA+B,CAAC,UAAU;AAAA,EAC1C,oBAAoB,CAAC,WAAW;AAAA,EAChC,eAAe,CAAC,iBAAiB,eAAe;AAAA,EAChD,cAAc,CAAC,YAAY;AAAA,EAC3B,yBAAyB,CAAC,SAAS,mBAAmB;AAAA,EACtD,oCAAoC,CAAC,YAAY,OAAO,kBAAkB;AAAA,EAC1E,aAAa,CAAC,aAAa,oBAAoB;AAAA,EAC/C,yBAAyB,CAAC,aAAa;AAAA,EACvC,eAAe,CAAC,SAAS;AAAA,EACzB,sBAAsB,CAAC,QAAQ;AAAA,EAC/B,WAAW,CAAC,iBAAiB;AAAA,EAC7B,cAAc,CAAC,eAAe,aAAa;AAAA,EAC3C,kCAAkC,CAAC,YAAY;AAAA,EAC/C,iBAAiB,CAAC,eAAe;AAAA,EACjC,WAAW,CAAC,UAAU;AAAA,EACtB,kBAAkB,CAAC,SAAS;AAAA,EAC5B,eAAe,CAAC,eAAe,mBAAmB;AAAA,EAClD,eAAe,CAAC,gBAAgB,MAAM;AAAA,EACtC,OAAO,CAAC,SAAS;AAAA,EACjB,kBAAkB,CAAC,MAAM,eAAe;AAC1C;"}
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/components/map-chart/lib/constants.ts"],"sourcesContent":["export type MapVisualisation = 'choropleth' | 'bubbles' | 'spike' | 'markers';\n\nexport type MapAdminType = 'city' | 'county' | 'state' | 'country' | 'province' | 'region';\n\nexport interface RegionKeys {\n name: string;\n id: string;\n code: string;\n county: string;\n state: string;\n country: string;\n}\n\nexport const MAP_ADMIN_TYPES: MapAdminType[] = [\n 'city',\n 'county',\n 'state',\n 'province',\n 'region',\n 'country',\n];\n\nexport const SANITIZE_KEY_PATTERN = /[^a-zA-Z0-9]/g;\nexport const SANITIZE_ID_PATTERN = /[^a-zA-Z0-9_-]/g;\n\nexport const sanitizeKey = (key: string): string => key.replace(SANITIZE_KEY_PATTERN, '_');\n\nexport const sanitizeId = (id: string): string => id.replace(SANITIZE_ID_PATTERN, '_');\n\n/** Vendored from client MapBox/constants.ts — keep in lockstep with mcp-ui geojsonKeys. */\nexport const GEOJSON_KEYS: Record<MapAdminType, RegionKeys> = {\n city: {\n name: 'NAME_2',\n code: 'GID_0',\n id: 'GID_2',\n county: 'NAME_2',\n state: 'NAME_1',\n country: 'COUNTRY',\n },\n region: {\n name: 'name',\n code: 'iso_3166_2',\n id: 'iso_3166_2',\n county: 'name',\n state: 'name',\n country: 'admin',\n },\n county: {\n name: 'NAME_2',\n code: 'GID_0',\n id: 'GID_2',\n county: 'NAME_2',\n state: 'NAME_1',\n country: 'COUNTRY',\n },\n state: {\n name: 'NAME_1',\n code: 'GID_0',\n id: 'GID_1',\n county: 'NAME_2',\n state: 'NAME_1',\n country: 'COUNTRY',\n },\n country: {\n name: 'name',\n code: 'name',\n id: 'iso_a3',\n county: 'NAME_2',\n state: 'NAME_1',\n country: 'COUNTRY',\n },\n province: {\n name: 'name',\n code: 'iso_3166_2',\n id: 'iso_3166_2',\n county: 'name',\n state: 'name',\n country: 'admin',\n },\n};\n\nexport const MAX_COLOR_RANGE = 7;\nexport const DEFAULT_SPIKE_SIZES = [8, 12, 16, 22, 28, 34, 42, 54];\nexport const DEFAULT_BUBBLES_RADIUS = [10, 15, 20, 25, 30, 35, 40, 45];\nexport const SPIKE_HEIGHTS = [15, 25, 35, 40, 55, 70, 85, 100];\nexport const BUBBLE_RADIUS_STEPS = [10, 15, 20, 25, 30, 35, 40];\nexport const FALLBACK_FILL = '#DADAE1';\nexport const UNMATCHED_FILL = 'rgba(72, 70, 91, 0.15)';\nexport const MAX_SPIKES = 200;\n\nexport const LAYER_ORDER: Record<MapVisualisation, number> = {\n choropleth: 0,\n bubbles: 1,\n spike: 2,\n markers: 3,\n};\n\nexport const MAP_STYLES = {\n light: 'mapbox://styles/andyk1987/cm1kvt8ib00ie01pi1lty0ey4',\n dark: 'mapbox://styles/flc-designers/cm7j7z28n00ov01ryahkd2jqj',\n terrain: 'mapbox://styles/andyk1987/clnefgdzy01ze01qne2766ihi',\n} as const;\n\nexport const MAPBOX_CSS_HREF = 'https://api.mapbox.com/mapbox-gl-js/v3.29.0/mapbox-gl.css';\n\nexport const COUNTRY_SYNONYMS: Record<string, string[]> = {\n 'United States of America': ['United States', 'USA', 'US'],\n 'United Republic of Tanzania': ['Tanzania'],\n 'Hong Kong S.A.R.': ['Hong Kong'],\n 'Ivory Coast': [\"Côte d'Ivoire\", \"Cote d'Ivoire\"],\n 'Cape Verde': ['Cabo Verde'],\n 'Republic of the Congo': ['Congo', 'Congo-Brazzaville'],\n 'Democratic Republic of the Congo': ['DR Congo', 'DRC', 'Congo (Kinshasa)'],\n 'West Bank': ['Palestine', 'State of Palestine'],\n 'Caribbean Netherlands': ['Netherlands'],\n 'The Bahamas': ['Bahamas'],\n 'Republic of Serbia': ['Serbia'],\n Macedonia: ['North Macedonia'],\n 'East Timor': ['Timor-Leste', 'Timor Leste'],\n 'Federated States of Micronesia': ['Micronesia'],\n 'Guinea Bissau': ['Guinea-Bissau'],\n Swaziland: ['Eswatini'],\n 'Czech Republic': ['Czechia'],\n 'South Korea': ['Korea, Rep.', 'Republic of Korea'],\n 'North Korea': ['Korea, North', 'DPRK'],\n Burma: ['Myanmar'],\n 'United Kingdom': ['UK', 'Great Britain'],\n};\n\n/** Country-level labels only — do not reuse COUNTRY_SYNONYMS (admin-1 composites). */\nexport const COUNTRY_LABEL_ALIASES: Record<string, string[]> = {\n 'Czech Rep.': ['Czechia', 'Czech Republic'],\n 'Cz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AC7D,cAAc,CAAC,WAAW,gBAAgB;AAAA,EAC1C,kBAAkB,CAAC,WAAW,YAAY;AAAA,EAC1C,SAAS,CAAC,kBAAkB,YAAY;AAC1C;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-index.d.ts","sourceRoot":"","sources":["../../../../src/components/map-chart/lib/geo-index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAWhE,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAO/E;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CA+B7E;AAED,wBAAgB,gCAAgC,CAC9C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,EAC7D,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,GAAG,SAAS,CAapB;AAwDD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"geo-index.d.ts","sourceRoot":"","sources":["../../../../src/components/map-chart/lib/geo-index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAWhE,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAO/E;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CA+B7E;AAED,wBAAgB,gCAAgC,CAC9C,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,EAC7D,OAAO,CAAC,EAAE,MAAM,GACf,MAAM,GAAG,SAAS,CAapB;AAwDD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,MAAM,GAAG,aAAa,CA4G9F;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAoBxG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COUNTRY_SYNONYMS, GEOJSON_KEYS, MAP_ADMIN_TYPES } from "./constants.js";
|
|
1
|
+
import { COUNTRY_SYNONYMS, GEOJSON_KEYS, COUNTRY_LABEL_ALIASES, MAP_ADMIN_TYPES } from "./constants.js";
|
|
2
2
|
const CITY_NAME_VARIATIONS = {
|
|
3
3
|
kyiv: "kiev",
|
|
4
4
|
peking: "beijing",
|
|
@@ -165,6 +165,10 @@ function createFeaturesIndex(features, mapType) {
|
|
|
165
165
|
props.geounit,
|
|
166
166
|
...String(props.aliases ?? "").split("|")
|
|
167
167
|
];
|
|
168
|
+
for (const seed of [dataValue, props.name, ...aliases]) {
|
|
169
|
+
if (typeof seed !== "string" || !seed) continue;
|
|
170
|
+
aliases.push(...COUNTRY_LABEL_ALIASES[seed] ?? []);
|
|
171
|
+
}
|
|
168
172
|
for (const alias of aliases) {
|
|
169
173
|
if (typeof alias === "string" && alias && alias !== dataValue) {
|
|
170
174
|
indexAlias(byDataValue, byNormalizedValue, alias, regionId, mapType);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo-index.js","sources":["../../../../src/components/map-chart/lib/geo-index.ts"],"sourcesContent":["import { COUNTRY_SYNONYMS, GEOJSON_KEYS, MAP_ADMIN_TYPES, type MapAdminType } from './constants.js';\nimport type { FeaturesIndex, GeoJsonFeature } from './types.js';\n\nconst CITY_NAME_VARIATIONS: Record<string, string> = {\n kyiv: 'kiev',\n peking: 'beijing',\n bombay: 'mumbai',\n calcutta: 'kolkata',\n madras: 'chennai',\n saigon: 'hochiminh',\n};\n\nexport function inferMapTypeFromKeyNames(dataKeys: string[]): string | undefined {\n for (const key of dataKeys ?? []) {\n const name = String(key).toLowerCase();\n const found = MAP_ADMIN_TYPES.find((type) => name.includes(type));\n if (found) return found;\n }\n return undefined;\n}\n\nexport function normalizeDataValue(dataValue: string, mapType: string): string {\n if (!dataValue) return '';\n\n let normalized = dataValue\n .toLowerCase()\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '');\n\n normalized = normalized.replace(/\\bst\\.?\\s+/g, 'saint ');\n if (mapType !== 'city') {\n normalized = normalized.replace(/['’´`.-]/g, ' ');\n }\n\n if (mapType === 'city') {\n normalized = normalized\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .replace(/[''`´]/g, '')\n .replace(/[-_]/g, '');\n for (const [from, to] of Object.entries(CITY_NAME_VARIATIONS)) {\n normalized = normalized.replace(new RegExp(`\\\\b${from}\\\\b`, 'g'), to);\n }\n }\n\n if (mapType === 'country') return normalized;\n\n const parts = normalized.replace(/ /g, '').split(',');\n if (mapType === 'county') {\n return parts.map((item) => item.replace('county', '')).join(',');\n }\n return parts.join(',');\n}\n\nexport function getRegionIdFromFeatureProperties(\n featureProperties: Record<string, unknown> | null | undefined,\n mapType?: string,\n): string | undefined {\n if (!featureProperties || !mapType) return undefined;\n const keys = GEOJSON_KEYS[mapType as MapAdminType];\n if (!keys) return undefined;\n\n if (mapType === 'country') {\n const iso = featureProperties[keys.id];\n if (iso === '-99') return String(featureProperties.adm0_a3 ?? iso);\n return iso != null ? String(iso) : undefined;\n }\n\n const id = featureProperties[keys.id];\n return id != null && String(id) !== '' ? String(id) : undefined;\n}\n\nfunction getDataValueFromFeature(feature: GeoJsonFeature, mapType: string): string | undefined {\n const props = feature.properties;\n if (!props) return undefined;\n const keys = GEOJSON_KEYS[mapType as MapAdminType];\n if (!keys) return undefined;\n\n const getProp = (field: keyof typeof keys): string | undefined => {\n const value = props[keys[field]];\n return typeof value === 'string' && value ? value : undefined;\n };\n\n const buildComposite = (\n parts: Array<keyof typeof keys>,\n fallbackKey: keyof typeof keys,\n ): string | undefined => {\n const values = parts.map(getProp);\n return values.every((v) => v) ? values.join(',') : getProp(fallbackKey);\n };\n\n switch (mapType) {\n case 'city': {\n const country = getProp('country');\n const state = getProp('state');\n const name = getProp('name');\n if (country && state && name) return `${country},${state},${name}`;\n if (country && name) return `${country},${name}`;\n return name;\n }\n case 'county':\n return buildComposite(['country', 'state', 'county'], 'county');\n case 'state':\n case 'province':\n return buildComposite(['country', 'state'], 'state');\n case 'country':\n case 'region':\n return getProp('name');\n default:\n return undefined;\n }\n}\n\nfunction indexAlias(\n byDataValue: Map<string, string>,\n byNormalizedValue: Map<string, string>,\n alias: string,\n regionId: string,\n mapType: string,\n): void {\n const lower = alias.toLowerCase();\n if (!byDataValue.has(lower)) byDataValue.set(lower, regionId);\n const normalized = normalizeDataValue(alias, mapType);\n if (!byNormalizedValue.has(normalized)) byNormalizedValue.set(normalized, regionId);\n}\n\nexport function createFeaturesIndex(features: GeoJsonFeature[], mapType: string): FeaturesIndex {\n const byId = new Map<string, GeoJsonFeature>();\n const byDataValue = new Map<string, string>();\n const byNormalizedValue = new Map<string, string>();\n if (!features.length || !mapType) return { byId, byDataValue, byNormalizedValue };\n\n const ambiguousTwoPartKeys = new Set<string>();\n\n for (const feature of features) {\n const regionId = getRegionIdFromFeatureProperties(feature.properties, mapType);\n if (!regionId) continue;\n byId.set(regionId, feature);\n\n const dataValue = getDataValueFromFeature(feature, mapType);\n if (!dataValue) continue;\n\n const normalized = normalizeDataValue(dataValue, mapType);\n byDataValue.set(dataValue.toLowerCase(), regionId);\n byNormalizedValue.set(normalized, regionId);\n\n const props = feature.properties;\n if (!props) continue;\n\n if (mapType === 'city') {\n const country = props.COUNTRY;\n const state = props.NAME_1;\n const cityName = props.NAME_2;\n if (typeof country === 'string' && typeof cityName === 'string') {\n const twoPart = normalizeDataValue(`${country},${cityName}`, mapType);\n const existing = byNormalizedValue.get(twoPart);\n if (existing && existing !== regionId) ambiguousTwoPartKeys.add(twoPart);\n else byNormalizedValue.set(twoPart, regionId);\n }\n if (\n typeof country === 'string' &&\n typeof state === 'string' &&\n typeof cityName === 'string' &&\n state !== cityName\n ) {\n const stateFormat = normalizeDataValue(`${country},${state}`, mapType);\n if (!byNormalizedValue.has(stateFormat)) byNormalizedValue.set(stateFormat, regionId);\n }\n }\n\n if (mapType === 'county') {\n const country = props.COUNTRY;\n const countyName = props.NAME_2;\n if (typeof country === 'string' && typeof countyName === 'string') {\n for (const countryForm of [country, ...(COUNTRY_SYNONYMS[country] ?? [])]) {\n const twoPart = normalizeDataValue(`${countryForm},${countyName}`, mapType);\n const existing = byNormalizedValue.get(twoPart);\n if (existing && existing !== regionId) ambiguousTwoPartKeys.add(twoPart);\n else byNormalizedValue.set(twoPart, regionId);\n }\n }\n }\n\n if (mapType === 'region' || mapType === 'province') {\n const country = props.admin;\n const regionName = props.name;\n const unitNames = [regionName, props.name_en, ...String(props.aliases ?? '').split('|')].filter(\n (n): n is string => typeof n === 'string' && n.length > 0,\n );\n const countryForms =\n typeof country === 'string' ? [country, ...(COUNTRY_SYNONYMS[country] ?? [])] : [];\n for (const countryForm of countryForms) {\n for (const unitName of unitNames) {\n const composite = normalizeDataValue(`${countryForm},${unitName}`, mapType);\n if (!byNormalizedValue.has(composite)) byNormalizedValue.set(composite, regionId);\n }\n }\n for (const alias of [props.name_en, ...String(props.aliases ?? '').split('|')]) {\n if (typeof alias !== 'string' || !alias || alias === regionName) continue;\n indexAlias(byDataValue, byNormalizedValue, alias, regionId, mapType);\n }\n }\n\n if (mapType === 'state' || mapType === 'province') {\n const keys = GEOJSON_KEYS[mapType];\n const bareName = props[keys.state] ?? props[keys.name];\n if (typeof bareName === 'string' && bareName) {\n indexAlias(byDataValue, byNormalizedValue, bareName, regionId, mapType);\n }\n }\n\n if (mapType === 'country') {\n const aliases = [\n props.name_long,\n props.formal_en,\n props.brk_name,\n props.admin,\n props.geounit,\n ...String(props.aliases ?? '').split('|'),\n ];\n for (const alias of aliases) {\n if (typeof alias === 'string' && alias && alias !== dataValue) {\n indexAlias(byDataValue, byNormalizedValue, alias, regionId, mapType);\n }\n }\n }\n }\n\n for (const key of ambiguousTwoPartKeys) byNormalizedValue.delete(key);\n return { byId, byDataValue, byNormalizedValue };\n}\n\nexport function getRegionId(dataValue: string, mapType: string, index: FeaturesIndex): string | undefined {\n if (!dataValue || !mapType) return undefined;\n const direct = index.byDataValue.get(dataValue.toLowerCase());\n if (direct) return direct;\n const normalized = index.byNormalizedValue.get(normalizeDataValue(dataValue, mapType));\n if (normalized) return normalized;\n\n if (\n (mapType === 'region' || mapType === 'province' || mapType === 'county') &&\n dataValue.includes(',')\n ) {\n const lastPart = dataValue.split(',').at(-1)?.trim();\n if (lastPart) {\n return (\n index.byDataValue.get(lastPart.toLowerCase()) ??\n index.byNormalizedValue.get(normalizeDataValue(lastPart, mapType))\n );\n }\n }\n return undefined;\n}\n"],"names":[],"mappings":";AAGA,MAAM,uBAA+C;AAAA,EACnD,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AACV;AAEO,SAAS,yBAAyB,UAAwC;AAC/E,aAAW,OAAO,YAAY,IAAI;AAChC,UAAM,OAAO,OAAO,GAAG,EAAE,YAAA;AACzB,UAAM,QAAQ,gBAAgB,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC;AAChE,QAAI,MAAO,QAAO;AAAA,EACpB;AACA,SAAO;AACT;AAEO,SAAS,mBAAmB,WAAmB,SAAyB;AAC7E,MAAI,CAAC,UAAW,QAAO;AAEvB,MAAI,aAAa,UACd,cACA,UAAU,KAAK,EACf,QAAQ,oBAAoB,EAAE;AAEjC,eAAa,WAAW,QAAQ,eAAe,QAAQ;AACvD,MAAI,YAAY,QAAQ;AACtB,iBAAa,WAAW,QAAQ,aAAa,GAAG;AAAA,EAClD;AAEA,MAAI,Y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MAAM;AAAA,QACN,MAAM;AAAA,QACN,GAAG,OAAO,MAAM,WAAW,EAAE,EAAE,MAAM,GAAG;AAAA,MAAA;AAE1C,iBAAW,SAAS,SAAS;AAC3B,YAAI,OAAO,UAAU,YAAY,SAAS,UAAU,WAAW;AAC7D,qBAAW,aAAa,mBAAmB,OAAO,UAAU,OAAO;AAAA,QACrE;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAEA,aAAW,OAAO,qBAAsB,mBAAkB,OAAO,GAAG;AACpE,SAAO,EAAE,MAAM,aAAa,kBAAA;AAC9B;AAEO,SAAS,YAAY,WAAmB,SAAiB,OAA0C;;AACxG,MAAI,CAAC,aAAa,CAAC,QAAS,QAAO;AACnC,QAAM,SAAS,MAAM,YAAY,IAAI,UAAU,aAAa;AAC5D,MAAI,OAAQ,QAAO;AACnB,QAAM,aAAa,MAAM,kBAAkB,IAAI,mBAAmB,WAAW,OAAO,CAAC;AACrF,MAAI,WAAY,QAAO;AAEvB,OACG,YAAY,YAAY,YAAY,cAAc,YAAY,aAC/D,UAAU,SAAS,GAAG,GACtB;AACA,UAAM,YAAW,eAAU,MAAM,GAAG,EAAE,GAAG,EAAE,MAA1B,mBAA6B;AAC9C,QAAI,UAAU;AACZ,aACE,MAAM,YAAY,IAAI,SAAS,YAAA,CAAa,KAC5C,MAAM,kBAAkB,IAAI,mBAAmB,UAAU,OAAO,CAAC;AAAA,IAErE;AAAA,EACF;AACA,SAAO;AACT;"}
|
|
1
|
+
{"version":3,"file":"geo-index.js","sources":["../../../../src/components/map-chart/lib/geo-index.ts"],"sourcesContent":["import { COUNTRY_LABEL_ALIASES, COUNTRY_SYNONYMS, GEOJSON_KEYS, MAP_ADMIN_TYPES, type MapAdminType } from './constants.js';\nimport type { FeaturesIndex, GeoJsonFeature } from './types.js';\n\nconst CITY_NAME_VARIATIONS: Record<string, string> = {\n kyiv: 'kiev',\n peking: 'beijing',\n bombay: 'mumbai',\n calcutta: 'kolkata',\n madras: 'chennai',\n saigon: 'hochiminh',\n};\n\nexport function inferMapTypeFromKeyNames(dataKeys: string[]): string | undefined {\n for (const key of dataKeys ?? []) {\n const name = String(key).toLowerCase();\n const found = MAP_ADMIN_TYPES.find((type) => name.includes(type));\n if (found) return found;\n }\n return undefined;\n}\n\nexport function normalizeDataValue(dataValue: string, mapType: string): string {\n if (!dataValue) return '';\n\n let normalized = dataValue\n .toLowerCase()\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '');\n\n normalized = normalized.replace(/\\bst\\.?\\s+/g, 'saint ');\n if (mapType !== 'city') {\n normalized = normalized.replace(/['’´`.-]/g, ' ');\n }\n\n if (mapType === 'city') {\n normalized = normalized\n .normalize('NFD')\n .replace(/[\\u0300-\\u036f]/g, '')\n .replace(/[''`´]/g, '')\n .replace(/[-_]/g, '');\n for (const [from, to] of Object.entries(CITY_NAME_VARIATIONS)) {\n normalized = normalized.replace(new RegExp(`\\\\b${from}\\\\b`, 'g'), to);\n }\n }\n\n if (mapType === 'country') return normalized;\n\n const parts = normalized.replace(/ /g, '').split(',');\n if (mapType === 'county') {\n return parts.map((item) => item.replace('county', '')).join(',');\n }\n return parts.join(',');\n}\n\nexport function getRegionIdFromFeatureProperties(\n featureProperties: Record<string, unknown> | null | undefined,\n mapType?: string,\n): string | undefined {\n if (!featureProperties || !mapType) return undefined;\n const keys = GEOJSON_KEYS[mapType as MapAdminType];\n if (!keys) return undefined;\n\n if (mapType === 'country') {\n const iso = featureProperties[keys.id];\n if (iso === '-99') return String(featureProperties.adm0_a3 ?? iso);\n return iso != null ? String(iso) : undefined;\n }\n\n const id = featureProperties[keys.id];\n return id != null && String(id) !== '' ? String(id) : undefined;\n}\n\nfunction getDataValueFromFeature(feature: GeoJsonFeature, mapType: string): string | undefined {\n const props = feature.properties;\n if (!props) return undefined;\n const keys = GEOJSON_KEYS[mapType as MapAdminType];\n if (!keys) return undefined;\n\n const getProp = (field: keyof typeof keys): string | undefined => {\n const value = props[keys[field]];\n return typeof value === 'string' && value ? value : undefined;\n };\n\n const buildComposite = (\n parts: Array<keyof typeof keys>,\n fallbackKey: keyof typeof keys,\n ): string | undefined => {\n const values = parts.map(getProp);\n return values.every((v) => v) ? values.join(',') : getProp(fallbackKey);\n };\n\n switch (mapType) {\n case 'city': {\n const country = getProp('country');\n const state = getProp('state');\n const name = getProp('name');\n if (country && state && name) return `${country},${state},${name}`;\n if (country && name) return `${country},${name}`;\n return name;\n }\n case 'county':\n return buildComposite(['country', 'state', 'county'], 'county');\n case 'state':\n case 'province':\n return buildComposite(['country', 'state'], 'state');\n case 'country':\n case 'region':\n return getProp('name');\n default:\n return undefined;\n }\n}\n\nfunction indexAlias(\n byDataValue: Map<string, string>,\n byNormalizedValue: Map<string, string>,\n alias: string,\n regionId: string,\n mapType: string,\n): void {\n const lower = alias.toLowerCase();\n if (!byDataValue.has(lower)) byDataValue.set(lower, regionId);\n const normalized = normalizeDataValue(alias, mapType);\n if (!byNormalizedValue.has(normalized)) byNormalizedValue.set(normalized, regionId);\n}\n\nexport function createFeaturesIndex(features: GeoJsonFeature[], mapType: string): FeaturesIndex {\n const byId = new Map<string, GeoJsonFeature>();\n const byDataValue = new Map<string, string>();\n const byNormalizedValue = new Map<string, string>();\n if (!features.length || !mapType) return { byId, byDataValue, byNormalizedValue };\n\n const ambiguousTwoPartKeys = new Set<string>();\n\n for (const feature of features) {\n const regionId = getRegionIdFromFeatureProperties(feature.properties, mapType);\n if (!regionId) continue;\n byId.set(regionId, feature);\n\n const dataValue = getDataValueFromFeature(feature, mapType);\n if (!dataValue) continue;\n\n const normalized = normalizeDataValue(dataValue, mapType);\n byDataValue.set(dataValue.toLowerCase(), regionId);\n byNormalizedValue.set(normalized, regionId);\n\n const props = feature.properties;\n if (!props) continue;\n\n if (mapType === 'city') {\n const country = props.COUNTRY;\n const state = props.NAME_1;\n const cityName = props.NAME_2;\n if (typeof country === 'string' && typeof cityName === 'string') {\n const twoPart = normalizeDataValue(`${country},${cityName}`, mapType);\n const existing = byNormalizedValue.get(twoPart);\n if (existing && existing !== regionId) ambiguousTwoPartKeys.add(twoPart);\n else byNormalizedValue.set(twoPart, regionId);\n }\n if (\n typeof country === 'string' &&\n typeof state === 'string' &&\n typeof cityName === 'string' &&\n state !== cityName\n ) {\n const stateFormat = normalizeDataValue(`${country},${state}`, mapType);\n if (!byNormalizedValue.has(stateFormat)) byNormalizedValue.set(stateFormat, regionId);\n }\n }\n\n if (mapType === 'county') {\n const country = props.COUNTRY;\n const countyName = props.NAME_2;\n if (typeof country === 'string' && typeof countyName === 'string') {\n for (const countryForm of [country, ...(COUNTRY_SYNONYMS[country] ?? [])]) {\n const twoPart = normalizeDataValue(`${countryForm},${countyName}`, mapType);\n const existing = byNormalizedValue.get(twoPart);\n if (existing && existing !== regionId) ambiguousTwoPartKeys.add(twoPart);\n else byNormalizedValue.set(twoPart, regionId);\n }\n }\n }\n\n if (mapType === 'region' || mapType === 'province') {\n const country = props.admin;\n const regionName = props.name;\n const unitNames = [regionName, props.name_en, ...String(props.aliases ?? '').split('|')].filter(\n (n): n is string => typeof n === 'string' && n.length > 0,\n );\n const countryForms =\n typeof country === 'string' ? [country, ...(COUNTRY_SYNONYMS[country] ?? [])] : [];\n for (const countryForm of countryForms) {\n for (const unitName of unitNames) {\n const composite = normalizeDataValue(`${countryForm},${unitName}`, mapType);\n if (!byNormalizedValue.has(composite)) byNormalizedValue.set(composite, regionId);\n }\n }\n for (const alias of [props.name_en, ...String(props.aliases ?? '').split('|')]) {\n if (typeof alias !== 'string' || !alias || alias === regionName) continue;\n indexAlias(byDataValue, byNormalizedValue, alias, regionId, mapType);\n }\n }\n\n if (mapType === 'state' || mapType === 'province') {\n const keys = GEOJSON_KEYS[mapType];\n const bareName = props[keys.state] ?? props[keys.name];\n if (typeof bareName === 'string' && bareName) {\n indexAlias(byDataValue, byNormalizedValue, bareName, regionId, mapType);\n }\n }\n\n if (mapType === 'country') {\n const aliases = [\n props.name_long,\n props.formal_en,\n props.brk_name,\n props.admin,\n props.geounit,\n ...String(props.aliases ?? '').split('|'),\n ];\n for (const seed of [dataValue, props.name, ...aliases]) {\n if (typeof seed !== 'string' || !seed) continue;\n aliases.push(...(COUNTRY_LABEL_ALIASES[seed] ?? []));\n }\n for (const alias of aliases) {\n if (typeof alias === 'string' && alias && alias !== dataValue) {\n indexAlias(byDataValue, byNormalizedValue, alias, regionId, mapType);\n }\n }\n }\n }\n\n for (const key of ambiguousTwoPartKeys) byNormalizedValue.delete(key);\n return { byId, byDataValue, byNormalizedValue };\n}\n\nexport function getRegionId(dataValue: string, mapType: string, index: FeaturesIndex): string | undefined {\n if (!dataValue || !mapType) return undefined;\n const direct = index.byDataValue.get(dataValue.toLowerCase());\n if (direct) return direct;\n const normalized = index.byNormalizedValue.get(normalizeDataValue(dataValue, mapType));\n if (normalized) return normalized;\n\n if (\n (mapType === 'region' || mapType === 'province' || mapType === 'county') &&\n dataValue.includes(',')\n ) {\n const lastPart = dataValue.split(',').at(-1)?.trim();\n if (lastPart) {\n return (\n index.byDataValue.get(lastPart.toLowerCase()) ??\n index.byNormalizedValue.get(normalizeDataValue(lastPart, mapType))\n );\n }\n }\n return undefined;\n}\n"],"names":[],"mappings":";AAGA,MAAM,uBAA+C;AAAA,EACnD,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,QAAQ;AACV;AAEO,SAAS,yBAAyB,UAAwC;AAC/E,aAAW,OAAO,YAAY,IAAI;AAChC,UAAM,OAAO,OAAO,GAAG,EAAE,YAAA;AACzB,UAAM,QAAQ,gBAAgB,KAAK,CAAC,SAAS,KAAK,SAAS,IAAI,CAAC;AAChE,QAAI,MAAO,QAAO;AAAA,EACpB;AACA,SAAO;AACT;AAEO,SAAS,mBAAmB,WAAmB,SAAyB;AAC7E,MAAI,CAAC,UAAW,QAAO;AAEvB,MAAI,aAAa,UACd,cACA,UAAU,KAAK,EACf,QAAQ,oBAAoB,EAAE;AAEjC,eAAa,WAAW,Q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|
5
5
|
position: relative;
|
|
6
6
|
width: 100%;
|
|
7
7
|
height: 100%;
|
|
8
|
-
min-height: 220px;
|
|
8
|
+
min-height: var(--ui9000-host-min-height, 220px);
|
|
9
9
|
color: var(--ui9000-color-text, #111827);
|
|
10
10
|
font-family: var(--ui9000-font-family, system-ui, sans-serif);
|
|
11
11
|
box-sizing: border-box;
|
|
@@ -13,7 +13,7 @@ const stepLineChartStyles = css`
|
|
|
13
13
|
.chart-root {
|
|
14
14
|
flex: 1 1 auto;
|
|
15
15
|
width: 100%;
|
|
16
|
-
min-height: 240px;
|
|
16
|
+
min-height: var(--ui9000-plot-min-height, 240px);
|
|
17
17
|
}
|
|
18
18
|
.tooltip {
|
|
19
19
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../src/components/step-line-chart/element/styles.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const stepLineChartStyles = css`\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n min-height: 220px;\n color: var(--ui9000-color-text, #111827);\n font-family: var(--ui9000-font-family, system-ui, sans-serif);\n box-sizing: border-box;\n }\n .chart-root {\n flex: 1 1 auto;\n width: 100%;\n min-height: 240px;\n }\n .tooltip {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n padding: 6px 10px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.35;\n background: var(--ui9000-color-text, #111827);\n color: #fff;\n box-shadow: 0 4px 12px rgb(0 0 0 / 18%);\n transform: translate(-50%, calc(-100% - 12px));\n white-space: nowrap;\n }\n .tooltip .x {\n font-weight: 600;\n margin-bottom: 2px;\n }\n .tooltip .row {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n .tooltip .swatch {\n width: 8px;\n height: 8px;\n border-radius: 2px;\n flex: none;\n }\n .tooltip .value {\n margin-left: auto;\n font-variant-numeric: tabular-nums;\n }\n .empty {\n display: grid;\n place-items: center;\n height: 100%;\n min-height: inherit;\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 0.875rem;\n }\n`;\n"],"names":[],"mappings":";AAEO,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../../src/components/step-line-chart/element/styles.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const stepLineChartStyles = css`\n :host {\n display: block;\n position: relative;\n width: 100%;\n height: 100%;\n min-height: var(--ui9000-host-min-height, 220px);\n color: var(--ui9000-color-text, #111827);\n font-family: var(--ui9000-font-family, system-ui, sans-serif);\n box-sizing: border-box;\n }\n .chart-root {\n flex: 1 1 auto;\n width: 100%;\n min-height: var(--ui9000-plot-min-height, 240px);\n }\n .tooltip {\n position: absolute;\n pointer-events: none;\n z-index: 2;\n padding: 6px 10px;\n border-radius: 6px;\n font-size: 12px;\n line-height: 1.35;\n background: var(--ui9000-color-text, #111827);\n color: #fff;\n box-shadow: 0 4px 12px rgb(0 0 0 / 18%);\n transform: translate(-50%, calc(-100% - 12px));\n white-space: nowrap;\n }\n .tooltip .x {\n font-weight: 600;\n margin-bottom: 2px;\n }\n .tooltip .row {\n display: flex;\n align-items: center;\n gap: 6px;\n }\n .tooltip .swatch {\n width: 8px;\n height: 8px;\n border-radius: 2px;\n flex: none;\n }\n .tooltip .value {\n margin-left: auto;\n font-variant-numeric: tabular-nums;\n }\n .empty {\n display: grid;\n place-items: center;\n height: 100%;\n min-height: inherit;\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 0.875rem;\n }\n`;\n"],"names":[],"mappings":";AAEO,MAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-shell-styles.d.ts","sourceRoot":"","sources":["../../src/element/chart-shell-styles.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"chart-shell-styles.d.ts","sourceRoot":"","sources":["../../src/element/chart-shell-styles.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,yBAgO5B,CAAC"}
|
|
@@ -13,6 +13,13 @@ const chartShellStyles = css`
|
|
|
13
13
|
background: var(--ui9000-color-surface, #ffffff);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
:host([embedded]) .widget-shell {
|
|
17
|
+
padding: 8px 10px 4px;
|
|
18
|
+
border: none;
|
|
19
|
+
border-radius: 0;
|
|
20
|
+
background: transparent;
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
.widget-header {
|
|
17
24
|
display: flex;
|
|
18
25
|
align-items: flex-start;
|
|
@@ -94,8 +101,8 @@ const chartShellStyles = css`
|
|
|
94
101
|
|
|
95
102
|
.widget-body {
|
|
96
103
|
flex: 1 1 auto;
|
|
97
|
-
/* Chat/MCP hosts often set only min-height on :host;
|
|
98
|
-
min-height: 240px;
|
|
104
|
+
/* Chat/MCP hosts often set only min-height on :host; nested panes set this var to 0. */
|
|
105
|
+
min-height: var(--ui9000-plot-min-height, 240px);
|
|
99
106
|
position: relative;
|
|
100
107
|
display: flex;
|
|
101
108
|
flex-direction: column;
|
|
@@ -105,12 +112,12 @@ const chartShellStyles = css`
|
|
|
105
112
|
.widget-body > .chart-root {
|
|
106
113
|
flex: 1 1 auto;
|
|
107
114
|
width: 100%;
|
|
108
|
-
min-height: 240px;
|
|
115
|
+
min-height: var(--ui9000-plot-min-height, 240px);
|
|
109
116
|
}
|
|
110
117
|
|
|
111
118
|
.widget-body > .chart-body {
|
|
112
119
|
flex: 1 1 auto;
|
|
113
|
-
min-height: 240px;
|
|
120
|
+
min-height: var(--ui9000-plot-min-height, 240px);
|
|
114
121
|
}
|
|
115
122
|
|
|
116
123
|
.chart-legend {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chart-shell-styles.js","sources":["../../src/element/chart-shell-styles.ts"],"sourcesContent":["import { css } from 'lit';\n\n/** FuseDash WidgetWrapper chrome — padding, header, menu (MCP chat / Storybook). */\nexport const chartShellStyles = css`\n .widget-shell {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: inherit;\n box-sizing: border-box;\n padding: 12px 16px;\n border: 1px solid var(--ui9000-color-border, #e5e7eb);\n border-radius: 8px;\n background: var(--ui9000-color-surface, #ffffff);\n }\n\n .widget-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n flex-shrink: 0;\n margin-bottom: 8px;\n min-width: 0;\n }\n\n .widget-title {\n flex: 1;\n min-width: 0;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--ui9000-color-text, #111827);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .widget-actions {\n position: relative;\n flex-shrink: 0;\n }\n\n .menu-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: 1px solid var(--ui9000-color-border, #e5e7eb);\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.92);\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 18px;\n line-height: 1;\n cursor: pointer;\n }\n\n .menu-btn:hover {\n background: #fff;\n border-color: var(--ui9000-color-border-strong, #d1d5db);\n }\n\n .menu-dropdown {\n position: absolute;\n top: 36px;\n right: 0;\n z-index: 5;\n min-width: 170px;\n border: 1px solid var(--ui9000-color-border, #e5e7eb);\n border-radius: 10px;\n background: #fff;\n box-shadow:\n 0 10px 15px -3px rgb(0 0 0 / 10%),\n 0 4px 6px -4px rgb(0 0 0 / 10%);\n overflow: hidden;\n }\n\n .menu-item {\n display: block;\n width: 100%;\n padding: 10px 14px;\n border: none;\n background: transparent;\n text-align: left;\n font-size: 13px;\n color: var(--ui9000-color-text, #111827);\n cursor: pointer;\n }\n\n .menu-item:hover {\n background: var(--ui9000-color-surface-muted, #f3f4f6);\n }\n\n .widget-body {\n flex: 1 1 auto;\n /* Chat/MCP hosts often set only min-height on :host;
|
|
1
|
+
{"version":3,"file":"chart-shell-styles.js","sources":["../../src/element/chart-shell-styles.ts"],"sourcesContent":["import { css } from 'lit';\n\n/** FuseDash WidgetWrapper chrome — padding, header, menu (MCP chat / Storybook). */\nexport const chartShellStyles = css`\n .widget-shell {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n min-height: inherit;\n box-sizing: border-box;\n padding: 12px 16px;\n border: 1px solid var(--ui9000-color-border, #e5e7eb);\n border-radius: 8px;\n background: var(--ui9000-color-surface, #ffffff);\n }\n\n :host([embedded]) .widget-shell {\n padding: 8px 10px 4px;\n border: none;\n border-radius: 0;\n background: transparent;\n }\n\n .widget-header {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n flex-shrink: 0;\n margin-bottom: 8px;\n min-width: 0;\n }\n\n .widget-title {\n flex: 1;\n min-width: 0;\n font-size: 14px;\n font-weight: 500;\n line-height: 20px;\n color: var(--ui9000-color-text, #111827);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n .widget-actions {\n position: relative;\n flex-shrink: 0;\n }\n\n .menu-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: 1px solid var(--ui9000-color-border, #e5e7eb);\n border-radius: 8px;\n background: rgba(255, 255, 255, 0.92);\n color: var(--ui9000-color-text-muted, #6b7280);\n font-size: 18px;\n line-height: 1;\n cursor: pointer;\n }\n\n .menu-btn:hover {\n background: #fff;\n border-color: var(--ui9000-color-border-strong, #d1d5db);\n }\n\n .menu-dropdown {\n position: absolute;\n top: 36px;\n right: 0;\n z-index: 5;\n min-width: 170px;\n border: 1px solid var(--ui9000-color-border, #e5e7eb);\n border-radius: 10px;\n background: #fff;\n box-shadow:\n 0 10px 15px -3px rgb(0 0 0 / 10%),\n 0 4px 6px -4px rgb(0 0 0 / 10%);\n overflow: hidden;\n }\n\n .menu-item {\n display: block;\n width: 100%;\n padding: 10px 14px;\n border: none;\n background: transparent;\n text-align: left;\n font-size: 13px;\n color: var(--ui9000-color-text, #111827);\n cursor: pointer;\n }\n\n .menu-item:hover {\n background: var(--ui9000-color-surface-muted, #f3f4f6);\n }\n\n .widget-body {\n flex: 1 1 auto;\n /* Chat/MCP hosts often set only min-height on :host; nested panes set this var to 0. */\n min-height: var(--ui9000-plot-min-height, 240px);\n position: relative;\n display: flex;\n flex-direction: column;\n }\n\n /* Default plot slot — charts may nest further (box/bar scroll). */\n .widget-body > .chart-root {\n flex: 1 1 auto;\n width: 100%;\n min-height: var(--ui9000-plot-min-height, 240px);\n }\n\n .widget-body > .chart-body {\n flex: 1 1 auto;\n min-height: var(--ui9000-plot-min-height, 240px);\n }\n\n .chart-legend {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px 16px;\n flex-shrink: 0;\n margin-bottom: 8px;\n font-size: 11px;\n line-height: 1.2;\n color: var(--ui9000-color-text-muted, #6c7584);\n }\n\n .legend-item {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n white-space: nowrap;\n }\n\n .legend-swatch {\n width: 10px;\n height: 10px;\n border-radius: 2px;\n flex-shrink: 0;\n }\n\n .legend-line {\n position: relative;\n display: inline-block;\n width: 14px;\n height: 2px;\n border-radius: 1px;\n background: var(--legend-color, #473dd9);\n flex-shrink: 0;\n }\n\n .legend-line--dashed {\n background: transparent;\n border-top: 2px dashed var(--legend-color, #6c7584);\n height: 0;\n }\n\n .legend-dot {\n position: absolute;\n left: 50%;\n top: 50%;\n width: 6px;\n height: 6px;\n border-radius: 50%;\n transform: translate(-50%, -50%);\n }\n\n /* FuseDash ChartLegend legendType=\"palette\" — Low / High sequential ramp. */\n .legend-palette {\n display: flex;\n align-items: center;\n gap: 8px;\n flex-shrink: 0;\n padding-top: 8px;\n padding-bottom: 12px;\n font-size: 12px;\n font-weight: 400;\n line-height: 1.2;\n color: var(--ui9000-color-text-muted, #6c7584);\n }\n\n .legend-palette-swatches {\n display: flex;\n align-items: center;\n }\n\n .legend-palette-swatch {\n width: 14px;\n height: 8px;\n flex-shrink: 0;\n }\n\n .legend-palette-swatch:first-child {\n border-top-left-radius: 8px;\n border-bottom-left-radius: 8px;\n }\n\n .legend-palette-swatch:last-child {\n border-top-right-radius: 8px;\n border-bottom-right-radius: 8px;\n }\n\n .label-tooltip {\n position: absolute;\n pointer-events: none;\n z-index: 4;\n max-width: min(320px, 90vw);\n padding: 2px 5px;\n border: 1px solid var(--ui9000-color-border, #e5e7eb);\n border-radius: 5px;\n font-size: 11px;\n line-height: 1.35;\n background: var(--ui9000-color-surface, #fff);\n color: var(--ui9000-color-text-muted, #6c7584);\n box-shadow: 0 2px 8px rgb(0 0 0 / 8%);\n transform: translate(-50%, calc(-100% - 8px));\n white-space: nowrap;\n }\n`;\n"],"names":[],"mappings":";AAGO,MAAM,mBAAmB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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A;AAAA;AAAA;AAAA;"}
|
|
@@ -5,6 +5,11 @@ import { LabelTooltipState } from '../utils/chart-shell.js';
|
|
|
5
5
|
export declare abstract class Ui9000ChartElement extends LitElement {
|
|
6
6
|
dataJson: string;
|
|
7
7
|
chartTitle: string;
|
|
8
|
+
/**
|
|
9
|
+
* On by default; `show-header="false"` turns it off. A plain `type: Boolean`
|
|
10
|
+
* property would read any present attribute as true, so hosts that embed a
|
|
11
|
+
* chart inside their own chrome could not suppress the header.
|
|
12
|
+
*/
|
|
8
13
|
showHeader: boolean;
|
|
9
14
|
protected _labelTooltip: LabelTooltipState;
|
|
10
15
|
protected _menuOpen: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui9000-chart-base.d.ts","sourceRoot":"","sources":["../../src/element/ui9000-chart-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAG1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAM3D,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAEjC,8DAA8D;AAC9D,8BAAsB,kBAAmB,SAAQ,UAAU;IAEzD,QAAQ,SAAQ;IAGhB,UAAU,SAAM;
|
|
1
|
+
{"version":3,"file":"ui9000-chart-base.d.ts","sourceRoot":"","sources":["../../src/element/ui9000-chart-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAG1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAM3D,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAEjC,8DAA8D;AAC9D,8BAAsB,kBAAmB,SAAQ,UAAU;IAEzD,QAAQ,SAAQ;IAGhB,UAAU,SAAM;IAEhB;;;;OAIG;IAQH,UAAU,UAAQ;IAGlB,SAAS,CAAC,aAAa,EAAE,iBAAiB,CAAQ;IAGlD,SAAS,CAAC,SAAS,UAAS;IAE5B,SAAS,CAAC,WAAW,QAAO,IAAI,CAE9B;IAEO,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;IAKrC,SAAS,CAAC,WAAW,IAAI,MAAM;IAI/B,SAAS,CAAC,iBAAiB;IAM3B,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,MAAM;IAgBzC,SAAS,CAAC,uBAAuB;CAGlC;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -65,7 +65,13 @@ __decorateClass([
|
|
|
65
65
|
property({ type: String, attribute: "chart-title" })
|
|
66
66
|
], Ui9000ChartElement.prototype, "chartTitle");
|
|
67
67
|
__decorateClass([
|
|
68
|
-
property({
|
|
68
|
+
property({
|
|
69
|
+
converter: {
|
|
70
|
+
fromAttribute: (value) => value !== null && value !== "false",
|
|
71
|
+
toAttribute: (value) => value ? "" : "false"
|
|
72
|
+
},
|
|
73
|
+
attribute: "show-header"
|
|
74
|
+
})
|
|
69
75
|
], Ui9000ChartElement.prototype, "showHeader");
|
|
70
76
|
__decorateClass([
|
|
71
77
|
state()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ui9000-chart-base.js","sources":["../../src/element/ui9000-chart-base.ts"],"sourcesContent":["import { LitElement, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\n\nimport { chartShellStyles } from './chart-shell-styles.js';\nimport {\n dispatchChartDownload,\n renderLabelTooltip,\n renderWidgetHeader,\n} from './chart-shell-render.js';\nimport {\n createAxisLabelHandlers,\n resolveHeaderTitle,\n type LabelTooltipState,\n} from '../utils/chart-shell.js';\n\n/** Shared widget chrome: header, axis-label tooltip, menu. */\nexport abstract class Ui9000ChartElement extends LitElement {\n @property({ type: String, attribute: 'data' })\n dataJson = '[]';\n\n @property({ type: String, attribute: 'chart-title' })\n chartTitle = '';\n\n @property({
|
|
1
|
+
{"version":3,"file":"ui9000-chart-base.js","sources":["../../src/element/ui9000-chart-base.ts"],"sourcesContent":["import { LitElement, nothing } from 'lit';\nimport { property, state } from 'lit/decorators.js';\n\nimport { chartShellStyles } from './chart-shell-styles.js';\nimport {\n dispatchChartDownload,\n renderLabelTooltip,\n renderWidgetHeader,\n} from './chart-shell-render.js';\nimport {\n createAxisLabelHandlers,\n resolveHeaderTitle,\n type LabelTooltipState,\n} from '../utils/chart-shell.js';\n\n/** Shared widget chrome: header, axis-label tooltip, menu. */\nexport abstract class Ui9000ChartElement extends LitElement {\n @property({ type: String, attribute: 'data' })\n dataJson = '[]';\n\n @property({ type: String, attribute: 'chart-title' })\n chartTitle = '';\n\n /**\n * On by default; `show-header=\"false\"` turns it off. A plain `type: Boolean`\n * property would read any present attribute as true, so hosts that embed a\n * chart inside their own chrome could not suppress the header.\n */\n @property({\n converter: {\n fromAttribute: (value: string | null): boolean => value !== null && value !== 'false',\n toAttribute: (value: boolean): string => (value ? '' : 'false'),\n },\n attribute: 'show-header',\n })\n showHeader = true;\n\n @state()\n protected _labelTooltip: LabelTooltipState = null;\n\n @state()\n protected _menuOpen = false;\n\n protected _onDocClick = (): void => {\n this._menuOpen = false;\n };\n\n override connectedCallback(): void {\n super.connectedCallback();\n document.addEventListener('click', this._onDocClick);\n }\n\n override disconnectedCallback(): void {\n document.removeEventListener('click', this._onDocClick);\n super.disconnectedCallback();\n }\n\n protected headerTitle(): string {\n return resolveHeaderTitle(this.chartTitle, this.dataJson, this.showHeader);\n }\n\n protected axisLabelHandlers() {\n return createAxisLabelHandlers(this, (t) => {\n this._labelTooltip = t;\n });\n }\n\n protected renderShellHeader(title: string) {\n if (!title) return nothing;\n return renderWidgetHeader({\n title,\n menuOpen: this._menuOpen,\n onMenuToggle: (e: Event) => {\n e.stopPropagation();\n this._menuOpen = !this._menuOpen;\n },\n onMenuClose: () => {\n this._menuOpen = false;\n },\n onDownload: () => dispatchChartDownload(this),\n });\n }\n\n protected renderShellLabelTooltip() {\n return renderLabelTooltip(this._labelToo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mBAKpB,WAAA,YAAA;AAcA,gBAAA;AAAA,EAPC,SAAS;AAAA,IACR,WAAW;AAAA,MACT,eAAe,CAAC,UAAkC,UAAU,QAAQ,UAAU;AAAA,MAC9E,aAAa,CAAC,UAA4B,QAAQ,KAAK;AAAA,IAAA;AAAA,IAEzD,WAAW;AAAA,EAAA,CACZ;AAAA,GAlBmB,mBAmBpB,WAAA,YAAA;AAGU,gBAAA;AAAA,EADT,MAAA;AAAM,GArBa,mBAsBV,WAAA,eAAA;AAGA,gBAAA;AAAA,EADT,MAAA;AAAM,GAxBa,mBAyBV,WAAA,WAAA;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -30,10 +30,11 @@ import { registerPartialDependenceChart, Ui9000PartialDependenceChart } from './
|
|
|
30
30
|
import { registerKpiWidget, Ui9000KpiWidget } from './components/kpi-widget/index.js';
|
|
31
31
|
import { registerGiniImpurityEntropyChart, Ui9000GiniImpurityEntropyChart } from './components/gini-impurity-entropy-chart/index.js';
|
|
32
32
|
import { registerMapChart, Ui9000MapChart } from './components/map-chart/index.js';
|
|
33
|
+
import { registerCustomWidget, Ui9000CustomWidget } from './components/custom-widget/index.js';
|
|
33
34
|
export * from './context/index.js';
|
|
34
35
|
export * from './types/index.js';
|
|
35
|
-
export { loadBarChart, loadChart, loadLineChart, loadAreaChart, loadAreaGroupedBarChart, loadLollipop, loadStepLineChart, loadSparkLineChart, loadSparkAreaChart, loadScatterSparklineChart, loadChartRenderer, loadHistogramChart, loadPunchcardChart, loadMatrixChart, loadBoxPlotChart, loadViolinChart, loadWaterfallChart, loadSankeyChart, loadParallelCoordinatesChart, loadPieChart, loadDonutChart, loadPolarAreaChart, loadScatterPlotChart, loadNetworkGraph, loadBiasVarianceTradeoffChart, loadBubbleChart, loadRadarChart, loadRadialBarChart, loadTreemapChart, loadPartialDependenceChart, loadKpiWidget, loadGiniImpurityEntropyChart, loadMapChart, type ChartKind, } from './lazy/index.js';
|
|
36
|
-
export { Ui9000BarChart, registerBarChart, Ui9000LineChart, registerLineChart, Ui9000AreaChart, registerAreaChart, Ui9000AreaGroupedBarChart, registerAreaGroupedBarChart, Ui9000Lollipop, registerLollipop, Ui9000StepLineChart, registerStepLineChart, Ui9000SparkLineChart, registerSparkLineChart, Ui9000SparkAreaChart, registerSparkAreaChart, Ui9000ScatterSparklineChart, registerScatterSparklineChart, Ui9000ChartRenderer, registerChartRenderer, Ui9000HistogramChart, registerHistogramChart, Ui9000PunchcardChart, registerPunchcardChart, Ui9000MatrixChart, registerMatrixChart, Ui9000BoxPlotChart, registerBoxPlotChart, Ui9000ViolinChart, registerViolinChart, Ui9000WaterfallChart, registerWaterfallChart, Ui9000SankeyChart, registerSankeyChart, Ui9000ParallelCoordinatesChart, registerParallelCoordinatesChart, Ui9000PieChart, registerPieChart, Ui9000DonutChart, registerDonutChart, Ui9000PolarAreaChart, registerPolarAreaChart, Ui9000ScatterPlot, registerScatterPlot, Ui9000NetworkGraph, registerNetworkGraph, Ui9000BiasVarianceTradeoffChart, registerBiasVarianceTradeoffChart, Ui9000BubbleChart, registerBubbleChart, Ui9000RadarChart, registerRadarChart, Ui9000RadialBarChart, registerRadialBarChart, Ui9000TreemapChart, registerTreemapChart, Ui9000PartialDependenceChart, registerPartialDependenceChart, Ui9000KpiWidget, registerKpiWidget, Ui9000GiniImpurityEntropyChart, registerGiniImpurityEntropyChart, Ui9000MapChart, registerMapChart, };
|
|
36
|
+
export { loadBarChart, loadChart, loadLineChart, loadAreaChart, loadAreaGroupedBarChart, loadLollipop, loadStepLineChart, loadSparkLineChart, loadSparkAreaChart, loadScatterSparklineChart, loadChartRenderer, loadHistogramChart, loadPunchcardChart, loadMatrixChart, loadBoxPlotChart, loadViolinChart, loadWaterfallChart, loadSankeyChart, loadParallelCoordinatesChart, loadPieChart, loadDonutChart, loadPolarAreaChart, loadScatterPlotChart, loadNetworkGraph, loadBiasVarianceTradeoffChart, loadBubbleChart, loadRadarChart, loadRadialBarChart, loadTreemapChart, loadPartialDependenceChart, loadKpiWidget, loadGiniImpurityEntropyChart, loadMapChart, loadCustomWidget, type ChartKind, } from './lazy/index.js';
|
|
37
|
+
export { Ui9000BarChart, registerBarChart, Ui9000LineChart, registerLineChart, Ui9000AreaChart, registerAreaChart, Ui9000AreaGroupedBarChart, registerAreaGroupedBarChart, Ui9000Lollipop, registerLollipop, Ui9000StepLineChart, registerStepLineChart, Ui9000SparkLineChart, registerSparkLineChart, Ui9000SparkAreaChart, registerSparkAreaChart, Ui9000ScatterSparklineChart, registerScatterSparklineChart, Ui9000ChartRenderer, registerChartRenderer, Ui9000HistogramChart, registerHistogramChart, Ui9000PunchcardChart, registerPunchcardChart, Ui9000MatrixChart, registerMatrixChart, Ui9000BoxPlotChart, registerBoxPlotChart, Ui9000ViolinChart, registerViolinChart, Ui9000WaterfallChart, registerWaterfallChart, Ui9000SankeyChart, registerSankeyChart, Ui9000ParallelCoordinatesChart, registerParallelCoordinatesChart, Ui9000PieChart, registerPieChart, Ui9000DonutChart, registerDonutChart, Ui9000PolarAreaChart, registerPolarAreaChart, Ui9000ScatterPlot, registerScatterPlot, Ui9000NetworkGraph, registerNetworkGraph, Ui9000BiasVarianceTradeoffChart, registerBiasVarianceTradeoffChart, Ui9000BubbleChart, registerBubbleChart, Ui9000RadarChart, registerRadarChart, Ui9000RadialBarChart, registerRadialBarChart, Ui9000TreemapChart, registerTreemapChart, Ui9000PartialDependenceChart, registerPartialDependenceChart, Ui9000KpiWidget, registerKpiWidget, Ui9000GiniImpurityEntropyChart, registerGiniImpurityEntropyChart, Ui9000MapChart, registerMapChart, Ui9000CustomWidget, registerCustomWidget, };
|
|
37
38
|
/** Register all published chart web components (eager). Prefer lazy imports in MCP hosts. */
|
|
38
39
|
export declare function registerAllCharts(): void;
|
|
39
40
|
export { normalizeBarData, renderBarChart, type BarChartData, type BarHoverEntry, type BarLayout, type BarOrientation, type BarPoint, type BarSeries, barChartMetadata, } from './components/bar-chart/index.js';
|
|
@@ -66,6 +67,7 @@ export { normalizeRadialBarData, renderRadialBarChart, radialBarAngleScale, radi
|
|
|
66
67
|
export { normalizeTreemapData, renderTreemapChart, treemapGridTemplate, treemapRangeColors, treemapValueRanges, type TreemapChartData, type TreemapGroupCard, type TreemapMode, type TreemapModel, type TreemapTile, treemapChartMetadata, } from './components/treemap-chart/index.js';
|
|
67
68
|
export { normalizePartialDependenceData, renderPartialDependenceChart, type IcePoint, type IceSeries, type PartialDependenceChartData, type PartialDependenceModel, partialDependenceChartMetadata, } from './components/partial-dependence-chart/index.js';
|
|
68
69
|
export { normalizeKpiData, extractCardsFromKpi, isAdvancedKpiItem, formatKpiValue, splitFormattedKpiValue, getKpiGridColumns, getKpiGridScrollAxis, getAdvancedSplitLayout, MIN_KPI_CELL_WIDTH, type AdvancedSplitLayout, type KpiCardModel, type KpiGridScrollAxis, type KpiStatusBadge, type KpiValueLabel, type KpiWidgetData, type KpiWidgetLayout, type KpiWidgetModel, type RawKpiItem, kpiWidgetMetadata, } from './components/kpi-widget/index.js';
|
|
70
|
+
export { normalizeCustomWidget, normalizeTableModel, isContentChartType, paneFlexDirection, KPI_ROW_HEIGHT, MAX_PANES, PANE_GAP, customWidgetMetadata, type ArrangingDirection, type CustomPane, type CustomPaneKind, type CustomTableModel, type CustomWidgetArranging, type CustomWidgetModel, type CustomWidgetPayload, } from './components/custom-widget/index.js';
|
|
69
71
|
export { normalizeGiniImpurityEntropyData, renderGiniImpurityEntropyChart, giniImpurity, splitAnnotation, type GiniHoverEntry, type GiniImpurityEntropyChartData, type GiniImpurityEntropyFusePayload, type GiniImpurityEntropyModel, type GiniOverlayFlags, type GiniOverlays, type GiniSeries, type GiniSeriesPoint, type SplitAnnotation, giniImpurityEntropyChartMetadata, } from './components/gini-impurity-entropy-chart/index.js';
|
|
70
72
|
export { normalizeMapData, renderMapChart, stopMapChart, GEOJSON_KEYS, type MapChartInput, type MapHoverEntry, type MapLayerModel, type MapModel, mapChartMetadata, } from './components/map-chart/index.js';
|
|
71
73
|
export { getUniversalFormatting, getUniversalMarkers, getFormattingKeys, formattingInputFromWidget, resolveWidgetFormatting, resolveWidgetMarkers, type UniversalFormattingInput, type ChartFormattingItem, type ChartMarkerItem, type ChartMarkerShape, } from './utils/chart-formatting/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EACL,YAAY,EACZ,SAAS,EACT,aAAa,EACb,aAAa,EACb,uBAAuB,EACvB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,4BAA4B,EAC5B,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,gBAAgB,EAChB,6BAA6B,EAC7B,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,0BAA0B,EAC1B,aAAa,EACb,4BAA4B,EAC5B,YAAY,EACZ,KAAK,SAAS,GACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EACL,iBAAiB,EACjB,eAAe,EAChB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EAC1B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAClF,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,sBAAsB,EACtB,oBAAoB,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