@milaboratories/miplots4 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/common/ContinuousGrid.d.ts.map +1 -1
  2. package/dist/common/ContinuousGrid.js +90 -56
  3. package/dist/common/ContinuousGrid.js.map +1 -1
  4. package/dist/histogram/ChartRenderer.d.ts.map +1 -1
  5. package/dist/histogram/ChartRenderer.js +6 -0
  6. package/dist/histogram/ChartRenderer.js.map +1 -1
  7. package/dist/histogram/HistogramSettingsImpl.d.ts +5 -1
  8. package/dist/histogram/HistogramSettingsImpl.d.ts.map +1 -1
  9. package/dist/histogram/HistogramSettingsImpl.js.map +1 -1
  10. package/dist/scatterplot/components/Grid.d.ts.map +1 -1
  11. package/dist/scatterplot/components/Grid.js +109 -71
  12. package/dist/scatterplot/components/Grid.js.map +1 -1
  13. package/dist/types/bubble.d.ts +8 -8
  14. package/dist/types/common.d.ts +62 -6
  15. package/dist/types/common.d.ts.map +1 -1
  16. package/dist/types/common.js +15 -6
  17. package/dist/types/common.js.map +1 -1
  18. package/dist/types/dendro.d.ts +6 -6
  19. package/dist/types/discrete.d.ts +41 -13
  20. package/dist/types/discrete.d.ts.map +1 -1
  21. package/dist/types/heatmap.d.ts +4 -4
  22. package/dist/types/histogram.d.ts +59 -10
  23. package/dist/types/histogram.d.ts.map +1 -1
  24. package/dist/types/histogram.js +60 -66
  25. package/dist/types/histogram.js.map +1 -1
  26. package/dist/types/scatterplot-umap.d.ts +74 -18
  27. package/dist/types/scatterplot-umap.d.ts.map +1 -1
  28. package/dist/types/scatterplot.d.ts +74 -18
  29. package/dist/types/scatterplot.d.ts.map +1 -1
  30. package/dist/types/selection.d.ts +8 -8
  31. package/dist/utils/getChartEdgeSides.d.ts +1 -1
  32. package/dist/utils/significantLinesStyle.d.ts +8 -0
  33. package/dist/utils/significantLinesStyle.d.ts.map +1 -0
  34. package/dist/utils/significantLinesStyle.js +12 -0
  35. package/dist/utils/significantLinesStyle.js.map +1 -0
  36. package/package.json +1 -1
@@ -1,96 +1,134 @@
1
1
  import { GRID_GRAY as e } from "../../constants.js";
