@cloudscape-design/chart-components 1.0.151 → 1.0.153
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/core/utils.js +8 -5
- package/core/utils.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/generated/theming/index.cjs +2 -0
- package/internal/generated/theming/index.d.cts +9 -0
- package/internal/generated/theming/index.d.ts +9 -0
- package/internal/generated/theming/index.js +2 -0
- package/internal/manifest.json +1 -1
- package/package.json +1 -1
package/core/utils.js
CHANGED
|
@@ -162,10 +162,13 @@ export function getChartLegendItems({ chart, getItemOptions = () => ({}), itemMa
|
|
|
162
162
|
return legendItems;
|
|
163
163
|
}
|
|
164
164
|
export function getVisibleLegendItems(options) {
|
|
165
|
-
var _a, _b, _c, _d, _e;
|
|
166
|
-
|
|
167
|
-
const
|
|
168
|
-
|
|
165
|
+
var _a, _b, _c, _d, _e, _f;
|
|
166
|
+
// Highcharts implicitly inverts the chart when its type or any series type is "bar", even if chart.inverted is unset.
|
|
167
|
+
const isInverted = ((_a = options.chart) === null || _a === void 0 ? void 0 : _a.inverted) === true ||
|
|
168
|
+
((_b = options.chart) === null || _b === void 0 ? void 0 : _b.type) === "bar" ||
|
|
169
|
+
((_c = options.series) === null || _c === void 0 ? void 0 : _c.some((series) => "type" in series && series.type === "bar")) === true;
|
|
170
|
+
const valueAxes = (_d = (isInverted ? castArray(options.xAxis) : castArray(options.yAxis))) !== null && _d !== void 0 ? _d : [];
|
|
171
|
+
const defaultOpposite = valueAxes.length > 0 ? ((_e = valueAxes[0].opposite) !== null && _e !== void 0 ? _e : false) : false;
|
|
169
172
|
const primaryAxis = valueAxes.find((a) => { var _a; return !((_a = a.opposite) !== null && _a !== void 0 ? _a : false); });
|
|
170
173
|
const secondaryAxis = valueAxes.find((a) => a.opposite === true);
|
|
171
174
|
const primaryItems = [];
|
|
@@ -178,7 +181,7 @@ export function getVisibleLegendItems(options) {
|
|
|
178
181
|
primaryItems.push(item);
|
|
179
182
|
}
|
|
180
183
|
};
|
|
181
|
-
(
|
|
184
|
+
(_f = options.series) === null || _f === void 0 ? void 0 : _f.forEach((series) => {
|
|
182
185
|
if (!("type" in series)) {
|
|
183
186
|
return;
|
|
184
187
|
}
|
package/core/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/core/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAMtC,OAAO,EACL,cAAc,EACd,YAAY,EACZ,aAAa,GAId,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAe5C,yHAAyH;AACzH,6HAA6H;AAC7H,gFAAgF;AAChF,MAAM,UAAU,WAAW,CAAC,MAAkB;IAC5C,OAAO,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AACD,MAAM,UAAU,UAAU,CAAC,KAAgB;IACzC,OAAO,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AACD,MAAM,UAAU,YAAY,CAAC,OAAuC;;IAClE,OAAO,MAAA,MAAA,OAAO,CAAC,EAAE,mCAAI,OAAO,CAAC,IAAI,mCAAI,eAAe,EAAE,CAAC;AACzD,CAAC;AACD,SAAS,eAAe;IACtB,MAAM,IAAI,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,OAAS,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IACrE,OAAO,0BAA0B,GAAG,IAAI,CAAC;AAC3C,CAAC;AAED,yGAAyG;AACzG,MAAM,UAAU,eAAe,CAAC,MAAkB;IAChD,OAAQ,MAAM,CAAC,OAAe,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACvD,C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.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type Highcharts from \"highcharts\";\n\nimport { ChartSeriesMarkerType } from \"../internal/components/series-marker\";\nimport { ChartSeriesMarkerStatus } from \"../internal/components/series-marker/interfaces\";\nimport {\n getChartSeries,\n getPointZone,\n getSeriesData,\n SafeChart,\n SafePoint,\n SafeSeries,\n} from \"../internal/utils/highcharts\";\nimport { castArray } from \"../internal/utils/utils\";\nimport { getFormatter } from \"./formatters\";\nimport { ChartLabels } from \"./i18n-utils\";\nimport { CoreChartProps, Rect } from \"./interfaces\";\n\nexport interface LegendItemSpec {\n id: string;\n name: string;\n markerType: ChartSeriesMarkerType;\n color: string;\n visible: boolean;\n isSecondary: boolean;\n status?: ChartSeriesMarkerStatus;\n markerAriaLabel?: string;\n}\n\n// The below functions extract unique identifier from series, point, or options. The identifier can be item's ID or name.\n// We expect that items requiring referencing (e.g. in order to control their visibility) have the unique identifier defined.\n// Otherwise, we return a randomized id that is to ensure no accidental matches.\nexport function getSeriesId(series: SafeSeries): string {\n return getOptionsId(series.options);\n}\nexport function getPointId(point: SafePoint): string {\n return getOptionsId(point.options);\n}\nexport function getOptionsId(options: { id?: string; name?: string }): string {\n return options.id ?? options.name ?? noIdPlaceholder();\n}\nfunction noIdPlaceholder(): string {\n const rand = (Math.random() * 1_000_000).toFixed(0).padStart(6, \"0\");\n return \"awsui-no-id-placeholder-\" + rand;\n}\n\n// There are more possible values that series.stacking can take, but we only explicitly support \"normal\".\nexport function isSeriesStacked(series: SafeSeries) {\n return (series.options as any).stacking === \"normal\";\n}\n\n// The threshold series are custom series, implemented as a combination of line series, and plot lines.\n// As Highcharts does not support custom series declaration, we annotate threshold series by using the\n// series.custom property. This is then used in our utilities to recognize threshold series, and retrieve\n// the associated threshold value.\ninterface ThresholdOptions<T extends \"x-threshold\" | \"y-threshold\"> {\n custom: {\n awsui: {\n type: T;\n threshold: number;\n };\n };\n}\nexport function createThresholdMetadata<T extends \"x-threshold\" | \"y-threshold\">(\n type: T,\n value: number,\n): ThresholdOptions<T> {\n return { custom: { awsui: { type, threshold: value } } };\n}\nexport function isXThreshold(s: SafeSeries): s is SafeSeries & { options: ThresholdOptions<\"x-threshold\"> } {\n return typeof s.options.custom === \"object\" && s.options.custom.awsui?.type === \"x-threshold\";\n}\nexport function isYThreshold(s: SafeSeries): s is SafeSeries & { options: ThresholdOptions<\"y-threshold\"> } {\n return typeof s.options.custom === \"object\" && s.options.custom.awsui?.type === \"y-threshold\";\n}\n\n// We extend bubble series by introducing sizeAxis - which is used to define title and formatter for bubble series size values.\n// In case there are multiple such axes - the bubble series can target a specific one by setting sizeAxis to the respective size\n// axis id. As there is no such prop in Highcharts series type - we pass it using the custom options object.\nexport interface BubbleOptions {\n custom: {\n awsui: {\n sizeAxis?: string;\n };\n };\n}\nexport function createBubbleMetadata(options: { sizeAxis?: string }): BubbleOptions {\n return { custom: { awsui: options } };\n}\nexport function getBubbleSeriesSizeAxis(series: SafeSeries): undefined | string {\n const { custom } = series.options as Highcharts.SeriesOptionsType & BubbleOptions;\n return custom?.awsui?.sizeAxis;\n}\n\nexport function getPointMarkerType(point?: SafePoint): ChartSeriesMarkerType {\n const pointZone = point && getPointZone(point);\n return getSeriesMarkerType(point?.series, pointZone?.dashStyle);\n}\n\nexport function getSeriesMarkerType(series?: SafeSeries, dashStyle?: Highcharts.DashStyleValue): ChartSeriesMarkerType {\n if (!series) {\n return \"large-square\";\n }\n const seriesSymbol = \"symbol\" in series && typeof series.symbol === \"string\" ? series.symbol : \"circle\";\n // In Highcharts, dashStyle supports different types of dashes: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/\n // Return a dashed legend symbol for all of these dashes, excluding the default \"Solid\" option\n if (\n (dashStyle && dashStyle !== \"Solid\") ||\n (\"dashStyle\" in series.options && series.options.dashStyle && series.options.dashStyle !== \"Solid\")\n ) {\n return \"dashed\";\n }\n switch (series.type) {\n case \"area\":\n case \"areaspline\":\n return \"hollow-square\";\n case \"line\":\n case \"spline\":\n return \"line\";\n case \"scatter\":\n switch (seriesSymbol) {\n case \"square\":\n return \"square\";\n case \"diamond\":\n return \"diamond\";\n case \"triangle\":\n return \"triangle\";\n case \"triangle-down\":\n return \"triangle-down\";\n case \"circle\":\n default:\n return \"circle\";\n }\n case \"column\":\n case \"pie\":\n return \"large-square\";\n case \"bubble\":\n return \"circle\";\n case \"errorbar\":\n default:\n return \"large-square\";\n }\n}\n\n// Highcharts supports color objects to represent gradients and more, but we only support string\n// colors in our markers. In case a non-string color is defined, we use black color as as fallback.\nexport function getSeriesColor(series?: SafeSeries): string {\n return typeof series?.color === \"string\" ? series.color : \"black\";\n}\nexport function getPointColor(point?: SafePoint): string {\n const pointZone = point && getPointZone(point);\n const zoneColor = typeof pointZone?.color === \"string\" ? pointZone.color : undefined;\n const pointColor = typeof point?.color === \"string\" ? point.color : undefined;\n return zoneColor ?? pointColor ?? \"black\";\n}\n\n// The custom legend implementation does not rely on the Highcharts legend. When Highcharts legend is disabled,\n// the chart object does not include information on legend items. Instead, we collect series and pie segments\n// using this custom function, respecting Highcharts' showInLegend flag (defined for series only).\n\n// There exists a Highcharts APIs to access legend items, but it is unfortunately not available, when\n// Highcharts legend is disabled. Instead, we use this custom method to collect legend items from the chart.\nexport function getChartLegendItems({\n chart,\n getItemOptions = () => ({}),\n itemMarkerStatusAriaLabel,\n}: {\n chart: SafeChart;\n getItemOptions?: CoreChartProps.GetItemOptions;\n itemMarkerStatusAriaLabel?: ChartLabels[\"itemMarkerLabel\"];\n}): readonly LegendItemSpec[] {\n const legendItems: LegendItemSpec[] = [];\n const isInverted = chart.inverted ?? false;\n const addSeriesItem = (series: SafeSeries, isSecondary: boolean) => {\n // The pie series is not shown in the legend. Instead, we show pie segments.\n if (series.type === \"pie\") {\n return;\n }\n // We only support errorbar series that are linked to other series. Those are not represented separately\n // in the legend, but can be controlled from the outside, using controllable items visibility API.\n if (series.type === \"errorbar\") {\n return;\n }\n // We respect Highcharts showInLegend option to allow hiding certain series from the legend.\n // The same is not supported for pie chart segments.\n if (series.options.showInLegend !== false) {\n const seriesId = getSeriesId(series);\n const itemProps = getItemOptions(seriesId);\n const status = itemProps.status;\n legendItems.push({\n id: seriesId,\n name: series.name,\n markerType: getSeriesMarkerType(series),\n color: getSeriesColor(series),\n visible: series.visible,\n isSecondary,\n status: status,\n markerAriaLabel: itemMarkerStatusAriaLabel?.(status),\n });\n }\n };\n const addPointItem = (point: SafePoint, isSecondary: boolean) => {\n if (point?.series?.type === \"pie\") {\n const pointId = getPointId(point);\n legendItems.push({\n id: pointId,\n name: point.name,\n markerType: getSeriesMarkerType(point.series),\n color: getPointColor(point),\n visible: point.visible,\n status: getItemOptions(pointId).status,\n isSecondary,\n });\n }\n };\n for (const s of getChartSeries(chart)) {\n const valueAxis = isInverted ? s.xAxis : s.yAxis;\n const isSecondary = valueAxis?.options?.opposite ?? false;\n addSeriesItem(s, isSecondary);\n getSeriesData(s, { includeHiddenPoints: true }).forEach((p) => addPointItem(p, isSecondary));\n }\n return legendItems;\n}\n\nexport type LegendItemOptions = Highcharts.SeriesOptionsType | Highcharts.PointOptionsType;\n\nexport function getVisibleLegendItems(options: Highcharts.Options) {\n const isInverted = options.chart?.inverted ?? false;\n const valueAxes = (isInverted ? castArray(options.xAxis) : castArray(options.yAxis)) ?? [];\n const defaultOpposite = valueAxes.length > 0 ? (valueAxes[0].opposite ?? false) : false;\n\n const primaryAxis = valueAxes.find((a) => !(a.opposite ?? false));\n const secondaryAxis = valueAxes.find((a) => a.opposite === true);\n\n const primaryItems: LegendItemOptions[] = [];\n const secondaryItems: LegendItemOptions[] = [];\n const addLegendItem = (item: LegendItemOptions) => {\n if (isSecondaryLegendItem(item, isInverted, defaultOpposite, valueAxes)) {\n secondaryItems.push(item);\n } else {\n primaryItems.push(item);\n }\n };\n\n options.series?.forEach((series) => {\n if (!(\"type\" in series)) {\n return;\n }\n\n // The pie series is not shown in the legend. Instead, we show pie segments (points).\n if (series.type === \"pie\") {\n if (Array.isArray(series.data)) {\n series.data.forEach((point) => addLegendItem(point));\n }\n return;\n }\n // We only support errorbar series that are linked to other series. Those are not represented separately\n // in the legend, but can be controlled from the outside, using controllable items visibility API.\n if (series.type === \"errorbar\") {\n return;\n }\n if (series.showInLegend !== false) {\n addLegendItem(series);\n }\n });\n\n return { primaryItems, secondaryItems, primaryAxisId: primaryAxis?.id, secondaryAxisId: secondaryAxis?.id };\n}\n\nfunction isSecondaryLegendItem(\n item: LegendItemOptions,\n isInverted: boolean,\n defaultOpposite: boolean,\n valueAxes: Array<{ id?: string; opposite?: boolean }>,\n): boolean {\n // Only items that have an associated axis can be considered secondary\n if (item && typeof item === \"object\" && (\"xAxis\" in item || \"yAxis\" in item)) {\n const axisRef = isInverted ? (item.xAxis ?? 0) : (item.yAxis ?? 0);\n // An axis reference can be an index into the axes array or an explicitly passed id\n const valueAxis = typeof axisRef === \"number\" ? valueAxes[axisRef] : valueAxes.find((a) => a.id === axisRef);\n return valueAxis?.opposite ?? false;\n }\n return defaultOpposite;\n}\n\nexport function getLegendsProps(\n options: CoreChartProps.ChartOptions,\n legendOptions: CoreChartProps.LegendOptions | undefined,\n) {\n // While Highcharts supports more than two axes, this\n // implementation supports at most two, in which case one\n // of them must be set as opposite (secondary).\n const { primaryItems, secondaryItems, primaryAxisId, secondaryAxisId } = getVisibleLegendItems(options);\n return {\n primary:\n primaryItems.length === 0\n ? undefined\n : ({\n isSecondary: false,\n axisId: primaryAxisId,\n title: legendOptions?.title,\n actions: legendOptions?.actions,\n alignment: legendOptions?.position === \"side\" ? \"vertical\" : \"horizontal\",\n horizontalAlignment: secondaryItems.length === 0 ? legendOptions?.horizontalAlignment : \"start\",\n enableHorizontalScroll: legendOptions?.enableHorizontalScroll,\n } as const),\n secondary:\n secondaryItems.length === 0\n ? undefined\n : ({\n isSecondary: true,\n axisId: secondaryAxisId,\n title: legendOptions?.secondaryLegendTitle,\n actions: legendOptions?.secondaryLegendActions,\n alignment: legendOptions?.position === \"side\" ? \"vertical\" : \"horizontal\",\n horizontalAlignment: \"end\",\n enableHorizontalScroll: legendOptions?.enableHorizontalScroll,\n } as const),\n };\n}\n\n// This function returns coordinates of a rectangle, including the target point.\n// There are differences in how the rectangle is computed, but in all cases it is supposed to\n// enclose the point's visual representation in the chart, with no extra offsets.\nexport function getPointRect(point: SafePoint): Rect {\n if (!point.series) {\n return { x: 0, y: 0, width: 0, height: 0 };\n }\n\n switch (point.series.type) {\n case \"column\":\n return getColumnPointRect(point);\n case \"errorbar\":\n return getErrorBarPointRect(point);\n default:\n return getDefaultPointRect(point);\n }\n}\n\n// The group rect is only used for cartesian charts. It returns coordinates of a rectangle,\n// which includes all given points, but also stretched vertically or horizontally (in inverted charts)\n// to the entire chart's height or width.\nexport function getGroupRect(points: readonly SafePoint[]): Rect {\n if (points.length === 0 || !points[0].series) {\n return { x: 0, y: 0, width: 0, height: 0 };\n }\n const chart = points[0].series.chart;\n const rects = points.map(getPointRect);\n const [first, ...rest] = rects;\n let minX = first.x,\n minY = first.y,\n maxX = first.x + first.width,\n maxY = first.y + first.height;\n for (const r of rest) {\n minX = Math.min(minX, r.x);\n minY = Math.min(minY, r.y);\n maxX = Math.max(maxX, r.x + r.width);\n maxY = Math.max(maxY, r.y + r.height);\n }\n return safeRect(\n chart.inverted\n ? { x: chart.plotLeft, y: minY, width: chart.plotWidth, height: maxY - minY }\n : { x: minX, y: chart.plotTop, width: maxX - minX, height: chart.plotHeight },\n );\n}\n\n// We ensure rect width and height are non-zero to ensure its position is calculated correctly in Firefox.\nexport function safeRect(rect: Rect): Rect {\n return { ...rect, width: Math.max(0.1, rect.width), height: Math.max(0.1, rect.height) };\n}\n\nexport function getChartAccessibleDescription(chart: SafeChart) {\n return chart.options.lang?.accessibility?.chartContainerLabel ?? \"\";\n}\n\nexport function matchSizeAxis(sizeAxis: readonly CoreChartProps.SizeAxisOptions[], series: SafeSeries) {\n return sizeAxis.find((a) => a.id === getBubbleSeriesSizeAxis(series)) ?? sizeAxis[0];\n}\n\nexport function getPointAccessibleDescription(\n point: SafePoint,\n labels: ChartLabels,\n additionalProps?: {\n sizeAxis?: readonly CoreChartProps.SizeAxisOptions[];\n },\n) {\n if (point.series.xAxis && point.series.yAxis) {\n const formattedX = getFormatter(point.series.xAxis)(point.x);\n const formattedY = getFormatter(point.series.yAxis)(point.y);\n let formattedSize = \"\";\n if (additionalProps?.sizeAxis && point.series.type === \"bubble\") {\n const matchedSizeAxis = matchSizeAxis(additionalProps.sizeAxis, point.series);\n const size = point.options.z ?? null;\n const sizeFormatter = getFormatter(matchedSizeAxis);\n formattedSize = sizeFormatter(size);\n }\n return `${formattedX} ${formattedY}${formattedSize ? \" \" + formattedSize : \"\"}, ${point.series.name}`;\n } else if (point.series.type === \"pie\") {\n const segmentLabel = labels.chartSegmentLabel ? `${labels.chartSegmentLabel} ` : \"\";\n return `${segmentLabel}${point.name}, ${point.y}. ${point.series.name}`;\n } else {\n return \"\";\n }\n}\n\nexport function getGroupAccessibleDescription(group: readonly SafePoint[]) {\n const firstPoint = group[0];\n return getFormatter(firstPoint.series.xAxis)(firstPoint.x);\n}\n\n// The area-, line-, or scatter series markers are rendered as single graphic elements,\n// and we can use their respective b-boxes to compute rects.\nfunction getDefaultPointRect(point: SafePoint): Rect {\n const chart = point.series.chart;\n if (point.graphic) {\n const box = point.graphic.getBBox();\n return getChartRect(box, chart, false);\n }\n return getPointRectFromCoordinates(point);\n}\n\n// The column series graphic elements are rectangles, and they are inverted if the chart is inverted,\n// so that rect's width becomes height and vice-versa.\nfunction getColumnPointRect(point: SafePoint): Rect {\n const chart = point.series.chart;\n if (point.graphic) {\n return getChartRect(point.graphic.getBBox(), chart, true);\n }\n return getPointRectFromCoordinates(point);\n}\n\n// The errorbar series point rect cannot be computed from the respective graphic element (it gives wrong position).\n// Instead, we have to rely on the internal \"whiskers\" element b-box, which can be inverted, too.\nfunction getErrorBarPointRect(point: SafePoint): Rect {\n const chart = point.series.chart;\n if (\"whiskers\" in point) {\n return getChartRect((point.whiskers as Highcharts.SVGElement).getBBox(), chart, true);\n }\n return getPointRectFromCoordinates(point);\n}\n\n// The point graphic is not present in large charts to optimize performance.\n// In that case we compute point rects from their coordinates. We also assume the point\n// size is small, and thereby give it 0 width and height, which is alright as there is a\n// small offset that we use for focus outline anyways.\n// See: https://www.highcharts.com/blog/news/175-highcharts-performance-boost/\nfunction getPointRectFromCoordinates(point: SafePoint) {\n const chart = point.series.chart;\n const plotX = point.plotX ?? 0;\n const plotY = point.plotY ?? 0;\n return getChartRect({ x: plotX, y: plotY, width: 0, height: 0 }, chart, true);\n}\n\nfunction getChartRect(rect: Rect, chart: SafeChart, canBeInverted: boolean): Rect {\n return canBeInverted && chart.inverted\n ? {\n x: chart.plotWidth + chart.plotLeft - (rect.y + rect.height),\n y: chart.plotHeight + chart.plotTop - (rect.x + rect.width),\n width: rect.height,\n height: rect.width,\n }\n : {\n x: chart.plotLeft + rect.x,\n y: chart.plotTop + rect.y,\n width: rect.width,\n height: rect.height,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/core/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAMtC,OAAO,EACL,cAAc,EACd,YAAY,EACZ,aAAa,GAId,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAe5C,yHAAyH;AACzH,6HAA6H;AAC7H,gFAAgF;AAChF,MAAM,UAAU,WAAW,CAAC,MAAkB;IAC5C,OAAO,YAAY,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACtC,CAAC;AACD,MAAM,UAAU,UAAU,CAAC,KAAgB;IACzC,OAAO,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AACD,MAAM,UAAU,YAAY,CAAC,OAAuC;;IAClE,OAAO,MAAA,MAAA,OAAO,C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Aa,IAAI,KAAK,CAAC,QAAQ;QACpC,CAAC,CAAC;YACE,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;YAC5D,CAAC,EAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;YAC3D,KAAK,EAAE,IAAI,CAAC,MAAM;YAClB,MAAM,EAAE,IAAI,CAAC,KAAK;SACnB;QACH,CAAC,CAAC;YACE,CAAC,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;YAC1B,CAAC,EAAE,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;YACzB,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC;AACR,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport type Highcharts from \"highcharts\";\n\nimport { ChartSeriesMarkerType } from \"../internal/components/series-marker\";\nimport { ChartSeriesMarkerStatus } from \"../internal/components/series-marker/interfaces\";\nimport {\n getChartSeries,\n getPointZone,\n getSeriesData,\n SafeChart,\n SafePoint,\n SafeSeries,\n} from \"../internal/utils/highcharts\";\nimport { castArray } from \"../internal/utils/utils\";\nimport { getFormatter } from \"./formatters\";\nimport { ChartLabels } from \"./i18n-utils\";\nimport { CoreChartProps, Rect } from \"./interfaces\";\n\nexport interface LegendItemSpec {\n id: string;\n name: string;\n markerType: ChartSeriesMarkerType;\n color: string;\n visible: boolean;\n isSecondary: boolean;\n status?: ChartSeriesMarkerStatus;\n markerAriaLabel?: string;\n}\n\n// The below functions extract unique identifier from series, point, or options. The identifier can be item's ID or name.\n// We expect that items requiring referencing (e.g. in order to control their visibility) have the unique identifier defined.\n// Otherwise, we return a randomized id that is to ensure no accidental matches.\nexport function getSeriesId(series: SafeSeries): string {\n return getOptionsId(series.options);\n}\nexport function getPointId(point: SafePoint): string {\n return getOptionsId(point.options);\n}\nexport function getOptionsId(options: { id?: string; name?: string }): string {\n return options.id ?? options.name ?? noIdPlaceholder();\n}\nfunction noIdPlaceholder(): string {\n const rand = (Math.random() * 1_000_000).toFixed(0).padStart(6, \"0\");\n return \"awsui-no-id-placeholder-\" + rand;\n}\n\n// There are more possible values that series.stacking can take, but we only explicitly support \"normal\".\nexport function isSeriesStacked(series: SafeSeries) {\n return (series.options as any).stacking === \"normal\";\n}\n\n// The threshold series are custom series, implemented as a combination of line series, and plot lines.\n// As Highcharts does not support custom series declaration, we annotate threshold series by using the\n// series.custom property. This is then used in our utilities to recognize threshold series, and retrieve\n// the associated threshold value.\ninterface ThresholdOptions<T extends \"x-threshold\" | \"y-threshold\"> {\n custom: {\n awsui: {\n type: T;\n threshold: number;\n };\n };\n}\nexport function createThresholdMetadata<T extends \"x-threshold\" | \"y-threshold\">(\n type: T,\n value: number,\n): ThresholdOptions<T> {\n return { custom: { awsui: { type, threshold: value } } };\n}\nexport function isXThreshold(s: SafeSeries): s is SafeSeries & { options: ThresholdOptions<\"x-threshold\"> } {\n return typeof s.options.custom === \"object\" && s.options.custom.awsui?.type === \"x-threshold\";\n}\nexport function isYThreshold(s: SafeSeries): s is SafeSeries & { options: ThresholdOptions<\"y-threshold\"> } {\n return typeof s.options.custom === \"object\" && s.options.custom.awsui?.type === \"y-threshold\";\n}\n\n// We extend bubble series by introducing sizeAxis - which is used to define title and formatter for bubble series size values.\n// In case there are multiple such axes - the bubble series can target a specific one by setting sizeAxis to the respective size\n// axis id. As there is no such prop in Highcharts series type - we pass it using the custom options object.\nexport interface BubbleOptions {\n custom: {\n awsui: {\n sizeAxis?: string;\n };\n };\n}\nexport function createBubbleMetadata(options: { sizeAxis?: string }): BubbleOptions {\n return { custom: { awsui: options } };\n}\nexport function getBubbleSeriesSizeAxis(series: SafeSeries): undefined | string {\n const { custom } = series.options as Highcharts.SeriesOptionsType & BubbleOptions;\n return custom?.awsui?.sizeAxis;\n}\n\nexport function getPointMarkerType(point?: SafePoint): ChartSeriesMarkerType {\n const pointZone = point && getPointZone(point);\n return getSeriesMarkerType(point?.series, pointZone?.dashStyle);\n}\n\nexport function getSeriesMarkerType(series?: SafeSeries, dashStyle?: Highcharts.DashStyleValue): ChartSeriesMarkerType {\n if (!series) {\n return \"large-square\";\n }\n const seriesSymbol = \"symbol\" in series && typeof series.symbol === \"string\" ? series.symbol : \"circle\";\n // In Highcharts, dashStyle supports different types of dashes: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-dashstyle-all/\n // Return a dashed legend symbol for all of these dashes, excluding the default \"Solid\" option\n if (\n (dashStyle && dashStyle !== \"Solid\") ||\n (\"dashStyle\" in series.options && series.options.dashStyle && series.options.dashStyle !== \"Solid\")\n ) {\n return \"dashed\";\n }\n switch (series.type) {\n case \"area\":\n case \"areaspline\":\n return \"hollow-square\";\n case \"line\":\n case \"spline\":\n return \"line\";\n case \"scatter\":\n switch (seriesSymbol) {\n case \"square\":\n return \"square\";\n case \"diamond\":\n return \"diamond\";\n case \"triangle\":\n return \"triangle\";\n case \"triangle-down\":\n return \"triangle-down\";\n case \"circle\":\n default:\n return \"circle\";\n }\n case \"column\":\n case \"pie\":\n return \"large-square\";\n case \"bubble\":\n return \"circle\";\n case \"errorbar\":\n default:\n return \"large-square\";\n }\n}\n\n// Highcharts supports color objects to represent gradients and more, but we only support string\n// colors in our markers. In case a non-string color is defined, we use black color as as fallback.\nexport function getSeriesColor(series?: SafeSeries): string {\n return typeof series?.color === \"string\" ? series.color : \"black\";\n}\nexport function getPointColor(point?: SafePoint): string {\n const pointZone = point && getPointZone(point);\n const zoneColor = typeof pointZone?.color === \"string\" ? pointZone.color : undefined;\n const pointColor = typeof point?.color === \"string\" ? point.color : undefined;\n return zoneColor ?? pointColor ?? \"black\";\n}\n\n// The custom legend implementation does not rely on the Highcharts legend. When Highcharts legend is disabled,\n// the chart object does not include information on legend items. Instead, we collect series and pie segments\n// using this custom function, respecting Highcharts' showInLegend flag (defined for series only).\n\n// There exists a Highcharts APIs to access legend items, but it is unfortunately not available, when\n// Highcharts legend is disabled. Instead, we use this custom method to collect legend items from the chart.\nexport function getChartLegendItems({\n chart,\n getItemOptions = () => ({}),\n itemMarkerStatusAriaLabel,\n}: {\n chart: SafeChart;\n getItemOptions?: CoreChartProps.GetItemOptions;\n itemMarkerStatusAriaLabel?: ChartLabels[\"itemMarkerLabel\"];\n}): readonly LegendItemSpec[] {\n const legendItems: LegendItemSpec[] = [];\n const isInverted = chart.inverted ?? false;\n const addSeriesItem = (series: SafeSeries, isSecondary: boolean) => {\n // The pie series is not shown in the legend. Instead, we show pie segments.\n if (series.type === \"pie\") {\n return;\n }\n // We only support errorbar series that are linked to other series. Those are not represented separately\n // in the legend, but can be controlled from the outside, using controllable items visibility API.\n if (series.type === \"errorbar\") {\n return;\n }\n // We respect Highcharts showInLegend option to allow hiding certain series from the legend.\n // The same is not supported for pie chart segments.\n if (series.options.showInLegend !== false) {\n const seriesId = getSeriesId(series);\n const itemProps = getItemOptions(seriesId);\n const status = itemProps.status;\n legendItems.push({\n id: seriesId,\n name: series.name,\n markerType: getSeriesMarkerType(series),\n color: getSeriesColor(series),\n visible: series.visible,\n isSecondary,\n status: status,\n markerAriaLabel: itemMarkerStatusAriaLabel?.(status),\n });\n }\n };\n const addPointItem = (point: SafePoint, isSecondary: boolean) => {\n if (point?.series?.type === \"pie\") {\n const pointId = getPointId(point);\n legendItems.push({\n id: pointId,\n name: point.name,\n markerType: getSeriesMarkerType(point.series),\n color: getPointColor(point),\n visible: point.visible,\n status: getItemOptions(pointId).status,\n isSecondary,\n });\n }\n };\n for (const s of getChartSeries(chart)) {\n const valueAxis = isInverted ? s.xAxis : s.yAxis;\n const isSecondary = valueAxis?.options?.opposite ?? false;\n addSeriesItem(s, isSecondary);\n getSeriesData(s, { includeHiddenPoints: true }).forEach((p) => addPointItem(p, isSecondary));\n }\n return legendItems;\n}\n\nexport type LegendItemOptions = Highcharts.SeriesOptionsType | Highcharts.PointOptionsType;\n\nexport function getVisibleLegendItems(options: Highcharts.Options) {\n // Highcharts implicitly inverts the chart when its type or any series type is \"bar\", even if chart.inverted is unset.\n const isInverted =\n options.chart?.inverted === true ||\n options.chart?.type === \"bar\" ||\n options.series?.some((series) => \"type\" in series && series.type === \"bar\") === true;\n\n const valueAxes = (isInverted ? castArray(options.xAxis) : castArray(options.yAxis)) ?? [];\n const defaultOpposite = valueAxes.length > 0 ? (valueAxes[0].opposite ?? false) : false;\n\n const primaryAxis = valueAxes.find((a) => !(a.opposite ?? false));\n const secondaryAxis = valueAxes.find((a) => a.opposite === true);\n\n const primaryItems: LegendItemOptions[] = [];\n const secondaryItems: LegendItemOptions[] = [];\n const addLegendItem = (item: LegendItemOptions) => {\n if (isSecondaryLegendItem(item, isInverted, defaultOpposite, valueAxes)) {\n secondaryItems.push(item);\n } else {\n primaryItems.push(item);\n }\n };\n\n options.series?.forEach((series) => {\n if (!(\"type\" in series)) {\n return;\n }\n\n // The pie series is not shown in the legend. Instead, we show pie segments (points).\n if (series.type === \"pie\") {\n if (Array.isArray(series.data)) {\n series.data.forEach((point) => addLegendItem(point));\n }\n return;\n }\n // We only support errorbar series that are linked to other series. Those are not represented separately\n // in the legend, but can be controlled from the outside, using controllable items visibility API.\n if (series.type === \"errorbar\") {\n return;\n }\n if (series.showInLegend !== false) {\n addLegendItem(series);\n }\n });\n\n return { primaryItems, secondaryItems, primaryAxisId: primaryAxis?.id, secondaryAxisId: secondaryAxis?.id };\n}\n\nfunction isSecondaryLegendItem(\n item: LegendItemOptions,\n isInverted: boolean,\n defaultOpposite: boolean,\n valueAxes: Array<{ id?: string; opposite?: boolean }>,\n): boolean {\n // Only items that have an associated axis can be considered secondary\n if (item && typeof item === \"object\" && (\"xAxis\" in item || \"yAxis\" in item)) {\n const axisRef = isInverted ? (item.xAxis ?? 0) : (item.yAxis ?? 0);\n // An axis reference can be an index into the axes array or an explicitly passed id\n const valueAxis = typeof axisRef === \"number\" ? valueAxes[axisRef] : valueAxes.find((a) => a.id === axisRef);\n return valueAxis?.opposite ?? false;\n }\n return defaultOpposite;\n}\n\nexport function getLegendsProps(\n options: CoreChartProps.ChartOptions,\n legendOptions: CoreChartProps.LegendOptions | undefined,\n) {\n // While Highcharts supports more than two axes, this\n // implementation supports at most two, in which case one\n // of them must be set as opposite (secondary).\n const { primaryItems, secondaryItems, primaryAxisId, secondaryAxisId } = getVisibleLegendItems(options);\n return {\n primary:\n primaryItems.length === 0\n ? undefined\n : ({\n isSecondary: false,\n axisId: primaryAxisId,\n title: legendOptions?.title,\n actions: legendOptions?.actions,\n alignment: legendOptions?.position === \"side\" ? \"vertical\" : \"horizontal\",\n horizontalAlignment: secondaryItems.length === 0 ? legendOptions?.horizontalAlignment : \"start\",\n enableHorizontalScroll: legendOptions?.enableHorizontalScroll,\n } as const),\n secondary:\n secondaryItems.length === 0\n ? undefined\n : ({\n isSecondary: true,\n axisId: secondaryAxisId,\n title: legendOptions?.secondaryLegendTitle,\n actions: legendOptions?.secondaryLegendActions,\n alignment: legendOptions?.position === \"side\" ? \"vertical\" : \"horizontal\",\n horizontalAlignment: \"end\",\n enableHorizontalScroll: legendOptions?.enableHorizontalScroll,\n } as const),\n };\n}\n\n// This function returns coordinates of a rectangle, including the target point.\n// There are differences in how the rectangle is computed, but in all cases it is supposed to\n// enclose the point's visual representation in the chart, with no extra offsets.\nexport function getPointRect(point: SafePoint): Rect {\n if (!point.series) {\n return { x: 0, y: 0, width: 0, height: 0 };\n }\n\n switch (point.series.type) {\n case \"column\":\n return getColumnPointRect(point);\n case \"errorbar\":\n return getErrorBarPointRect(point);\n default:\n return getDefaultPointRect(point);\n }\n}\n\n// The group rect is only used for cartesian charts. It returns coordinates of a rectangle,\n// which includes all given points, but also stretched vertically or horizontally (in inverted charts)\n// to the entire chart's height or width.\nexport function getGroupRect(points: readonly SafePoint[]): Rect {\n if (points.length === 0 || !points[0].series) {\n return { x: 0, y: 0, width: 0, height: 0 };\n }\n const chart = points[0].series.chart;\n const rects = points.map(getPointRect);\n const [first, ...rest] = rects;\n let minX = first.x,\n minY = first.y,\n maxX = first.x + first.width,\n maxY = first.y + first.height;\n for (const r of rest) {\n minX = Math.min(minX, r.x);\n minY = Math.min(minY, r.y);\n maxX = Math.max(maxX, r.x + r.width);\n maxY = Math.max(maxY, r.y + r.height);\n }\n return safeRect(\n chart.inverted\n ? { x: chart.plotLeft, y: minY, width: chart.plotWidth, height: maxY - minY }\n : { x: minX, y: chart.plotTop, width: maxX - minX, height: chart.plotHeight },\n );\n}\n\n// We ensure rect width and height are non-zero to ensure its position is calculated correctly in Firefox.\nexport function safeRect(rect: Rect): Rect {\n return { ...rect, width: Math.max(0.1, rect.width), height: Math.max(0.1, rect.height) };\n}\n\nexport function getChartAccessibleDescription(chart: SafeChart) {\n return chart.options.lang?.accessibility?.chartContainerLabel ?? \"\";\n}\n\nexport function matchSizeAxis(sizeAxis: readonly CoreChartProps.SizeAxisOptions[], series: SafeSeries) {\n return sizeAxis.find((a) => a.id === getBubbleSeriesSizeAxis(series)) ?? sizeAxis[0];\n}\n\nexport function getPointAccessibleDescription(\n point: SafePoint,\n labels: ChartLabels,\n additionalProps?: {\n sizeAxis?: readonly CoreChartProps.SizeAxisOptions[];\n },\n) {\n if (point.series.xAxis && point.series.yAxis) {\n const formattedX = getFormatter(point.series.xAxis)(point.x);\n const formattedY = getFormatter(point.series.yAxis)(point.y);\n let formattedSize = \"\";\n if (additionalProps?.sizeAxis && point.series.type === \"bubble\") {\n const matchedSizeAxis = matchSizeAxis(additionalProps.sizeAxis, point.series);\n const size = point.options.z ?? null;\n const sizeFormatter = getFormatter(matchedSizeAxis);\n formattedSize = sizeFormatter(size);\n }\n return `${formattedX} ${formattedY}${formattedSize ? \" \" + formattedSize : \"\"}, ${point.series.name}`;\n } else if (point.series.type === \"pie\") {\n const segmentLabel = labels.chartSegmentLabel ? `${labels.chartSegmentLabel} ` : \"\";\n return `${segmentLabel}${point.name}, ${point.y}. ${point.series.name}`;\n } else {\n return \"\";\n }\n}\n\nexport function getGroupAccessibleDescription(group: readonly SafePoint[]) {\n const firstPoint = group[0];\n return getFormatter(firstPoint.series.xAxis)(firstPoint.x);\n}\n\n// The area-, line-, or scatter series markers are rendered as single graphic elements,\n// and we can use their respective b-boxes to compute rects.\nfunction getDefaultPointRect(point: SafePoint): Rect {\n const chart = point.series.chart;\n if (point.graphic) {\n const box = point.graphic.getBBox();\n return getChartRect(box, chart, false);\n }\n return getPointRectFromCoordinates(point);\n}\n\n// The column series graphic elements are rectangles, and they are inverted if the chart is inverted,\n// so that rect's width becomes height and vice-versa.\nfunction getColumnPointRect(point: SafePoint): Rect {\n const chart = point.series.chart;\n if (point.graphic) {\n return getChartRect(point.graphic.getBBox(), chart, true);\n }\n return getPointRectFromCoordinates(point);\n}\n\n// The errorbar series point rect cannot be computed from the respective graphic element (it gives wrong position).\n// Instead, we have to rely on the internal \"whiskers\" element b-box, which can be inverted, too.\nfunction getErrorBarPointRect(point: SafePoint): Rect {\n const chart = point.series.chart;\n if (\"whiskers\" in point) {\n return getChartRect((point.whiskers as Highcharts.SVGElement).getBBox(), chart, true);\n }\n return getPointRectFromCoordinates(point);\n}\n\n// The point graphic is not present in large charts to optimize performance.\n// In that case we compute point rects from their coordinates. We also assume the point\n// size is small, and thereby give it 0 width and height, which is alright as there is a\n// small offset that we use for focus outline anyways.\n// See: https://www.highcharts.com/blog/news/175-highcharts-performance-boost/\nfunction getPointRectFromCoordinates(point: SafePoint) {\n const chart = point.series.chart;\n const plotX = point.plotX ?? 0;\n const plotY = point.plotY ?? 0;\n return getChartRect({ x: plotX, y: plotY, width: 0, height: 0 }, chart, true);\n}\n\nfunction getChartRect(rect: Rect, chart: SafeChart, canBeInverted: boolean): Rect {\n return canBeInverted && chart.inverted\n ? {\n x: chart.plotWidth + chart.plotLeft - (rect.y + rect.height),\n y: chart.plotHeight + chart.plotTop - (rect.x + rect.width),\n width: rect.height,\n height: rect.width,\n }\n : {\n x: chart.plotLeft + rect.x,\n y: chart.plotTop + rect.y,\n width: rect.width,\n height: rect.height,\n };\n}\n"]}
|
package/internal/environment.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export var PACKAGE_SOURCE = "chart-components";
|
|
2
|
-
export var PACKAGE_VERSION = "1.0.0 (
|
|
2
|
+
export var PACKAGE_VERSION = "1.0.0 (28ef5485)";
|
|
3
3
|
export var THEME = "open-source-visual-refresh";
|
|
4
4
|
export var ALWAYS_VISUAL_REFRESH = true;
|
|
5
5
|
export var SYSTEM = "core";
|
|
@@ -16767,6 +16767,7 @@ module.exports.preset = {
|
|
|
16767
16767
|
"colorBackgroundLayoutAiDrawer",
|
|
16768
16768
|
"colorBackgroundBackdrop",
|
|
16769
16769
|
"colorBackgroundLayoutPanel",
|
|
16770
|
+
"colorBackgroundLayoutPanelContent",
|
|
16770
16771
|
"colorBackgroundLayoutToolbar",
|
|
16771
16772
|
"colorBackgroundLayoutToggleActive",
|
|
16772
16773
|
"colorBackgroundLayoutToggleDefault",
|
|
@@ -17334,6 +17335,7 @@ module.exports.preset = {
|
|
|
17334
17335
|
"colorBackgroundLayoutMain",
|
|
17335
17336
|
"colorBackgroundBackdrop",
|
|
17336
17337
|
"colorBackgroundLayoutPanel",
|
|
17338
|
+
"colorBackgroundLayoutPanelContent",
|
|
17337
17339
|
"colorBackgroundLayoutToolbar",
|
|
17338
17340
|
"colorBackgroundLayoutToggleActive",
|
|
17339
17341
|
"colorBackgroundLayoutToggleDefault",
|
|
@@ -122,6 +122,7 @@ export declare interface TypedOverride {
|
|
|
122
122
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
123
123
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
124
124
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
125
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
125
126
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
126
127
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
127
128
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -600,6 +601,7 @@ export declare interface TypedOverride {
|
|
|
600
601
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
601
602
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
602
603
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
604
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
603
605
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
604
606
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
605
607
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1078,6 +1080,7 @@ export declare interface TypedOverride {
|
|
|
1078
1080
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1079
1081
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1080
1082
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1083
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1081
1084
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1082
1085
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1083
1086
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1556,6 +1559,7 @@ export declare interface TypedOverride {
|
|
|
1556
1559
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1557
1560
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1558
1561
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1562
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1559
1563
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1560
1564
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1561
1565
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2034,6 +2038,7 @@ export declare interface TypedOverride {
|
|
|
2034
2038
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2035
2039
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2036
2040
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2041
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2037
2042
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2038
2043
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2039
2044
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2512,6 +2517,7 @@ export declare interface TypedOverride {
|
|
|
2512
2517
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2513
2518
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2514
2519
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2520
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2515
2521
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2516
2522
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2517
2523
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2990,6 +2996,7 @@ export declare interface TypedOverride {
|
|
|
2990
2996
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2991
2997
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2992
2998
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2999
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2993
3000
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2994
3001
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2995
3002
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -3468,6 +3475,7 @@ export declare interface TypedOverride {
|
|
|
3468
3475
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3469
3476
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3470
3477
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3478
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3471
3479
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3472
3480
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3473
3481
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -3946,6 +3954,7 @@ export declare interface TypedOverride {
|
|
|
3946
3954
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3947
3955
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3948
3956
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3957
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3949
3958
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3950
3959
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3951
3960
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -122,6 +122,7 @@ export declare interface TypedOverride {
|
|
|
122
122
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
123
123
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
124
124
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
125
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
125
126
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
126
127
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
127
128
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -600,6 +601,7 @@ export declare interface TypedOverride {
|
|
|
600
601
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
601
602
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
602
603
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
604
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
603
605
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
604
606
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
605
607
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1078,6 +1080,7 @@ export declare interface TypedOverride {
|
|
|
1078
1080
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1079
1081
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1080
1082
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1083
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1081
1084
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1082
1085
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1083
1086
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -1556,6 +1559,7 @@ export declare interface TypedOverride {
|
|
|
1556
1559
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1557
1560
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1558
1561
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1562
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1559
1563
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1560
1564
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
1561
1565
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2034,6 +2038,7 @@ export declare interface TypedOverride {
|
|
|
2034
2038
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2035
2039
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2036
2040
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2041
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2037
2042
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2038
2043
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2039
2044
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2512,6 +2517,7 @@ export declare interface TypedOverride {
|
|
|
2512
2517
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2513
2518
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2514
2519
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2520
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2515
2521
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2516
2522
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2517
2523
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -2990,6 +2996,7 @@ export declare interface TypedOverride {
|
|
|
2990
2996
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2991
2997
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2992
2998
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2999
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2993
3000
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2994
3001
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
2995
3002
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -3468,6 +3475,7 @@ export declare interface TypedOverride {
|
|
|
3468
3475
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3469
3476
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3470
3477
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3478
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3471
3479
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3472
3480
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3473
3481
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -3946,6 +3954,7 @@ export declare interface TypedOverride {
|
|
|
3946
3954
|
colorBackgroundLayoutAiDrawer?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3947
3955
|
colorBackgroundBackdrop?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3948
3956
|
colorBackgroundLayoutPanel?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3957
|
+
colorBackgroundLayoutPanelContent?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3949
3958
|
colorBackgroundLayoutToolbar?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3950
3959
|
colorBackgroundLayoutToggleActive?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
3951
3960
|
colorBackgroundLayoutToggleDefault?: GlobalValue | TypedModeValueOverride<'light' | 'dark'>;
|
|
@@ -16767,6 +16767,7 @@ export var preset = {
|
|
|
16767
16767
|
"colorBackgroundLayoutAiDrawer",
|
|
16768
16768
|
"colorBackgroundBackdrop",
|
|
16769
16769
|
"colorBackgroundLayoutPanel",
|
|
16770
|
+
"colorBackgroundLayoutPanelContent",
|
|
16770
16771
|
"colorBackgroundLayoutToolbar",
|
|
16771
16772
|
"colorBackgroundLayoutToggleActive",
|
|
16772
16773
|
"colorBackgroundLayoutToggleDefault",
|
|
@@ -17334,6 +17335,7 @@ export var preset = {
|
|
|
17334
17335
|
"colorBackgroundLayoutMain",
|
|
17335
17336
|
"colorBackgroundBackdrop",
|
|
17336
17337
|
"colorBackgroundLayoutPanel",
|
|
17338
|
+
"colorBackgroundLayoutPanelContent",
|
|
17337
17339
|
"colorBackgroundLayoutToolbar",
|
|
17338
17340
|
"colorBackgroundLayoutToggleActive",
|
|
17339
17341
|
"colorBackgroundLayoutToggleDefault",
|
package/internal/manifest.json
CHANGED