p1-charts 0.3.0 → 0.4.0
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 +26 -0
- package/README.md +58 -2
- package/dist/CategoryBarChart-KYzsjGwg.js +715 -0
- package/dist/CategoryBarChart-KYzsjGwg.js.map +1 -0
- package/dist/{ChartFrame-B1bVFM2E.js → ChartFrame-DOEsou-R.js} +2 -2
- package/dist/{ChartFrame-B1bVFM2E.js.map → ChartFrame-DOEsou-R.js.map} +1 -1
- package/dist/ChartLegend-B8ZmIG2y.js +46 -0
- package/dist/ChartLegend-B8ZmIG2y.js.map +1 -0
- package/dist/{Heatmap-CFC753mV.js → Heatmap-Bwhf305C.js} +2 -2
- package/dist/{Heatmap-CFC753mV.js.map → Heatmap-Bwhf305C.js.map} +1 -1
- package/dist/{PieLegend-CbpjaOJH.js → PieLegend-16E6W10x.js} +3 -3
- package/dist/{PieLegend-CbpjaOJH.js.map → PieLegend-16E6W10x.js.map} +1 -1
- package/dist/PolarChart-C_vPz-3K.js +489 -0
- package/dist/PolarChart-C_vPz-3K.js.map +1 -0
- package/dist/{TimeSeriesChart-BzeHEtQl.js → TimeSeriesChart-BZMLERDZ.js} +451 -451
- package/dist/{TimeSeriesChart-BzeHEtQl.js.map → TimeSeriesChart-BZMLERDZ.js.map} +1 -1
- package/dist/category.d.ts +4 -1
- package/dist/category.d.ts.map +1 -1
- package/dist/category.js +4 -3
- package/dist/charts/CategoryBarChart/index.d.ts +3 -1
- package/dist/charts/CategoryBarChart/index.d.ts.map +1 -1
- package/dist/charts/ScatterChart/index.d.ts +1 -1
- package/dist/charts/ScatterChart/index.d.ts.map +1 -1
- package/dist/components/ChartLegend/index.d.ts +13 -0
- package/dist/components/ChartLegend/index.d.ts.map +1 -0
- package/dist/{css-BtFQ2bM4.js → css-BTZA9hea.js} +2 -2
- package/dist/{css-BtFQ2bM4.js.map → css-BTZA9hea.js.map} +1 -1
- package/dist/heatmap.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +64 -63
- package/dist/index.js.map +1 -1
- package/dist/pie.js +1 -1
- package/dist/scatter.d.ts +4 -1
- package/dist/scatter.d.ts.map +1 -1
- package/dist/scatter.js +3 -2
- package/dist/series.js +1 -1
- package/dist/standalone/p1-charts.standalone.js +13 -0
- package/dist/standalone.d.ts +27 -0
- package/dist/standalone.d.ts.map +1 -0
- package/dist/story.js +2 -2
- package/dist/theme.js +2 -2
- package/dist/{theme.utils-DgmWROoe.js → theme.utils-DF_e8LxQ.js} +118 -119
- package/dist/theme.utils-DF_e8LxQ.js.map +1 -0
- package/dist/types/category.d.ts +16 -0
- package/dist/types/category.d.ts.map +1 -1
- package/dist/types/scatter.d.ts +31 -0
- package/dist/types/scatter.d.ts.map +1 -1
- package/dist/{useChartTheme-KKtc1C4K.js → useChartTheme-D0bQ3LQq.js} +2 -2
- package/dist/{useChartTheme-KKtc1C4K.js.map → useChartTheme-D0bQ3LQq.js.map} +1 -1
- package/dist/utils/category.utils.d.ts +13 -1
- package/dist/utils/category.utils.d.ts.map +1 -1
- package/dist/utils/scatter.utils.d.ts +17 -1
- package/dist/utils/scatter.utils.d.ts.map +1 -1
- package/dist/utils/theme.utils.d.ts +1 -1
- package/dist/utils/theme.utils.d.ts.map +1 -1
- package/package.json +7 -3
- package/src/category.ts +4 -1
- package/src/charts/CategoryBarChart/index.tsx +108 -19
- package/src/charts/ScatterChart/index.tsx +73 -10
- package/src/components/ChartLegend/index.tsx +46 -0
- package/src/index.ts +5 -1
- package/src/scatter.ts +4 -1
- package/src/standalone.tsx +68 -0
- package/src/types/category.ts +16 -0
- package/src/types/scatter.ts +20 -0
- package/src/utils/category.utils.ts +89 -2
- package/src/utils/scatter.utils.ts +22 -5
- package/src/utils/theme.utils.ts +18 -15
- package/dist/CategoryBarChart-1Kn3Vozc.js +0 -580
- package/dist/CategoryBarChart-1Kn3Vozc.js.map +0 -1
- package/dist/PolarChart-hcNTWKfJ.js +0 -450
- package/dist/PolarChart-hcNTWKfJ.js.map +0 -1
- package/dist/theme.utils-DgmWROoe.js.map +0 -1
package/dist/category.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
export { CategoryBarChart } from "./charts/CategoryBarChart/index.js";
|
|
2
|
-
export { categoryLayout } from "./utils/category.utils.js";
|
|
2
|
+
export { categoryLayout, niceExtent, niceStep } from "./utils/category.utils.js";
|
|
3
|
+
export { labelRoom } from "./charts/CategoryBarChart/index.js";
|
|
4
|
+
export { ChartLegend } from "./components/ChartLegend/index.js";
|
|
5
|
+
export type { ChartLegendItem } from "./components/ChartLegend/index.js";
|
|
3
6
|
export { bin } from "./utils/bin.utils.js";
|
|
4
7
|
export type { CategoryBand, CategoryBarChartProps, CategoryBarDatum, CategoryBarSeries, CategoryReference, CategorySort, } from "./types/category.js";
|
|
5
8
|
export type { CategoryBarMode, CategoryDomain, CategoryOrientation, CategoryScale, } from "./utils/category.utils.js";
|
package/dist/category.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../src/category.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../src/category.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,YAAY,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAE3C,YAAY,EACV,YAAY,EACZ,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,aAAa,GACd,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/category.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
|
|
2
|
+
import { a as e, i as t, n, r, t as i } from "./CategoryBarChart-KYzsjGwg.js";
|
|
3
|
+
import { t as a } from "./ChartLegend-B8ZmIG2y.js";
|
|
4
|
+
import { t as o } from "./bin.utils-Ch1y7YDn.js";
|
|
5
|
+
export { i as CategoryBarChart, a as ChartLegend, o as bin, r as categoryLayout, n as labelRoom, t as niceExtent, e as niceStep };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { CategoryBarChartProps } from "../../types/category.js";
|
|
2
|
-
|
|
2
|
+
/** Room for 11px category labels: about 6.2 units a character, never under the old 108. */
|
|
3
|
+
export declare function labelRoom(labels: readonly string[]): number;
|
|
4
|
+
export declare function CategoryBarChart({ categories: sourceCategories, series: sourceSeries, sort, animate, mode, orientation, domain, rightDomain, reference, references, bands, activeIndex, valueLabel, labelWidth, nice, legend, width, height, className, ariaLabel, formatValue, formatTick, renderTooltip, onSelect, theme, unstyled, }: CategoryBarChartProps): import("react").JSX.Element;
|
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/charts/CategoryBarChart/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,qBAAqB,EAGtB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/charts/CategoryBarChart/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,qBAAqB,EAGtB,MAAM,yBAAyB,CAAC;AAwBjC,2FAA2F;AAC3F,wBAAgB,SAAS,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAI3D;AA6BD,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EAAE,gBAAgB,EAC5B,MAAM,EAAE,YAAY,EACpB,IAAa,EACb,OAAc,EACd,IAAc,EACd,WAAwB,EACxB,MAAM,EACN,WAAW,EACX,SAAS,EACT,UAA0B,EAC1B,KAAgB,EAChB,WAAW,EACX,UAAU,EACV,UAAU,EACV,IAAW,EACX,MAAc,EACd,KAAa,EACb,MAAe,EACf,SAAS,EACT,SAAuB,EACvB,WAAW,EACX,UAAU,EACV,aAAa,EACb,QAAQ,EACR,KAAK,EACL,QAAQ,GACT,EAAE,qBAAqB,+BAghBvB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ScatterChartProps } from "../../types/scatter.js";
|
|
2
|
-
export declare function ScatterChart({ series, width, height, className, ariaLabel, xLabel, yLabel, animate, onSelect, renderTooltip, theme, unstyled, }: ScatterChartProps): import("react").JSX.Element;
|
|
2
|
+
export declare function ScatterChart({ series, width, height, className, ariaLabel, xLabel, yLabel, xDomain, yDomain, formatX, formatY, references, legend, animate, onSelect, renderTooltip, theme, unstyled, }: ScatterChartProps): import("react").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/charts/ScatterChart/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/charts/ScatterChart/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAchE,wBAAgB,YAAY,CAAC,EAC3B,MAAM,EACN,KAAa,EACb,MAAe,EACf,SAAS,EACT,SAA2B,EAC3B,MAAM,EACN,MAAM,EACN,OAAO,EACP,OAAO,EACP,OAAO,EACP,OAAO,EACP,UAAe,EACf,MAAc,EACd,OAAc,EACd,QAAQ,EACR,aAAa,EACb,KAAK,EACL,QAAQ,GACT,EAAE,iBAAiB,+BAgQnB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface ChartLegendItem {
|
|
2
|
+
label: string;
|
|
3
|
+
color: string;
|
|
4
|
+
/** Draw the swatch as a dashed line, for a reference such as a diagonal. */
|
|
5
|
+
dashed?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Swatch and name per item, above a chart. `data-part="legend"`, items `legend-item`, swatches `swatch`. */
|
|
8
|
+
export declare function ChartLegend({ items, color, unstyled, }: {
|
|
9
|
+
items: readonly ChartLegendItem[];
|
|
10
|
+
color?: string;
|
|
11
|
+
unstyled?: boolean;
|
|
12
|
+
}): import("react").JSX.Element | null;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ChartLegend/index.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,4EAA4E;IAC5E,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAKD,6GAA6G;AAC7G,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,KAAK,EACL,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,sCAwBA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { l as e, r as t } from "./theme.utils-
|
|
2
|
+
import { l as e, r as t } from "./theme.utils-DF_e8LxQ.js";
|
|
3
3
|
//#region src/themes/p1.tokens.ts
|
|
4
4
|
var n = {
|
|
5
5
|
color: {
|
|
@@ -472,4 +472,4 @@ function l(n) {
|
|
|
472
472
|
//#endregion
|
|
473
473
|
export { o as i, l as n, s as r, c as t };
|
|
474
474
|
|
|
475
|
-
//# sourceMappingURL=css-
|
|
475
|
+
//# sourceMappingURL=css-BTZA9hea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css-BtFQ2bM4.js","names":["themeFromCssVariables","createTheme","P1_TOKENS","\"color\"","\"dark\"","\"surface\"","\"line\"","\"ink\"","\"neutral\"","\"primary\"","\"ash\"","\"accent\"","\"info\"","\"success\"","\"warning\"","\"error\"","\"light\"","\"type\"","\"family\"","\"size\"","\"weight\"","\"heading\"","\"label\"","\"eyebrow\"","\"numeric\"","\"axis\"","\"body\"","\"small\"","\"space\"","text","type","style","p1Theme","c","mode","scale","prefix","step","colourBlind","space","i","p1Accents","p1CssVariables","p1ThemeFromCss","element"],"sources":["../src/themes/p1.tokens.ts","../src/themes/p1.ts","../src/themes/css.ts"],"sourcesContent":["export const P1_TOKENS = {\n \"color\": {\n \"dark\": {\n \"surface\": \"#111111\",\n \"surface-2\": \"#1a1a19\",\n \"line\": \"#2b2b2a\",\n \"control-border\": \"#8a837a\",\n \"ink\": \"#d9d9d9\",\n \"ink-muted\": \"#9d9d9d\",\n \"neutral\": \"#ffffff\",\n \"on-neutral\": \"#111111\",\n \"primary\": \"#ce5a3a\",\n \"on-primary\": \"#111111\",\n \"tera-shadow\": \"#6b2210\",\n \"ash\": \"#d4d0cb\",\n \"accent\": \"#f9a325\",\n \"on-accent\": \"#111111\",\n \"info\": \"#0064fa\",\n \"success\": \"#16a34a\",\n \"warning\": \"#f4b600\",\n \"error\": \"#e51503\",\n \"chart-bg\": \"#111111\",\n \"chart-grid\": \"#2b2b2a\",\n \"chart-text\": \"#9d9d9d\",\n \"chart-crosshair\": \"#8a837a\",\n \"chart-up\": \"#d4d0cb\",\n \"chart-down\": \"#ce5a3a\",\n \"chart-up-alt\": \"#0064fa\",\n \"chart-down-alt\": \"#f9a325\",\n \"chart-up-classic\": \"#16a34a\",\n \"chart-down-classic\": \"#e51503\",\n \"chart-wick\": \"#8a837a\",\n \"chart-highlight\": \"#f9a325\",\n \"chart-now\": \"#d9d9d9\",\n \"chart-threshold\": \"#9d9d9d\",\n \"chart-series-1\": \"#ce5a3a\",\n \"chart-series-2\": \"#3a8bff\",\n \"chart-series-3\": \"#f9a325\",\n \"chart-area-top\": \"rgba(206, 90, 58, 0.32)\",\n \"chart-area-bottom\": \"rgba(206, 90, 58, 0)\",\n \"chart-up-fill\": \"rgba(212, 208, 203, 0.16)\",\n \"chart-down-fill\": \"rgba(206, 90, 58, 0.28)\",\n \"chart-bar\": \"#6e6e6c\",\n \"chart-bar-over\": \"#f9a325\",\n \"chart-pos\": \"#f9a325\",\n \"chart-neg\": \"#3a8bff\",\n \"chart-lane\": \"#3a3a38\",\n \"chart-lane-active\": \"#ce5a3a\",\n \"chart-lane-tentative\": \"#8a837a\",\n \"chart-seq-1\": \"#2a2522\",\n \"chart-seq-1-ink\": \"#ffffff\",\n \"chart-seq-2\": \"#5c2a1a\",\n \"chart-seq-2-ink\": \"#ffffff\",\n \"chart-seq-3\": \"#9f4d35\",\n \"chart-seq-3-ink\": \"#ffffff\",\n \"chart-seq-4\": \"#e0703f\",\n \"chart-seq-4-ink\": \"#111111\",\n \"chart-seq-5\": \"#f9a325\",\n \"chart-seq-5-ink\": \"#111111\",\n \"chart-div-1\": \"#3a8bff\",\n \"chart-div-1-ink\": \"#111111\",\n \"chart-div-2\": \"#22406b\",\n \"chart-div-2-ink\": \"#ffffff\",\n \"chart-div-3\": \"#2b2b2a\",\n \"chart-div-3-ink\": \"#ffffff\",\n \"chart-div-4\": \"#6b4416\",\n \"chart-div-4-ink\": \"#ffffff\",\n \"chart-div-5\": \"#f9a325\",\n \"chart-div-5-ink\": \"#111111\",\n \"chart-cat-1\": \"#ce5a3a\",\n \"chart-cat-1-ink\": \"#111111\",\n \"chart-cat-2\": \"#3a8bff\",\n \"chart-cat-2-ink\": \"#111111\",\n \"chart-cat-3\": \"#f9a325\",\n \"chart-cat-3-ink\": \"#111111\",\n \"chart-cat-4\": \"#6e6e6c\",\n \"chart-cat-4-ink\": \"#ffffff\",\n \"chart-cat-5\": \"#d4d0cb\",\n \"chart-cat-5-ink\": \"#111111\",\n \"chart-node\": \"#1a1a19\",\n \"chart-link\": \"#8a837a\",\n \"chart-band-strong\": \"#3b211a\",\n \"chart-band-1\": \"#30302f\",\n \"chart-band-2\": \"#212020\",\n \"chart-band-none\": \"#00000000\",\n \"chart-band-chip\": \"#ce5a3a\",\n \"chart-band-green\": \"#122b1b\"\n },\n \"light\": {\n \"surface\": \"#ffffff\",\n \"surface-2\": \"#f7f7f5\",\n \"line\": \"#e5e5e2\",\n \"control-border\": \"#8a837a\",\n \"ink\": \"#111111\",\n \"ink-muted\": \"#585858\",\n \"neutral\": \"#111111\",\n \"on-neutral\": \"#ffffff\",\n \"primary\": \"#9f4d35\",\n \"on-primary\": \"#f7f7f5\",\n \"tera-shadow\": \"#6b2210\",\n \"ash\": \"#d4d0cb\",\n \"accent\": \"#f9a325\",\n \"on-accent\": \"#111111\",\n \"info\": \"#0064fa\",\n \"success\": \"#16a34a\",\n \"warning\": \"#f4b600\",\n \"error\": \"#e51503\",\n \"chart-bg\": \"#ffffff\",\n \"chart-grid\": \"#e5e5e2\",\n \"chart-text\": \"#585858\",\n \"chart-crosshair\": \"#8a837a\",\n \"chart-up\": \"#111111\",\n \"chart-down\": \"#9f4d35\",\n \"chart-up-alt\": \"#0064fa\",\n \"chart-down-alt\": \"#b36b00\",\n \"chart-up-classic\": \"#16a34a\",\n \"chart-down-classic\": \"#e51503\",\n \"chart-wick\": \"#8a837a\",\n \"chart-highlight\": \"#f9a325\",\n \"chart-now\": \"#111111\",\n \"chart-threshold\": \"#585858\",\n \"chart-series-1\": \"#9f4d35\",\n \"chart-series-2\": \"#0050c8\",\n \"chart-series-3\": \"#b36b00\",\n \"chart-area-top\": \"rgba(159, 77, 53, 0.20)\",\n \"chart-area-bottom\": \"rgba(159, 77, 53, 0)\",\n \"chart-up-fill\": \"rgba(17, 17, 17, 0.08)\",\n \"chart-down-fill\": \"rgba(159, 77, 53, 0.18)\",\n \"chart-bar\": \"#8a837a\",\n \"chart-bar-over\": \"#b36b00\",\n \"chart-pos\": \"#b36b00\",\n \"chart-neg\": \"#0050c8\",\n \"chart-lane\": \"#d4d0cb\",\n \"chart-lane-active\": \"#9f4d35\",\n \"chart-lane-tentative\": \"#8a837a\",\n \"chart-seq-1\": \"#f0ede8\",\n \"chart-seq-1-ink\": \"#111111\",\n \"chart-seq-2\": \"#f2c9a0\",\n \"chart-seq-2-ink\": \"#111111\",\n \"chart-seq-3\": \"#e08a5c\",\n \"chart-seq-3-ink\": \"#111111\",\n \"chart-seq-4\": \"#b5502f\",\n \"chart-seq-4-ink\": \"#ffffff\",\n \"chart-seq-5\": \"#6b2210\",\n \"chart-seq-5-ink\": \"#ffffff\",\n \"chart-div-1\": \"#0050c8\",\n \"chart-div-1-ink\": \"#ffffff\",\n \"chart-div-2\": \"#a9c4ef\",\n \"chart-div-2-ink\": \"#111111\",\n \"chart-div-3\": \"#f0ede8\",\n \"chart-div-3-ink\": \"#111111\",\n \"chart-div-4\": \"#f2cc8f\",\n \"chart-div-4-ink\": \"#111111\",\n \"chart-div-5\": \"#8f5500\",\n \"chart-div-5-ink\": \"#ffffff\",\n \"chart-cat-1\": \"#9f4d35\",\n \"chart-cat-1-ink\": \"#ffffff\",\n \"chart-cat-2\": \"#0050c8\",\n \"chart-cat-2-ink\": \"#ffffff\",\n \"chart-cat-3\": \"#b36b00\",\n \"chart-cat-3-ink\": \"#111111\",\n \"chart-cat-4\": \"#8a837a\",\n \"chart-cat-4-ink\": \"#111111\",\n \"chart-cat-5\": \"#3a3a38\",\n \"chart-cat-5-ink\": \"#ffffff\",\n \"chart-node\": \"#f7f7f5\",\n \"chart-link\": \"#8a837a\",\n \"chart-band-strong\": \"#f0e3df\",\n \"chart-band-1\": \"#e5e3e0\",\n \"chart-band-2\": \"#f3f2f0\",\n \"chart-band-none\": \"#00000000\",\n \"chart-band-chip\": \"#9f4d35\",\n \"chart-band-green\": \"#def2e6\"\n }\n },\n \"type\": {\n \"display-xl\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 72,\n \"weight\": 500\n },\n \"display-l\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 48,\n \"weight\": 500\n },\n \"heading\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 28,\n \"weight\": 500\n },\n \"emphasis-xl\": {\n \"family\": \"gtSuperDisplay, \\\"GT Super Display\\\", \\\"Instrument Serif\\\", Georgia, serif\",\n \"size\": 72,\n \"weight\": 400\n },\n \"emphasis-l\": {\n \"family\": \"gtSuperDisplay, \\\"GT Super Display\\\", \\\"Instrument Serif\\\", Georgia, serif\",\n \"size\": 48,\n \"weight\": 400\n },\n \"label\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 14,\n \"weight\": 500\n },\n \"eyebrow\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 11,\n \"weight\": 400\n },\n \"numeric\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 13,\n \"weight\": 400\n },\n \"axis\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 11,\n \"weight\": 400\n },\n \"axis-day\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 11,\n \"weight\": 600\n },\n \"pane-meta\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 11,\n \"weight\": 400\n },\n \"body\": {\n \"family\": \"p1Standard, Inter, ui-sans-serif, system-ui, sans-serif\",\n \"size\": 16,\n \"weight\": 400\n },\n \"small\": {\n \"family\": \"p1Standard, Inter, ui-sans-serif, system-ui, sans-serif\",\n \"size\": 14,\n \"weight\": 400\n },\n \"pane-title\": {\n \"family\": \"p1Standard, Inter, ui-sans-serif, system-ui, sans-serif\",\n \"size\": 14,\n \"weight\": 500\n }\n },\n \"space\": {\n \"space-1\": 4,\n \"space-2\": 8,\n \"space-3\": 12,\n \"space-4\": 16,\n \"space-6\": 24,\n \"space-12\": 48,\n \"pane-label\": 150,\n \"pane-row\": 52\n }\n} as const;\n","import { P1_TOKENS } from \"./p1.tokens.js\";\nimport { createTheme } from \"../utils/theme.utils.js\";\nimport type { Theme } from \"../types/theme.js\";\n\nexport type Mode = keyof typeof P1_TOKENS.color;\n\nconst { type, space } = P1_TOKENS;\n\nconst text = (style: keyof typeof type, color?: string) => ({\n family: type[style].family,\n size: type[style].size,\n weight: type[style].weight,\n color,\n});\n\nexport function p1Theme(\n mode: Mode,\n { colourBlind = false }: { colourBlind?: boolean } = {},\n): Theme {\n const c = P1_TOKENS.color[mode];\n const scale = (prefix: string) =>\n [1, 2, 3, 4, 5].map((step) => c[`${prefix}-${step}` as keyof typeof c]);\n\n return createTheme({\n palette: {\n background: c[\"chart-bg\"],\n text: c[\"chart-text\"],\n grid: c[\"chart-grid\"],\n border: c[\"chart-grid\"],\n crosshair: c[\"chart-crosshair\"],\n crosshairLabel: c.neutral,\n up: colourBlind ? c[\"chart-up-alt\"] : c[\"chart-up\"],\n down: colourBlind ? c[\"chart-down-alt\"] : c[\"chart-down\"],\n neutral: c[\"chart-threshold\"],\n now: c[\"chart-now\"],\n categorical: scale(\"chart-cat\"),\n sequential: scale(\"chart-seq\"),\n diverging: scale(\"chart-div\"),\n },\n typography: {\n axis: { family: type.axis.family, size: type.axis.size },\n label: text(\"label\"),\n value: text(\"numeric\"),\n title: text(\"pane-title\"),\n },\n spacing: { paneLabel: `${space[\"space-2\"]}px ${space[\"space-3\"]}px` },\n sizes: {\n paneHeight: space[\"pane-row\"],\n paneLabel: space[\"pane-label\"],\n laneHeight: 50,\n },\n line: {\n color: c[\"chart-series-1\"],\n width: 2,\n areaTop: c[\"chart-area-top\"],\n areaBottom: c[\"chart-area-bottom\"],\n baselineTopFill: c[\"chart-up-fill\"],\n baselineBottomFill: c[\"chart-down-fill\"],\n overlays: [c[\"chart-series-2\"], c[\"chart-series-3\"]],\n },\n histogram: {\n bar: c[\"chart-bar\"],\n over: c[\"chart-bar-over\"],\n positive: c[\"chart-pos\"],\n negative: c[\"chart-neg\"],\n threshold: { color: c[\"chart-threshold\"], style: \"dashed\" },\n zero: { color: c[\"chart-crosshair\"], style: \"solid\" },\n },\n panes: {\n now: { color: c[\"chart-now\"] },\n title: text(\"pane-title\", c.ink),\n meta: text(\"pane-meta\", c[\"ink-muted\"]),\n },\n timeline: {\n barHeight: 18,\n styles: {\n active: {\n fill: c[\"chart-lane-active\"],\n text: text(\"label\", c[\"on-primary\"]),\n },\n confirmed: { fill: c[\"chart-lane\"], text: text(\"label\", c.ink) },\n tentative: {\n stroke: { color: c[\"chart-lane-tentative\"], style: \"dashed\" },\n text: text(\"label\", c.ink),\n },\n arrival: { hatch: { color: c[\"chart-lane-tentative\"] } },\n },\n },\n bands: {\n styles: {\n riskOff: {\n fill: c[\"chart-band-strong\"],\n legendColor: c[\"chart-band-chip\"],\n label: \"Risk off\",\n },\n trend: { fill: c[\"chart-band-1\"], label: \"Strong trend\" },\n riskOn: { fill: c[\"chart-band-2\"], label: \"Risk on\" },\n meanRevert: { fill: c[\"chart-band-none\"], label: \"Mean revert\" },\n },\n },\n anchor: { color: c[\"chart-threshold\"] },\n pie: {\n dimOpacity: 0.32,\n selection: { color: c.ink, width: 3 },\n focus: { color: c.primary, dash: \"3 3\" },\n center: text(\"heading\"),\n centerUnit: text(\"axis\", c[\"chart-text\"]),\n },\n heatmap: {\n gap: 2,\n dimOpacity: 0.28,\n filteredOpacity: 0.08,\n missing: { fill: c[\"chart-bg\"], hatch: c[\"ink-muted\"] },\n active: { color: c.ink, width: 1.5 },\n focus: { color: c.primary, width: 1.5, style: \"dashed\" },\n selection: { color: c.ink, width: 2 },\n extreme: { color: c.ink },\n valueInk: scale(\"chart-seq\").map(\n (_, i) => c[`chart-seq-${i + 1}-ink` as keyof typeof c],\n ),\n },\n });\n}\n\nexport function p1Accents(mode: Mode) {\n const c = P1_TOKENS.color[mode];\n\n return {\n highlight: c[\"chart-highlight\"],\n wick: c[\"chart-wick\"],\n ink: c.ink,\n lastPrice: c[\"chart-series-1\"],\n };\n}\n","import type { Theme } from \"../types/theme.js\";\nimport { createTheme, themeFromCssVariables } from \"../utils/theme.utils.js\";\n\n/**\n * Maps a chart theme onto the custom properties p1-website already publishes\n * (`--p1-surface`, `--p1-ink`, `--p1-primary`, …). The site keeps the tokens.\n */\nexport const p1CssVariables = {\n \"palette.background\": \"--p1-surface\",\n \"palette.text\": \"--p1-ink\",\n \"palette.grid\": \"--p1-line\",\n \"palette.border\": \"--p1-line\",\n \"palette.crosshair\": \"--p1-ash-shadow\",\n \"palette.crosshairLabel\": \"--p1-ink\",\n \"palette.up\": \"--p1-ink\",\n \"palette.down\": \"--p1-primary\",\n \"palette.neutral\": \"--p1-ash-shadow\",\n \"palette.now\": \"--p1-ink\",\n \"palette.categorical\": [\n \"--p1-primary\",\n \"--p1-blue\",\n \"--p1-amber\",\n \"--p1-ash-shadow\",\n \"--p1-ink\",\n ],\n \"palette.sequential\": [\n \"--p1-ash-background\",\n \"--p1-ash\",\n \"--p1-tera\",\n \"--p1-tera-sharp\",\n \"--p1-tera-shadow\",\n ],\n \"palette.diverging\": [\n \"--p1-blue\",\n \"--p1-ash\",\n \"--p1-surface-2\",\n \"--p1-amber\",\n \"--p1-primary\",\n ],\n \"typography.axis.family\": \"--p1-font-sans\",\n \"typography.label.family\": \"--p1-font-sans\",\n \"typography.value.family\": \"--p1-font-mono\",\n \"typography.title.family\": \"--p1-font-sans\",\n \"line.color\": \"--p1-primary\",\n \"candlestick.up\": \"--p1-ink\",\n \"candlestick.down\": \"--p1-primary\",\n \"candlestick.wick\": \"--p1-ash-shadow\",\n \"histogram.bar\": \"--p1-ash-shadow\",\n \"histogram.positive\": \"--p1-amber\",\n \"histogram.negative\": \"--p1-blue\",\n} as const;\n\nexport function p1ThemeFromCss(element?: Element): Theme {\n return createTheme(\n themeFromCssVariables(\n p1CssVariables as Record<string, string | readonly string[]>,\n element,\n ),\n );\n}\n"],"mappings":";;;AAAA,IAAaE,IAAY;CACvBC,OAAS;EACPC,MAAQ;GACNC,SAAW;GACX,aAAa;GACbC,MAAQ;GACR,kBAAkB;GAClBC,KAAO;GACP,aAAa;GACbC,SAAW;GACX,cAAc;GACdC,SAAW;GACX,cAAc;GACd,eAAe;GACfC,KAAO;GACPC,QAAU;GACV,aAAa;GACbC,MAAQ;GACRC,SAAW;GACXC,SAAW;GACXC,OAAS;GACT,YAAY;GACZ,cAAc;GACd,cAAc;GACd,mBAAmB;GACnB,YAAY;GACZ,cAAc;GACd,gBAAgB;GAChB,kBAAkB;GAClB,oBAAoB;GACpB,sBAAsB;GACtB,cAAc;GACd,mBAAmB;GACnB,aAAa;GACb,mBAAmB;GACnB,kBAAkB;GAClB,kBAAkB;GAClB,kBAAkB;GAClB,kBAAkB;GAClB,qBAAqB;GACrB,iBAAiB;GACjB,mBAAmB;GACnB,aAAa;GACb,kBAAkB;GAClB,aAAa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,iBAAiB;GACjB,SAAS;IAAE,MAAMA,EAAE;IAAa,OAAOA,EAAE;GAAa;GACtD,QAAQ;IAAE,OAAOA,EAAE;IAAK,OAAO;GAAI;GACnC,OAAO;IAAE,OAAOA,EAAE;IAAS,OAAO;IAAK,OAAO;GAAS;GACvD,WAAW;IAAE,OAAOA,EAAE;IAAK,OAAO;GAAE;GACpC,SAAS,EAAE,OAAOA,EAAE,IAAI;GACxB,UAAUE,EAAM,WAAW,CAAC,CAAC,KAC1B,GAAG,MAAMF,EAAE,aAAaO,IAAI,EAAE,MACjC;EACF;CACF,CAAC;AACH;AAEA,SAAgBC,EAAU,GAAY;CACpC,IAAMR,IAAI/B,EAAU,MAAMgC;CAE1B,OAAO;EACL,WAAWD,EAAE;EACb,MAAMA,EAAE;EACR,KAAKA,EAAE;EACP,WAAWA,EAAE;CACf;AACF;;;AC9HA,IAAaS,IAAiB;CAC5B,sBAAsB;CACtB,gBAAgB;CAChB,gBAAgB;CAChB,kBAAkB;CAClB,qBAAqB;CACrB,0BAA0B;CAC1B,cAAc;CACd,gBAAgB;CAChB,mBAAmB;CACnB,eAAe;CACf,uBAAuB;EACrB;EACA;EACA;EACA;EACA;CACF;CACA,sBAAsB;EACpB;EACA;EACA;EACA;EACA;CACF;CACA,qBAAqB;EACnB;EACA;EACA;EACA;EACA;CACF;CACA,0BAA0B;CAC1B,2BAA2B;CAC3B,2BAA2B;CAC3B,2BAA2B;CAC3B,cAAc;CACd,kBAAkB;CAClB,oBAAoB;CACpB,oBAAoB;CACpB,iBAAiB;CACjB,sBAAsB;CACtB,sBAAsB;AACxB;AAEA,SAAgBC,EAAe,GAA0B;CACvD,OAAO1C,EACLD,EACE0C,GACAE,CACF,CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"css-BTZA9hea.js","names":["themeFromCssVariables","createTheme","P1_TOKENS","\"color\"","\"dark\"","\"surface\"","\"line\"","\"ink\"","\"neutral\"","\"primary\"","\"ash\"","\"accent\"","\"info\"","\"success\"","\"warning\"","\"error\"","\"light\"","\"type\"","\"family\"","\"size\"","\"weight\"","\"heading\"","\"label\"","\"eyebrow\"","\"numeric\"","\"axis\"","\"body\"","\"small\"","\"space\"","text","type","style","p1Theme","c","mode","scale","prefix","step","colourBlind","space","i","p1Accents","p1CssVariables","p1ThemeFromCss","element"],"sources":["../src/themes/p1.tokens.ts","../src/themes/p1.ts","../src/themes/css.ts"],"sourcesContent":["export const P1_TOKENS = {\n \"color\": {\n \"dark\": {\n \"surface\": \"#111111\",\n \"surface-2\": \"#1a1a19\",\n \"line\": \"#2b2b2a\",\n \"control-border\": \"#8a837a\",\n \"ink\": \"#d9d9d9\",\n \"ink-muted\": \"#9d9d9d\",\n \"neutral\": \"#ffffff\",\n \"on-neutral\": \"#111111\",\n \"primary\": \"#ce5a3a\",\n \"on-primary\": \"#111111\",\n \"tera-shadow\": \"#6b2210\",\n \"ash\": \"#d4d0cb\",\n \"accent\": \"#f9a325\",\n \"on-accent\": \"#111111\",\n \"info\": \"#0064fa\",\n \"success\": \"#16a34a\",\n \"warning\": \"#f4b600\",\n \"error\": \"#e51503\",\n \"chart-bg\": \"#111111\",\n \"chart-grid\": \"#2b2b2a\",\n \"chart-text\": \"#9d9d9d\",\n \"chart-crosshair\": \"#8a837a\",\n \"chart-up\": \"#d4d0cb\",\n \"chart-down\": \"#ce5a3a\",\n \"chart-up-alt\": \"#0064fa\",\n \"chart-down-alt\": \"#f9a325\",\n \"chart-up-classic\": \"#16a34a\",\n \"chart-down-classic\": \"#e51503\",\n \"chart-wick\": \"#8a837a\",\n \"chart-highlight\": \"#f9a325\",\n \"chart-now\": \"#d9d9d9\",\n \"chart-threshold\": \"#9d9d9d\",\n \"chart-series-1\": \"#ce5a3a\",\n \"chart-series-2\": \"#3a8bff\",\n \"chart-series-3\": \"#f9a325\",\n \"chart-area-top\": \"rgba(206, 90, 58, 0.32)\",\n \"chart-area-bottom\": \"rgba(206, 90, 58, 0)\",\n \"chart-up-fill\": \"rgba(212, 208, 203, 0.16)\",\n \"chart-down-fill\": \"rgba(206, 90, 58, 0.28)\",\n \"chart-bar\": \"#6e6e6c\",\n \"chart-bar-over\": \"#f9a325\",\n \"chart-pos\": \"#f9a325\",\n \"chart-neg\": \"#3a8bff\",\n \"chart-lane\": \"#3a3a38\",\n \"chart-lane-active\": \"#ce5a3a\",\n \"chart-lane-tentative\": \"#8a837a\",\n \"chart-seq-1\": \"#2a2522\",\n \"chart-seq-1-ink\": \"#ffffff\",\n \"chart-seq-2\": \"#5c2a1a\",\n \"chart-seq-2-ink\": \"#ffffff\",\n \"chart-seq-3\": \"#9f4d35\",\n \"chart-seq-3-ink\": \"#ffffff\",\n \"chart-seq-4\": \"#e0703f\",\n \"chart-seq-4-ink\": \"#111111\",\n \"chart-seq-5\": \"#f9a325\",\n \"chart-seq-5-ink\": \"#111111\",\n \"chart-div-1\": \"#3a8bff\",\n \"chart-div-1-ink\": \"#111111\",\n \"chart-div-2\": \"#22406b\",\n \"chart-div-2-ink\": \"#ffffff\",\n \"chart-div-3\": \"#2b2b2a\",\n \"chart-div-3-ink\": \"#ffffff\",\n \"chart-div-4\": \"#6b4416\",\n \"chart-div-4-ink\": \"#ffffff\",\n \"chart-div-5\": \"#f9a325\",\n \"chart-div-5-ink\": \"#111111\",\n \"chart-cat-1\": \"#ce5a3a\",\n \"chart-cat-1-ink\": \"#111111\",\n \"chart-cat-2\": \"#3a8bff\",\n \"chart-cat-2-ink\": \"#111111\",\n \"chart-cat-3\": \"#f9a325\",\n \"chart-cat-3-ink\": \"#111111\",\n \"chart-cat-4\": \"#6e6e6c\",\n \"chart-cat-4-ink\": \"#ffffff\",\n \"chart-cat-5\": \"#d4d0cb\",\n \"chart-cat-5-ink\": \"#111111\",\n \"chart-node\": \"#1a1a19\",\n \"chart-link\": \"#8a837a\",\n \"chart-band-strong\": \"#3b211a\",\n \"chart-band-1\": \"#30302f\",\n \"chart-band-2\": \"#212020\",\n \"chart-band-none\": \"#00000000\",\n \"chart-band-chip\": \"#ce5a3a\",\n \"chart-band-green\": \"#122b1b\"\n },\n \"light\": {\n \"surface\": \"#ffffff\",\n \"surface-2\": \"#f7f7f5\",\n \"line\": \"#e5e5e2\",\n \"control-border\": \"#8a837a\",\n \"ink\": \"#111111\",\n \"ink-muted\": \"#585858\",\n \"neutral\": \"#111111\",\n \"on-neutral\": \"#ffffff\",\n \"primary\": \"#9f4d35\",\n \"on-primary\": \"#f7f7f5\",\n \"tera-shadow\": \"#6b2210\",\n \"ash\": \"#d4d0cb\",\n \"accent\": \"#f9a325\",\n \"on-accent\": \"#111111\",\n \"info\": \"#0064fa\",\n \"success\": \"#16a34a\",\n \"warning\": \"#f4b600\",\n \"error\": \"#e51503\",\n \"chart-bg\": \"#ffffff\",\n \"chart-grid\": \"#e5e5e2\",\n \"chart-text\": \"#585858\",\n \"chart-crosshair\": \"#8a837a\",\n \"chart-up\": \"#111111\",\n \"chart-down\": \"#9f4d35\",\n \"chart-up-alt\": \"#0064fa\",\n \"chart-down-alt\": \"#b36b00\",\n \"chart-up-classic\": \"#16a34a\",\n \"chart-down-classic\": \"#e51503\",\n \"chart-wick\": \"#8a837a\",\n \"chart-highlight\": \"#f9a325\",\n \"chart-now\": \"#111111\",\n \"chart-threshold\": \"#585858\",\n \"chart-series-1\": \"#9f4d35\",\n \"chart-series-2\": \"#0050c8\",\n \"chart-series-3\": \"#b36b00\",\n \"chart-area-top\": \"rgba(159, 77, 53, 0.20)\",\n \"chart-area-bottom\": \"rgba(159, 77, 53, 0)\",\n \"chart-up-fill\": \"rgba(17, 17, 17, 0.08)\",\n \"chart-down-fill\": \"rgba(159, 77, 53, 0.18)\",\n \"chart-bar\": \"#8a837a\",\n \"chart-bar-over\": \"#b36b00\",\n \"chart-pos\": \"#b36b00\",\n \"chart-neg\": \"#0050c8\",\n \"chart-lane\": \"#d4d0cb\",\n \"chart-lane-active\": \"#9f4d35\",\n \"chart-lane-tentative\": \"#8a837a\",\n \"chart-seq-1\": \"#f0ede8\",\n \"chart-seq-1-ink\": \"#111111\",\n \"chart-seq-2\": \"#f2c9a0\",\n \"chart-seq-2-ink\": \"#111111\",\n \"chart-seq-3\": \"#e08a5c\",\n \"chart-seq-3-ink\": \"#111111\",\n \"chart-seq-4\": \"#b5502f\",\n \"chart-seq-4-ink\": \"#ffffff\",\n \"chart-seq-5\": \"#6b2210\",\n \"chart-seq-5-ink\": \"#ffffff\",\n \"chart-div-1\": \"#0050c8\",\n \"chart-div-1-ink\": \"#ffffff\",\n \"chart-div-2\": \"#a9c4ef\",\n \"chart-div-2-ink\": \"#111111\",\n \"chart-div-3\": \"#f0ede8\",\n \"chart-div-3-ink\": \"#111111\",\n \"chart-div-4\": \"#f2cc8f\",\n \"chart-div-4-ink\": \"#111111\",\n \"chart-div-5\": \"#8f5500\",\n \"chart-div-5-ink\": \"#ffffff\",\n \"chart-cat-1\": \"#9f4d35\",\n \"chart-cat-1-ink\": \"#ffffff\",\n \"chart-cat-2\": \"#0050c8\",\n \"chart-cat-2-ink\": \"#ffffff\",\n \"chart-cat-3\": \"#b36b00\",\n \"chart-cat-3-ink\": \"#111111\",\n \"chart-cat-4\": \"#8a837a\",\n \"chart-cat-4-ink\": \"#111111\",\n \"chart-cat-5\": \"#3a3a38\",\n \"chart-cat-5-ink\": \"#ffffff\",\n \"chart-node\": \"#f7f7f5\",\n \"chart-link\": \"#8a837a\",\n \"chart-band-strong\": \"#f0e3df\",\n \"chart-band-1\": \"#e5e3e0\",\n \"chart-band-2\": \"#f3f2f0\",\n \"chart-band-none\": \"#00000000\",\n \"chart-band-chip\": \"#9f4d35\",\n \"chart-band-green\": \"#def2e6\"\n }\n },\n \"type\": {\n \"display-xl\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 72,\n \"weight\": 500\n },\n \"display-l\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 48,\n \"weight\": 500\n },\n \"heading\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 28,\n \"weight\": 500\n },\n \"emphasis-xl\": {\n \"family\": \"gtSuperDisplay, \\\"GT Super Display\\\", \\\"Instrument Serif\\\", Georgia, serif\",\n \"size\": 72,\n \"weight\": 400\n },\n \"emphasis-l\": {\n \"family\": \"gtSuperDisplay, \\\"GT Super Display\\\", \\\"Instrument Serif\\\", Georgia, serif\",\n \"size\": 48,\n \"weight\": 400\n },\n \"label\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 14,\n \"weight\": 500\n },\n \"eyebrow\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 11,\n \"weight\": 400\n },\n \"numeric\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 13,\n \"weight\": 400\n },\n \"axis\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 11,\n \"weight\": 400\n },\n \"axis-day\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 11,\n \"weight\": 600\n },\n \"pane-meta\": {\n \"family\": \"p1StandardMono, \\\"IBM Plex Mono\\\", ui-monospace, SFMono-Regular, Menlo, monospace\",\n \"size\": 11,\n \"weight\": 400\n },\n \"body\": {\n \"family\": \"p1Standard, Inter, ui-sans-serif, system-ui, sans-serif\",\n \"size\": 16,\n \"weight\": 400\n },\n \"small\": {\n \"family\": \"p1Standard, Inter, ui-sans-serif, system-ui, sans-serif\",\n \"size\": 14,\n \"weight\": 400\n },\n \"pane-title\": {\n \"family\": \"p1Standard, Inter, ui-sans-serif, system-ui, sans-serif\",\n \"size\": 14,\n \"weight\": 500\n }\n },\n \"space\": {\n \"space-1\": 4,\n \"space-2\": 8,\n \"space-3\": 12,\n \"space-4\": 16,\n \"space-6\": 24,\n \"space-12\": 48,\n \"pane-label\": 150,\n \"pane-row\": 52\n }\n} as const;\n","import { P1_TOKENS } from \"./p1.tokens.js\";\nimport { createTheme } from \"../utils/theme.utils.js\";\nimport type { Theme } from \"../types/theme.js\";\n\nexport type Mode = keyof typeof P1_TOKENS.color;\n\nconst { type, space } = P1_TOKENS;\n\nconst text = (style: keyof typeof type, color?: string) => ({\n family: type[style].family,\n size: type[style].size,\n weight: type[style].weight,\n color,\n});\n\nexport function p1Theme(\n mode: Mode,\n { colourBlind = false }: { colourBlind?: boolean } = {},\n): Theme {\n const c = P1_TOKENS.color[mode];\n const scale = (prefix: string) =>\n [1, 2, 3, 4, 5].map((step) => c[`${prefix}-${step}` as keyof typeof c]);\n\n return createTheme({\n palette: {\n background: c[\"chart-bg\"],\n text: c[\"chart-text\"],\n grid: c[\"chart-grid\"],\n border: c[\"chart-grid\"],\n crosshair: c[\"chart-crosshair\"],\n crosshairLabel: c.neutral,\n up: colourBlind ? c[\"chart-up-alt\"] : c[\"chart-up\"],\n down: colourBlind ? c[\"chart-down-alt\"] : c[\"chart-down\"],\n neutral: c[\"chart-threshold\"],\n now: c[\"chart-now\"],\n categorical: scale(\"chart-cat\"),\n sequential: scale(\"chart-seq\"),\n diverging: scale(\"chart-div\"),\n },\n typography: {\n axis: { family: type.axis.family, size: type.axis.size },\n label: text(\"label\"),\n value: text(\"numeric\"),\n title: text(\"pane-title\"),\n },\n spacing: { paneLabel: `${space[\"space-2\"]}px ${space[\"space-3\"]}px` },\n sizes: {\n paneHeight: space[\"pane-row\"],\n paneLabel: space[\"pane-label\"],\n laneHeight: 50,\n },\n line: {\n color: c[\"chart-series-1\"],\n width: 2,\n areaTop: c[\"chart-area-top\"],\n areaBottom: c[\"chart-area-bottom\"],\n baselineTopFill: c[\"chart-up-fill\"],\n baselineBottomFill: c[\"chart-down-fill\"],\n overlays: [c[\"chart-series-2\"], c[\"chart-series-3\"]],\n },\n histogram: {\n bar: c[\"chart-bar\"],\n over: c[\"chart-bar-over\"],\n positive: c[\"chart-pos\"],\n negative: c[\"chart-neg\"],\n threshold: { color: c[\"chart-threshold\"], style: \"dashed\" },\n zero: { color: c[\"chart-crosshair\"], style: \"solid\" },\n },\n panes: {\n now: { color: c[\"chart-now\"] },\n title: text(\"pane-title\", c.ink),\n meta: text(\"pane-meta\", c[\"ink-muted\"]),\n },\n timeline: {\n barHeight: 18,\n styles: {\n active: {\n fill: c[\"chart-lane-active\"],\n text: text(\"label\", c[\"on-primary\"]),\n },\n confirmed: { fill: c[\"chart-lane\"], text: text(\"label\", c.ink) },\n tentative: {\n stroke: { color: c[\"chart-lane-tentative\"], style: \"dashed\" },\n text: text(\"label\", c.ink),\n },\n arrival: { hatch: { color: c[\"chart-lane-tentative\"] } },\n },\n },\n bands: {\n styles: {\n riskOff: {\n fill: c[\"chart-band-strong\"],\n legendColor: c[\"chart-band-chip\"],\n label: \"Risk off\",\n },\n trend: { fill: c[\"chart-band-1\"], label: \"Strong trend\" },\n riskOn: { fill: c[\"chart-band-2\"], label: \"Risk on\" },\n meanRevert: { fill: c[\"chart-band-none\"], label: \"Mean revert\" },\n },\n },\n anchor: { color: c[\"chart-threshold\"] },\n pie: {\n dimOpacity: 0.32,\n selection: { color: c.ink, width: 3 },\n focus: { color: c.primary, dash: \"3 3\" },\n center: text(\"heading\"),\n centerUnit: text(\"axis\", c[\"chart-text\"]),\n },\n heatmap: {\n gap: 2,\n dimOpacity: 0.28,\n filteredOpacity: 0.08,\n missing: { fill: c[\"chart-bg\"], hatch: c[\"ink-muted\"] },\n active: { color: c.ink, width: 1.5 },\n focus: { color: c.primary, width: 1.5, style: \"dashed\" },\n selection: { color: c.ink, width: 2 },\n extreme: { color: c.ink },\n valueInk: scale(\"chart-seq\").map(\n (_, i) => c[`chart-seq-${i + 1}-ink` as keyof typeof c],\n ),\n },\n });\n}\n\nexport function p1Accents(mode: Mode) {\n const c = P1_TOKENS.color[mode];\n\n return {\n highlight: c[\"chart-highlight\"],\n wick: c[\"chart-wick\"],\n ink: c.ink,\n lastPrice: c[\"chart-series-1\"],\n };\n}\n","import type { Theme } from \"../types/theme.js\";\nimport { createTheme, themeFromCssVariables } from \"../utils/theme.utils.js\";\n\n/**\n * Maps a chart theme onto the custom properties p1-website already publishes\n * (`--p1-surface`, `--p1-ink`, `--p1-primary`, …). The site keeps the tokens.\n */\nexport const p1CssVariables = {\n \"palette.background\": \"--p1-surface\",\n \"palette.text\": \"--p1-ink\",\n \"palette.grid\": \"--p1-line\",\n \"palette.border\": \"--p1-line\",\n \"palette.crosshair\": \"--p1-ash-shadow\",\n \"palette.crosshairLabel\": \"--p1-ink\",\n \"palette.up\": \"--p1-ink\",\n \"palette.down\": \"--p1-primary\",\n \"palette.neutral\": \"--p1-ash-shadow\",\n \"palette.now\": \"--p1-ink\",\n \"palette.categorical\": [\n \"--p1-primary\",\n \"--p1-blue\",\n \"--p1-amber\",\n \"--p1-ash-shadow\",\n \"--p1-ink\",\n ],\n \"palette.sequential\": [\n \"--p1-ash-background\",\n \"--p1-ash\",\n \"--p1-tera\",\n \"--p1-tera-sharp\",\n \"--p1-tera-shadow\",\n ],\n \"palette.diverging\": [\n \"--p1-blue\",\n \"--p1-ash\",\n \"--p1-surface-2\",\n \"--p1-amber\",\n \"--p1-primary\",\n ],\n \"typography.axis.family\": \"--p1-font-sans\",\n \"typography.label.family\": \"--p1-font-sans\",\n \"typography.value.family\": \"--p1-font-mono\",\n \"typography.title.family\": \"--p1-font-sans\",\n \"line.color\": \"--p1-primary\",\n \"candlestick.up\": \"--p1-ink\",\n \"candlestick.down\": \"--p1-primary\",\n \"candlestick.wick\": \"--p1-ash-shadow\",\n \"histogram.bar\": \"--p1-ash-shadow\",\n \"histogram.positive\": \"--p1-amber\",\n \"histogram.negative\": \"--p1-blue\",\n} as const;\n\nexport function p1ThemeFromCss(element?: Element): Theme {\n return createTheme(\n themeFromCssVariables(\n p1CssVariables as Record<string, string | readonly string[]>,\n element,\n ),\n );\n}\n"],"mappings":";;;AAAA,IAAaE,IAAY;CACvBC,OAAS;EACPC,MAAQ;GACNC,SAAW;GACX,aAAa;GACbC,MAAQ;GACR,kBAAkB;GAClBC,KAAO;GACP,aAAa;GACbC,SAAW;GACX,cAAc;GACdC,SAAW;GACX,cAAc;GACd,eAAe;GACfC,KAAO;GACPC,QAAU;GACV,aAAa;GACbC,MAAQ;GACRC,SAAW;GACXC,SAAW;GACXC,OAAS;GACT,YAAY;GACZ,cAAc;GACd,cAAc;GACd,mBAAmB;GACnB,YAAY;GACZ,cAAc;GACd,gBAAgB;GAChB,kBAAkB;GAClB,oBAAoB;GACpB,sBAAsB;GACtB,cAAc;GACd,mBAAmB;GACnB,aAAa;GACb,mBAAmB;GACnB,kBAAkB;GAClB,kBAAkB;GAClB,kBAAkB;GAClB,kBAAkB;GAClB,qBAAqB;GACrB,iBAAiB;GACjB,mBAAmB;GACnB,aAAa;GACb,kBAAkB;GAClB,aAAa;GACb,aAAa;GACb,cAAc;GACd,qBAAqB;GACrB,wBAAwB;GACxB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,eAAe;GACf,mBAAmB;GACnB,cAAc;GACd,cAAc;GACd,qBAAqB;GACrB,gBAAgB;GAChB,gBAAgB;GAChB,mBAAmB;GACnB,mBAAmB;GACnB,oBAAo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C9HA,IAAaS,IAAiB;CAC5B,sBAAsB;CACtB,gBAAgB;CAChB,gBAAgB;CAChB,kBAAkB;CAClB,qBAAqB;CACrB,0BAA0B;CAC1B,cAAc;CACd,gBAAgB;CAChB,mBAAmB;CACnB,eAAe;CACf,uBAAuB;EACrB;EACA;EACA;EACA;EACA;CACF;CACA,sBAAsB;EACpB;EACA;EACA;EACA;EACA;CACF;CACA,qBAAqB;EACnB;EACA;EACA;EACA;EACA;CACF;CACA,0BAA0B;CAC1B,2BAA2B;CAC3B,2BAA2B;CAC3B,2BAA2B;CAC3B,cAAc;CACd,kBAAkB;CAClB,oBAAoB;CACpB,oBAAoB;CACpB,iBAAiB;CACjB,sBAAsB;CACtB,sBAAsB;AACxB;AAEA,SAAgBC,EAAe,GAA0B;CACvD,OAAO1C,EACLD,EACE0C,GACAE,CACF,CACF;AACF"}
|
package/dist/heatmap.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { c as e, i as t, l as n, o as r, p as i, r as a, s as o, t as s } from "./Heatmap-
|
|
2
|
+
import { c as e, i as t, l as n, o as r, p as i, r as a, s as o, t as s } from "./Heatmap-Bwhf305C.js";
|
|
3
3
|
export { s as Heatmap, t as HeatmapLegend, r as cellAt, o as extremes, e as heatmapGrid, n as heatmapLayout, i as rangeStats, a as useHeatmapState };
|
package/dist/index.d.ts
CHANGED
|
@@ -56,7 +56,11 @@ export type { TimeSeriesChartProps, TimeSeriesKind, TimeSeriesMarkerSpec, TimeSe
|
|
|
56
56
|
export type { CategoryBand, CategoryBarChartProps, CategoryBarDatum, CategoryBarSeries, CategoryReference, } from "./types/category.js";
|
|
57
57
|
export type { CategoryBarMode, CategoryDomain, CategoryOrientation, CategoryScale, } from "./utils/category.utils.js";
|
|
58
58
|
export type { Bin, BinOptions } from "./utils/bin.utils.js";
|
|
59
|
-
export type { ScatterChartProps, ScatterSeries } from "./types/scatter.js";
|
|
59
|
+
export type { ScatterChartProps, ScatterReference, ScatterSeries } from "./types/scatter.js";
|
|
60
|
+
export type { ScatterDomain } from "./utils/scatter.utils.js";
|
|
61
|
+
export { ChartLegend } from "./components/ChartLegend/index.js";
|
|
62
|
+
export type { ChartLegendItem } from "./components/ChartLegend/index.js";
|
|
63
|
+
export { niceExtent, niceStep } from "./utils/category.utils.js";
|
|
60
64
|
export type { PolarChartProps } from "./types/polar.js";
|
|
61
65
|
export type { SparklineProps } from "./types/sparkline.js";
|
|
62
66
|
export type { Mode } from "./themes/p1.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,YAAY,EACV,IAAI,EACJ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,IAAI,EACJ,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,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C7B,YAAY,EACV,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,aAAa,GACd,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,IAAI,EACJ,SAAS,EACT,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,IAAI,EACJ,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,UAAU,EACV,YAAY,EACZ,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,yBAAyB,GAC1B,MAAM,wBAAwB,CAAC;AAEhC,YAAY,EACV,QAAQ,EACR,SAAS,EACT,UAAU,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,SAAS,EACT,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,qBAAqB,CAA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|
"use client";
|
|
2
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, p as d, r as f, s as p, u as m, y as h } from "./theme.utils-
|
|
2
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, p as d, r as f, s as p, u as m, y as h } from "./theme.utils-DF_e8LxQ.js";
|
|
3
3
|
import { a as g, c as _, i as v, n as y, o as b, r as x, s as S } from "./visibility.utils-wuc3ZS8D.js";
|
|
4
|
-
import { a as ee, c as C, d as w, f as T, i as E, l as te, m as D, n as O, o as k, p as ne, r as re, s as A, t as j, u as M } from "./Heatmap-
|
|
4
|
+
import { a as ee, c as C, d as w, f as T, i as E, l as te, m as D, n as O, o as k, p as ne, r as re, s as A, t as j, u as M } from "./Heatmap-Bwhf305C.js";
|
|
5
5
|
import { i as N, n as P, r as F } from "./motion.utils-DFoqptDi.js";
|
|
6
|
-
import { n as I, t as L } from "./useChartTheme-
|
|
7
|
-
import { C as ie, S as R, _ as ae, a as z, b as B, c as V, d as oe, f as se, g as ce, h as le, i as ue, l as de, m as H, n as fe, o as pe, p as me, r as he, s as ge, t as _e, u as ve, v as U, w as W, x as G, y as ye } from "./TimeSeriesChart-
|
|
8
|
-
import { a as be, i as xe, n as Se, o as Ce, r as we, t as Te } from "./PieLegend-
|
|
6
|
+
import { n as I, t as L } from "./useChartTheme-D0bQ3LQq.js";
|
|
7
|
+
import { C as ie, S as R, _ as ae, a as z, b as B, c as V, d as oe, f as se, g as ce, h as le, i as ue, l as de, m as H, n as fe, o as pe, p as me, r as he, s as ge, t as _e, u as ve, v as U, w as W, x as G, y as ye } from "./TimeSeriesChart-BZMLERDZ.js";
|
|
8
|
+
import { a as be, i as xe, n as Se, o as Ce, r as we, t as Te } from "./PieLegend-16E6W10x.js";
|
|
9
9
|
import { t as Ee } from "./useTween-B0G0CcvM.js";
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { Children as
|
|
10
|
+
import { a as De, i as Oe, t as ke } from "./CategoryBarChart-KYzsjGwg.js";
|
|
11
|
+
import { t as Ae } from "./useMarkMemory-CLNY6TtT.js";
|
|
12
|
+
import { t as je } from "./ChartLegend-B8ZmIG2y.js";
|
|
13
|
+
import { r as Me, t as Ne } from "./PolarChart-C_vPz-3K.js";
|
|
14
|
+
import { t as Pe } from "./Sparkline-BApLVWfg.js";
|
|
15
|
+
import { t as Fe } from "./bin.utils-Ch1y7YDn.js";
|
|
16
|
+
import { i as Ie, n as Le, r as Re, t as ze } from "./css-BTZA9hea.js";
|
|
17
|
+
import { a as Be, i as Ve, n as He, r as Ue, t as We } from "./ChartFrame-DOEsou-R.js";
|
|
18
|
+
import { Children as Ge, forwardRef as K, isValidElement as q, useEffect as J, useImperativeHandle as Ke, useMemo as Y, useRef as X, useState as qe } from "react";
|
|
19
19
|
import { jsx as Z, jsxs as Q } from "react/jsx-runtime";
|
|
20
|
+
import { HistogramSeries as Je } from "lightweight-charts";
|
|
20
21
|
//#region src/utils/squarify.utils.ts
|
|
21
|
-
function
|
|
22
|
+
function Ye(e, t) {
|
|
22
23
|
let n = b(e), [r, i] = x(e), a = t * t, o = n * n;
|
|
23
24
|
return Math.max(a * i / o, o / (a * r));
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
+
function Xe(e, t, n, r) {
|
|
26
27
|
let i = b(e.map((e) => t[e])), a = n.width >= n.height, o = i / (a ? n.height : n.width), s = 0;
|
|
27
28
|
for (let i of e) {
|
|
28
29
|
let e = t[i] / o;
|
|
@@ -48,7 +49,7 @@ function qe(e, t, n, r) {
|
|
|
48
49
|
height: Math.max(0, n.height - o)
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
+
function Ze(e, t) {
|
|
52
53
|
y("squarify", e);
|
|
53
54
|
let n = e.map(() => ({
|
|
54
55
|
x: t.x,
|
|
@@ -60,13 +61,13 @@ function Je(e, t) {
|
|
|
60
61
|
let a = e.map((e) => e * i / r), o = a.map((e, t) => t).filter((e) => a[e] > 0).sort((e, t) => a[t] - a[e] || e - t), s = { ...t }, c = [], l = (e) => e.map((e) => a[e]);
|
|
61
62
|
for (let e of o) {
|
|
62
63
|
let t = Math.min(s.width, s.height), r = [...c, e];
|
|
63
|
-
c.length === 0 ||
|
|
64
|
+
c.length === 0 || Ye(l(r), t) <= Ye(l(c), t) ? c = r : (s = Xe(c, a, s, n), c = [e]);
|
|
64
65
|
}
|
|
65
|
-
return c.length > 0 &&
|
|
66
|
+
return c.length > 0 && Xe(c, a, s, n), n;
|
|
66
67
|
}
|
|
67
68
|
//#endregion
|
|
68
69
|
//#region src/hooks/useNowLine.ts
|
|
69
|
-
function
|
|
70
|
+
function Qe(e, t, n) {
|
|
70
71
|
J(() => {
|
|
71
72
|
let r = t.current;
|
|
72
73
|
if (!e || !r) return;
|
|
@@ -90,14 +91,14 @@ function $(e) {
|
|
|
90
91
|
}
|
|
91
92
|
//#endregion
|
|
92
93
|
//#region src/charts/HistogramPane/index.tsx
|
|
93
|
-
function
|
|
94
|
+
function $e(e) {
|
|
94
95
|
return null;
|
|
95
96
|
}
|
|
96
97
|
//#endregion
|
|
97
98
|
//#region src/utils/timeline.utils.ts
|
|
98
|
-
var
|
|
99
|
-
function
|
|
100
|
-
let { palette: n, typography: r, timeline: i } = e, a = i.barHeight ??
|
|
99
|
+
var et = 18, tt = 5e3;
|
|
100
|
+
function nt(e, t) {
|
|
101
|
+
let { palette: n, typography: r, timeline: i } = e, a = i.barHeight ?? et, o = (e) => ({
|
|
101
102
|
...r.label,
|
|
102
103
|
color: e
|
|
103
104
|
}), s = [...t].reduce((e, t) => e + t.charCodeAt(0), 0);
|
|
@@ -137,10 +138,10 @@ function $e(e, t) {
|
|
|
137
138
|
text: o(n.background)
|
|
138
139
|
};
|
|
139
140
|
}
|
|
140
|
-
function
|
|
141
|
-
return (n) => o(e &&
|
|
141
|
+
function rt(e, t = {}) {
|
|
142
|
+
return (n) => o(e && nt(e, n), e?.timeline.styles?.[n], t[n]);
|
|
142
143
|
}
|
|
143
|
-
function
|
|
144
|
+
function it(e) {
|
|
144
145
|
return e.flatMap(({ start: e, end: t, eta: n, state: r, label: i, color: a }) => {
|
|
145
146
|
let o = {
|
|
146
147
|
from: e,
|
|
@@ -156,19 +157,19 @@ function tt(e) {
|
|
|
156
157
|
}, o] : [o];
|
|
157
158
|
});
|
|
158
159
|
}
|
|
159
|
-
function
|
|
160
|
+
function at(e) {
|
|
160
161
|
let t = e.map(R).filter((e) => e !== null);
|
|
161
162
|
return [...new Set(t)].sort((e, t) => e - t);
|
|
162
163
|
}
|
|
163
|
-
function
|
|
164
|
-
let n =
|
|
164
|
+
function ot(e, t = 3600) {
|
|
165
|
+
let n = at(e), r = n[0], i = n[n.length - 1];
|
|
165
166
|
if (r === void 0 || i === void 0 || !(t > 0)) return [];
|
|
166
|
-
let a = Math.max(t, Math.ceil((i - r) /
|
|
167
|
+
let a = Math.max(t, Math.ceil((i - r) / tt)), o = Math.floor(r / a) * a, s = Math.ceil(i / a) * a;
|
|
167
168
|
return Array.from({ length: Math.max(1, (s - o) / a + 1) }, (e, t) => o + t * a);
|
|
168
169
|
}
|
|
169
170
|
//#endregion
|
|
170
171
|
//#region src/hooks/usePaneRanges.ts
|
|
171
|
-
function
|
|
172
|
+
function st(e, t, n) {
|
|
172
173
|
let r = X([]);
|
|
173
174
|
J(() => {
|
|
174
175
|
r.current = [];
|
|
@@ -185,8 +186,8 @@ function it(e, t, n) {
|
|
|
185
186
|
];
|
|
186
187
|
if (s && h(s.inputs, c)) return;
|
|
187
188
|
let l = {
|
|
188
|
-
items:
|
|
189
|
-
style:
|
|
189
|
+
items: it(e.items),
|
|
190
|
+
style: rt(n, e.styles)
|
|
190
191
|
};
|
|
191
192
|
if (s) {
|
|
192
193
|
s.primitive.applyOptions(l), s.inputs = c;
|
|
@@ -203,14 +204,14 @@ function it(e, t, n) {
|
|
|
203
204
|
}
|
|
204
205
|
//#endregion
|
|
205
206
|
//#region src/hooks/usePaneSeries.ts
|
|
206
|
-
function
|
|
207
|
+
function ct(n, r, i) {
|
|
207
208
|
let s = X([]);
|
|
208
209
|
return J(() => {
|
|
209
210
|
s.current = [];
|
|
210
211
|
}, [n]), J(() => {
|
|
211
212
|
if (!n) return;
|
|
212
213
|
let { chart: c } = n, l = s.current, u = (e, t, r) => {
|
|
213
|
-
let i = e === 0 ? n.series : c.addSeries(
|
|
214
|
+
let i = e === 0 ? n.series : c.addSeries(Je, {}, e), a = o(i.options());
|
|
214
215
|
return e > 0 && (i.applyOptions(t), c.panes()[e]?.setPreserveEmptyPane(!0)), {
|
|
215
216
|
series: i,
|
|
216
217
|
defaults: a,
|
|
@@ -235,7 +236,7 @@ function at(n, r, i) {
|
|
|
235
236
|
y,
|
|
236
237
|
b
|
|
237
238
|
];
|
|
238
|
-
h(g.dataInputs, x) || (g.normalized = G(n.data), g.series.setData(n.whitespace ?
|
|
239
|
+
h(g.dataInputs, x) || (g.normalized = G(n.data), g.series.setData(n.whitespace ? at(n.whitespace).map((e) => ({ time: e })) : me(g.normalized.data, s, n.threshold, {
|
|
239
240
|
bar: _,
|
|
240
241
|
over: v,
|
|
241
242
|
positive: y,
|
|
@@ -265,29 +266,29 @@ function at(n, r, i) {
|
|
|
265
266
|
}
|
|
266
267
|
//#endregion
|
|
267
268
|
//#region src/charts/ChartPanes/index.tsx
|
|
268
|
-
var
|
|
269
|
+
var lt = { display: "flex" }, ut = { flex: "none" }, dt = {
|
|
269
270
|
boxSizing: "border-box",
|
|
270
271
|
overflow: "hidden"
|
|
271
|
-
},
|
|
272
|
+
}, ft = {
|
|
272
273
|
position: "relative",
|
|
273
274
|
flex: 1,
|
|
274
275
|
minWidth: 0
|
|
275
|
-
},
|
|
276
|
+
}, pt = {
|
|
276
277
|
position: "absolute",
|
|
277
278
|
inset: 0
|
|
278
|
-
},
|
|
279
|
+
}, mt = {
|
|
279
280
|
position: "absolute",
|
|
280
281
|
top: 0,
|
|
281
282
|
left: 0,
|
|
282
283
|
width: 1,
|
|
283
284
|
display: "none",
|
|
284
285
|
pointerEvents: "none"
|
|
285
|
-
},
|
|
286
|
+
}, ht = { layout: { panes: { enableResize: !1 } } }, gt = [], _t = (e) => e.value.toLocaleString(), vt = K(function({ children: e, now: t = null, axisLabel: r, chartOptions: i, ctrlWheelZoom: a = !0, ariaLabel: c = "Chart panes", className: l, classNames: d = {}, styles: f = {}, onPaneClick: p, onPaneHover: m, onPaneLeave: h, theme: g, unstyled: _ }, v) {
|
|
286
287
|
let y = X(null), b = X(null), x = X({
|
|
287
288
|
onPaneClick: p,
|
|
288
289
|
onPaneHover: m,
|
|
289
290
|
onPaneLeave: h
|
|
290
|
-
}), [S, ee] =
|
|
291
|
+
}), [S, ee] = qe(0), [C, w] = qe(null);
|
|
291
292
|
x.current = {
|
|
292
293
|
onPaneClick: p,
|
|
293
294
|
onPaneHover: m,
|
|
@@ -297,30 +298,30 @@ var ot = { display: "flex" }, st = { flex: "none" }, ct = {
|
|
|
297
298
|
theme: g,
|
|
298
299
|
unstyled: _
|
|
299
300
|
}), E = T?.sizes.paneHeight ?? s.sizes.paneHeight, te = T?.sizes.laneHeight ?? E, D = [], O = [];
|
|
300
|
-
|
|
301
|
-
if (
|
|
301
|
+
Ge.forEach(e, (e) => {
|
|
302
|
+
if (q(e) && e.type === $e && (D.push(null), O.push({
|
|
302
303
|
...e.props,
|
|
303
304
|
height: e.props.height ?? E
|
|
304
|
-
})),
|
|
305
|
+
})), q(e) && e.type === $) {
|
|
305
306
|
let { label: t, meta: n, height: r = te, times: i } = e.props;
|
|
306
307
|
D.push(e.props), O.push({
|
|
307
308
|
label: t,
|
|
308
309
|
meta: n,
|
|
309
310
|
height: r,
|
|
310
|
-
data:
|
|
311
|
+
data: gt,
|
|
311
312
|
whitespace: i
|
|
312
313
|
});
|
|
313
314
|
}
|
|
314
315
|
});
|
|
315
|
-
let k = O[0], ne = Y(() => H(k?.mode ?? "plain", k?.seriesOptions), [k?.mode, k?.seriesOptions]), re = Y(() => o(u(T),
|
|
316
|
+
let k = O[0], ne = Y(() => H(k?.mode ?? "plain", k?.seriesOptions), [k?.mode, k?.seriesOptions]), re = Y(() => o(u(T), ht, a && {
|
|
316
317
|
handleScale: { mouseWheel: !1 },
|
|
317
318
|
handleScroll: { mouseWheel: !1 }
|
|
318
319
|
}, i), [
|
|
319
320
|
T,
|
|
320
321
|
a,
|
|
321
322
|
i
|
|
322
|
-
]), A = ie(y,
|
|
323
|
-
|
|
323
|
+
]), A = ie(y, Je, re, ne), j = ct(A, O, T);
|
|
324
|
+
st(A, D, T), ae(A, y, a), J(() => {
|
|
324
325
|
if (!A) return;
|
|
325
326
|
let e = A.chart.timeScale(), t = () => ee(e.height());
|
|
326
327
|
return t(), e.subscribeSizeChange(t), () => e.unsubscribeSizeChange(t);
|
|
@@ -351,7 +352,7 @@ var ot = { display: "flex" }, st = { flex: "none" }, ct = {
|
|
|
351
352
|
return e.subscribeCrosshairMove(r), e.subscribeClick(i), () => {
|
|
352
353
|
e.unsubscribeCrosshairMove(r), e.unsubscribeClick(i);
|
|
353
354
|
};
|
|
354
|
-
}, [A, j]),
|
|
355
|
+
}, [A, j]), Qe(A, b, t === null ? null : R(t)), Ke(v, () => A ? {
|
|
355
356
|
chart: A.chart,
|
|
356
357
|
get series() {
|
|
357
358
|
return j.current.map((e) => e.series);
|
|
@@ -363,12 +364,12 @@ var ot = { display: "flex" }, st = { flex: "none" }, ct = {
|
|
|
363
364
|
} : {}, F = { width: T?.sizes.paneLabel }, I = { padding: T?.spacing.paneLabel }, z = n(T ? o(T.typography.title, T.panes.title) : void 0), B = n(T ? o(T.typography.value, T.panes.meta) : void 0), V = M.reduce((e, t) => e + t, 0) + Math.max(0, O.length - 1) + S;
|
|
364
365
|
return /* @__PURE__ */ Q("div", {
|
|
365
366
|
className: l,
|
|
366
|
-
style:
|
|
367
|
+
style: lt,
|
|
367
368
|
children: [/* @__PURE__ */ Q("div", {
|
|
368
369
|
"data-part": "labels",
|
|
369
370
|
className: d.labels,
|
|
370
371
|
style: {
|
|
371
|
-
...
|
|
372
|
+
...ut,
|
|
372
373
|
...F,
|
|
373
374
|
...f.labels
|
|
374
375
|
},
|
|
@@ -378,7 +379,7 @@ var ot = { display: "flex" }, st = { flex: "none" }, ct = {
|
|
|
378
379
|
"data-part": "label",
|
|
379
380
|
className: d.label,
|
|
380
381
|
style: {
|
|
381
|
-
...
|
|
382
|
+
...dt,
|
|
382
383
|
...I,
|
|
383
384
|
height: M[t] + +(t > 0),
|
|
384
385
|
...f.label
|
|
@@ -398,14 +399,14 @@ var ot = { display: "flex" }, st = { flex: "none" }, ct = {
|
|
|
398
399
|
...B,
|
|
399
400
|
...f.meta
|
|
400
401
|
},
|
|
401
|
-
children: n ? (e.format ??
|
|
402
|
+
children: n ? (e.format ?? _t)(n) : e.meta
|
|
402
403
|
})]
|
|
403
404
|
}, t);
|
|
404
405
|
}), /* @__PURE__ */ Z("div", {
|
|
405
406
|
"data-part": "axis",
|
|
406
407
|
className: d.axis,
|
|
407
408
|
style: {
|
|
408
|
-
...
|
|
409
|
+
...dt,
|
|
409
410
|
height: S,
|
|
410
411
|
...f.axis
|
|
411
412
|
},
|
|
@@ -415,13 +416,13 @@ var ot = { display: "flex" }, st = { flex: "none" }, ct = {
|
|
|
415
416
|
"data-part": "plot",
|
|
416
417
|
className: d.plot,
|
|
417
418
|
style: {
|
|
418
|
-
...
|
|
419
|
+
...ft,
|
|
419
420
|
height: V,
|
|
420
421
|
...f.plot
|
|
421
422
|
},
|
|
422
423
|
children: [/* @__PURE__ */ Z("div", {
|
|
423
424
|
ref: y,
|
|
424
|
-
style:
|
|
425
|
+
style: pt,
|
|
425
426
|
role: "img",
|
|
426
427
|
"aria-label": c
|
|
427
428
|
}), /* @__PURE__ */ Z("div", {
|
|
@@ -429,7 +430,7 @@ var ot = { display: "flex" }, st = { flex: "none" }, ct = {
|
|
|
429
430
|
"data-part": "now",
|
|
430
431
|
className: d.now,
|
|
431
432
|
style: {
|
|
432
|
-
...
|
|
433
|
+
...mt,
|
|
433
434
|
...P,
|
|
434
435
|
bottom: S,
|
|
435
436
|
...f.now
|
|
@@ -438,13 +439,13 @@ var ot = { display: "flex" }, st = { flex: "none" }, ct = {
|
|
|
438
439
|
})]
|
|
439
440
|
})]
|
|
440
441
|
});
|
|
441
|
-
}),
|
|
442
|
-
let i = Y(() =>
|
|
442
|
+
}), yt = K(function({ lanes: e, step: t, ...n }, r) {
|
|
443
|
+
let i = Y(() => ot(e.flatMap((e) => e.items.flatMap(({ start: e, end: t, eta: n }) => n === void 0 ? [e, t] : [
|
|
443
444
|
n,
|
|
444
445
|
e,
|
|
445
446
|
t
|
|
446
447
|
])), t), [e, t]);
|
|
447
|
-
return /* @__PURE__ */ Z(
|
|
448
|
+
return /* @__PURE__ */ Z(vt, {
|
|
448
449
|
ref: r,
|
|
449
450
|
...n,
|
|
450
451
|
children: e.map(({ id: e, ...t }, n) => /* @__PURE__ */ Z($, {
|
|
@@ -454,6 +455,6 @@ var ot = { display: "flex" }, st = { flex: "none" }, ct = {
|
|
|
454
455
|
});
|
|
455
456
|
});
|
|
456
457
|
//#endregion
|
|
457
|
-
export { ve as BarChart, z as CandlestickChart,
|
|
458
|
+
export { ve as BarChart, z as CandlestickChart, ke as CategoryBarChart, We as ChartFrame, je as ChartLegend, vt as ChartPanes, Ve as ChartStory, I as ChartThemeProvider, j as Heatmap, E as HeatmapLegend, pe as HistogramChart, $e as HistogramPane, de as LineChart, Se as PieChart, Te as PieLegend, Ne as PolarChart, ue as RibbonPrimitive, Me as ScatterChart, ce as SeriesChart, Pe as Sparkline, U as TimeRangePrimitive, _e as TimeSeriesChart, yt as TimelineChart, $ as TimelinePane, ge as aggregate, oe as aggregatePoints, xe as arcPath, ye as bandAt, Fe as bin, k as cellAt, r as contrastRatio, f as createTheme, s as defaultTheme, He as downloadCsv, P as easeInOutCubic, F as easeOutCubic, fe as editorialChartOptions, A as extremes, C as heatmapGrid, te as heatmapLayout, M as inRange, V as isUp, N as linear, Oe as niceExtent, De as niceStep, w as normaliseRange, Re as p1Accents, ze as p1CssVariables, Ie as p1Theme, Le as p1ThemeFromCss, he as patchSquareCanvasLabels, v as pieArcs, be as pieSlices, Ce as placeLabels, T as pointerCell, g as quantize, ne as rangeStats, i as readableInk, B as resolveBandStyles, Ze as squarify, D as stepColor, S as symmetricExtent, c as themeFromCssVariables, _ as tidyTree, W as timeToX, Ue as toCsv, se as toLinePoints, d as toSrgb, L as useChartTheme, O as useHeatmapSelection, re as useHeatmapState, ee as useHeatmapSteps, Ae as useMarkMemory, we as usePieState, Be as useSteps, Ee as useTween, l as withAlpha };
|
|
458
459
|
|
|
459
460
|
//# sourceMappingURL=index.js.map
|