@milaboratories/miplots4 1.2.0 → 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.
- package/dist/bubble/BubbleSettingsImpl.d.ts +3 -0
- package/dist/bubble/BubbleSettingsImpl.d.ts.map +1 -1
- package/dist/bubble/BubbleSettingsImpl.js +4 -1
- package/dist/bubble/BubbleSettingsImpl.js.map +1 -1
- package/dist/bubble/ChartRenderer.d.ts +2 -12
- package/dist/bubble/ChartRenderer.d.ts.map +1 -1
- package/dist/bubble/ChartRenderer.js +13 -13
- package/dist/bubble/ChartRenderer.js.map +1 -1
- package/dist/bubble/getGroupedCellsData.d.ts +1 -1
- package/dist/bubble/getGroupedCellsData.d.ts.map +1 -1
- package/dist/bubble/getGroupedCellsData.js +20 -14
- package/dist/bubble/getGroupedCellsData.js.map +1 -1
- package/dist/bubble/index.d.ts.map +1 -1
- package/dist/bubble/index.js +6 -10
- package/dist/bubble/index.js.map +1 -1
- package/dist/common/ContinuousGrid.d.ts.map +1 -1
- package/dist/common/ContinuousGrid.js +90 -56
- package/dist/common/ContinuousGrid.js.map +1 -1
- package/dist/heatmap/ChartRenderer.d.ts +2 -12
- package/dist/heatmap/ChartRenderer.d.ts.map +1 -1
- package/dist/heatmap/ChartRenderer.js +26 -26
- package/dist/heatmap/ChartRenderer.js.map +1 -1
- package/dist/heatmap/HeatmapSettingsImpl.d.ts +3 -0
- package/dist/heatmap/HeatmapSettingsImpl.d.ts.map +1 -1
- package/dist/heatmap/HeatmapSettingsImpl.js +5 -2
- package/dist/heatmap/HeatmapSettingsImpl.js.map +1 -1
- package/dist/heatmap/fillCellsData.d.ts +6 -1
- package/dist/heatmap/fillCellsData.d.ts.map +1 -1
- package/dist/heatmap/fillCellsData.js +135 -96
- package/dist/heatmap/fillCellsData.js.map +1 -1
- package/dist/heatmap/getCells.d.ts +4 -1
- package/dist/heatmap/getCells.d.ts.map +1 -1
- package/dist/heatmap/getCells.js +19 -16
- package/dist/heatmap/getCells.js.map +1 -1
- package/dist/heatmap/index.d.ts.map +1 -1
- package/dist/heatmap/index.js +32 -34
- package/dist/heatmap/index.js.map +1 -1
- package/dist/histogram/ChartRenderer.d.ts.map +1 -1
- package/dist/histogram/ChartRenderer.js +6 -0
- package/dist/histogram/ChartRenderer.js.map +1 -1
- package/dist/histogram/HistogramSettingsImpl.d.ts +5 -1
- package/dist/histogram/HistogramSettingsImpl.d.ts.map +1 -1
- package/dist/histogram/HistogramSettingsImpl.js.map +1 -1
- package/dist/scatterplot/components/Grid.d.ts.map +1 -1
- package/dist/scatterplot/components/Grid.js +109 -71
- package/dist/scatterplot/components/Grid.js.map +1 -1
- package/dist/types/bubble.d.ts +97 -8
- package/dist/types/bubble.d.ts.map +1 -1
- package/dist/types/bubble.js +3 -0
- package/dist/types/bubble.js.map +1 -1
- package/dist/types/common.d.ts +62 -6
- package/dist/types/common.d.ts.map +1 -1
- package/dist/types/common.js +15 -6
- package/dist/types/common.js.map +1 -1
- package/dist/types/dendro.d.ts +6 -6
- package/dist/types/discrete.d.ts +41 -13
- package/dist/types/discrete.d.ts.map +1 -1
- package/dist/types/heatmap.d.ts +93 -4
- package/dist/types/heatmap.d.ts.map +1 -1
- package/dist/types/heatmap.js +3 -0
- package/dist/types/heatmap.js.map +1 -1
- package/dist/types/histogram.d.ts +59 -10
- package/dist/types/histogram.d.ts.map +1 -1
- package/dist/types/histogram.js +60 -66
- package/dist/types/histogram.js.map +1 -1
- package/dist/types/scatterplot-umap.d.ts +74 -18
- package/dist/types/scatterplot-umap.d.ts.map +1 -1
- package/dist/types/scatterplot.d.ts +74 -18
- package/dist/types/scatterplot.d.ts.map +1 -1
- package/dist/types/selection.d.ts +8 -8
- package/dist/utils/getChartEdgeSides.d.ts +1 -1
- package/dist/utils/intersect.d.ts +2 -0
- package/dist/utils/intersect.d.ts.map +1 -0
- package/dist/utils/intersect.js +8 -0
- package/dist/utils/intersect.js.map +1 -0
- package/dist/utils/significantLinesStyle.d.ts +8 -0
- package/dist/utils/significantLinesStyle.d.ts.map +1 -0
- package/dist/utils/significantLinesStyle.js +12 -0
- package/dist/utils/significantLinesStyle.js.map +1 -0
- package/package.json +1 -1
package/dist/types/bubble.d.ts
CHANGED
|
@@ -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?: "
|
|
35
|
+
position?: "top" | "bottom" | "right" | "inside" | undefined;
|
|
36
36
|
}, {
|
|
37
37
|
show?: boolean | undefined;
|
|
38
|
-
position?: "
|
|
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?: "
|
|
43
|
+
type?: "bottom" | "left" | "left-bottom" | "full" | "empty" | undefined;
|
|
44
44
|
}, {
|
|
45
|
-
type?: "
|
|
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>;
|
|
@@ -207,6 +207,57 @@ export declare const BubblesSettingsSchema: z.ZodObject<{
|
|
|
207
207
|
valueLabelsMap?: Record<string, string> | undefined;
|
|
208
208
|
nullValueLabel?: string | undefined;
|
|
209
209
|
}>, "many">>;
|
|
210
|
+
xSortBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
211
|
+
type: z.ZodLiteral<"column">;
|
|
212
|
+
value: z.ZodString;
|
|
213
|
+
format: z.ZodOptional<z.ZodString>;
|
|
214
|
+
label: z.ZodOptional<z.ZodString>;
|
|
215
|
+
valueLabels: z.ZodOptional<z.ZodString>;
|
|
216
|
+
valueLabelsMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
217
|
+
nullValueLabel: z.ZodOptional<z.ZodString>;
|
|
218
|
+
}, "strip", z.ZodTypeAny, {
|
|
219
|
+
type: "column";
|
|
220
|
+
value: string;
|
|
221
|
+
format?: string | undefined;
|
|
222
|
+
label?: string | undefined;
|
|
223
|
+
valueLabels?: string | undefined;
|
|
224
|
+
valueLabelsMap?: Record<string, string> | undefined;
|
|
225
|
+
nullValueLabel?: string | undefined;
|
|
226
|
+
}, {
|
|
227
|
+
type: "column";
|
|
228
|
+
value: string;
|
|
229
|
+
format?: string | undefined;
|
|
230
|
+
label?: string | undefined;
|
|
231
|
+
valueLabels?: string | undefined;
|
|
232
|
+
valueLabelsMap?: Record<string, string> | undefined;
|
|
233
|
+
nullValueLabel?: string | undefined;
|
|
234
|
+
}>, "many">>;
|
|
235
|
+
ySortBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
236
|
+
type: z.ZodLiteral<"column">;
|
|
237
|
+
value: z.ZodString;
|
|
238
|
+
format: z.ZodOptional<z.ZodString>;
|
|
239
|
+
label: z.ZodOptional<z.ZodString>;
|
|
240
|
+
valueLabels: z.ZodOptional<z.ZodString>;
|
|
241
|
+
valueLabelsMap: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
242
|
+
nullValueLabel: z.ZodOptional<z.ZodString>;
|
|
243
|
+
}, "strip", z.ZodTypeAny, {
|
|
244
|
+
type: "column";
|
|
245
|
+
value: string;
|
|
246
|
+
format?: string | undefined;
|
|
247
|
+
label?: string | undefined;
|
|
248
|
+
valueLabels?: string | undefined;
|
|
249
|
+
valueLabelsMap?: Record<string, string> | undefined;
|
|
250
|
+
nullValueLabel?: string | undefined;
|
|
251
|
+
}, {
|
|
252
|
+
type: "column";
|
|
253
|
+
value: string;
|
|
254
|
+
format?: string | undefined;
|
|
255
|
+
label?: string | undefined;
|
|
256
|
+
valueLabels?: string | undefined;
|
|
257
|
+
valueLabelsMap?: Record<string, string> | undefined;
|
|
258
|
+
nullValueLabel?: string | undefined;
|
|
259
|
+
}>, "many">>;
|
|
260
|
+
transform: z.ZodOptional<z.ZodEnum<["log"]>>;
|
|
210
261
|
keysOrder: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
211
262
|
normalization: z.ZodOptional<z.ZodObject<{
|
|
212
263
|
direction: z.ZodEnum<["row", "column"]>;
|
|
@@ -441,7 +492,7 @@ export declare const BubblesSettingsSchema: z.ZodObject<{
|
|
|
441
492
|
} | undefined;
|
|
442
493
|
legend?: {
|
|
443
494
|
show?: boolean | undefined;
|
|
444
|
-
position?: "
|
|
495
|
+
position?: "top" | "bottom" | "right" | "inside" | undefined;
|
|
445
496
|
} | undefined;
|
|
446
497
|
tooltips?: {
|
|
447
498
|
show?: boolean | undefined;
|
|
@@ -456,7 +507,7 @@ export declare const BubblesSettingsSchema: z.ZodObject<{
|
|
|
456
507
|
}[] | undefined;
|
|
457
508
|
} | undefined;
|
|
458
509
|
frame?: {
|
|
459
|
-
type?: "
|
|
510
|
+
type?: "bottom" | "left" | "left-bottom" | "full" | "empty" | undefined;
|
|
460
511
|
} | undefined;
|
|
461
512
|
facetSettings?: {
|
|
462
513
|
order?: string[] | undefined;
|
|
@@ -508,6 +559,25 @@ export declare const BubblesSettingsSchema: z.ZodObject<{
|
|
|
508
559
|
valueLabelsMap?: Record<string, string> | undefined;
|
|
509
560
|
nullValueLabel?: string | undefined;
|
|
510
561
|
}[] | undefined;
|
|
562
|
+
xSortBy?: {
|
|
563
|
+
type: "column";
|
|
564
|
+
value: string;
|
|
565
|
+
format?: string | undefined;
|
|
566
|
+
label?: string | undefined;
|
|
567
|
+
valueLabels?: string | undefined;
|
|
568
|
+
valueLabelsMap?: Record<string, string> | undefined;
|
|
569
|
+
nullValueLabel?: string | undefined;
|
|
570
|
+
}[] | undefined;
|
|
571
|
+
ySortBy?: {
|
|
572
|
+
type: "column";
|
|
573
|
+
value: string;
|
|
574
|
+
format?: string | undefined;
|
|
575
|
+
label?: string | undefined;
|
|
576
|
+
valueLabels?: string | undefined;
|
|
577
|
+
valueLabelsMap?: Record<string, string> | undefined;
|
|
578
|
+
nullValueLabel?: string | undefined;
|
|
579
|
+
}[] | undefined;
|
|
580
|
+
transform?: "log" | undefined;
|
|
511
581
|
keysOrder?: Record<string, string[]> | undefined;
|
|
512
582
|
normalization?: {
|
|
513
583
|
direction: "column" | "row";
|
|
@@ -580,7 +650,7 @@ export declare const BubblesSettingsSchema: z.ZodObject<{
|
|
|
580
650
|
} | undefined;
|
|
581
651
|
legend?: {
|
|
582
652
|
show?: boolean | undefined;
|
|
583
|
-
position?: "
|
|
653
|
+
position?: "top" | "bottom" | "right" | "inside" | undefined;
|
|
584
654
|
} | undefined;
|
|
585
655
|
tooltips?: {
|
|
586
656
|
show?: boolean | undefined;
|
|
@@ -595,7 +665,7 @@ export declare const BubblesSettingsSchema: z.ZodObject<{
|
|
|
595
665
|
}[] | undefined;
|
|
596
666
|
} | undefined;
|
|
597
667
|
frame?: {
|
|
598
|
-
type?: "
|
|
668
|
+
type?: "bottom" | "left" | "left-bottom" | "full" | "empty" | undefined;
|
|
599
669
|
} | undefined;
|
|
600
670
|
facetSettings?: {
|
|
601
671
|
order?: string[] | undefined;
|
|
@@ -647,6 +717,25 @@ export declare const BubblesSettingsSchema: z.ZodObject<{
|
|
|
647
717
|
valueLabelsMap?: Record<string, string> | undefined;
|
|
648
718
|
nullValueLabel?: string | undefined;
|
|
649
719
|
}[] | undefined;
|
|
720
|
+
xSortBy?: {
|
|
721
|
+
type: "column";
|
|
722
|
+
value: string;
|
|
723
|
+
format?: string | undefined;
|
|
724
|
+
label?: string | undefined;
|
|
725
|
+
valueLabels?: string | undefined;
|
|
726
|
+
valueLabelsMap?: Record<string, string> | undefined;
|
|
727
|
+
nullValueLabel?: string | undefined;
|
|
728
|
+
}[] | undefined;
|
|
729
|
+
ySortBy?: {
|
|
730
|
+
type: "column";
|
|
731
|
+
value: string;
|
|
732
|
+
format?: string | undefined;
|
|
733
|
+
label?: string | undefined;
|
|
734
|
+
valueLabels?: string | undefined;
|
|
735
|
+
valueLabelsMap?: Record<string, string> | undefined;
|
|
736
|
+
nullValueLabel?: string | undefined;
|
|
737
|
+
}[] | undefined;
|
|
738
|
+
transform?: "log" | undefined;
|
|
650
739
|
keysOrder?: Record<string, string[]> | undefined;
|
|
651
740
|
normalization?: {
|
|
652
741
|
direction: "column" | "row";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubble.d.ts","sourceRoot":"","sources":["../../src/types/bubble.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"bubble.d.ts","sourceRoot":"","sources":["../../src/types/bubble.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyEhC,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/dist/types/bubble.js
CHANGED
|
@@ -39,6 +39,9 @@ const c = o.object({
|
|
|
39
39
|
yColumn: t,
|
|
40
40
|
xGroupBy: o.optional(o.array(t)),
|
|
41
41
|
yGroupBy: o.optional(o.array(t)),
|
|
42
|
+
xSortBy: o.optional(o.array(t)),
|
|
43
|
+
ySortBy: o.optional(o.array(t)),
|
|
44
|
+
transform: o.optional(o.enum(["log"])),
|
|
42
45
|
keysOrder: o.optional(o.record(o.string(), o.array(o.string()))),
|
|
43
46
|
normalization: o.optional(o.object({
|
|
44
47
|
direction: o.enum(["row", "column"]),
|
package/dist/types/bubble.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bubble.js","names":[],"sources":["../../src/types/bubble.ts"],"sourcesContent":["import {\n AggregationMethodSchema,\n ColumnNameSchema,\n FrameTypeSchema,\n LegendPositionSchema,\n TitlePositionSchema,\n TooltipSettingsSchema,\n} from './common';\nimport { z } from 'zod';\n\nconst axisCommonSchema = {\n title: z.optional(z.string()),\n showTicks: z.optional(z.boolean()),\n showTitle: z.optional(z.boolean()),\n showAxisLabels: z.optional(z.boolean()),\n axisLabelsAngle: z.optional(z.union([z.literal(0), z.literal(45), z.literal(90)])),\n};\n\n//const InheritAesSchema = z.object({type: z.literal('grouping'), value: z.string()}); // link to aes mapped to column\n\nexport const BubblesSettingsSchema = z.object({\n type: z.literal('bubble'),\n title: z.object({\n name: z.string(),\n show: z.optional(z.boolean()),\n position: z.optional(TitlePositionSchema),\n }),\n size: z.optional(\n z.object({\n width: z.optional(z.number()),\n height: z.optional(z.number()),\n cellSize: z.optional(z.number())\n })\n ),\n legend: z.optional(\n z.object({\n show: z.optional(z.boolean()),\n position: z.optional(LegendPositionSchema),\n })\n ),\n frame: z.optional(z.object({ type: z.optional(FrameTypeSchema) })),\n facetSettings: z.optional(\n z.object({\n nRows: z.optional(z.number()),\n nCols: z.optional(z.number()),\n order: z.optional(z.array(z.string())),\n })\n ),\n valueSize: ColumnNameSchema,\n valueColor: ColumnNameSchema,\n xColumn: ColumnNameSchema,\n yColumn: ColumnNameSchema,\n xGroupBy: z.optional(z.array(ColumnNameSchema)),\n yGroupBy: z.optional(z.array(ColumnNameSchema)),\n keysOrder: z.optional( // x, y, grouping, facet keys in user's order\n z.record(z.string(), z.array(z.string()))\n ),\n normalization: z.optional(z.object({\n direction: z.enum(['row', 'column']),\n method: z.enum(['standardScaling', 'meanNormalization']),\n colorRange: z.optional(z.array(z.number())),\n sizeRange: z.optional(z.array(z.number())),\n })),\n aggregation: z.optional(z.object({\n x: z.optional(z.boolean()),\n y: z.optional(z.boolean()),\n method: z.optional(AggregationMethodSchema),\n })),\n xAxis: z.optional(z.object({\n ...axisCommonSchema,\n sorting: z.optional(z.enum(['asc', 'desc'])),\n position: z.optional(z.enum(['top', 'bottom'])),\n })),\n yAxis: z.optional(z.object({\n ...axisCommonSchema,\n sorting: z.optional(z.enum(['asc', 'desc'])),\n position: z.optional(z.enum(['left', 'right'])),\n })),\n facetBy: z.optional(z.array(ColumnNameSchema)),\n aes: z.optional(z.object({\n colorsList: z.optional(z.array(z.string())),\n minRadius: z.optional(z.number()),\n maxRadius: z.optional(z.number()),\n cellStrokeColor: z.optional(z.string()),\n emptyCellColor: z.optional(z.string()),\n })),\n tooltips: z.optional(TooltipSettingsSchema),\n NAValueAs: z.optional(z.union([z.number(), z.null()])),\n showEmptyRows: z.optional(z.boolean()),\n showEmptyColumns: z.optional(z.boolean()),\n});\n\nexport type BubbleSettings = z.infer<typeof BubblesSettingsSchema>;\n"],"mappings":";;AAUA,IAAM,IAAmB;CACrB,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC;CAC7B,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC;CAClC,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC;CAClC,gBAAgB,EAAE,SAAS,EAAE,SAAS,CAAC;CACvC,iBAAiB,EAAE,SAAS,EAAE,MAAM;EAAC,EAAE,QAAQ,EAAE;EAAE,EAAE,QAAQ,GAAG;EAAE,EAAE,QAAQ,GAAG;EAAC,CAAC,CAAC;CACrF;AAID,MAAa,IAAwB,EAAE,OAAO;CAC1C,MAAM,EAAE,QAAQ,SAAS;CACzB,OAAO,EAAE,OAAO;EACZ,MAAM,EAAE,QAAQ;EAChB,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;EAC7B,UAAU,EAAE,SAAS,EAAoB;EAC5C,CAAC;CACF,MAAM,EAAE,SACJ,EAAE,OAAO;EACL,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC;EAC7B,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC;EAC9B,UAAU,EAAE,SAAS,EAAE,QAAQ,CAAC;EACnC,CAAC,CACL;CACD,QAAQ,EAAE,SACN,EAAE,OAAO;EACL,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC;EAC7B,UAAU,EAAE,SAAS,EAAqB;EAC7C,CAAC,CACL;CACD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAgB,EAAE,CAAC,CAAC;CAClE,eAAe,EAAE,SACb,EAAE,OAAO;EACL,OAAO,EAAE,SAAS,EAAE,QAAQ,CAAC;EAC7B,OAA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EAAE,MAAM,EAAiB,CAAC;CAC9C,KAAK,EAAE,SAAS,EAAE,OAAO;EACrB,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;EAC3C,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC;EACjC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC;EACjC,iBAAiB,EAAE,SAAS,EAAE,QAAQ,CAAC;EACvC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,CAAC;EACzC,CAAC,CAAC;CACH,UAAU,EAAE,SAAS,EAAsB;CAC3C,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;CACtD,eAAe,EAAE,SAAS,EAAE,SAAS,CAAC;CACtC,kBAAkB,EAAE,SAAS,EAAE,SAAS,CAAC;CAC5C,CAAC"}
|
|
1
|
+
{"version":3,"file":"bubble.js","names":[],"sources":["../../src/types/bubble.ts"],"sourcesContent":["import {\n AggregationMethodSchema,\n ColumnNameSchema,\n FrameTypeSchema,\n LegendPositionSchema,\n TitlePositionSchema,\n TooltipSettingsSchema,\n} from './common';\nimport { z } from 'zod';\n\nconst axisCommonSchema = {\n title: z.optional(z.string()),\n showTicks: z.optional(z.boolean()),\n showTitle: z.optional(z.boolean()),\n showAxisLabels: z.optional(z.boolean()),\n axisLabelsAngle: z.optional(z.union([z.literal(0), z.literal(45), z.literal(90)])),\n};\n\n//const InheritAesSchema = z.object({type: z.literal('grouping'), value: z.string()}); // link to aes mapped to column\n\nexport const BubblesSettingsSchema = z.object({\n type: z.literal('bubble'),\n title: z.object({\n name: z.string(),\n show: z.optional(z.boolean()),\n position: z.optional(TitlePositionSchema),\n }),\n size: z.optional(\n z.object({\n width: z.optional(z.number()),\n height: z.optional(z.number()),\n cellSize: z.optional(z.number())\n })\n ),\n legend: z.optional(\n z.object({\n show: z.optional(z.boolean()),\n position: z.optional(LegendPositionSchema),\n })\n ),\n frame: z.optional(z.object({ type: z.optional(FrameTypeSchema) })),\n facetSettings: z.optional(\n z.object({\n nRows: z.optional(z.number()),\n nCols: z.optional(z.number()),\n order: z.optional(z.array(z.string())),\n })\n ),\n valueSize: ColumnNameSchema,\n valueColor: ColumnNameSchema,\n xColumn: ColumnNameSchema,\n yColumn: ColumnNameSchema,\n xGroupBy: z.optional(z.array(ColumnNameSchema)),\n yGroupBy: z.optional(z.array(ColumnNameSchema)),\n xSortBy: z.optional(z.array(ColumnNameSchema)),\n ySortBy: z.optional(z.array(ColumnNameSchema)),\n transform: z.optional(z.enum(['log'])),\n keysOrder: z.optional( // x, y, grouping, facet keys in user's order\n z.record(z.string(), z.array(z.string()))\n ),\n normalization: z.optional(z.object({\n direction: z.enum(['row', 'column']),\n method: z.enum(['standardScaling', 'meanNormalization']),\n colorRange: z.optional(z.array(z.number())),\n sizeRange: z.optional(z.array(z.number())),\n })),\n aggregation: z.optional(z.object({\n x: z.optional(z.boolean()),\n y: z.optional(z.boolean()),\n method: z.optional(AggregationMethodSchema),\n })),\n xAxis: z.optional(z.object({\n ...axisCommonSchema,\n sorting: z.optional(z.enum(['asc', 'desc'])),\n position: z.optional(z.enum(['top', 'bottom'])),\n })),\n yAxis: z.optional(z.object({\n ...axisCommonSchema,\n sorting: z.optional(z.enum(['asc', 'desc'])),\n position: z.optional(z.enum(['left', 'right'])),\n })),\n facetBy: z.optional(z.array(ColumnNameSchema)),\n aes: z.optional(z.object({\n colorsList: z.optional(z.array(z.string())),\n minRadius: z.optional(z.number()),\n maxRadius: z.optional(z.number()),\n cellStrokeColor: z.optional(z.string()),\n emptyCellColor: z.optional(z.string()),\n })),\n tooltips: z.optional(TooltipSettingsSchema),\n NAValueAs: z.optional(z.union([z.number(), z.null()])),\n showEmptyRows: z.optional(z.boolean()),\n showEmptyColumns: z.optional(z.boolean()),\n});\n\nexport type BubbleSettings = z.infer<typeof BubblesSettingsSchema>;\n"],"mappings":";;AAUA,IAAM,IAAmB;CACrB,OAAO,EAAE,SAA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EAAE,QAAQ,CAAC,CAAC;EAC3C,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC;EACjC,WAAW,EAAE,SAAS,EAAE,QAAQ,CAAC;EACjC,iBAAiB,EAAE,SAAS,EAAE,QAAQ,CAAC;EACvC,gBAAgB,EAAE,SAAS,EAAE,QAAQ,CAAC;EACzC,CAAC,CAAC;CACH,UAAU,EAAE,SAAS,EAAsB;CAC3C,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC;CACtD,eAAe,EAAE,SAAS,EAAE,SAAS,CAAC;CACtC,kBAAkB,EAAE,SAAS,EAAE,SAAS,CAAC;CAC5C,CAAC"}
|
package/dist/types/common.d.ts
CHANGED
|
@@ -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.
|
|
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?:
|
|
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?:
|
|
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.
|
|
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?:
|
|
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?:
|
|
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,iBAAi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,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"}
|
package/dist/types/common.js
CHANGED
|
@@ -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.
|
|
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(
|
|
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
|
-
}),
|
|
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
|
|
135
|
+
function w(e) {
|
|
127
136
|
return typeof e == "object" && !!e && "type" in e && "info" in e;
|
|
128
137
|
}
|
|
129
|
-
function
|
|
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,
|
|
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
|
package/dist/types/common.js.map
CHANGED
|
@@ -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;CACrC,MAAM,EAAE,QAAQ,SAAS;CACzB,OAAO,EAAE,Q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AwB,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;CAAE,EAAE,MAAM;CAAC,CAAC,EAM7D,IAA0B,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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?: "
|
|
63
|
+
position?: "top" | "bottom" | "right" | "inside" | undefined;
|
|
64
64
|
}, {
|
|
65
65
|
show?: boolean | undefined;
|
|
66
|
-
position?: "
|
|
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?: "
|
|
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?: "
|
|
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?: "
|
|
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?: "
|
|
1274
|
+
rootPosition?: "top" | "left" | undefined;
|
|
1275
1275
|
}>;
|
|
1276
1276
|
export type DendroSettings = z.infer<typeof DendroSettingsSchema>;
|
|
1277
1277
|
export type DendroLegendInfo = Record<string, {
|