@spectrum-charts/vega-spec-builder-s2 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/src/area/areaSpecBuilder.d.ts +1 -1
- package/dist/@types/src/area/areaUtils.d.ts +2 -2
- package/dist/@types/src/axis/axisLabelHoverUtils.d.ts +22 -0
- package/dist/@types/src/axis/axisLabelHoverUtils.d.ts.map +1 -0
- package/dist/@types/src/axis/axisLabelHoverUtils.test.d.ts +2 -0
- package/dist/@types/src/axis/axisLabelHoverUtils.test.d.ts.map +1 -0
- package/dist/@types/src/axis/axisReferenceLineUtils.d.ts +11 -7
- package/dist/@types/src/axis/axisReferenceLineUtils.d.ts.map +1 -1
- package/dist/@types/src/axis/axisSpecBuilder.d.ts +1 -0
- package/dist/@types/src/axis/axisSpecBuilder.d.ts.map +1 -1
- package/dist/@types/src/axis/axisTestUtils.d.ts.map +1 -1
- package/dist/@types/src/axisAnnotation/axisAnnotationUtils.d.ts +1 -1
- package/dist/@types/src/bar/barSpecBuilder.d.ts.map +1 -1
- package/dist/@types/src/bar/barUtils.d.ts +23 -0
- package/dist/@types/src/bar/barUtils.d.ts.map +1 -1
- package/dist/@types/src/bar/dodgedBarUtils.d.ts.map +1 -1
- package/dist/@types/src/bar/dodgedBarUtils.test.d.ts.map +1 -1
- package/dist/@types/src/bar/stackedBarUtils.d.ts.map +1 -1
- package/dist/@types/src/barDirectLabel/barDirectLabelUtils.d.ts.map +1 -1
- package/dist/@types/src/chartInspect/chartInspectUtils.d.ts +53 -0
- package/dist/@types/src/{chartTooltip/chartTooltipUtils.d.ts.map → chartInspect/chartInspectUtils.d.ts.map} +1 -1
- package/dist/@types/src/chartInspect/chartInspectUtils.test.d.ts +2 -0
- package/dist/@types/src/chartInspect/chartInspectUtils.test.d.ts.map +1 -0
- package/dist/@types/src/chartSpecBuilder.d.ts +1 -1
- package/dist/@types/src/chartSpecBuilder.d.ts.map +1 -1
- package/dist/@types/src/data/dataUtils.d.ts +2 -2
- package/dist/@types/src/donut/donutSpecBuilder.d.ts.map +1 -1
- package/dist/@types/src/donut/donutUtils.d.ts +22 -1
- package/dist/@types/src/donut/donutUtils.d.ts.map +1 -1
- package/dist/@types/src/donut/donutUtils.test.d.ts +2 -0
- package/dist/@types/src/donut/donutUtils.test.d.ts.map +1 -0
- package/dist/@types/src/donut/segmentLabelUtils.d.ts.map +1 -1
- package/dist/@types/src/legend/legendHighlightUtils.d.ts +24 -2
- package/dist/@types/src/legend/legendHighlightUtils.d.ts.map +1 -1
- package/dist/@types/src/legend/legendSpecBuilder.d.ts.map +1 -1
- package/dist/@types/src/legend/legendUtils.d.ts +5 -5
- package/dist/@types/src/legend/legendUtils.d.ts.map +1 -1
- package/dist/@types/src/line/directLabelUtils.d.ts +39 -0
- package/dist/@types/src/line/directLabelUtils.d.ts.map +1 -0
- package/dist/@types/src/line/lineDataUtils.d.ts +23 -0
- package/dist/@types/src/line/lineDataUtils.d.ts.map +1 -1
- package/dist/@types/src/line/lineMarkUtils.d.ts +25 -2
- package/dist/@types/src/line/lineMarkUtils.d.ts.map +1 -1
- package/dist/@types/src/line/linePointAnnotation/index.d.ts +2 -0
- package/dist/@types/src/line/linePointAnnotation/index.d.ts.map +1 -0
- package/dist/@types/src/line/linePointAnnotation/linePointAnnotationUtils.d.ts +6 -0
- package/dist/@types/src/line/linePointAnnotation/linePointAnnotationUtils.d.ts.map +1 -0
- package/dist/@types/src/line/linePointAnnotation/linePointAnnotationUtils.test.d.ts +2 -0
- package/dist/@types/src/line/linePointAnnotation/linePointAnnotationUtils.test.d.ts.map +1 -0
- package/dist/@types/src/line/linePointUtils.d.ts +9 -2
- package/dist/@types/src/line/linePointUtils.d.ts.map +1 -1
- package/dist/@types/src/line/lineSpecBuilder.d.ts +5 -1
- package/dist/@types/src/line/lineSpecBuilder.d.ts.map +1 -1
- package/dist/@types/src/line/lineTestUtils.d.ts.map +1 -1
- package/dist/@types/src/line/lineUtils.d.ts +12 -2
- package/dist/@types/src/line/lineUtils.d.ts.map +1 -1
- package/dist/@types/src/lineDirectLabel/lineDirectLabelUtils.d.ts +2 -2
- package/dist/@types/src/lineDirectLabel/lineDirectLabelUtils.d.ts.map +1 -1
- package/dist/@types/src/lineForecast/index.d.ts +2 -0
- package/dist/@types/src/lineForecast/index.d.ts.map +1 -0
- package/dist/@types/src/lineForecast/lineForecastUtils.d.ts +8 -0
- package/dist/@types/src/lineForecast/lineForecastUtils.d.ts.map +1 -0
- package/dist/@types/src/lineForecast/lineForecastUtils.test.d.ts +2 -0
- package/dist/@types/src/lineForecast/lineForecastUtils.test.d.ts.map +1 -0
- package/dist/@types/src/marks/hoverAnimationUtils.d.ts +93 -0
- package/dist/@types/src/marks/hoverAnimationUtils.d.ts.map +1 -0
- package/dist/@types/src/marks/hoverAnimationUtils.test.d.ts +2 -0
- package/dist/@types/src/marks/hoverAnimationUtils.test.d.ts.map +1 -0
- package/dist/@types/src/marks/markUtils.d.ts +17 -12
- package/dist/@types/src/marks/markUtils.d.ts.map +1 -1
- package/dist/@types/src/metricRange/metricRangeUtils.d.ts +1 -1
- package/dist/@types/src/metricRange/metricRangeUtils.d.ts.map +1 -1
- package/dist/@types/src/signal/signalSpecBuilder.d.ts +1 -1
- package/dist/@types/src/signal/signalSpecBuilder.d.ts.map +1 -1
- package/dist/@types/src/specTestUtils.d.ts +20 -0
- package/dist/@types/src/specTestUtils.d.ts.map +1 -1
- package/dist/@types/src/specUtils.d.ts +6 -2
- package/dist/@types/src/specUtils.d.ts.map +1 -1
- package/dist/@types/src/trendline/trendlineTestUtils.d.ts.map +1 -1
- package/dist/@types/src/trendline/trendlineUtils.d.ts +1 -1
- package/dist/@types/src/types/axis/axisAnnotationSpec.types.d.ts +3 -3
- package/dist/@types/src/types/axis/axisSpec.types.d.ts +3 -1
- package/dist/@types/src/types/axis/axisSpec.types.d.ts.map +1 -1
- package/dist/@types/src/types/axis/referenceLineSpec.types.d.ts +5 -0
- package/dist/@types/src/types/axis/referenceLineSpec.types.d.ts.map +1 -1
- package/dist/@types/src/types/chartSpec.types.d.ts +2 -0
- package/dist/@types/src/types/chartSpec.types.d.ts.map +1 -1
- package/dist/@types/src/types/dialogs/chartInspectSpec.types.d.ts +14 -0
- package/dist/@types/src/types/dialogs/{chartTooltipSpec.types.d.ts.map → chartInspectSpec.types.d.ts.map} +1 -1
- package/dist/@types/src/types/dialogs/index.d.ts +1 -1
- package/dist/@types/src/types/legendSpec.types.d.ts +7 -0
- package/dist/@types/src/types/legendSpec.types.d.ts.map +1 -1
- package/dist/@types/src/types/marks/areaSpec.types.d.ts +4 -4
- package/dist/@types/src/types/marks/areaSpec.types.d.ts.map +1 -1
- package/dist/@types/src/types/marks/barSpec.types.d.ts +3 -3
- package/dist/@types/src/types/marks/donutSpec.types.d.ts +3 -3
- package/dist/@types/src/types/marks/lineSpec.types.d.ts +65 -6
- package/dist/@types/src/types/marks/lineSpec.types.d.ts.map +1 -1
- package/dist/@types/src/types/marks/scatterSpec.types.d.ts +3 -3
- package/dist/@types/src/types/marks/supplemental/barDirectLabelSpec.types.d.ts +4 -1
- package/dist/@types/src/types/marks/supplemental/barDirectLabelSpec.types.d.ts.map +1 -1
- package/dist/@types/src/types/marks/supplemental/index.d.ts +2 -0
- package/dist/@types/src/types/marks/supplemental/index.d.ts.map +1 -1
- package/dist/@types/src/types/marks/supplemental/lineDirectLabelSpec.types.d.ts +2 -0
- package/dist/@types/src/types/marks/supplemental/lineDirectLabelSpec.types.d.ts.map +1 -1
- package/dist/@types/src/types/marks/supplemental/lineForecastSpec.types.d.ts +23 -0
- package/dist/@types/src/types/marks/supplemental/lineForecastSpec.types.d.ts.map +1 -0
- package/dist/@types/src/types/marks/supplemental/linePointAnnotationSpec.types.d.ts +19 -0
- package/dist/@types/src/types/marks/supplemental/linePointAnnotationSpec.types.d.ts.map +1 -0
- package/dist/@types/src/types/marks/supplemental/metricRangeSpec.types.d.ts +3 -3
- package/dist/@types/src/types/marks/supplemental/trendlineSpec.types.d.ts +4 -4
- package/dist/@types/src/types/marks/supplemental/trendlineSpec.types.d.ts.map +1 -1
- package/dist/@types/src/types/marks/vennSpec.types.d.ts +3 -3
- package/dist/@types/src/types/specUtil.types.d.ts +9 -3
- package/dist/@types/src/types/specUtil.types.d.ts.map +1 -1
- package/dist/@types/src/vegaEmbedUtils.d.ts +8 -0
- package/dist/@types/src/vegaEmbedUtils.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE.txt +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/dist/@types/src/chartTooltip/chartTooltipUtils.d.ts +0 -54
- package/dist/@types/src/chartTooltip/chartTooltipUtils.test.d.ts +0 -2
- package/dist/@types/src/chartTooltip/chartTooltipUtils.test.d.ts.map +0 -1
- package/dist/@types/src/types/dialogs/chartTooltipSpec.types.d.ts +0 -14
|
@@ -7,7 +7,7 @@ export declare const addArea: (state: ScSpec, args_0: AreaOptions & {
|
|
|
7
7
|
idKey: string;
|
|
8
8
|
}) => ScSpec;
|
|
9
9
|
export declare const addData: (state: Data[], args_0: AreaSpecOptions) => Data[];
|
|
10
|
-
export declare const getAreaHighlightedData: (name: string, idKey: string,
|
|
10
|
+
export declare const getAreaHighlightedData: (name: string, idKey: string, hasInspect: boolean, hasPopover: boolean, hasGroupId: boolean) => SourceData;
|
|
11
11
|
export declare const addSignals: (state: Signal[], args_0: AreaSpecOptions) => Signal[];
|
|
12
12
|
/**
|
|
13
13
|
* Adds an on event that clears the controlled highlighted item signal value when the user mouses over the area.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AreaMark, NumericValueRef, ProductionRule } from 'vega';
|
|
2
|
-
import { ChartPopoverOptions,
|
|
2
|
+
import { ChartPopoverOptions, ChartInspectOptions, ColorFacet, ColorScheme, HighlightedItem, ScaleType } from '../types';
|
|
3
3
|
export interface AreaMarkOptions {
|
|
4
4
|
color: ColorFacet;
|
|
5
5
|
colorScheme: ColorScheme;
|
|
@@ -17,7 +17,7 @@ export interface AreaMarkOptions {
|
|
|
17
17
|
parentName?: string;
|
|
18
18
|
scaleType: ScaleType;
|
|
19
19
|
chartPopovers?: ChartPopoverOptions[];
|
|
20
|
-
|
|
20
|
+
chartInspects?: ChartInspectOptions[];
|
|
21
21
|
}
|
|
22
22
|
export declare const getAreaMark: (areaOptions: AreaMarkOptions, dataSource?: string) => AreaMark;
|
|
23
23
|
export declare function getAreaOpacity(areaOptions: AreaMarkOptions): ProductionRule<NumericValueRef> | undefined;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NumericValueRef, ProductionRule, Signal } from 'vega';
|
|
2
|
+
import { InteractiveMark } from '../types';
|
|
3
|
+
type MatchedInteractiveMark = Required<InteractiveMark>;
|
|
4
|
+
/**
|
|
5
|
+
* Vega mark name stamped onto an axis's primary label encode block - shared by hover and click
|
|
6
|
+
* wiring since Vega only allows one `encode.labels.name` per axis.
|
|
7
|
+
*/
|
|
8
|
+
export declare const getAxisLabelMarkName: (axisName: string) => string;
|
|
9
|
+
/** Filters `usermeta.interactiveMarks` to entries matching this axis's dimension field. */
|
|
10
|
+
export declare const getMatchingInteractiveBarDimensionFields: (scaleField: string | undefined, interactiveMarks?: InteractiveMark[]) => MatchedInteractiveMark[];
|
|
11
|
+
/**
|
|
12
|
+
* Appends mouseover/mouseout handlers onto each matching bar's existing dimension-hover-area signal.
|
|
13
|
+
* Never creates the signal itself, so this is a no-op for non-interactive bars.
|
|
14
|
+
*/
|
|
15
|
+
export declare const addAxisLabelHoverSignalWiring: (signals: Signal[], matchingBars: MatchedInteractiveMark[], axisLabelMarkName: string) => Signal[];
|
|
16
|
+
/**
|
|
17
|
+
* Fade rule for axis labels, keyed on the same dimension-hover-area signal(s) the bars fade on.
|
|
18
|
+
* Intentionally ignores item-level bar hover - a single hovered segment isn't "this category is hovered."
|
|
19
|
+
*/
|
|
20
|
+
export declare const getAxisLabelDimensionFillOpacity: (matchingBars: MatchedInteractiveMark[]) => ProductionRule<NumericValueRef>;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=axisLabelHoverUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axisLabelHoverUtils.d.ts","sourceRoot":"","sources":["../../../../src/axis/axisLabelHoverUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAI/D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,KAAK,sBAAsB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,aAAc,MAAM,KAAG,MAAkC,CAAC;AAE3F,2FAA2F;AAC3F,eAAO,MAAM,wCAAwC,eACvC,MAAM,GAAG,SAAS,qBACZ,eAAe,EAAE,KAClC,sBAAsB,EAKxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,YAC/B,MAAM,EAAE,gBACH,sBAAsB,EAAE,qBACnB,MAAM,KACxB,MAAM,EAiBR,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gCAAgC,iBAC7B,sBAAsB,EAAE,KACrC,eAAe,eAAe,CAUhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"axisLabelHoverUtils.test.d.ts","sourceRoot":"","sources":["../../../../src/axis/axisLabelHoverUtils.test.ts"],"names":[],"mappings":""}
|
|
@@ -8,20 +8,24 @@ export declare const scaleTypeSupportsReferenceLines: (scaleType: ScaleType | un
|
|
|
8
8
|
export declare const getReferenceLineMarks: (axisOptions: AxisSpecOptions, scaleName: string) => Mark[];
|
|
9
9
|
export declare const getPositionEncoding: ({ scaleType }: AxisSpecOptions, { value, position }: ReferenceLineSpecOptions, scaleName: string) => ProductionRule<NumericValueRef> | SignalRef;
|
|
10
10
|
/**
|
|
11
|
-
* Horizontal rule line — spans from
|
|
11
|
+
* Horizontal rule line — spans from caret tip to the right cap, with x-start adapting to caret size.
|
|
12
|
+
* In auto mode (no explicit size) both stroke width and x-start react to chart width via signals.
|
|
12
13
|
*/
|
|
13
|
-
export declare const getReferenceLineRuleMark: ({ colorScheme }: AxisSpecOptions, { name }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => RuleMark;
|
|
14
|
+
export declare const getReferenceLineRuleMark: ({ colorScheme }: AxisSpecOptions, { name, secondary, size }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => RuleMark;
|
|
14
15
|
/**
|
|
15
|
-
* Left-pointing arrow
|
|
16
|
+
* Left-pointing arrow caps at the left edge of the chart area.
|
|
17
|
+
* Explicit size: one mark with the size-specific path.
|
|
18
|
+
* Auto mode: three marks (S/M/L) with reactive opacity, so the caret tier matches the chart width.
|
|
16
19
|
*/
|
|
17
|
-
export declare const getReferenceLineStartCapMark: (_axisOptions: AxisSpecOptions, { colorScheme, name }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => PathMark;
|
|
20
|
+
export declare const getReferenceLineStartCapMark: (_axisOptions: AxisSpecOptions, { colorScheme, name, secondary, size }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => PathMark[];
|
|
18
21
|
/**
|
|
19
|
-
* Right-pointing arrow
|
|
22
|
+
* Right-pointing arrow caps at the right edge of the chart area.
|
|
23
|
+
* Explicit size: one mark. Auto mode: three marks (S/M/L) with reactive opacity.
|
|
20
24
|
*/
|
|
21
|
-
export declare const getReferenceLineEndCapMark: (_axisOptions: AxisSpecOptions, { colorScheme, name }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => PathMark;
|
|
25
|
+
export declare const getReferenceLineEndCapMark: (_axisOptions: AxisSpecOptions, { colorScheme, name, secondary, size }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => PathMark[];
|
|
22
26
|
/**
|
|
23
27
|
* Two text marks: background halo then foreground.
|
|
24
28
|
* Label is below the line, right-aligned, with S2 typography.
|
|
25
29
|
*/
|
|
26
|
-
export declare const getReferenceLineTextMark: ({ colorScheme, label, name }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => TextMark[];
|
|
30
|
+
export declare const getReferenceLineTextMark: ({ colorScheme, label, name, secondary, size }: ReferenceLineSpecOptions, positionEncoding: ProductionRule<NumericValueRef> | SignalRef) => TextMark[];
|
|
27
31
|
//# sourceMappingURL=axisReferenceLineUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axisReferenceLineUtils.d.ts","sourceRoot":"","sources":["../../../../src/axis/axisReferenceLineUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"axisReferenceLineUtils.d.ts","sourceRoot":"","sources":["../../../../src/axis/axisReferenceLineUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAyBjH,OAAO,EAAE,eAAe,EAAqC,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAGxG,eAAO,MAAM,iBAAiB,gBAAiB,eAAe,KAAG,wBAAwB,EAIxF,CAAC;AAYF,eAAO,MAAM,+BAA+B,cAAe,SAAS,GAAG,SAAS,KAAG,OAGlF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,gBACnB,eAAe,aACjB,MAAM,KAChB,IAAI,EAgBN,CAAC;AAEF,eAAO,MAAM,mBAAmB,kBACf,eAAe,uBACT,wBAAwB,aAClC,MAAM,KAChB,eAAe,eAAe,CAAC,GAAG,SAYpC,CAAC;AAmBF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,oBAClB,eAAe,6BACL,wBAAwB,oBACjC,eAAe,eAAe,CAAC,GAAG,SAAS,KAC5D,QA+BF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,iBACzB,eAAe,0CACW,wBAAwB,oBAC9C,eAAe,eAAe,CAAC,GAAG,SAAS,KAC5D,QAAQ,EA6BV,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,iBACvB,eAAe,0CACW,wBAAwB,oBAC9C,eAAe,eAAe,CAAC,GAAG,SAAS,KAC5D,QAAQ,EAgCV,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,kDACY,wBAAwB,oBACrD,eAAe,eAAe,CAAC,GAAG,SAAS,KAC5D,QAAQ,EA6CV,CAAC"}
|
|
@@ -53,6 +53,7 @@ export interface AxisAddOptions extends AxisSpecOptions {
|
|
|
53
53
|
*/
|
|
54
54
|
export declare const addAxes: (state: Axis[], args_0: AxisSpecOptions & {
|
|
55
55
|
scaleName: string;
|
|
56
|
+
scaleField?: string | undefined;
|
|
56
57
|
opposingScaleType?: string | undefined;
|
|
57
58
|
dualMetricAxis?: boolean | undefined;
|
|
58
59
|
usermeta: UserMeta;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axisSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/axis/axisSpecBuilder.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,IAAI,EAAc,IAAI,EAAa,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"axisSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/axis/axisSpecBuilder.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,IAAI,EAAc,IAAI,EAAa,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,MAA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,QAAQ,UAAQ,GAAG,IAAI,CAGlE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axisTestUtils.d.ts","sourceRoot":"","sources":["../../../../src/axis/axisTestUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAU5B,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,eAAO,MAAM,oBAAoB,EAAE,IAYlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,IAYlC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"axisTestUtils.d.ts","sourceRoot":"","sources":["../../../../src/axis/axisTestUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAU5B,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,eAAO,MAAM,oBAAoB,EAAE,IAYlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,IAYlC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,eAsBhC,CAAC"}
|
|
@@ -52,6 +52,6 @@ export declare const addAxisAnnotationAxis: (axes: Axis[], { offset }: AxisAnnot
|
|
|
52
52
|
export declare const getAxisAnnotationsFromChildren: ({ axisAnnotations, colorScheme, name: axisName, position, scaleType, }: AxisSpecOptions & {
|
|
53
53
|
scaleType: ScaleType;
|
|
54
54
|
}) => AxisAnnotationSpecOptions[];
|
|
55
|
-
export declare const applyDefaultAxisAnnotationOptions: ({ chartPopovers,
|
|
55
|
+
export declare const applyDefaultAxisAnnotationOptions: ({ chartPopovers, chartInspects, name, format, offset, color, dataKey, options, }: AxisAnnotationOptions, annotationIndex: number, axisName: string, colorScheme: ColorScheme, scaleType: ScaleType) => AxisAnnotationSpecOptions;
|
|
56
56
|
export declare const axisTypeSupportsAxisAnnotations: (position: Position | undefined) => boolean;
|
|
57
57
|
//# sourceMappingURL=axisAnnotationUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/bar/barSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAa,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAgB,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"barSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/bar/barSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAa,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAgB,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AA2C5F,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAc5F,eAAO,MAAM,MAAM;;;;WAON,MAAM;;YAqFlB,CAAC;AAEF,eAAO,MAAM,UAAU,uDA6BrB,CAAC;AAEH,eAAO,MAAM,OAAO,mDA8BlB,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,YAAa,cAAc,KAAG,IAe/D,CAAC;AAEF,eAAO,MAAM,mBAAmB,YAAa,cAAc,KAAG,gBAQ7D,CAAC;AAYF,eAAO,MAAM,2BAA2B,YAAa,cAAc,KAAG,IAYrE,CAAC;AAEF,eAAO,MAAM,sBAAsB,6CAA8C,cAAc,KAAG,gBAOjG,CAAC;AAEF,eAAO,MAAM,qBAAqB,SAAU,IAAI,EAAE,WAAW,cAAc,SAoB1E,CAAC;AAEF,eAAO,MAAM,SAAS,qDAsBpB,CAAC;AAEH,eAAO,MAAM,iBAAiB,WACpB,KAAK,EAAE,2EAC0D,cAAc,SAQxF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,WAAY,KAAK,EAAE,WAAW,cAAc,SAgC1E,CAAC;AAEF,eAAO,MAAM,QAAQ,mDA6BnB,CAAC;AAEH,eAAO,MAAM,gBAAgB,YAAa,cAAc,KAAG,KAU1D,CAAC"}
|
|
@@ -29,6 +29,29 @@ export declare const getBarFillEncoding: (options: BarSpecOptions) => ColorValue
|
|
|
29
29
|
export declare const getBarEnterEncodings: (options: BarSpecOptions) => EncodeEntry;
|
|
30
30
|
export declare const getBarUpdateEncodings: (options: BarSpecOptions) => EncodeEntry;
|
|
31
31
|
export declare const getStroke: (options: BarSpecOptions) => ProductionRule<ColorValueRef>;
|
|
32
|
+
/**
|
|
33
|
+
* Determines whether the per-item selection ring should be added for this mark.
|
|
34
|
+
* Mutually exclusive with the dimension-level {@link getDimensionSelectionRing}, which
|
|
35
|
+
* already provides its own group-spanning ring for `UNSAFE_highlightBy: 'dimension'` popovers.
|
|
36
|
+
*/
|
|
37
|
+
export declare const shouldShowItemSelectionRing: (options: BarSpecOptions) => boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Opaque backdrop for the selection ring, drawn UNDERNEATH the bar. It is outset from the bar and
|
|
40
|
+
* filled with the chart's background color so the gap between the bar and the stroke reads as an
|
|
41
|
+
* opaque halo (elements behind the bar aren't visible through it) rather than showing gridlines or
|
|
42
|
+
* other marks. It carries no stroke — the visible outline is {@link getBarItemSelectionRing}, drawn
|
|
43
|
+
* on top. Kept separate so the stroke can render above the bars while the fill stays below (an opaque
|
|
44
|
+
* fill drawn on top would cover the bar itself).
|
|
45
|
+
*/
|
|
46
|
+
export declare const getBarItemSelectionBackdrop: (options: BarSpecOptions, dataSource: string, dimensionEncodings: RectEncodeEntry) => RectMark;
|
|
47
|
+
/**
|
|
48
|
+
* The visible selection outline: a stroke-only rect drawn ON TOP of the bar marks so it is never
|
|
49
|
+
* occluded. This matters for stacked bars, where adjacent segments (drawn after) would paint over a
|
|
50
|
+
* ring drawn underneath. Its fill is transparent so it doesn't cover the bar; the opaque gap is
|
|
51
|
+
* provided by {@link getBarItemSelectionBackdrop}, drawn underneath. Only visible for the bar whose
|
|
52
|
+
* mark ID matches the {@link SELECTED_ITEM} signal.
|
|
53
|
+
*/
|
|
54
|
+
export declare const getBarItemSelectionRing: (options: BarSpecOptions, dataSource: string, dimensionEncodings: RectEncodeEntry) => RectMark;
|
|
32
55
|
export declare const getDimensionSelectionRing: (options: BarSpecOptions) => RectMark;
|
|
33
56
|
export declare const getStrokeDash: ({ chartPopovers, idKey, lineType }: BarSpecOptions) => ProductionRule<ArrayValueRef>;
|
|
34
57
|
export declare const getStrokeWidth: ({ chartPopovers, idKey, lineWidth, name, }: BarSpecOptions) => ProductionRule<NumericValueRef>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barUtils.d.ts","sourceRoot":"","sources":["../../../../src/bar/barUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,SAAS,EACT,eAAe,EACf,cAAc,EACd,eAAe,EACf,QAAQ,EACT,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"barUtils.d.ts","sourceRoot":"","sources":["../../../../src/bar/barUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EACL,aAAa,EACb,aAAa,EACb,WAAW,EACX,SAAS,EACT,eAAe,EACf,cAAc,EACd,eAAe,EACf,QAAQ,EACT,MAAM,MAAM,CAAC;AA0Bd,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,iCAAkC,cAAc,KAAG,OAEjF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,YAAa,cAAc,YAGvD,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,cAAc,KAAG,SAoC5D,CAAC;AAEF,eAAO,MAAM,2BAA2B,YAAa,cAAc,KAAG,eAUrE,CAAC;AAEF,eAAO,MAAM,8BAA8B,YAAa,cAAc,KAAG,eAOxE,CAAC;AAEF,eAAO,MAAM,kBAAkB,YAAa,cAAc,KAAG,eA2C5D,CAAC;AAEF,eA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AG,GAAG,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,OAAO,GAAG,OAAO,CAAC;IACrC,mBAAmB,EAAE,OAAO,GAAG,QAAQ,CAAC;IACxC,gBAAgB,EAAE,OAAO,GAAG,QAAQ,CAAC;CACtC;AAED,eAAO,MAAM,wBAAwB,gBAAiB,WAAW,cAAc,MAAM,KAAG,wBAiBjF,CAAC;AAER,eAAO,MAAM,gBAAgB,YAAa,cAAc,WAIvD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,YAAa,cAAc,QAAQ,SAAS,GAAG,QAAQ,KAAG,QAoB9F,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,YAAa,cAAc,KAAG,eAe9E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dodgedBarUtils.d.ts","sourceRoot":"","sources":["../../../../src/bar/dodgedBarUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"dodgedBarUtils.d.ts","sourceRoot":"","sources":["../../../../src/bar/dodgedBarUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAK3C,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAc1C,eAAO,MAAM,cAAc,YAAa,cAAc,KAAG,CAAC,SAAS,GAAG,QAAQ,CAAC,EA4D9E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dodgedBarUtils.test.d.ts","sourceRoot":"","sources":["../../../../src/bar/dodgedBarUtils.test.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"dodgedBarUtils.test.d.ts","sourceRoot":"","sources":["../../../../src/bar/dodgedBarUtils.test.ts"],"names":[],"mappings":";AAwLA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgB7B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stackedBarUtils.d.ts","sourceRoot":"","sources":["../../../../src/bar/stackedBarUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"stackedBarUtils.d.ts","sourceRoot":"","sources":["../../../../src/bar/stackedBarUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAKlE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAiB1C,eAAO,MAAM,kBAAkB,YAAa,cAAc,KAAG,IAAI,EAqChE,CAAC;AAEF,eAAO,MAAM,0BAA0B,YAAa,cAAc,KAAG,SAwBpE,CAAC;AAEF,eAAO,MAAM,uBAAuB,YAAa,cAAc,KAAG,QAmBjE,CAAC;AAEF,eAAO,MAAM,aAAa,YAAa,cAAc,KAAG,QAmBvD,CAAC;AAEF,eAAO,MAAM,4BAA4B,YAAa,cAAc,KAAG,eAYtE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"barDirectLabelUtils.d.ts","sourceRoot":"","sources":["../../../../src/barDirectLabel/barDirectLabelUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAY,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"barDirectLabelUtils.d.ts","sourceRoot":"","sources":["../../../../src/barDirectLabel/barDirectLabelUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,aAAa,EAAE,IAAI,EAAY,MAAM,MAAM,CAAC;AAOrD,OAAO,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AASxH;;;;;;;GAOG;AACH,eAAO,MAAM,kCAAkC,aACnC,0BAA0B,cACxB,OAAO,UACX,MAAM,kBACE,MAAM,gBACR,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmD5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,iBAAkB,yBAAyB,cAAc,cAAc,KAAG,IAAI,EAmFhH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,4BAA4B,iBACzB,qBAAqB,SAC5B,MAAM,cACD,cAAc,KACzB,yBAYD,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Data, FormulaTransform, NumericValueRef, Signal } from 'vega';
|
|
2
|
+
import { AreaSpecOptions, BarSpecOptions, ChartInspectOptions, ChartInspectSpecOptions, DonutSpecOptions, LineSpecOptions, ScatterSpecOptions, VennSpecOptions } from '../types';
|
|
3
|
+
type InspectParentOptions = AreaSpecOptions | BarSpecOptions | DonutSpecOptions | LineSpecOptions | ScatterSpecOptions | VennSpecOptions;
|
|
4
|
+
/**
|
|
5
|
+
* gets all the inspects
|
|
6
|
+
* @param markOptions
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const getInspects: (markOptions: InspectParentOptions) => ChartInspectSpecOptions[];
|
|
10
|
+
/**
|
|
11
|
+
* Applies all defaults to ChartInspectOptions
|
|
12
|
+
* @param chartInspectOptions
|
|
13
|
+
* @returns ChartInspectSpecOptions
|
|
14
|
+
*/
|
|
15
|
+
export declare const applyInspectPropDefaults: ({ highlightBy, targets, ...options }: ChartInspectOptions, markName: string) => ChartInspectSpecOptions;
|
|
16
|
+
/**
|
|
17
|
+
* Sets all the data needed for inspects
|
|
18
|
+
*
|
|
19
|
+
* NOTE: this function mutates the data object so it should only be called from a produce function
|
|
20
|
+
* @param data
|
|
21
|
+
* @param markOptions
|
|
22
|
+
*/
|
|
23
|
+
export declare const addInspectData: (data: Data[], markOptions: InspectParentOptions, addHighlightedData?: boolean) => void;
|
|
24
|
+
/**
|
|
25
|
+
* Gets the group id transform
|
|
26
|
+
* @param highlightBy
|
|
27
|
+
* @param markName
|
|
28
|
+
* @returns FormulaTransform
|
|
29
|
+
*/
|
|
30
|
+
export declare const getGroupIdTransform: (highlightBy: string[], markName: string) => FormulaTransform;
|
|
31
|
+
export declare const isHighlightedByGroup: (markOptions: InspectParentOptions) => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Inspect highlights by item or dimension
|
|
34
|
+
* @param markOptions
|
|
35
|
+
* @returns
|
|
36
|
+
*/
|
|
37
|
+
export declare const isHighlightedByDimension: (markOptions: InspectParentOptions) => boolean;
|
|
38
|
+
/**
|
|
39
|
+
* adds the appropriate signals for inspects
|
|
40
|
+
*
|
|
41
|
+
* NOTE: this function mutates the signals array so it should only be called from a produce function
|
|
42
|
+
* @param signals
|
|
43
|
+
* @param markOptions
|
|
44
|
+
*/
|
|
45
|
+
export declare const addInspectSignals: (signals: Signal[], markOptions: InspectParentOptions) => void;
|
|
46
|
+
export declare const addHoveredItemOpacityRules: (opacityRules: ({
|
|
47
|
+
test?: string;
|
|
48
|
+
} & NumericValueRef)[], markOptions: InspectParentOptions) => void;
|
|
49
|
+
export declare const addHoverdDimenstionAreaOpacityRules: (opacityRules: ({
|
|
50
|
+
test?: string;
|
|
51
|
+
} & NumericValueRef)[], markOptions: InspectParentOptions) => void;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=chartInspectUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"
|
|
1
|
+
{"version":3,"file":"chartInspectUtils.d.ts","sourceRoot":"","sources":["../../../../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|
|
1
|
+
{"version":3,"file":"chartInspectUtils.test.d.ts","sourceRoot":"","sources":["../../../../src/chartInspect/chartInspectUtils.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Data, LinearScale, OrdinalScale, PointScale, Signal } from 'vega';
|
|
2
2
|
import { ChartColors, ChartOptions, ChartSpecOptions, ColorScale, ColorScheme, Colors, LineType, LineTypes, LineWidth, Opacities, ScSpec, SymbolShapes, SymbolSize } from './types';
|
|
3
|
-
export declare function buildSpec({ axes, backgroundColor, chartHeight, chartWidth, colors, colorScheme, data, description, hiddenSeries, highlightedItem, highlightedSeries, idKey, legends, lineTypes, lineWidths, marks, opacities, symbolShapes, symbolSizes, title, titles, }: ChartOptions): ScSpec;
|
|
3
|
+
export declare function buildSpec({ animations, axes, backgroundColor, chartHeight, chartWidth, colors, colorScheme, data, description, hiddenSeries, highlightedItem, highlightedSeries, idKey, legends, lineTypes, lineWidths, marks, opacities, symbolShapes, symbolSizes, title, titles, }: ChartOptions): ScSpec;
|
|
4
4
|
export declare const removeUnusedScales: (state?: ScSpec | undefined) => ScSpec;
|
|
5
5
|
export declare const getDefaultSignals: ({ backgroundColor, colors, colorScheme, lineTypes, opacities, hiddenSeries, highlightedItem, highlightedSeries, }: ChartSpecOptions) => Signal[];
|
|
6
6
|
export declare const getTwoDimensionalColorScheme: (colors: ChartColors, colorScheme: ColorScheme) => string[][];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chartSpecBuilder.d.ts","sourceRoot":"","sources":["../../../src/chartSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAS,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"chartSpecBuilder.d.ts","sourceRoot":"","sources":["../../../src/chartSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE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,UAAU,CAAC,KAAG,WAMzE,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,gBAAiB,CAAC,UAAU,EAAE,UAAU,CAAC,KAAG,WAM9E,CAAC;AAEH,eAAO,MAAM,iBAAiB,eAAgB,SAAS,EAAE,KAAG,YAG3D,CAAC;AAEF,eAAO,MAAM,eAAe,eAAgB,SAAS,KAAG,YAAY,GAAG,UAatE,CAAC;AAiBF;;GAEG;AACH,eAAO,MAAM,OAAO;YAA8B,MAAM,EAAE;YAsBxD,CAAC;AAEH,eAAO,MAAM,YAAY,WAAY,WAAW,yBAE/C,CAAC;AAEF,eAAO,MAAM,QAAQ,WAAY,WAAW,qBAE3C,CAAC;AAEF,eAAO,MAAM,eAAe,cAAe,SAAS,4BAEnD,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAAc,QAAQ,GAAG,QAAQ,EAAE,yBAEhE,CAAC;AAEF,eAAO,MAAM,aAAa,cAAe,SAAS,0BAEjD,CAAC;AAEF,eAAO,MAAM,kBAAkB,iBAAkB,YAAY,6BAE5D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Compare, Data, FormulaTransform, SourceData, Transforms, ValuesData } from 'vega';
|
|
2
|
-
import {
|
|
2
|
+
import { ChartInspectOptions } from '../types';
|
|
3
3
|
export declare const addTimeTransform: (state: Transforms[], args_0: string) => Transforms[];
|
|
4
4
|
export declare const getTransformSort: (order?: string) => Compare | undefined;
|
|
5
5
|
/**
|
|
@@ -19,7 +19,7 @@ export declare const getSeriesIdTransform: (facets: string[]) => FormulaTransfor
|
|
|
19
19
|
* @param children
|
|
20
20
|
* @returns spec data that filters out items where the `excludeDataKey` is true
|
|
21
21
|
*/
|
|
22
|
-
export declare const
|
|
22
|
+
export declare const getFilteredInspectData: (chartInspects: ChartInspectOptions[]) => {
|
|
23
23
|
name: string;
|
|
24
24
|
source: string;
|
|
25
25
|
transform: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"donutSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/donut/donutSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAoB,IAAI,EAAgB,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAejF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAUhG,eAAO,MAAM,QAAQ;;;;WAOR,MAAM;YA+ClB,CAAC;AAEF,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"donutSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/donut/donutSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAoB,IAAI,EAAgB,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAejF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAUhG,eAAO,MAAM,QAAQ;;;;WAOR,MAAM;YA+ClB,CAAC;AAEF,eAAO,MAAM,OAAO,qDA6BlB,CAAC;AA2BH,eAAO,MAAM,SAAS,uDAIpB,CAAC;AAEH,eAAO,MAAM,QAAQ,qDAOnB,CAAC;AAEH,eAAO,MAAM,UAAU,yDAKrB,CAAC"}
|
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
import { ArcMark } from 'vega';
|
|
1
|
+
import { ArcMark, SourceData } from 'vega';
|
|
2
2
|
import { DonutSpecOptions } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Gets the test expression that is true when the donut has no data or all metric values sum to 0.
|
|
5
|
+
* When the metric sum is 0, the vega pie transform produces NaN angles which cannot be rendered.
|
|
6
|
+
* @param name donut name
|
|
7
|
+
* @returns vega expression string
|
|
8
|
+
*/
|
|
9
|
+
export declare const getDonutEmptyStateTest: (name: string) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Gets the data source that aggregates the sum of the metric.
|
|
12
|
+
* Used to detect the empty state (no data or all metric values are 0).
|
|
13
|
+
* @param donutOptions
|
|
14
|
+
* @returns SourceData
|
|
15
|
+
*/
|
|
16
|
+
export declare const getSumData: ({ metric, name }: DonutSpecOptions) => SourceData;
|
|
3
17
|
export declare const getArcMark: (options: DonutSpecOptions) => ArcMark;
|
|
18
|
+
/**
|
|
19
|
+
* Gets the empty state arc mark. This is a light gray ring that is only visible
|
|
20
|
+
* when the donut has no data or all metric values sum to 0.
|
|
21
|
+
* @param donutOptions
|
|
22
|
+
* @returns ArcMark
|
|
23
|
+
*/
|
|
24
|
+
export declare const getEmptyStateArcMark: (options: DonutSpecOptions) => ArcMark;
|
|
4
25
|
//# sourceMappingURL=donutUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"donutUtils.d.ts","sourceRoot":"","sources":["../../../../src/donut/donutUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"donutUtils.d.ts","sourceRoot":"","sources":["../../../../src/donut/donutUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAM3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE5C;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,SAAU,MAAM,KAAG,MAC2B,CAAC;AAElF;;;;;GAKG;AACH,eAAO,MAAM,UAAU,qBAAsB,gBAAgB,KAAG,UAW9D,CAAC;AAEH,eAAO,MAAM,UAAU,YAAa,gBAAgB,KAAG,OA4BtD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,YAAa,gBAAgB,KAAG,OAsBhE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"donutUtils.test.d.ts","sourceRoot":"","sources":["../../../../src/donut/donutUtils.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"segmentLabelUtils.d.ts","sourceRoot":"","sources":["../../../../src/donut/segmentLabelUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAmB,cAAc,EAAmB,QAAQ,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAM3G,OAAO,EAAE,gBAAgB,EAAuB,uBAAuB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"segmentLabelUtils.d.ts","sourceRoot":"","sources":["../../../../src/donut/segmentLabelUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAmB,cAAc,EAAmB,QAAQ,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAM3G,OAAO,EAAE,gBAAgB,EAAuB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAiC1F;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,iBAAkB,gBAAgB,KAAG,SAAS,EAgB9E,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,gDAKjC,uBAAuB,KAAG,QAsB5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,YAAa,uBAAuB,KAAG,QAAQ,EA2BvF,CAAC;AA4BF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,kEAMlC,uBAAuB,KAAG,eAAe,YAAY,CAAC,GAAG,SAkB3D,CAAC"}
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
-
import { Mark, NumericValueRef, ProductionRule } from 'vega';
|
|
1
|
+
import { Data, Mark, NumericValueRef, ProductionRule } from 'vega';
|
|
2
|
+
import { LegendOptions } from '../types';
|
|
3
|
+
export declare const getLegendHighlightSignals: (legends: LegendOptions[]) => string[];
|
|
2
4
|
/**
|
|
3
|
-
*
|
|
5
|
+
* Injects a legend hover rule into the hover target data for the chart.
|
|
6
|
+
*/
|
|
7
|
+
export declare const injectLegendHoverIntoData: (legendName: string, data: Data[], keys?: string[]) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Adds opacity tests for marks whose fill/stroke is driven by the color scale, and for marks
|
|
10
|
+
* that are already per-series (e.g. trendlines, which facet by series regardless of their own
|
|
11
|
+
* color encoding — a trendline with an overridden literal color still needs to fade on legend hover).
|
|
4
12
|
*/
|
|
5
13
|
export declare const setHoverOpacityForMarks: (legendName: string, marks: Mark[], keys?: string[], controlled?: boolean) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Injects a strokeWidth rule into marks that use the color scale so legend hover thickens the hovered series.
|
|
16
|
+
*/
|
|
17
|
+
export declare const setHoverStrokeWidthForMarks: (legendName: string, marks: Mark[], keys?: string[], controlled?: boolean) => void;
|
|
18
|
+
export declare const getHighlightStrokeWidthRule: (legendName: string, controlled: boolean, keys?: string[]) => {
|
|
19
|
+
test?: string;
|
|
20
|
+
} & NumericValueRef;
|
|
6
21
|
export declare const getHighlightOpacityRule: (legendName: string, controlled: boolean, keys?: string[]) => {
|
|
7
22
|
test?: string;
|
|
8
23
|
} & NumericValueRef;
|
|
@@ -13,6 +28,13 @@ export declare const getHighlightOpacityRule: (legendName: string, controlled: b
|
|
|
13
28
|
* @returns boolean
|
|
14
29
|
*/
|
|
15
30
|
export declare const markUsesSeriesColorScale: (mark: Mark) => boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Determines if a mark should receive a legend-hover opacity rule — either because its own
|
|
33
|
+
* fill/stroke uses the color scale, or because it's a trendline/metric range mark.
|
|
34
|
+
* @param mark
|
|
35
|
+
* @returns boolean
|
|
36
|
+
*/
|
|
37
|
+
export declare const markIsSeriesAware: (mark: Mark) => boolean;
|
|
16
38
|
/**
|
|
17
39
|
* Determines if the supplied encoding uses a scale to set the value
|
|
18
40
|
* @param encoding
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legendHighlightUtils.d.ts","sourceRoot":"","sources":["../../../../src/legend/legendHighlightUtils.ts"],"names":[],"mappings":"AAWA,OAAO,
|
|
1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|
1
|
-
{"version":3,"file":"legendSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/legend/legendSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,EAAE,MAAM,MAAM,CAAC;AAoBzD,OAAO,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,MAAM,EACN,gBAAgB,EAEjB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,KAAK,EAAmE,MAAM,eAAe,CAAC;AAEvG,eAAO,MAAM,SAAS;;;;;;
|
|
1
|
+
{"version":3,"file":"legendSpecBuilder.d.ts","sourceRoot":"","sources":["../../../../src/legend/legendSpecBuilder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAe,MAAM,EAAE,MAAM,MAAM,CAAC;AAoBzD,OAAO,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,MAAM,EACN,gBAAgB,EAEjB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,KAAK,EAAmE,MAAM,eAAe,CAAC;AAEvG,eAAO,MAAM,SAAS;;;;;;YA+GrB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,UAC9B,UAAU,GAAG,SAAS,YACnB,aAAa,GAAG,SAAS,aACxB,cAAc,GAAG,SAAS,eACxB,gBAAgB,GAAG,SAAS,eAC5B,WAAW;;;;;CA8BzB,CAAC;AAuBF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,UAAW,KAAK,WAAW,iBAAiB,KAAG,MAe9E,CAAC;AA+BF;;;;GAIG;AACH,eAAO,MAAM,OAAO;YAAkD,MAAM,EAAE;YAsE7E,CAAC;AAEF,eAAO,MAAM,UAAU,0DAUtB,CAAC"}
|
|
@@ -5,12 +5,11 @@ export interface Facet {
|
|
|
5
5
|
field: string;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
|
-
* Get the number of columns for the legend
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* @returns
|
|
8
|
+
* Get the number of columns for the legend.
|
|
9
|
+
* Uses actual measured label widths (via the ${name}_maxLabelWidth data source) capped at labelLimit
|
|
10
|
+
* so columns are based on real content rather than a fixed estimate.
|
|
12
11
|
*/
|
|
13
|
-
export declare const getColumns: (position: Position, labelLimit?: number) => SignalRef | undefined;
|
|
12
|
+
export declare const getColumns: (position: Position, name: string, labelLimit?: number) => SignalRef | undefined;
|
|
14
13
|
/**
|
|
15
14
|
* Gets the filter transform for hidden entries
|
|
16
15
|
* @param hiddenEntries
|
|
@@ -24,6 +23,7 @@ export declare const getHiddenEntriesFilter: (hiddenEntries: string[], name: str
|
|
|
24
23
|
* @returns
|
|
25
24
|
*/
|
|
26
25
|
export declare const getEncodings: (facets: Facet[], legendOptions: LegendSpecOptions, userMeta: UserMeta) => LegendEncode;
|
|
26
|
+
export declare const getLegendOpacity: (options: LegendSpecOptions, userMeta: UserMeta) => ProductionRule<NumericValueRef> | undefined;
|
|
27
27
|
/**
|
|
28
28
|
* simple opacity encoding for legend labels and the symbol stroke opacity
|
|
29
29
|
* @param legendOptions
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legendUtils.d.ts","sourceRoot":"","sources":["../../../../src/legend/legendUtils.ts"],"names":[],"mappings":"AAYA,OAAO,EAGL,aAAa,EACb,eAAe,EAEf,YAAY,EACZ,eAAe,EACf,cAAc,EACd,SAAS,EAEV,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"legendUtils.d.ts","sourceRoot":"","sources":["../../../../src/legend/legendUtils.ts"],"names":[],"mappings":"AAYA,OAAO,EAGL,aAAa,EACb,eAAe,EAEf,YAAY,EACZ,eAAe,EACf,cAAc,EACd,SAAS,EAEV,MAAM,MAAM,CAAC;AA6Bd,OAAO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a,gBAAiB,SAAS,MAAM,CAAC,GAAG,SAAS,KAAG,MAIzE,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { NumericValueRef, ProductionRule, TextMark, Transforms } from 'vega';
|
|
2
|
+
import { ColorScheme } from '../types';
|
|
3
|
+
type PositionRef = NumericValueRef | ProductionRule<NumericValueRef>;
|
|
4
|
+
type FillOverride = {
|
|
5
|
+
field: string;
|
|
6
|
+
} | {
|
|
7
|
+
value: string;
|
|
8
|
+
} | {
|
|
9
|
+
signal: string;
|
|
10
|
+
};
|
|
11
|
+
export interface DirectLabelUpdateEncode {
|
|
12
|
+
x: PositionRef;
|
|
13
|
+
y: PositionRef;
|
|
14
|
+
additional?: Record<string, unknown>;
|
|
15
|
+
}
|
|
16
|
+
export declare const MIN_LABEL_GAP = "rscChartSizeLabelGap";
|
|
17
|
+
/**
|
|
18
|
+
* Builds the five Vega transforms that compute collision-aware vertical positions for a set of
|
|
19
|
+
* co-located labels. Shared by direct labels (namespace='') and hover labels (namespace='hover').
|
|
20
|
+
*
|
|
21
|
+
* With namespace='': produces fields _seriesCount, _metricRank, _scaledY, _adjustedY, _cumMaxAdjusted
|
|
22
|
+
* With namespace='hover': produces fields _hover_seriesCount, _hover_metricRank, etc.
|
|
23
|
+
*/
|
|
24
|
+
export declare const getCascadeTransforms: (yScaleName: string, metric: string, namespace: string) => Transforms[];
|
|
25
|
+
/**
|
|
26
|
+
* Builds the two-mark (background halo + foreground text) pattern for hover-style labels
|
|
27
|
+
* where position is encoded directly from data (no label transform).
|
|
28
|
+
* Both marks read from the same dataSource.
|
|
29
|
+
*/
|
|
30
|
+
export declare const getDirectLabelTextMarks: (backgroundMarkName: string, foregroundMarkName: string, dataSource: string, textSignal: string, updateEncode: DirectLabelUpdateEncode, colorScheme: ColorScheme, foregroundFillOverride?: FillOverride) => TextMark[];
|
|
31
|
+
/**
|
|
32
|
+
* Builds the two-mark (background halo + foreground text) pattern for annotation-style labels
|
|
33
|
+
* that use Vega's label transform for collision-aware placement.
|
|
34
|
+
* The background mark runs the label transform; the foreground reads its computed positions
|
|
35
|
+
* (x, y, align, baseline, opacity) from the background mark.
|
|
36
|
+
*/
|
|
37
|
+
export declare const getLabelTransformTextMarks: (backgroundMarkName: string, foregroundMarkName: string, dataSource: string, textSignal: string, colorScheme: ColorScheme, labelTransform: Transforms, foregroundFillOverride?: FillOverride) => TextMark[];
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=directLabelUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directLabelUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/directLabelUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAK7E,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,KAAK,WAAW,GAAG,eAAe,GAAG,cAAc,CAAC,eAAe,CAAC,CAAC;AACrE,KAAK,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E,MAAM,WAAW,uBAAuB;IACtC,CAAC,EAAE,WAAW,CAAC;IACf,CAAC,EAAE,WAAW,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,eAAO,MAAM,aAAa,yBAAuB,CAAC;AAElD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,eAAgB,MAAM,UAAU,MAAM,aAAa,MAAM,KAAG,UAAU,EA8BtG,CAAC;AAeF;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,uBACd,MAAM,sBACN,MAAM,cACd,MAAM,cACN,MAAM,gBACJ,uBAAuB,eACxB,WAAW,2BACC,YAAY,KACpC,QAAQ,EA6BV,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,uBACjB,MAAM,sBACN,MAAM,cACd,MAAM,cACN,MAAM,eACL,WAAW,kBACR,UAAU,2BACD,YAAY,KACpC,QAAQ,EAiCV,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SourceData } from 'vega';
|
|
2
|
+
import { HoverMatchRule } from '../marks/hoverAnimationUtils';
|
|
2
3
|
import { LineSpecOptions } from '../types';
|
|
3
4
|
/**
|
|
4
5
|
* gets the data used for highlighting hovered data points
|
|
@@ -7,6 +8,22 @@ import { LineSpecOptions } from '../types';
|
|
|
7
8
|
* @returns
|
|
8
9
|
*/
|
|
9
10
|
export declare const getLineHighlightedData: (options: LineSpecOptions) => SourceData;
|
|
11
|
+
/**
|
|
12
|
+
* Builds a Vega expression that evaluates to true for series NOT in the primary set.
|
|
13
|
+
* - number: first N series by color scale order
|
|
14
|
+
* - string[]: explicitly named series
|
|
15
|
+
*/
|
|
16
|
+
export declare const getPrimarySeriesOtherExpr: (primarySeries: number | string[], datumPath: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* Gets a derived data source sorted so "other" series appear first,
|
|
19
|
+
* causing Vega to draw them first (behind the primary series).
|
|
20
|
+
*/
|
|
21
|
+
export declare const getPrimarySeriesFacetData: (name: string, primarySeries: number | string[]) => SourceData;
|
|
22
|
+
/**
|
|
23
|
+
* Derives from highlightedData and adds cascade transforms so labels for multiple series
|
|
24
|
+
* at the same hovered dimension are spread apart rather than overlapping.
|
|
25
|
+
*/
|
|
26
|
+
export declare const getHoverLabelData: (options: LineSpecOptions) => SourceData;
|
|
10
27
|
/**
|
|
11
28
|
* gets the data used for displaying points
|
|
12
29
|
* @param name
|
|
@@ -17,4 +34,10 @@ export declare const getLineHighlightedData: (options: LineSpecOptions) => Sourc
|
|
|
17
34
|
* @returns
|
|
18
35
|
*/
|
|
19
36
|
export declare const getLineStaticPointData: (name: string, staticPoint: string | undefined, source: string, isSparkline: boolean | undefined, isMethodLast: boolean | undefined) => SourceData;
|
|
37
|
+
/**
|
|
38
|
+
* Constructs the conditions for the hover interaction rules, storing the hover state as target values for each hoverable item
|
|
39
|
+
* @param lineOptions - the line spec options containing the interactive mark name, popover mark name, combo sibling names, and whether the series is highlighted by group
|
|
40
|
+
* @returns HoverMatchRule[] - the hover interaction rules
|
|
41
|
+
*/
|
|
42
|
+
export declare const getLineHoverRules: ({ interactiveMarkName, popoverMarkName, comboSiblingNames, isHighlightedByGroup }: LineSpecOptions) => HoverMatchRule[];
|
|
20
43
|
//# sourceMappingURL=lineDataUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineDataUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/lineDataUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"lineDataUtils.d.ts","sourceRoot":"","sources":["../../../../src/line/lineDataUtils.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIlC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,YAAa,eAAe,KAAG,UA4BjE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,kBAAmB,MAAM,GAAG,MAAM,EAAE,aAAa,MAAM,KAAG,MAK/F,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,yBAAyB,SAAU,MAAM,iBAAiB,MAAM,GAAG,MAAM,EAAE,KAAG,UAWzF,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,iBAAiB,YAAa,eAAe,KAAG,UAS5D,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB,SAC3B,MAAM,eACC,MAAM,GAAG,SAAS,UACvB,MAAM,eACD,OAAO,GAAG,SAAS,gBAClB,OAAO,GAAG,SAAS,KAChC,UAaF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,sFACuD,eAAe,KACjG,cAAc,EAyBhB,CAAC"}
|