2
- import { getLineShape as t } from "../../utils/getLineShape.js";
3
- import { isContinuousAxis as n, isNumericScale as r } from "../utils/isNumericScale.js";
4
- import { useEffect as i, useState as a } from "react";
5
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
- var c = 1;
7
- function l(e, t) {
8
- return r(e) ? e.ticks().filter((e) => !t.includes(e)) : e.domain();
2
+ import { numberFormat as t } from "../../utils/numberFormat.js";
3
+ import { getLineShape as n } from "../../utils/getLineShape.js";
4
+ import { resolveSignificantLinesStyle as r } from "../../utils/significantLinesStyle.js";
5
+ import { isContinuousAxis as i, isNumericScale as a } from "../utils/isNumericScale.js";
6
+ import { useEffect as o, useState as s } from "react";
7
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
8
+ var d = 11, f = 1;
9
+ function p(e, t) {
10
+ return a(e) ? e.ticks().filter((e) => !t.includes(e)) : e.domain();
9
11
  }
10
- function u({ scaleX: u, scaleY: d, width: f, height: p, axisX: m, axisY: h, frameType: g, updatingKey: _ = "" }) {
11
- let { significantLines: v = [] } = m, { significantLines: y = [] } = h, [b, x] = a(() => l(u, v)), [S, C] = a(() => l(d, y));
12
- return i(() => {
13
- let e = l(u, v), t = l(d, y);
14
- x(e), C(t);
12
+ function m({ scaleX: m, scaleY: h, width: g, height: _, axisX: v, axisY: y, frameType: b, updatingKey: x = "" }) {
13
+ let { significantLines: S = [] } = v, { significantLines: C = [] } = y, [w, T] = s(() => p(m, S)), [E, D] = s(() => p(h, C));
14
+ return o(() => {
15
+ let e = p(m, S), t = p(h, C);
16
+ T(e), D(t);
15
17
  }, [
16
- u,
17
- d,
18
- _
19
- ]), /* @__PURE__ */ s("g", {
18
+ m,
19
+ h,
20
+ x
21
+ ]), /* @__PURE__ */ u("g", {
20
22
  stroke: e,
21
23
  children: [
22
- m.showGrid && b.map((e) => {
23
- let t = u(e);
24
- return /* @__PURE__ */ o("line", {
24
+ v.showGrid && w.map((e) => {
25
+ let t = m(e);
26
+ return /* @__PURE__ */ l("line", {
25
27
  x1: t,
26
28
  x2: t,
27
29
  y1: 0,
28
- y2: p
29
- }, `x_${t}_${p}`);
30
+ y2: _
31
+ }, `x_${t}_${_}`);
30
32
  }),
31
- h.showGrid && S.map((e) => {
32
- let t = d(e);
33
- return /* @__PURE__ */ o("line", {
33
+ y.showGrid && E.map((e) => {
34
+ let t = h(e);
35
+ return /* @__PURE__ */ l("line", {
34
36
  x1: 0,
35
- x2: f,
37
+ x2: g,
36
38
  y1: t,
37
39
  y2: t
38
- }, `y_${t}_${f}`);
40
+ }, `y_${t}_${g}`);
39
41
  }),
40
- r(u) && n(m) && /* @__PURE__ */ o("g", {
41
- strokeDasharray: t(m.significantLinesStyle),
42
- stroke: "#110529",
43
- children: v.map((e) => {
44
- let t = u(e);
45
- return /* @__PURE__ */ o("line", {
46
- x1: t,
47
- x2: t,
48
- y1: 0,
49
- y2: p
50
- }, `significant_${t}_${p}`);
51
- })
52
- }),
53
- r(d) && n(h) && /* @__PURE__ */ o("g", {
54
- strokeDasharray: t(h.significantLinesStyle),
55
- stroke: "#110529",
56
- children: y.map((e) => {
57
- let t = d(e);
58
- return /* @__PURE__ */ o("line", {
59
- x1: 0,
60
- x2: f,
61
- y1: t,
62
- y2: t
63
- }, `significant_${t}_${f}`);
64
- })
65
- }),
66
- g !== "empty" && /* @__PURE__ */ s("g", {
67
- strokeWidth: c,
42
+ a(m) && i(v) && (() => {
43
+ let e = r(v.significantLinesStyle, "x");
44
+ return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("g", {
45
+ strokeDasharray: n(e.shape),
46
+ stroke: "#110529",
47
+ children: S.map((e) => {
48
+ let t = m(e);
49
+ return /* @__PURE__ */ l("line", {
50
+ x1: t,
51
+ x2: t,
52
+ y1: 0,
53
+ y2: _
54
+ }, `significant_${t}_${_}`);
55
+ })
56
+ }), e.showLabel && /* @__PURE__ */ l("g", {
57
+ fill: "#110529",
58
+ fontSize: 10,
59
+ stroke: "none",
60
+ children: S.map((n) => {
61
+ let r = m(n);
62
+ if (r < 0 || r > g) return null;
63
+ let i = r < 24 ? "start" : r > g - 24 ? "end" : "middle", a = i === "start" ? 3 : i === "end" ? -3 : 0, o = e.labelPosition === "bottom" ? _ - 3 : d;
64
+ return /* @__PURE__ */ l("text", {
65
+ x: r + a,
66
+ y: o,
67
+ textAnchor: i,
68
+ children: t(n)
69
+ }, `significant_label_${r}`);
70
+ })
71
+ })] });
72
+ })(),
73
+ a(h) && i(y) && (() => {
74
+ let e = r(y.significantLinesStyle, "y");
75
+ return /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("g", {
76
+ strokeDasharray: n(e.shape),
77
+ stroke: "#110529",
78
+ children: C.map((e) => {
79
+ let t = h(e);
80
+ return /* @__PURE__ */ l("line", {
81
+ x1: 0,
82
+ x2: g,
83
+ y1: t,
84
+ y2: t
85
+ }, `significant_${t}_${g}`);
86
+ })
87
+ }), e.showLabel && /* @__PURE__ */ l("g", {
88
+ fill: "#110529",
89
+ fontSize: 10,
90
+ stroke: "none",
91
+ children: C.map((n) => {
92
+ let r = h(n);
93
+ if (r < 0 || r > _) return null;
94
+ let i = r < d + 3 ? r + d : r - 3, a = e.labelPosition === "right";
95
+ return /* @__PURE__ */ l("text", {
96
+ x: a ? g - 4 : 4,
97
+ y: i,
98
+ textAnchor: a ? "end" : "start",
99
+ children: t(n)
100
+ }, `significant_label_${r}`);
101
+ })
102
+ })] });
103
+ })(),
104
+ b !== "empty" && /* @__PURE__ */ u("g", {
105
+ strokeWidth: f,
68
106
  children: [
69
- (m.showGrid || g !== "left") && /* @__PURE__ */ o("line", {
70
- stroke: g === "left" ? "#E1E3EB" : "#110529",
107
+ (v.showGrid || b !== "left") && /* @__PURE__ */ l("line", {
108
+ stroke: b === "left" ? "#E1E3EB" : "#110529",
71
109
  x1: "0",
72
- x2: f,
73
- y1: p,
74
- y2: p
110
+ x2: g,
111
+ y1: _,
112
+ y2: _
75
113
  }),
76
- (m.showGrid || g !== "bottom") && /* @__PURE__ */ o("line", {
77
- stroke: g === "bottom" ? "#E1E3EB" : "#110529",
114
+ (v.showGrid || b !== "bottom") && /* @__PURE__ */ l("line", {
115
+ stroke: b === "bottom" ? "#E1E3EB" : "#110529",
78
116
  x1: "0",
79
117
  x2: "0",
80
118
  y1: "0",
81
- y2: p
119
+ y2: _
82
120
  }),
83
- (m.showGrid || g === "full") && /* @__PURE__ */ o("line", {
84
- stroke: g === "full" ? "#110529" : "#E1E3EB",
85
- x1: f,
86
- x2: f,
121
+ (v.showGrid || b === "full") && /* @__PURE__ */ l("line", {
122
+ stroke: b === "full" ? "#110529" : "#E1E3EB",
123
+ x1: g,
124
+ x2: g,
87
125
  y1: "0",
88
- y2: p
126
+ y2: _
89
127
  }),
90
- (h.showGrid || g === "full") && /* @__PURE__ */ o("line", {
91
- stroke: g === "full" ? "#110529" : "#E1E3EB",
128
+ (y.showGrid || b === "full") && /* @__PURE__ */ l("line", {
129
+ stroke: b === "full" ? "#110529" : "#E1E3EB",
92
130
  x1: "0",
93
- x2: f,
131
+ x2: g,
94
132
  y1: "0",
95
133
  y2: "0"
96
134
  })
@@ -99,6 +137,6 @@ function u({ scaleX: u, scaleY: d, width: f, height: p, axisX: m, axisY: h, fram
99
137
  ]
100
138
  });
101
139
  }
102
- export { u as Grid };
140
+ export { m as Grid };
103
141
 
104
142
  //# sourceMappingURL=Grid.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.js","names":[],"sources":["../../../src/scatterplot/components/Grid.tsx"],"sourcesContent":["import { BLACK, GRID_GRAY } from '../../constants';\nimport type { AxisSettings, AxisSettingsContinuous, FrameType } from '../../types';\nimport { getLineShape } from '../../utils/getLineShape';\nimport React from 'react';\nimport { useEffect, useState } from 'react';\nimport type { ChartScales } from './types';\nimport { isContinuousAxis, isNumericScale } from '../utils/isNumericScale';\n\ntype PointValue = { valueOf(): number; } & string;\n\nconst GRID_FRAME_WIDTH = 1;\n\ninterface GridProps {\n scaleY: ChartScales['y'];\n scaleX: ChartScales['x'];\n width: number;\n height: number;\n axisX: AxisSettings;\n axisY: AxisSettings;\n frameType: FrameType;\n updatingKey?: string;\n}\n\nfunction getTicks(scale: ChartScales['x' | 'y'], significantLines: number[]): (string | number)[] {\n if (isNumericScale(scale)) {\n return scale.ticks().filter(t => !significantLines.includes(t));\n }\n return scale.domain();\n}\n\nexport function Grid({ scaleX, scaleY, width, height, axisX, axisY, frameType, updatingKey = '' }: GridProps) {\n const { significantLines: significantLinesX = [] } = axisX as AxisSettingsContinuous;\n const { significantLines: significantLinesY = [] } = axisY as AxisSettingsContinuous;\n\n const [ticksX, setTicksX] = useState<(string | number)[]>(() => getTicks(scaleX, significantLinesX));\n const [ticksY, setTicksY] = useState<(string | number)[]>(() => getTicks(scaleY, significantLinesY));\n\n useEffect(() => {\n const ticksX = getTicks(scaleX, significantLinesX);\n const ticksY = getTicks(scaleY, significantLinesY);\n setTicksX(ticksX);\n setTicksY(ticksY);\n }, [scaleX, scaleY, updatingKey]);\n\n return (\n <g stroke={GRID_GRAY}>\n {axisX.showGrid &&\n ticksX.map((tick) => {\n const x = scaleX(tick as PointValue);\n return (\n <line key={`x_${x}_${height}`} x1={x} x2={x} y1={0} y2={height} />\n );\n })}\n {axisY.showGrid &&\n ticksY.map(tick => {\n const y = scaleY(tick as PointValue);\n return (\n <line key={`y_${y}_${width}`} x1={0} x2={width} y1={y} y2={y} />\n );\n })}\n {isNumericScale(scaleX) && isContinuousAxis(axisX) && (\n <g strokeDasharray={getLineShape(axisX.significantLinesStyle)} stroke={BLACK}>\n {significantLinesX.map(v => {\n const x = scaleX(v);\n return (\n <line key={`significant_${x}_${height}`} x1={x} x2={x} y1={0} y2={height} />\n );\n })}\n </g>\n )}\n {isNumericScale(scaleY) && isContinuousAxis(axisY) && (\n <g strokeDasharray={getLineShape(axisY.significantLinesStyle)} stroke={BLACK}>\n {significantLinesY.map(v => {\n const y = scaleY(v);\n return (\n <line key={`significant_${y}_${width}`} x1={0} x2={width} y1={y} y2={y} />\n );\n })}\n </g>\n )}\n {frameType !== 'empty' && (\n <g strokeWidth={GRID_FRAME_WIDTH}>\n {(axisX.showGrid || frameType !== 'left') && <line stroke={frameType === 'left' ? GRID_GRAY : BLACK} x1=\"0\" x2={width} y1={height} y2={height} />}\n {(axisX.showGrid || frameType !== 'bottom') && <line stroke={frameType === 'bottom' ? GRID_GRAY : BLACK} x1=\"0\" x2=\"0\" y1=\"0\" y2={height} />}\n {(axisX.showGrid || frameType === 'full') && <line stroke={frameType === 'full' ? BLACK : GRID_GRAY} x1={width} x2={width} y1=\"0\" y2={height} />}\n {(axisY.showGrid || frameType === 'full') && <line stroke={frameType === 'full' ? BLACK : GRID_GRAY} x1=\"0\" x2={width} y1=\"0\" y2=\"0\" />}\n </g>\n )}\n </g>\n );\n}\n"],"mappings":";;;;;AAUA,IAAM,IAAmB;AAazB,SAAS,EAAS,GAA+B,GAAiD;AAI9F,QAHI,EAAe,EAAM,GACd,EAAM,OAAO,CAAC,QAAO,MAAK,CAAC,EAAiB,SAAS,EAAE,CAAC,GAE5D,EAAM,QAAQ;;AAGzB,SAAgB,EAAK,EAAE,WAAQ,WAAQ,UAAO,WAAQ,UAAO,UAAO,cAAW,iBAAc,MAAiB;CAC1G,IAAM,EAAE,kBAAkB,IAAoB,EAAE,KAAK,GAC/C,EAAE,kBAAkB,IAAoB,EAAE,KAAK,GAE/C,CAAC,GAAQ,KAAa,QAAoC,EAAS,GAAQ,EAAkB,CAAC,EAC9F,CAAC,GAAQ,KAAa,QAAoC,EAAS,GAAQ,EAAkB,CAAC;AASpG,QAPA,QAAgB;EACZ,IAAM,IAAS,EAAS,GAAQ,EAAkB,EAC5C,IAAS,EAAS,GAAQ,EAAkB;AAElD,EADA,EAAU,EAAO,EACjB,EAAU,EAAO;IAClB;EAAC;EAAQ;EAAQ;EAAY,CAAC,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c,WAAA,YAAA;MAA8B,IAAG;MAAI,IAAG;MAAI,IAAG;MAAI,IAAI;MAAU,CAAA;MAC1I,EAAM,YAAY,MAAc,WAAW,kBAAC,QAAD;MAAM,QAAQ,MAAc,SAAA,YAAA;MAA4B,IAAI;MAAO,IAAI;MAAO,IAAG;MAAI,IAAI;MAAU,CAAA;MAC9I,EAAM,YAAY,MAAc,WAAW,kBAAC,QAAD;MAAM,QAAQ,MAAc,SAAA,YAAA;MAA4B,IAAG;MAAI,IAAI;MAAO,IAAG;MAAI,IAAG;MAAM,CAAA;KACvI;;GAER"}
1
+ {"version":3,"file":"Grid.js","names":[],"sources":["../../../src/scatterplot/components/Grid.tsx"],"sourcesContent":["import { BLACK, GRID_GRAY } from '../../constants';\nimport type { AxisSettings, AxisSettingsContinuous, FrameType } from '../../types';\nimport { getLineShape } from '../../utils/getLineShape';\nimport { numberFormat } from '../../utils/numberFormat';\nimport { resolveSignificantLinesStyle } from '../../utils/significantLinesStyle';\nimport React from 'react';\nimport { useEffect, useState } from 'react';\nimport type { ChartScales } from './types';\nimport { isContinuousAxis, isNumericScale } from '../utils/isNumericScale';\n\nconst LABEL_EDGE_OFFSET = 11;\n\ntype PointValue = { valueOf(): number; } & string;\n\nconst GRID_FRAME_WIDTH = 1;\n\ninterface GridProps {\n scaleY: ChartScales['y'];\n scaleX: ChartScales['x'];\n width: number;\n height: number;\n axisX: AxisSettings;\n axisY: AxisSettings;\n frameType: FrameType;\n updatingKey?: string;\n}\n\nfunction getTicks(scale: ChartScales['x' | 'y'], significantLines: number[]): (string | number)[] {\n if (isNumericScale(scale)) {\n return scale.ticks().filter(t => !significantLines.includes(t));\n }\n return scale.domain();\n}\n\nexport function Grid({ scaleX, scaleY, width, height, axisX, axisY, frameType, updatingKey = '' }: GridProps) {\n const { significantLines: significantLinesX = [] } = axisX as AxisSettingsContinuous;\n const { significantLines: significantLinesY = [] } = axisY as AxisSettingsContinuous;\n\n const [ticksX, setTicksX] = useState<(string | number)[]>(() => getTicks(scaleX, significantLinesX));\n const [ticksY, setTicksY] = useState<(string | number)[]>(() => getTicks(scaleY, significantLinesY));\n\n useEffect(() => {\n const ticksX = getTicks(scaleX, significantLinesX);\n const ticksY = getTicks(scaleY, significantLinesY);\n setTicksX(ticksX);\n setTicksY(ticksY);\n }, [scaleX, scaleY, updatingKey]);\n\n return (\n <g stroke={GRID_GRAY}>\n {axisX.showGrid &&\n ticksX.map((tick) => {\n const x = scaleX(tick as PointValue);\n return (\n <line key={`x_${x}_${height}`} x1={x} x2={x} y1={0} y2={height} />\n );\n })}\n {axisY.showGrid &&\n ticksY.map(tick => {\n const y = scaleY(tick as PointValue);\n return (\n <line key={`y_${y}_${width}`} x1={0} x2={width} y1={y} y2={y} />\n );\n })}\n {isNumericScale(scaleX) && isContinuousAxis(axisX) && (() => {\n const xStyle = resolveSignificantLinesStyle(axisX.significantLinesStyle, 'x');\n return (\n <>\n <g strokeDasharray={getLineShape(xStyle.shape)} stroke={BLACK}>\n {significantLinesX.map(v => {\n const x = scaleX(v);\n return (\n <line key={`significant_${x}_${height}`} x1={x} x2={x} y1={0} y2={height} />\n );\n })}\n </g>\n {xStyle.showLabel && (\n <g fill={BLACK} fontSize={10} stroke=\"none\">\n {significantLinesX.map(v => {\n const x = scaleX(v);\n if (x < 0 || x > width) return null;\n const anchor = x < 24 ? 'start' : x > width - 24 ? 'end' : 'middle';\n const dx = anchor === 'start' ? 3 : anchor === 'end' ? -3 : 0;\n const y = xStyle.labelPosition === 'bottom'\n ? height - 3\n : LABEL_EDGE_OFFSET;\n return (\n <text key={`significant_label_${x}`} x={x + dx} y={y} textAnchor={anchor}>\n {numberFormat(v)}\n </text>\n );\n })}\n </g>\n )}\n </>\n );\n })()}\n {isNumericScale(scaleY) && isContinuousAxis(axisY) && (() => {\n const yStyle = resolveSignificantLinesStyle(axisY.significantLinesStyle, 'y');\n return (\n <>\n <g strokeDasharray={getLineShape(yStyle.shape)} stroke={BLACK}>\n {significantLinesY.map(v => {\n const y = scaleY(v);\n return (\n <line key={`significant_${y}_${width}`} x1={0} x2={width} y1={y} y2={y} />\n );\n })}\n </g>\n {yStyle.showLabel && (\n <g fill={BLACK} fontSize={10} stroke=\"none\">\n {significantLinesY.map(v => {\n const y = scaleY(v);\n if (y < 0 || y > height) return null;\n const labelY = y < LABEL_EDGE_OFFSET + 3\n ? y + LABEL_EDGE_OFFSET\n : y - 3;\n const onRight = yStyle.labelPosition === 'right';\n const x = onRight ? width - 4 : 4;\n return (\n <text key={`significant_label_${y}`} x={x} y={labelY} textAnchor={onRight ? 'end' : 'start'}>\n {numberFormat(v)}\n </text>\n );\n })}\n </g>\n )}\n </>\n );\n })()}\n {frameType !== 'empty' && (\n <g strokeWidth={GRID_FRAME_WIDTH}>\n {(axisX.showGrid || frameType !== 'left') && <line stroke={frameType === 'left' ? GRID_GRAY : BLACK} x1=\"0\" x2={width} y1={height} y2={height} />}\n {(axisX.showGrid || frameType !== 'bottom') && <line stroke={frameType === 'bottom' ? GRID_GRAY : BLACK} x1=\"0\" x2=\"0\" y1=\"0\" y2={height} />}\n {(axisX.showGrid || frameType === 'full') && <line stroke={frameType === 'full' ? BLACK : GRID_GRAY} x1={width} x2={width} y1=\"0\" y2={height} />}\n {(axisY.showGrid || frameType === 'full') && <line stroke={frameType === 'full' ? BLACK : GRID_GRAY} x1=\"0\" x2={width} y1=\"0\" y2=\"0\" />}\n </g>\n )}\n </g>\n );\n}\n"],"mappings":";;;;;;;AAUA,IAAM,IAAoB,IAIpB,IAAmB;AAazB,SAAS,EAAS,GAA+B,GAAiD;AAI9F,QAHI,EAAe,EAAM,GACd,EAAM,OAAO,CAAC,QAAO,MAAK,CAAC,EAAiB,SAAS,EAAE,CAAC,GAE5D,EAAM,QAAQ;;AAGzB,SAAgB,EAAK,EAAE,WAAQ,WAAQ,UAAO,WAAQ,UAAO,UAAO,cAAW,iBAAc,MAAiB;CAC1G,IAAM,EAAE,kBAAkB,IAAoB,EAAE,KAAK,GAC/C,EAAE,kBAAk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Q,MAAc,SAAA,YAAA;MAA4B,IAAG;MAAI,IAAI;MAAO,IAAI;MAAQ,IAAI;MAAU,CAAA;MAC/I,EAAM,YAAY,MAAc,aAAa,kBAAC,QAAD;MAAM,QAAQ,MAAc,WAAA,YAAA;MAA8B,IAAG;MAAI,IAAG;MAAI,IAAG;MAAI,IAAI;MAAU,CAAA;MAC1I,EAAM,YAAY,MAAc,WAAW,kBAAC,QAAD;MAAM,QAAQ,MAAc,SAAA,YAAA;MAA4B,IAAI;MAAO,IAAI;MAAO,IAAG;MAAI,IAAI;MAAU,CAAA;MAC9I,EAAM,YAAY,MAAc,WAAW,kBAAC,QAAD;MAAM,QAAQ,MAAc,SAAA,YAAA;MAA4B,IAAG;MAAI,IAAI;MAAO,IAAG;MAAI,IAAG;MAAM,CAAA;KACvI;;GAER"}
@@ -32,17 +32,17 @@ export declare const BubblesSettingsSchema: z.ZodObject<{
32
32
  position: z.ZodOptional<z.ZodEnum<["inside", "right", "top", "bottom"]>>;
33
33
  }, "strip", z.ZodTypeAny, {
34
34
  show?: boolean | undefined;
35
- position?: "right" | "inside" | "top" | "bottom" | undefined;
35
+ position?: "top" | "bottom" | "right" | "inside" | undefined;
36
36
  }, {
37
37
  show?: boolean | undefined;
38
- position?: "right" | "inside" | "top" | "bottom" | undefined;
38
+ position?: "top" | "bottom" | "right" | "inside" | undefined;
39
39
  }>>;
40
40
  frame: z.ZodOptional<z.ZodObject<{
41
41
  type: z.ZodOptional<z.ZodEnum<["left", "bottom", "left-bottom", "full", "empty"]>>;
42
42
  }, "strip", z.ZodTypeAny, {
43
- type?: "left" | "bottom" | "left-bottom" | "full" | "empty" | undefined;
43
+ type?: "bottom" | "left" | "left-bottom" | "full" | "empty" | undefined;
44
44
  }, {
45
- type?: "left" | "bottom" | "left-bottom" | "full" | "empty" | undefined;
45
+ type?: "bottom" | "left" | "left-bottom" | "full" | "empty" | undefined;
46
46
  }>>;
47
47
  facetSettings: z.ZodOptional<z.ZodObject<{
48
48
  nRows: z.ZodOptional<z.ZodNumber>;
@@ -492,7 +492,7 @@ export declare const BubblesSettingsSchema: z.ZodObject<{
492
492
  } | undefined;
493
493
  legend?: {
494
494
  show?: boolean | undefined;
495
- position?: "right" | "inside" | "top" | "bottom" | undefined;
495
+ position?: "top" | "bottom" | "right" | "inside" | undefined;
496
496
  } | undefined;
497
497
  tooltips?: {
498
498
  show?: boolean | undefined;
@@ -507,7 +507,7 @@ export declare const BubblesSettingsSchema: z.ZodObject<{
507
507
  }[] | undefined;
508
508
  } | undefined;
509
509
  frame?: {
510
- type?: "left" | "bottom" | "left-bottom" | "full" | "empty" | undefined;
510
+ type?: "bottom" | "left" | "left-bottom" | "full" | "empty" | undefined;
511
511
  } | undefined;
512
512
  facetSettings?: {
513
513
  order?: string[] | undefined;
@@ -650,7 +650,7 @@ export declare const BubblesSettingsSchema: z.ZodObject<{
650
650
  } | undefined;
651
651
  legend?: {
652
652
  show?: boolean | undefined;
653
- position?: "right" | "inside" | "top" | "bottom" | undefined;
653
+ position?: "top" | "bottom" | "right" | "inside" | undefined;
654
654
  } | undefined;
655
655
  tooltips?: {
656
656
  show?: boolean | undefined;
@@ -665,7 +665,7 @@ export declare const BubblesSettingsSchema: z.ZodObject<{
665
665
  }[] | undefined;
666
666
  } | undefined;
667
667
  frame?: {
668
- type?: "left" | "bottom" | "left-bottom" | "full" | "empty" | undefined;
668
+ type?: "bottom" | "left" | "left-bottom" | "full" | "empty" | undefined;
669
669
  } | undefined;
670
670
  facetSettings?: {
671
671
  order?: string[] | undefined;
@@ -286,6 +286,22 @@ export declare const AxisSettingsDiscreteSchema: z.ZodObject<{
286
286
  labelsPosition?: "center" | "45deg" | "90deg" | undefined;
287
287
  hiddenLabels?: boolean | undefined;
288
288
  }>;
289
+ export declare const SignificantLineLabelPositionSchema: z.ZodUnion<[z.ZodLiteral<"top">, z.ZodLiteral<"bottom">, z.ZodLiteral<"left">, z.ZodLiteral<"right">]>;
290
+ export type SignificantLineLabelPosition = z.infer<typeof SignificantLineLabelPositionSchema>;
291
+ export declare const SignificantLinesStyleSchema: z.ZodObject<{
292
+ shape: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted", "dotdash", "longdash", "twodash"]>>;
293
+ showLabel: z.ZodOptional<z.ZodBoolean>;
294
+ labelPosition: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"top">, z.ZodLiteral<"bottom">, z.ZodLiteral<"left">, z.ZodLiteral<"right">]>>;
295
+ }, "strip", z.ZodTypeAny, {
296
+ shape?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
297
+ showLabel?: boolean | undefined;
298
+ labelPosition?: "top" | "bottom" | "left" | "right" | undefined;
299
+ }, {
300
+ shape?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
301
+ showLabel?: boolean | undefined;
302
+ labelPosition?: "top" | "bottom" | "left" | "right" | undefined;
303
+ }>;
304
+ export type SignificantLinesStyle = z.infer<typeof SignificantLinesStyleSchema>;
289
305
  export declare const AxisSettingsContinuousSchema: z.ZodObject<{
290
306
  title: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
291
307
  type: z.ZodLiteral<"column">;
@@ -316,7 +332,19 @@ export declare const AxisSettingsContinuousSchema: z.ZodObject<{
316
332
  showGrid: z.ZodOptional<z.ZodBoolean>;
317
333
  showTicks: z.ZodOptional<z.ZodBoolean>;
318
334
  significantLines: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
319
- significantLinesStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted", "dotdash", "longdash", "twodash"]>>;
335
+ significantLinesStyle: z.ZodOptional<z.ZodObject<{
336
+ shape: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted", "dotdash", "longdash", "twodash"]>>;
337
+ showLabel: z.ZodOptional<z.ZodBoolean>;
338
+ labelPosition: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"top">, z.ZodLiteral<"bottom">, z.ZodLiteral<"left">, z.ZodLiteral<"right">]>>;
339
+ }, "strip", z.ZodTypeAny, {
340
+ shape?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
341
+ showLabel?: boolean | undefined;
342
+ labelPosition?: "top" | "bottom" | "left" | "right" | undefined;
343
+ }, {
344
+ shape?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
345
+ showLabel?: boolean | undefined;
346
+ labelPosition?: "top" | "bottom" | "left" | "right" | undefined;
347
+ }>>;
320
348
  symmetricRange: z.ZodOptional<z.ZodNumber>;
321
349
  upperValue: z.ZodOptional<z.ZodNumber>;
322
350
  lowerValue: z.ZodOptional<z.ZodNumber>;
@@ -336,7 +364,11 @@ export declare const AxisSettingsContinuousSchema: z.ZodObject<{
336
364
  showTicks?: boolean | undefined;
337
365
  hiddenLabels?: boolean | undefined;
338
366
  significantLines?: number[] | undefined;
339
- significantLinesStyle?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
367
+ significantLinesStyle?: {
368
+ shape?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
369
+ showLabel?: boolean | undefined;
370
+ labelPosition?: "top" | "bottom" | "left" | "right" | undefined;
371
+ } | undefined;
340
372
  symmetricRange?: number | undefined;
341
373
  upperValue?: number | undefined;
342
374
  lowerValue?: number | undefined;
@@ -355,7 +387,11 @@ export declare const AxisSettingsContinuousSchema: z.ZodObject<{
355
387
  showTicks?: boolean | undefined;
356
388
  hiddenLabels?: boolean | undefined;
357
389
  significantLines?: number[] | undefined;
358
- significantLinesStyle?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
390
+ significantLinesStyle?: {
391
+ shape?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
392
+ showLabel?: boolean | undefined;
393
+ labelPosition?: "top" | "bottom" | "left" | "right" | undefined;
394
+ } | undefined;
359
395
  symmetricRange?: number | undefined;
360
396
  upperValue?: number | undefined;
361
397
  lowerValue?: number | undefined;
@@ -460,7 +496,19 @@ export declare const AxisSettingsSchema: z.ZodUnion<[z.ZodObject<{
460
496
  showGrid: z.ZodOptional<z.ZodBoolean>;
461
497
  showTicks: z.ZodOptional<z.ZodBoolean>;
462
498
  significantLines: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
463
- significantLinesStyle: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted", "dotdash", "longdash", "twodash"]>>;
499
+ significantLinesStyle: z.ZodOptional<z.ZodObject<{
500
+ shape: z.ZodOptional<z.ZodEnum<["solid", "dashed", "dotted", "dotdash", "longdash", "twodash"]>>;
501
+ showLabel: z.ZodOptional<z.ZodBoolean>;
502
+ labelPosition: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"top">, z.ZodLiteral<"bottom">, z.ZodLiteral<"left">, z.ZodLiteral<"right">]>>;
503
+ }, "strip", z.ZodTypeAny, {
504
+ shape?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
505
+ showLabel?: boolean | undefined;
506
+ labelPosition?: "top" | "bottom" | "left" | "right" | undefined;
507
+ }, {
508
+ shape?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
509
+ showLabel?: boolean | undefined;
510
+ labelPosition?: "top" | "bottom" | "left" | "right" | undefined;
511
+ }>>;
464
512
  symmetricRange: z.ZodOptional<z.ZodNumber>;
465
513
  upperValue: z.ZodOptional<z.ZodNumber>;
466
514
  lowerValue: z.ZodOptional<z.ZodNumber>;
@@ -480,7 +528,11 @@ export declare const AxisSettingsSchema: z.ZodUnion<[z.ZodObject<{
480
528
  showTicks?: boolean | undefined;
481
529
  hiddenLabels?: boolean | undefined;
482
530
  significantLines?: number[] | undefined;
483
- significantLinesStyle?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
531
+ significantLinesStyle?: {
532
+ shape?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
533
+ showLabel?: boolean | undefined;
534
+ labelPosition?: "top" | "bottom" | "left" | "right" | undefined;
535
+ } | undefined;
484
536
  symmetricRange?: number | undefined;
485
537
  upperValue?: number | undefined;
486
538
  lowerValue?: number | undefined;
@@ -499,7 +551,11 @@ export declare const AxisSettingsSchema: z.ZodUnion<[z.ZodObject<{
499
551
  showTicks?: boolean | undefined;
500
552
  hiddenLabels?: boolean | undefined;
501
553
  significantLines?: number[] | undefined;
502
- significantLinesStyle?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
554
+ significantLinesStyle?: {
555
+ shape?: "solid" | "dashed" | "dotted" | "dotdash" | "longdash" | "twodash" | undefined;
556
+ showLabel?: boolean | undefined;
557
+ labelPosition?: "top" | "bottom" | "left" | "right" | undefined;
558
+ } | undefined;
503
559
  symmetricRange?: number | undefined;
504
560
  upperValue?: number | undefined;
505
561
  lowerValue?: number | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,KAAK,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAEvF,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;AAC/C,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC;AAC9B,eAAO,MAAM,eAAe,mDAA8C,CAAC;AAE3E,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AAE3C,MAAM,MAAM,KAAK,GAAG,MAAM,CAAC;AAE3B,eAAO,MAAM,uBAAuB,oDAAkD,CAAC;AACvF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,C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CAAC;IAClC,IAAI,EAAE;QACF,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KACpB,CAAC;CACL;AACD,MAAM,WAAW,2BAA4B,SAAQ,aAAa;IAC9D,IAAI,EAAE,2BAA2B,CAAC;IAClC,IAAI,EAAE;QACF,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KACpB,CAAC;CACL;AACD,MAAM,WAAW,wBAAyB,SAAQ,aAAa;IAC3D,IAAI,EAAE,wBAAwB,CAAC;IAC/B,IAAI,EAAE;QACF,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;KACpB,CAAC;CACL;AACD,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACnD,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE;QACF,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;KAC7B,CAAC;CACL;AACD,MAAM,MAAM,SAAS,GAAG,eAAe,GAAG,sBAAsB,GAAG,wBAAwB,GAAG,2BAA2B,GAAG,2BAA2B,GAAG,wBAAwB,GAAG,gBAAgB,CAAC;AACtM,wBAAgB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,SAAS,CAE9D;AACD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,gBAAgB,CAQlE"}
@@ -108,25 +108,34 @@ const _ = e.union([
108
108
  showTicks: e.optional(e.boolean()),
109
109
  labelsPosition: e.optional(_),
110
110
  hiddenLabels: e.optional(e.boolean())
111
- }), y = e.object({
111
+ }), y = e.union([
112
+ e.literal("top"),
113
+ e.literal("bottom"),
114
+ e.literal("left"),
115
+ e.literal("right")
116
+ ]), b = e.object({
117
+ shape: e.optional(a),
118
+ showLabel: e.optional(e.boolean()),
119
+ labelPosition: e.optional(y)
120
+ }), x = e.object({
112
121
  title: e.optional(e.union([e.string(), u])),
113
122
  scale: e.optional(e.union([e.literal("linear"), e.literal("log")])),
114
123
  showGrid: e.optional(e.boolean()),
115
124
  showTicks: e.optional(e.boolean()),
116
125
  significantLines: e.optional(e.array(e.number())),
117
- significantLinesStyle: e.optional(a),
126
+ significantLinesStyle: e.optional(b),
118
127
  symmetricRange: e.optional(e.number()),
119
128
  upperValue: e.optional(e.number()),
120
129
  lowerValue: e.optional(e.number()),
121
130
  hiddenLabels: e.optional(e.boolean())
122
- }), b = e.union([v, y]), x = e.object({
131
+ }), S = e.union([v, x]), C = e.object({
123
132
  show: e.optional(e.boolean()),
124
133
  content: e.optional(e.array(u))
125
134
  });
126
- function S(e) {
135
+ function w(e) {
127
136
  return typeof e == "object" && !!e && "type" in e && "info" in e;
128
137
  }
129
- function C(e) {
138
+ function T(e) {
130
139
  return {
131
140
  type: "unknownError",
132
141
  info: {
@@ -135,6 +144,6 @@ function C(e) {
135
144
  }
136
145
  };
137
146
  }
138
- export { d as AesItemSchema, f as AesRecordSchema, n as AggregationMethodSchema, y as AxisSettingsContinuousSchema, v as AxisSettingsDiscreteSchema, b as AxisSettingsSchema, u as ColumnNameSchema, t as DataValueSchema, _ as DiscreteLabelsPositionSchema, o as FrameTypeSchema, s as LegendPositionSchema, a as LineShapeSchema, r as POINT_SHAPE, i as PointShapeSchema, c as TITLE_POSITION, l as TitlePositionSchema, x as TooltipSettingsSchema, p as categoricalAesMappingFromValueSchema, m as continuousAesMappingFromValueSchema, C as getUnknownErrorInfo, h as isCategoricalAes, g as isContinuousAes, S as isErrorInfo };
147
+ export { d as AesItemSchema, f as AesRecordSchema, n as AggregationMethodSchema, x as AxisSettingsContinuousSchema, v as AxisSettingsDiscreteSchema, S as AxisSettingsSchema, u as ColumnNameSchema, t as DataValueSchema, _ as DiscreteLabelsPositionSchema, o as FrameTypeSchema, s as LegendPositionSchema, a as LineShapeSchema, r as POINT_SHAPE, i as PointShapeSchema, y as SignificantLineLabelPositionSchema, b as SignificantLinesStyleSchema, c as TITLE_POSITION, l as TitlePositionSchema, C as TooltipSettingsSchema, p as categoricalAesMappingFromValueSchema, m as continuousAesMappingFromValueSchema, T as getUnknownErrorInfo, h as isCategoricalAes, g as isContinuousAes, w as isErrorInfo };
139
148
 
140
149
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","names":[],"sources":["../../src/types/common.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { LassoControlsState, Polygon } from '../scatterplot-umap/types';\nimport type { CategoricalAesFromColumn, ContinuousAesFromColumn } from './scatterplot';\n\nexport type DataValue = string | number | null;\nexport type Category = string;\nexport const DataValueSchema = z.union([z.string(), z.number(), z.null()]);\n\nexport type Row = Record<string, DataValue>\n\nexport type Color = string;\n\nexport const AggregationMethodSchema = z.enum(['sum', 'mean', 'median', 'min', 'max']);\nexport type AggregationMethod = z.infer<typeof AggregationMethodSchema>;\n\n// numbered according ggplot2 symbols, 19 (third size of black circle) is missed\nexport const POINT_SHAPE = [\n '0',\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n '13',\n '14',\n '15',\n '16',\n '17',\n '18',\n '20',\n '21',\n '22',\n '23',\n '24',\n '25',\n] as const;\nexport const PointShapeSchema = z.enum(POINT_SHAPE);\nexport type PointShape = z.infer<typeof PointShapeSchema>;\n\nconst LINE_SHAPE = ['solid', 'dashed', 'dotted', 'dotdash', 'longdash', 'twodash'] as const;\nexport const LineShapeSchema = z.enum(LINE_SHAPE);\nexport type LineShape = z.infer<typeof LineShapeSchema>;\n\nconst FRAME_TYPE = ['left', 'bottom', 'left-bottom', 'full', 'empty'] as const;\nexport const FrameTypeSchema = z.enum(FRAME_TYPE);\nexport type FrameType = z.infer<typeof FrameTypeSchema>;\n\nconst LEGEND_POSITION = ['inside', 'right', 'top', 'bottom'] as const;\nexport const LegendPositionSchema = z.enum(LEGEND_POSITION);\nexport type LegendPosition = z.infer<typeof LegendPositionSchema>;\n\nexport const TITLE_POSITION = ['left', 'center', 'right'] as const;\nexport const TitlePositionSchema = z.enum(TITLE_POSITION);\nexport type TitlePosition = z.infer<typeof TitlePositionSchema>;\n\nexport const ColumnNameSchema = z.object({\n type: z.literal('column'),\n value: z.string(),\n format: z.optional(z.string()), // d3 format\n label: z.optional(z.string()),\n // Column id of a sibling labels column in the same DataFrame. Per-row\n // lookup via `data.getColumnValue(valueLabels, rowIdx)`.\n valueLabels: z.optional(z.string()),\n // Authoritative value -> display label map sourced from the column spec's\n // `pl7.app/valueLabels` annotation. Use when the value space is finite and\n // labels must exist independent of the data rows (e.g. selection stages\n // that may have eliminated zero rows).\n valueLabelsMap: z.optional(z.record(z.string())),\n nullValueLabel: z.optional(z.string())\n});\nexport type ColumnName = z.infer<typeof ColumnNameSchema>\n\nexport type AesItem = {\n fillColor?: Color;\n lineColor?: Color;\n lineWidth?: number;\n lineShape?: LineShape;\n dotShape?: PointShape;\n dotSize?: number;\n dotFill?: Color;\n};\nexport const AesItemSchema = z.object({\n fillColor: z.optional(z.string()),\n lineColor: z.optional(z.string()),\n lineWidth: z.optional(z.number()),\n lineShape: z.optional(LineShapeSchema),\n dotShape: z.optional(PointShapeSchema),\n dotSize: z.optional(z.number()),\n dotFill: z.optional(z.string()),\n});\n\nexport const AesRecordSchema = z.record(AesItemSchema);\nexport type AesRecord = z.infer<typeof AesRecordSchema>;\n\nexport function categoricalAesMappingFromValueSchema<ValueType extends z.ZodTypeAny>(\n valueSchema: ValueType,\n) {\n return z.object({\n columnName: ColumnNameSchema,\n valuesMap: z.record(valueSchema),\n });\n}\nexport function continuousAesMappingFromValueSchema<ValueType extends z.ZodTypeAny>(\n valueSchema: ValueType,\n) {\n return z.object({\n columnName: ColumnNameSchema,\n domain: z.array(z.number()),\n range: z.array(valueSchema),\n type: z.optional(z.union([z.literal('linear'), z.literal('log')]))\n });\n}\n\nexport function isCategoricalAes<InputType extends string | number | PointShape | LineShape>(\n item: InputType | CategoricalAesFromColumn<InputType> | ContinuousAesFromColumn<InputType> | unknown\n): item is CategoricalAesFromColumn<InputType> {\n if (typeof item !== 'object') {\n return false;\n }\n return item !== null && 'valuesMap' in item;\n}\n\nexport function isContinuousAes<InputType extends string | number | PointShape | LineShape>(\n item: InputType | CategoricalAesFromColumn<InputType> | ContinuousAesFromColumn<InputType> | unknown\n): item is ContinuousAesFromColumn<InputType> {\n if (typeof item !== 'object') {\n return false;\n }\n return item !== null && 'domain' in item && 'range' in item;\n}\n\nexport const DiscreteLabelsPositionSchema = z.union([z.literal('center'), z.literal('45deg'), z.literal('90deg')]);\n\nexport const AxisSettingsDiscreteSchema = z.object({\n title: z.optional(z.union([z.string(), ColumnNameSchema])),\n scale: z.optional(z.literal('discrete')),\n keys: z.optional(z.array(z.union([z.string(), z.number()]))),\n labels: z.optional(z.record(z.string())),\n showGrid: z.optional(z.boolean()),\n linesBetweenCategories: z.optional(z.boolean()),\n showTicks: z.optional(z.boolean()),\n labelsPosition: z.optional(DiscreteLabelsPositionSchema),\n hiddenLabels: z.optional(z.boolean())\n});\nexport const AxisSettingsContinuousSchema = z.object({\n title: z.optional(z.union([z.string(), ColumnNameSchema])),\n scale: z.optional(z.union([z.literal('linear'), z.literal('log')])),\n showGrid: z.optional(z.boolean()),\n showTicks: z.optional(z.boolean()),\n significantLines: z.optional(z.array(z.number())),\n significantLinesStyle: z.optional(LineShapeSchema),\n symmetricRange: z.optional(z.number()),\n upperValue: z.optional(z.number()),\n lowerValue: z.optional(z.number()),\n hiddenLabels: z.optional(z.boolean()),\n});\n\nexport const AxisSettingsSchema = z.union([AxisSettingsDiscreteSchema, AxisSettingsContinuousSchema]);\n\nexport type AxisSettings = z.infer<typeof AxisSettingsSchema>\nexport type AxisSettingsDiscrete = z.infer<typeof AxisSettingsDiscreteSchema>;\nexport type AxisSettingsContinuous = z.infer<typeof AxisSettingsContinuousSchema>;\n\nexport type DiscreteLabelsPosition = z.infer<typeof DiscreteLabelsPositionSchema>;\n\nexport const TooltipSettingsSchema = z.object({\n show: z.optional(z.boolean()),\n content: z.optional(z.array(ColumnNameSchema)),\n});\n\nexport type TooltipSettings = z.infer<typeof TooltipSettingsSchema>;\n\nexport interface SettingsInterface {\n type: string;\n}\n\nexport type ClickEventData = {\n x: number;\n y: number;\n info: unknown;\n}\n\nexport type PolygonData = [number, number][];\n\nexport type ChartEventHandlers<T> = T;\nexport type DendroEventHandlers = ChartEventHandlers<[(d: ClickEventData) => void]>\nexport type ScatterplotEventHandlers = ChartEventHandlers<{\n onPolygonUpdate: (d: number[], p: Polygon[]) => void;\n onTooltipHintSwitch: (d: boolean) => void;\n onLassoStateChange: () => void;\n onLassoControlsStateUpdate: (v: LassoControlsState) => void;\n onZoomChange: (isZoomChanged: boolean) => void;\n}>\nexport type HeatmapEventHandlers = ChartEventHandlers<{\n onTooltipHintSwitch: (d: boolean) => void;\n onLoadingChange: (d: boolean) => void;\n}>\n\nexport type BubbleEventHandlers = ChartEventHandlers<[(d: boolean) => void]>\nexport type DiscreteEventHandlers = ChartEventHandlers<[(d: boolean) => void]>\nexport type HistogramEventHandlers = ChartEventHandlers<[(d: boolean) => void]>\n\nexport type ErrorTypes = 'tooManyFacets' \n| 'tooManyPrimaryGroups' | 'tooManySecondaryGroups'\n| 'tooManyScatterplotGroupsX' | 'tooManyScatterplotGroupsY'\n| 'tooManyHistogramGroups'\n| 'unknownError';\ntype ErrorInfoBase = { type: ErrorTypes, info: unknown };\nexport interface ErrorInfoFacets extends ErrorInfoBase {\n type: 'tooManyFacets';\n info: {\n count: number;\n maxCount: number;\n };\n}\nexport interface ErrorInfoPrimaryGroups extends ErrorInfoBase {\n type: 'tooManyPrimaryGroups';\n info: {\n count: number;\n maxCount: number;\n };\n}\nexport interface ErrorInfoSecondaryGroups extends ErrorInfoBase {\n type: 'tooManySecondaryGroups';\n info: {\n count: number;\n maxCount: number;\n };\n}\n\nexport interface ErrorInfoScatterplotGroupsX extends ErrorInfoBase {\n type: 'tooManyScatterplotGroupsX';\n info: {\n count: number;\n maxCount: number;\n };\n}\nexport interface ErrorInfoScatterplotGroupsY extends ErrorInfoBase {\n type: 'tooManyScatterplotGroupsY';\n info: {\n count: number;\n maxCount: number;\n };\n}\nexport interface ErrorInfoHistogramGroups extends ErrorInfoBase {\n type: 'tooManyHistogramGroups';\n info: {\n count: number;\n maxCount: number;\n };\n}\nexport interface ErrorInfoUnknown extends ErrorInfoBase {\n type: 'unknownError';\n info: {\n message: string;\n stack: string | undefined;\n };\n}\nexport type ErrorInfo = ErrorInfoFacets | ErrorInfoPrimaryGroups | ErrorInfoSecondaryGroups | ErrorInfoScatterplotGroupsX | ErrorInfoScatterplotGroupsY | ErrorInfoHistogramGroups | ErrorInfoUnknown;\nexport function isErrorInfo(value: unknown): value is ErrorInfo {\n return typeof value === 'object' && value !== null && 'type' in value && 'info' in value;\n}\nexport function getUnknownErrorInfo(error: Error): ErrorInfoUnknown {\n return {\n type: 'unknownError',\n info: {\n message: error.message,\n stack: error.stack,\n },\n };\n}"],"mappings":";AAMA,MAAa,IAAkB,EAAE,MAAM;CAAC,EAAE,QAAQ;CAAE,EAAE,QAAQ;CAAE,EAAE,MAAM;CAAC,CAAC,EAM7D,IAA0B,EAAE,KAAK;CAAC;CAAO;CAAQ;CAAU;CAAO;CAAM,CAAC,EAIzE,IAAc;CACvB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACH,EACY,IAAmB,EAAE,KAAK,EAAY,EAItC,IAAkB,EAAE,KADd;CAAC;CAAS;CAAU;CAAU;CAAW;CAAY;CAAU,CACjC,EAIpC,IAAkB,EAAE,KADd;CAAC;CAAQ;CAAU;CAAe;CAAQ;CAAQ,CACpB,EAIpC,IAAuB,EAAE,KADd;CAAC;CAAU;CAAS;CAAO;CAAS,CACD,EAG9C,IAAiB;CAAC;CAAQ;CAAU;CAAQ,EAC5C,IAAsB,EAAE,KAAK,EAAe,EAG5C,IAAmB,EAAE,OAAO;CAC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EAAE,MAAM,CAAC,GAA4B,EAA6B,CAAC,EAQxF,IAAwB,EAAE,OAAO;CAC1C,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;CAC7B,SAAS,EAAE,SAAS,EAAE,MAAM,EAAiB,CAAC;CACjD,CAAC;AA2FF,SAAgB,EAAY,GAAoC;AAC5D,QAAO,OAAO,KAAU,cAAY,KAAkB,UAAU,KAAS,UAAU;;AAEvF,SAAgB,EAAoB,GAAgC;AAChE,QAAO;EACH,MAAM;EACN,MAAM;GACF,SAAS,EAAM;GACf,OAAO,EAAM;GAChB;EACJ"}
1
+ {"version":3,"file":"common.js","names":[],"sources":["../../src/types/common.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { LassoControlsState, Polygon } from '../scatterplot-umap/types';\nimport type { CategoricalAesFromColumn, ContinuousAesFromColumn } from './scatterplot';\n\nexport type DataValue = string | number | null;\nexport type Category = string;\nexport const DataValueSchema = z.union([z.string(), z.number(), z.null()]);\n\nexport type Row = Record<string, DataValue>\n\nexport type Color = string;\n\nexport const AggregationMethodSchema = z.enum(['sum', 'mean', 'median', 'min', 'max']);\nexport type AggregationMethod = z.infer<typeof AggregationMethodSchema>;\n\n// numbered according ggplot2 symbols, 19 (third size of black circle) is missed\nexport const POINT_SHAPE = [\n '0',\n '1',\n '2',\n '3',\n '4',\n '5',\n '6',\n '7',\n '8',\n '9',\n '10',\n '11',\n '12',\n '13',\n '14',\n '15',\n '16',\n '17',\n '18',\n '20',\n '21',\n '22',\n '23',\n '24',\n '25',\n] as const;\nexport const PointShapeSchema = z.enum(POINT_SHAPE);\nexport type PointShape = z.infer<typeof PointShapeSchema>;\n\nconst LINE_SHAPE = ['solid', 'dashed', 'dotted', 'dotdash', 'longdash', 'twodash'] as const;\nexport const LineShapeSchema = z.enum(LINE_SHAPE);\nexport type LineShape = z.infer<typeof LineShapeSchema>;\n\nconst FRAME_TYPE = ['left', 'bottom', 'left-bottom', 'full', 'empty'] as const;\nexport const FrameTypeSchema = z.enum(FRAME_TYPE);\nexport type FrameType = z.infer<typeof FrameTypeSchema>;\n\nconst LEGEND_POSITION = ['inside', 'right', 'top', 'bottom'] as const;\nexport const LegendPositionSchema = z.enum(LEGEND_POSITION);\nexport type LegendPosition = z.infer<typeof LegendPositionSchema>;\n\nexport const TITLE_POSITION = ['left', 'center', 'right'] as const;\nexport const TitlePositionSchema = z.enum(TITLE_POSITION);\nexport type TitlePosition = z.infer<typeof TitlePositionSchema>;\n\nexport const ColumnNameSchema = z.object({\n type: z.literal('column'),\n value: z.string(),\n format: z.optional(z.string()), // d3 format\n label: z.optional(z.string()),\n // Column id of a sibling labels column in the same DataFrame. Per-row\n // lookup via `data.getColumnValue(valueLabels, rowIdx)`.\n valueLabels: z.optional(z.string()),\n // Authoritative value -> display label map sourced from the column spec's\n // `pl7.app/valueLabels` annotation. Use when the value space is finite and\n // labels must exist independent of the data rows (e.g. selection stages\n // that may have eliminated zero rows).\n valueLabelsMap: z.optional(z.record(z.string())),\n nullValueLabel: z.optional(z.string())\n});\nexport type ColumnName = z.infer<typeof ColumnNameSchema>\n\nexport type AesItem = {\n fillColor?: Color;\n lineColor?: Color;\n lineWidth?: number;\n lineShape?: LineShape;\n dotShape?: PointShape;\n dotSize?: number;\n dotFill?: Color;\n};\nexport const AesItemSchema = z.object({\n fillColor: z.optional(z.string()),\n lineColor: z.optional(z.string()),\n lineWidth: z.optional(z.number()),\n lineShape: z.optional(LineShapeSchema),\n dotShape: z.optional(PointShapeSchema),\n dotSize: z.optional(z.number()),\n dotFill: z.optional(z.string()),\n});\n\nexport const AesRecordSchema = z.record(AesItemSchema);\nexport type AesRecord = z.infer<typeof AesRecordSchema>;\n\nexport function categoricalAesMappingFromValueSchema<ValueType extends z.ZodTypeAny>(\n valueSchema: ValueType,\n) {\n return z.object({\n columnName: ColumnNameSchema,\n valuesMap: z.record(valueSchema),\n });\n}\nexport function continuousAesMappingFromValueSchema<ValueType extends z.ZodTypeAny>(\n valueSchema: ValueType,\n) {\n return z.object({\n columnName: ColumnNameSchema,\n domain: z.array(z.number()),\n range: z.array(valueSchema),\n type: z.optional(z.union([z.literal('linear'), z.literal('log')]))\n });\n}\n\nexport function isCategoricalAes<InputType extends string | number | PointShape | LineShape>(\n item: InputType | CategoricalAesFromColumn<InputType> | ContinuousAesFromColumn<InputType> | unknown\n): item is CategoricalAesFromColumn<InputType> {\n if (typeof item !== 'object') {\n return false;\n }\n return item !== null && 'valuesMap' in item;\n}\n\nexport function isContinuousAes<InputType extends string | number | PointShape | LineShape>(\n item: InputType | CategoricalAesFromColumn<InputType> | ContinuousAesFromColumn<InputType> | unknown\n): item is ContinuousAesFromColumn<InputType> {\n if (typeof item !== 'object') {\n return false;\n }\n return item !== null && 'domain' in item && 'range' in item;\n}\n\nexport const DiscreteLabelsPositionSchema = z.union([z.literal('center'), z.literal('45deg'), z.literal('90deg')]);\n\nexport const AxisSettingsDiscreteSchema = z.object({\n title: z.optional(z.union([z.string(), ColumnNameSchema])),\n scale: z.optional(z.literal('discrete')),\n keys: z.optional(z.array(z.union([z.string(), z.number()]))),\n labels: z.optional(z.record(z.string())),\n showGrid: z.optional(z.boolean()),\n linesBetweenCategories: z.optional(z.boolean()),\n showTicks: z.optional(z.boolean()),\n labelsPosition: z.optional(DiscreteLabelsPositionSchema),\n hiddenLabels: z.optional(z.boolean())\n});\nexport const SignificantLineLabelPositionSchema = z.union([\n z.literal('top'),\n z.literal('bottom'),\n z.literal('left'),\n z.literal('right'),\n]);\nexport type SignificantLineLabelPosition = z.infer<typeof SignificantLineLabelPositionSchema>;\n\n// top/bottom for X axis lines; left/right for Y axis lines. Mismatched\n// values fall back to the axis-appropriate default in the renderer.\nexport const SignificantLinesStyleSchema = z.object({\n shape: z.optional(LineShapeSchema),\n showLabel: z.optional(z.boolean()),\n labelPosition: z.optional(SignificantLineLabelPositionSchema),\n});\nexport type SignificantLinesStyle = z.infer<typeof SignificantLinesStyleSchema>;\n\nexport const AxisSettingsContinuousSchema = z.object({\n title: z.optional(z.union([z.string(), ColumnNameSchema])),\n scale: z.optional(z.union([z.literal('linear'), z.literal('log')])),\n showGrid: z.optional(z.boolean()),\n showTicks: z.optional(z.boolean()),\n significantLines: z.optional(z.array(z.number())),\n significantLinesStyle: z.optional(SignificantLinesStyleSchema),\n symmetricRange: z.optional(z.number()),\n upperValue: z.optional(z.number()),\n lowerValue: z.optional(z.number()),\n hiddenLabels: z.optional(z.boolean()),\n});\n\nexport const AxisSettingsSchema = z.union([AxisSettingsDiscreteSchema, AxisSettingsContinuousSchema]);\n\nexport type AxisSettings = z.infer<typeof AxisSettingsSchema>\nexport type AxisSettingsDiscrete = z.infer<typeof AxisSettingsDiscreteSchema>;\nexport type AxisSettingsContinuous = z.infer<typeof AxisSettingsContinuousSchema>;\n\nexport type DiscreteLabelsPosition = z.infer<typeof DiscreteLabelsPositionSchema>;\n\nexport const TooltipSettingsSchema = z.object({\n show: z.optional(z.boolean()),\n content: z.optional(z.array(ColumnNameSchema)),\n});\n\nexport type TooltipSettings = z.infer<typeof TooltipSettingsSchema>;\n\nexport interface SettingsInterface {\n type: string;\n}\n\nexport type ClickEventData = {\n x: number;\n y: number;\n info: unknown;\n}\n\nexport type PolygonData = [number, number][];\n\nexport type ChartEventHandlers<T> = T;\nexport type DendroEventHandlers = ChartEventHandlers<[(d: ClickEventData) => void]>\nexport type ScatterplotEventHandlers = ChartEventHandlers<{\n onPolygonUpdate: (d: number[], p: Polygon[]) => void;\n onTooltipHintSwitch: (d: boolean) => void;\n onLassoStateChange: () => void;\n onLassoControlsStateUpdate: (v: LassoControlsState) => void;\n onZoomChange: (isZoomChanged: boolean) => void;\n}>\nexport type HeatmapEventHandlers = ChartEventHandlers<{\n onTooltipHintSwitch: (d: boolean) => void;\n onLoadingChange: (d: boolean) => void;\n}>\n\nexport type BubbleEventHandlers = ChartEventHandlers<[(d: boolean) => void]>\nexport type DiscreteEventHandlers = ChartEventHandlers<[(d: boolean) => void]>\nexport type HistogramEventHandlers = ChartEventHandlers<[(d: boolean) => void]>\n\nexport type ErrorTypes = 'tooManyFacets' \n| 'tooManyPrimaryGroups' | 'tooManySecondaryGroups'\n| 'tooManyScatterplotGroupsX' | 'tooManyScatterplotGroupsY'\n| 'tooManyHistogramGroups'\n| 'unknownError';\ntype ErrorInfoBase = { type: ErrorTypes, info: unknown };\nexport interface ErrorInfoFacets extends ErrorInfoBase {\n type: 'tooManyFacets';\n info: {\n count: number;\n maxCount: number;\n };\n}\nexport interface ErrorInfoPrimaryGroups extends ErrorInfoBase {\n type: 'tooManyPrimaryGroups';\n info: {\n count: number;\n maxCount: number;\n };\n}\nexport interface ErrorInfoSecondaryGroups extends ErrorInfoBase {\n type: 'tooManySecondaryGroups';\n info: {\n count: number;\n maxCount: number;\n };\n}\n\nexport interface ErrorInfoScatterplotGroupsX extends ErrorInfoBase {\n type: 'tooManyScatterplotGroupsX';\n info: {\n count: number;\n maxCount: number;\n };\n}\nexport interface ErrorInfoScatterplotGroupsY extends ErrorInfoBase {\n type: 'tooManyScatterplotGroupsY';\n info: {\n count: number;\n maxCount: number;\n };\n}\nexport interface ErrorInfoHistogramGroups extends ErrorInfoBase {\n type: 'tooManyHistogramGroups';\n info: {\n count: number;\n maxCount: number;\n };\n}\nexport interface ErrorInfoUnknown extends ErrorInfoBase {\n type: 'unknownError';\n info: {\n message: string;\n stack: string | undefined;\n };\n}\nexport type ErrorInfo = ErrorInfoFacets | ErrorInfoPrimaryGroups | ErrorInfoSecondaryGroups | ErrorInfoScatterplotGroupsX | ErrorInfoScatterplotGroupsY | ErrorInfoHistogramGroups | ErrorInfoUnknown;\nexport function isErrorInfo(value: unknown): value is ErrorInfo {\n return typeof value === 'object' && value !== null && 'type' in value && 'info' in value;\n}\nexport function getUnknownErrorInfo(error: Error): ErrorInfoUnknown {\n return {\n type: 'unknownError',\n info: {\n message: error.message,\n stack: error.stack,\n },\n };\n}"],"mappings":";AAMA,MAAa,IAAkB,EAAE,MAAM;CAAC,EAAE,QAAQ;CAAE,EAAE,QAAQ;CAA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60,10 @@ export declare const DendroSettingsSchema: z.ZodObject<{
60
60
  position: z.ZodOptional<z.ZodEnum<["inside", "right", "top", "bottom"]>>;
61
61
  }, "strip", z.ZodTypeAny, {
62
62
  show?: boolean | undefined;
63
- position?: "right" | "inside" | "top" | "bottom" | undefined;
63
+ position?: "top" | "bottom" | "right" | "inside" | undefined;
64
64
  }, {
65
65
  show?: boolean | undefined;
66
- position?: "right" | "inside" | "top" | "bottom" | undefined;
66
+ position?: "top" | "bottom" | "right" | "inside" | undefined;
67
67
  }>>;
68
68
  facetSettings: z.ZodOptional<z.ZodObject<{
69
69
  nRows: z.ZodOptional<z.ZodNumber>;
@@ -1004,7 +1004,7 @@ export declare const DendroSettingsSchema: z.ZodObject<{
1004
1004
  } | undefined;
1005
1005
  legend?: {
1006
1006
  show?: boolean | undefined;
1007
- position?: "right" | "inside" | "top" | "bottom" | undefined;
1007
+ position?: "top" | "bottom" | "right" | "inside" | undefined;
1008
1008
  } | undefined;
1009
1009
  facetSettings?: {
1010
1010
  order?: string[] | undefined;
@@ -1063,7 +1063,7 @@ export declare const DendroSettingsSchema: z.ZodObject<{
1063
1063
  showEdges?: boolean | undefined;
1064
1064
  showLeavesLabels?: boolean | undefined;
1065
1065
  showNodesLabels?: boolean | undefined;
1066
- rootPosition?: "left" | "top" | undefined;
1066
+ rootPosition?: "top" | "left" | undefined;
1067
1067
  }, {
1068
1068
  type: "dendro";
1069
1069
  title: {
@@ -1212,7 +1212,7 @@ export declare const DendroSettingsSchema: z.ZodObject<{
1212
1212
  } | undefined;
1213
1213
  legend?: {
1214
1214
  show?: boolean | undefined;
1215
- position?: "right" | "inside" | "top" | "bottom" | undefined;
1215
+ position?: "top" | "bottom" | "right" | "inside" | undefined;
1216
1216
  } | undefined;
1217
1217
  facetSettings?: {
1218
1218
  order?: string[] | undefined;
@@ -1271,7 +1271,7 @@ export declare const DendroSettingsSchema: z.ZodObject<{
1271
1271
  showEdges?: boolean | undefined;
1272
1272
  showLeavesLabels?: boolean | undefined;
1273
1273
  showNodesLabels?: boolean | undefined;
1274
- rootPosition?: "left" | "top" | undefined;
1274
+ rootPosition?: "top" | "left" | undefined;
1275
1275
  }>;
1276
1276
  export type DendroSettings = z.infer<typeof DendroSettingsSchema>;
1277
1277
  export type DendroLegendInfo = Record<string, {