@visactor/vseed 0.5.1 → 0.5.3
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/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/animation/bar.js +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/animation/bar.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/animation/lineOrArea.d.ts +4 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/radar.d.ts +4 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/index.d.ts +1 -60
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/index.js +2 -44
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/index.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/pointAtmosphere.d.ts +65 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/pointAtmosphere.js +56 -0
- package/dist/esm/pipeline/spec/chart/pipes/animation/utils/pointAtmosphere.js.map +1 -0
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js +18 -39
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadius.js.map +1 -1
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadiusUtils.d.ts +4 -0
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadiusUtils.js +50 -0
- package/dist/esm/pipeline/spec/chart/pipes/stack/stackCornerRadiusUtils.js.map +1 -0
- package/dist/esm/theme/tokenTheme.d.ts +2 -0
- package/dist/esm/theme/tokenTheme.js +2 -0
- package/dist/esm/theme/tokenTheme.js.map +1 -1
- package/dist/umd/index.js +86 -50
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme/tokenTheme.js","sources":["../../../src/theme/tokenTheme.ts"],"sourcesContent":["import tinycolor from 'tinycolor2'\nimport type { Config, CustomThemeConfig } from 'src/types'\nimport { registerAll } from '../builder/register/all'\nimport { registerCustomTheme } from '../builder/register/theme'\nimport { darkTheme } from './dark'\nimport { lightTheme } from './light'\n\nexport type TokenThemeBase = 'light' | 'dark'\n\nexport type TokenThemeDefinition = {\n baseTheme: TokenThemeBase\n fontFamily?: string\n tableHeaderFontSize?: number\n tableBodyFontSize?: number\n labelFontSize?: number\n tooltipFontSize?: number\n axisFontSize?: number\n legendFontSize?: number\n playerFontSize?: number\n colorScheme: [string, string, ...string[]]\n linearColorScheme: [string, string]\n textPrimary: string\n textSecondary: string\n borderColor: string\n surfaceColor?: string\n surfaceBackgroundColor?: string\n accentColor?: string\n positiveColor?: string\n negativeColor?: string\n tooltipBackgroundColor: string\n tooltipBorderColor?: string\n axisLabelColor?: string\n axisTitleColor?: string\n axisGridColor?: string\n axisLineColor?: string\n labelColor?: string\n labelStroke?: string\n legendLabelColor?: string\n legendPagerIconColor?: string\n legendPagerIconDisableColor?: string\n playerRailColor?: string\n playerSliderHandleColor?: string\n playerSliderHandleBorderColor?: string\n tableBorderColor?: string\n tableBodyFontColor?: string\n tableHeaderFontColor?: string\n tableHeaderBackgroundColor?: string\n tableHoverBodyBackgroundColor?: string\n tableHoverBodyInlineBackgroundColor?: string\n tableHoverHeaderBackgroundColor?: string\n tableHoverHeaderInlineBackgroundColor?: string\n tableSelectedBorderColor?: string\n tableSelectedBackgroundColor?: string\n annotationLineColor?: string\n annotationLineStyle?: 'solid' | 'dashed' | 'dotted'\n annotationLineDash?: number[]\n annotationTextColor?: string\n annotationTextBackgroundColor?: string\n annotationTextBackgroundOpacity?: number\n}\n\nexport type TokenThemeRegistry = Record<string, TokenThemeDefinition>\n\nexport type RegisterTokenThemeOptions = {\n ensureRegisterAll?: boolean\n}\n\ntype ThemeConfigMap = NonNullable<CustomThemeConfig['config']>\ntype ThemeConfigKey = keyof ThemeConfigMap\n\nconst raceChartTypes: ThemeConfigKey[] = ['raceBar', 'raceColumn', 'raceScatter', 'raceLine', 'racePie', 'raceDonut']\n\nlet hasEnsuredRegisterAll = false\n\nconst isRecord = (value: unknown): value is Record<string, unknown> => {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nconst mergeThemeNode = <T>(base: T, patch: Partial<T>): T => {\n if (!isRecord(base) || !isRecord(patch)) {\n return patch as T\n }\n\n const result: Record<string, unknown> = { ...base }\n for (const [key, patchValue] of Object.entries(patch)) {\n if (patchValue === undefined) {\n continue\n }\n\n const currentValue = result[key]\n if (Array.isArray(patchValue)) {\n result[key] = [...patchValue]\n continue\n }\n\n if (isRecord(currentValue) && isRecord(patchValue)) {\n result[key] = mergeThemeNode(currentValue, patchValue)\n continue\n }\n\n result[key] = patchValue\n }\n\n return result as T\n}\n\nconst withAlpha = (color: string, alpha: number) => tinycolor(color).setAlpha(alpha).toRgbString()\n\nconst ensureRegisterAll = (options?: RegisterTokenThemeOptions) => {\n if (options?.ensureRegisterAll === false || hasEnsuredRegisterAll) {\n return\n }\n\n registerAll()\n hasEnsuredRegisterAll = true\n}\n\nconst getAccentColor = (tokens: TokenThemeDefinition) => tokens.accentColor || tokens.colorScheme[0]\n\nconst getAxisPatch = (tokens: TokenThemeDefinition) => ({\n label: {\n labelColor: tokens.axisLabelColor || tokens.textSecondary,\n labelFontSize: tokens.axisFontSize,\n },\n title: {\n titleColor: tokens.axisTitleColor || tokens.textSecondary,\n titleFontSize: tokens.axisFontSize,\n },\n grid: {\n gridColor: tokens.axisGridColor || tokens.borderColor,\n },\n tick: {\n tickColor: tokens.axisLineColor || tokens.borderColor,\n },\n line: {\n lineColor: tokens.axisLineColor || tokens.borderColor,\n },\n})\n\nconst getPivotGridPatch = (tokens: TokenThemeDefinition) => ({\n borderColor: tokens.tableBorderColor || tokens.borderColor,\n bodyFontSize: tokens.tableBodyFontSize,\n bodyFontColor: tokens.tableBodyFontColor || tokens.textPrimary,\n headerFontSize: tokens.tableHeaderFontSize,\n headerFontColor: tokens.tableHeaderFontColor || tokens.textPrimary,\n headerBackgroundColor: tokens.tableHeaderBackgroundColor || tokens.surfaceColor || 'transparent',\n hoverHeaderBackgroundColor: tokens.tableHoverHeaderBackgroundColor || withAlpha(getAccentColor(tokens), 0.18),\n hoverHeaderInlineBackgroundColor:\n tokens.tableHoverHeaderInlineBackgroundColor || withAlpha(getAccentColor(tokens), 0.08),\n titleFontColor: tokens.textPrimary,\n titleFontSize: tokens.tableHeaderFontSize,\n chartGridColor: tokens.axisGridColor || tokens.borderColor,\n axisLabelColor: tokens.axisLabelColor || tokens.textSecondary,\n axisLabelFontSize: tokens.axisFontSize,\n})\n\nconst getPlayerPatch = (tokens: TokenThemeDefinition) => {\n const accentColor = getAccentColor(tokens)\n\n return {\n fontFamily: tokens.fontFamily,\n fontSize: tokens.playerFontSize,\n railColor: tokens.playerRailColor || tokens.borderColor,\n trackColor: accentColor,\n sliderHandleColor: tokens.playerSliderHandleColor || tokens.surfaceColor || '#ffffff',\n sliderHandleBorderColor: tokens.playerSliderHandleBorderColor || accentColor,\n startButtonColor: accentColor,\n pauseButtonColor: accentColor,\n backwardButtonColor: accentColor,\n forwardButtonColor: accentColor,\n }\n}\n\nconst getTablePatch = (tokens: TokenThemeDefinition) => {\n const accentColor = getAccentColor(tokens)\n\n return {\n borderColor: tokens.tableBorderColor || tokens.borderColor,\n bodyFontSize: tokens.tableBodyFontSize,\n bodyFontFamily: tokens.fontFamily,\n bodyFontColor: tokens.tableBodyFontColor || tokens.textPrimary,\n headerFontSize: tokens.tableHeaderFontSize,\n headerFontFamily: tokens.fontFamily,\n headerFontColor: tokens.tableHeaderFontColor || tokens.textPrimary,\n headerBackgroundColor: tokens.tableHeaderBackgroundColor || tokens.surfaceColor || 'transparent',\n hoverBodyBackgroundColor: tokens.tableHoverBodyBackgroundColor || withAlpha(accentColor, 0.18),\n hoverBodyInlineBackgroundColor: tokens.tableHoverBodyInlineBackgroundColor || withAlpha(accentColor, 0.08),\n hoverHeaderBackgroundColor: tokens.tableHoverHeaderBackgroundColor || withAlpha(accentColor, 0.18),\n hoverHeaderInlineBackgroundColor: tokens.tableHoverHeaderInlineBackgroundColor || withAlpha(accentColor, 0.08),\n selectedBorderColor: tokens.tableSelectedBorderColor || accentColor,\n selectedBackgroundColor: tokens.tableSelectedBackgroundColor || withAlpha(accentColor, 0.12),\n backgroundColor: tokens.surfaceBackgroundColor || 'transparent',\n barAxisColor: tokens.axisLineColor || tokens.borderColor,\n backgroundColorScale: {\n minColor: tokens.linearColorScheme[0],\n maxColor: tokens.linearColorScheme[1],\n },\n }\n}\n\nconst getChartPatch = (tokens: TokenThemeDefinition) => ({\n backgroundColor: 'transparent',\n fontFamily: tokens.fontFamily,\n color: {\n colorScheme: [...tokens.colorScheme],\n linearColorScheme: [...tokens.linearColorScheme],\n positiveColor: tokens.positiveColor,\n negativeColor: tokens.negativeColor,\n },\n label: {\n labelFontSize: tokens.labelFontSize,\n labelColor: tokens.labelColor || tokens.textPrimary,\n labelStroke: tokens.labelStroke,\n },\n legend: {\n labelColor: tokens.legendLabelColor || tokens.textSecondary,\n labelFontSize: tokens.legendFontSize,\n pagerIconColor: tokens.legendPagerIconColor || tokens.textSecondary,\n pagerIconDisableColor: tokens.legendPagerIconDisableColor || tokens.borderColor,\n },\n tooltip: {\n backgroundColor: tokens.tooltipBackgroundColor,\n borderColor: tokens.tooltipBorderColor || tokens.borderColor,\n fontSize: tokens.tooltipFontSize,\n keyColor: tokens.textSecondary,\n valueColor: tokens.textPrimary,\n titleColor: tokens.textPrimary,\n },\n})\n\nconst getAnnotationLinePatch = (tokens: TokenThemeDefinition) => ({\n lineColor: tokens.annotationLineColor,\n lineStyle: tokens.annotationLineStyle,\n lineDash: tokens.annotationLineDash,\n textColor: tokens.annotationTextColor,\n textBackgroundColor: tokens.annotationTextBackgroundColor,\n textBackgroundBorderColor: tokens.annotationTextBackgroundColor,\n textBackgroundOpacity: tokens.annotationTextBackgroundOpacity,\n})\n\nconst getAnnotationTextPatch = (tokens: TokenThemeDefinition) => ({\n textColor: tokens.annotationTextColor,\n textBackgroundColor: tokens.annotationTextBackgroundColor,\n textBackgroundBorderColor: tokens.annotationTextBackgroundColor,\n textBackgroundOpacity: tokens.annotationTextBackgroundOpacity,\n})\n\nconst getAnnotationPatch = (tokens: TokenThemeDefinition) => {\n const annotationLinePatch = getAnnotationLinePatch(tokens)\n const annotationTextPatch = getAnnotationTextPatch(tokens)\n\n return {\n annotationPoint: {\n textFontSize: tokens.labelFontSize,\n ...annotationTextPatch,\n },\n annotationHorizontalLine: {\n textFontSize: tokens.labelFontSize,\n ...annotationLinePatch,\n },\n annotationVerticalLine: {\n textFontSize: tokens.labelFontSize,\n ...annotationLinePatch,\n },\n annotationDifferenceLine: {\n textFontSize: tokens.labelFontSize,\n lineColor: tokens.annotationLineColor,\n lineStyle: tokens.annotationLineStyle,\n lineDash: tokens.annotationLineDash,\n textColor: tokens.annotationTextColor,\n textBackgroundColor: tokens.annotationTextBackgroundColor,\n textBackgroundOpacity: tokens.annotationTextBackgroundOpacity,\n },\n annotationArea: {\n textFontSize: tokens.labelFontSize,\n ...annotationTextPatch,\n },\n }\n}\n\nconst getRegressionLinePatch = (tokens: TokenThemeDefinition) => ({\n kdeRegressionLine: {\n textFontSize: tokens.labelFontSize,\n },\n ecdfRegressionLine: {\n textFontSize: tokens.labelFontSize,\n },\n linearRegressionLine: {\n textFontSize: tokens.labelFontSize,\n },\n lowessRegressionLine: {\n textFontSize: tokens.labelFontSize,\n },\n polynomialRegressionLine: {\n textFontSize: tokens.labelFontSize,\n },\n logisticRegressionLine: {\n textFontSize: tokens.labelFontSize,\n },\n})\n\nconst withAxesAndExtras = (\n chartType: ThemeConfigKey,\n chartConfig: NonNullable<ThemeConfigMap[ThemeConfigKey]>,\n tokens: TokenThemeDefinition,\n) => {\n let nextChartConfig = mergeThemeNode(chartConfig, getChartPatch(tokens))\n const chartRecord = nextChartConfig as Record<string, unknown>\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'xAxis')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { xAxis: getAxisPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'yAxis')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { yAxis: getAxisPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'primaryYAxis')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { primaryYAxis: getAxisPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'secondaryYAxis')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { secondaryYAxis: getAxisPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'pivotGrid')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { pivotGrid: getPivotGridPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'annotation')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { annotation: getAnnotationPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'regressionLine')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { regressionLine: getRegressionLinePatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (raceChartTypes.includes(chartType) && Object.prototype.hasOwnProperty.call(chartRecord, 'player')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { player: getPlayerPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n return nextChartConfig\n}\n\nexport const createTokenThemeConfig = (tokens: TokenThemeDefinition): CustomThemeConfig => {\n const baseTheme = tokens.baseTheme === 'dark' ? darkTheme() : lightTheme()\n const baseConfig = (baseTheme.config || {}) as ThemeConfigMap\n const nextConfig = {} as ThemeConfigMap\n\n for (const chartType of Object.keys(baseConfig) as ThemeConfigKey[]) {\n const chartConfig = baseConfig[chartType]\n if (!chartConfig) {\n continue\n }\n\n if (chartType === 'table' || chartType === 'pivotTable') {\n nextConfig[chartType] = mergeThemeNode(chartConfig, getTablePatch(tokens)) as ThemeConfigMap[ThemeConfigKey]\n continue\n }\n\n nextConfig[chartType] = withAxesAndExtras(chartType, chartConfig, tokens) as ThemeConfigMap[ThemeConfigKey]\n }\n\n return {\n config: nextConfig as Config,\n }\n}\n\nexport const registerTokenTheme = (\n themeName: string,\n tokens: TokenThemeDefinition,\n options?: RegisterTokenThemeOptions,\n) => {\n ensureRegisterAll(options)\n registerCustomTheme(themeName, createTokenThemeConfig(tokens))\n}\n\nexport const registerTokenThemes = (themes: TokenThemeRegistry, options?: RegisterTokenThemeOptions) => {\n ensureRegisterAll(options)\n\n for (const [themeName, tokens] of Object.entries(themes)) {\n registerCustomTheme(themeName, createTokenThemeConfig(tokens))\n }\n}\n"],"names":["raceChartTypes","hasEnsuredRegisterAll","isRecord","value","Array","mergeThemeNode","base","patch","result","key","patchValue","Object","undefined","currentValue","withAlpha","color","alpha","tinycolor","ensureRegisterAll","options","registerAll","getAccentColor","tokens","getAxisPatch","getPivotGridPatch","getPlayerPatch","accentColor","getTablePatch","getChartPatch","getAnnotationLinePatch","getAnnotationTextPatch","getAnnotationPatch","annotationLinePatch","annotationTextPatch","getRegressionLinePatch","withAxesAndExtras","chartType","chartConfig","nextChartConfig","chartRecord","createTokenThemeConfig","baseTheme","darkTheme","lightTheme","baseConfig","nextConfig","registerTokenTheme","themeName","registerCustomTheme","registerTokenThemes","themes"],"mappings":";;;;;AAsEA,MAAMA,iBAAmC;IAAC;IAAW;IAAc;IAAe;IAAY;IAAW;CAAY;AAErH,IAAIC,wBAAwB;AAE5B,MAAMC,WAAW,CAACC,QACT,AAAiB,YAAjB,OAAOA,SAAsBA,AAAU,SAAVA,SAAkB,CAACC,MAAM,OAAO,CAACD;AAGvE,MAAME,iBAAiB,CAAIC,MAASC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AE,QAAQb,eAAeH;IAAQ;IAKrF,OAAOgB;AACT;AAEO,MAAME,yBAAyB,CAAClB;IACrC,MAAMmB,YAAYnB,AAAqB,WAArBA,OAAO,SAAS,GAAcoB,cAAcC;IAC9D,MAAMC,aAAcH,UAAU,MAAM,IAAI,CAAC;IACzC,MAAMI,aAAa,CAAC;IAEpB,KAAK,MAAMT,aAAazB,OAAO,IAAI,CAACiC,YAAiC;QACnE,MAAMP,cAAcO,UAAU,CAACR,UAAU;QACzC,IAAKC;YAIL,IAAID,AAAc,YAAdA,aAAyBA,AAAc,iBAAdA,WAA4B;gBACvDS,UAAU,CAACT,UAAU,GAAG/B,eAAegC,aAAaV,cAAcL;gBAClE;YACF;YAEAuB,UAAU,CAACT,UAAU,GAAGD,kBAAkBC,WAAWC,aAAaf;;IACpE;IAEA,OAAO;QACL,QAAQuB;IACV;AACF;AAEO,MAAMC,qBAAqB,CAChCC,WACAzB,QACAH;IAEAD,kBAAkBC;IAClB6B,oBAAoBD,WAAWP,uBAAuBlB;AACxD;AAEO,MAAM2B,sBAAsB,CAACC,QAA4B/B;IAC9DD,kBAAkBC;IAElB,KAAK,MAAM,CAAC4B,WAAWzB,OAAO,IAAIX,OAAO,OAAO,CAACuC,QAC/CF,oBAAoBD,WAAWP,uBAAuBlB;AAE1D"}
|
|
1
|
+
{"version":3,"file":"theme/tokenTheme.js","sources":["../../../src/theme/tokenTheme.ts"],"sourcesContent":["import tinycolor from 'tinycolor2'\nimport type { Config, CustomThemeConfig } from 'src/types'\nimport { registerAll } from '../builder/register/all'\nimport { registerCustomTheme } from '../builder/register/theme'\nimport { darkTheme } from './dark'\nimport { lightTheme } from './light'\n\nexport type TokenThemeBase = 'light' | 'dark'\n\nexport type TokenThemeDefinition = {\n baseTheme: TokenThemeBase\n fontFamily?: string\n tableHeaderFontSize?: number\n tableBodyFontSize?: number\n labelFontSize?: number\n tooltipFontSize?: number\n axisFontSize?: number\n legendFontSize?: number\n playerFontSize?: number\n colorScheme: [string, string, ...string[]]\n linearColorScheme: [string, string]\n textPrimary: string\n textSecondary: string\n borderColor: string\n surfaceColor?: string\n surfaceBackgroundColor?: string\n accentColor?: string\n positiveColor?: string\n negativeColor?: string\n tooltipBackgroundColor: string\n tooltipBorderColor?: string\n axisLabelColor?: string\n axisTitleColor?: string\n axisGridColor?: string\n axisLineColor?: string\n labelColor?: string\n labelStroke?: string\n legendLabelColor?: string\n legendPagerIconColor?: string\n legendPagerIconDisableColor?: string\n playerRailColor?: string\n playerSliderHandleColor?: string\n playerSliderHandleBorderColor?: string\n tableBorderColor?: string\n tableBodyFontColor?: string\n tableHeaderFontColor?: string\n tableHeaderBackgroundColor?: string\n tableHoverBodyBackgroundColor?: string\n tableHoverBodyInlineBackgroundColor?: string\n tableHoverHeaderBackgroundColor?: string\n tableHoverHeaderInlineBackgroundColor?: string\n tableSelectedBorderColor?: string\n tableSelectedBackgroundColor?: string\n annotationLineColor?: string\n annotationLineStyle?: 'solid' | 'dashed' | 'dotted'\n annotationLineDash?: number[]\n annotationTextColor?: string\n annotationTextBackgroundColor?: string\n annotationTextBackgroundOpacity?: number\n annotationAreaColor?: string\n annotationAreaColorOpacity?: number\n}\n\nexport type TokenThemeRegistry = Record<string, TokenThemeDefinition>\n\nexport type RegisterTokenThemeOptions = {\n ensureRegisterAll?: boolean\n}\n\ntype ThemeConfigMap = NonNullable<CustomThemeConfig['config']>\ntype ThemeConfigKey = keyof ThemeConfigMap\n\nconst raceChartTypes: ThemeConfigKey[] = ['raceBar', 'raceColumn', 'raceScatter', 'raceLine', 'racePie', 'raceDonut']\n\nlet hasEnsuredRegisterAll = false\n\nconst isRecord = (value: unknown): value is Record<string, unknown> => {\n return typeof value === 'object' && value !== null && !Array.isArray(value)\n}\n\nconst mergeThemeNode = <T>(base: T, patch: Partial<T>): T => {\n if (!isRecord(base) || !isRecord(patch)) {\n return patch as T\n }\n\n const result: Record<string, unknown> = { ...base }\n for (const [key, patchValue] of Object.entries(patch)) {\n if (patchValue === undefined) {\n continue\n }\n\n const currentValue = result[key]\n if (Array.isArray(patchValue)) {\n result[key] = [...patchValue]\n continue\n }\n\n if (isRecord(currentValue) && isRecord(patchValue)) {\n result[key] = mergeThemeNode(currentValue, patchValue)\n continue\n }\n\n result[key] = patchValue\n }\n\n return result as T\n}\n\nconst withAlpha = (color: string, alpha: number) => tinycolor(color).setAlpha(alpha).toRgbString()\n\nconst ensureRegisterAll = (options?: RegisterTokenThemeOptions) => {\n if (options?.ensureRegisterAll === false || hasEnsuredRegisterAll) {\n return\n }\n\n registerAll()\n hasEnsuredRegisterAll = true\n}\n\nconst getAccentColor = (tokens: TokenThemeDefinition) => tokens.accentColor || tokens.colorScheme[0]\n\nconst getAxisPatch = (tokens: TokenThemeDefinition) => ({\n label: {\n labelColor: tokens.axisLabelColor || tokens.textSecondary,\n labelFontSize: tokens.axisFontSize,\n },\n title: {\n titleColor: tokens.axisTitleColor || tokens.textSecondary,\n titleFontSize: tokens.axisFontSize,\n },\n grid: {\n gridColor: tokens.axisGridColor || tokens.borderColor,\n },\n tick: {\n tickColor: tokens.axisLineColor || tokens.borderColor,\n },\n line: {\n lineColor: tokens.axisLineColor || tokens.borderColor,\n },\n})\n\nconst getPivotGridPatch = (tokens: TokenThemeDefinition) => ({\n borderColor: tokens.tableBorderColor || tokens.borderColor,\n bodyFontSize: tokens.tableBodyFontSize,\n bodyFontColor: tokens.tableBodyFontColor || tokens.textPrimary,\n headerFontSize: tokens.tableHeaderFontSize,\n headerFontColor: tokens.tableHeaderFontColor || tokens.textPrimary,\n headerBackgroundColor: tokens.tableHeaderBackgroundColor || tokens.surfaceColor || 'transparent',\n hoverHeaderBackgroundColor: tokens.tableHoverHeaderBackgroundColor || withAlpha(getAccentColor(tokens), 0.18),\n hoverHeaderInlineBackgroundColor:\n tokens.tableHoverHeaderInlineBackgroundColor || withAlpha(getAccentColor(tokens), 0.08),\n titleFontColor: tokens.textPrimary,\n titleFontSize: tokens.tableHeaderFontSize,\n chartGridColor: tokens.axisGridColor || tokens.borderColor,\n axisLabelColor: tokens.axisLabelColor || tokens.textSecondary,\n axisLabelFontSize: tokens.axisFontSize,\n})\n\nconst getPlayerPatch = (tokens: TokenThemeDefinition) => {\n const accentColor = getAccentColor(tokens)\n\n return {\n fontFamily: tokens.fontFamily,\n fontSize: tokens.playerFontSize,\n railColor: tokens.playerRailColor || tokens.borderColor,\n trackColor: accentColor,\n sliderHandleColor: tokens.playerSliderHandleColor || tokens.surfaceColor || '#ffffff',\n sliderHandleBorderColor: tokens.playerSliderHandleBorderColor || accentColor,\n startButtonColor: accentColor,\n pauseButtonColor: accentColor,\n backwardButtonColor: accentColor,\n forwardButtonColor: accentColor,\n }\n}\n\nconst getTablePatch = (tokens: TokenThemeDefinition) => {\n const accentColor = getAccentColor(tokens)\n\n return {\n borderColor: tokens.tableBorderColor || tokens.borderColor,\n bodyFontSize: tokens.tableBodyFontSize,\n bodyFontFamily: tokens.fontFamily,\n bodyFontColor: tokens.tableBodyFontColor || tokens.textPrimary,\n headerFontSize: tokens.tableHeaderFontSize,\n headerFontFamily: tokens.fontFamily,\n headerFontColor: tokens.tableHeaderFontColor || tokens.textPrimary,\n headerBackgroundColor: tokens.tableHeaderBackgroundColor || tokens.surfaceColor || 'transparent',\n hoverBodyBackgroundColor: tokens.tableHoverBodyBackgroundColor || withAlpha(accentColor, 0.18),\n hoverBodyInlineBackgroundColor: tokens.tableHoverBodyInlineBackgroundColor || withAlpha(accentColor, 0.08),\n hoverHeaderBackgroundColor: tokens.tableHoverHeaderBackgroundColor || withAlpha(accentColor, 0.18),\n hoverHeaderInlineBackgroundColor: tokens.tableHoverHeaderInlineBackgroundColor || withAlpha(accentColor, 0.08),\n selectedBorderColor: tokens.tableSelectedBorderColor || accentColor,\n selectedBackgroundColor: tokens.tableSelectedBackgroundColor || withAlpha(accentColor, 0.12),\n backgroundColor: tokens.surfaceBackgroundColor || 'transparent',\n barAxisColor: tokens.axisLineColor || tokens.borderColor,\n backgroundColorScale: {\n minColor: tokens.linearColorScheme[0],\n maxColor: tokens.linearColorScheme[1],\n },\n }\n}\n\nconst getChartPatch = (tokens: TokenThemeDefinition) => ({\n backgroundColor: 'transparent',\n fontFamily: tokens.fontFamily,\n color: {\n colorScheme: [...tokens.colorScheme],\n linearColorScheme: [...tokens.linearColorScheme],\n positiveColor: tokens.positiveColor,\n negativeColor: tokens.negativeColor,\n },\n label: {\n labelFontSize: tokens.labelFontSize,\n labelColor: tokens.labelColor || tokens.textPrimary,\n labelStroke: tokens.labelStroke,\n },\n legend: {\n labelColor: tokens.legendLabelColor || tokens.textSecondary,\n labelFontSize: tokens.legendFontSize,\n pagerIconColor: tokens.legendPagerIconColor || tokens.textSecondary,\n pagerIconDisableColor: tokens.legendPagerIconDisableColor || tokens.borderColor,\n },\n tooltip: {\n backgroundColor: tokens.tooltipBackgroundColor,\n borderColor: tokens.tooltipBorderColor || tokens.borderColor,\n fontSize: tokens.tooltipFontSize,\n keyColor: tokens.textSecondary,\n valueColor: tokens.textPrimary,\n titleColor: tokens.textPrimary,\n },\n})\n\nconst getAnnotationLinePatch = (tokens: TokenThemeDefinition) => ({\n lineColor: tokens.annotationLineColor,\n lineStyle: tokens.annotationLineStyle,\n lineDash: tokens.annotationLineDash,\n textColor: tokens.annotationTextColor,\n textBackgroundColor: tokens.annotationTextBackgroundColor,\n textBackgroundBorderColor: tokens.annotationTextBackgroundColor,\n textBackgroundOpacity: tokens.annotationTextBackgroundOpacity,\n})\n\nconst getAnnotationTextPatch = (tokens: TokenThemeDefinition) => ({\n textColor: tokens.annotationTextColor,\n textBackgroundColor: tokens.annotationTextBackgroundColor,\n textBackgroundBorderColor: tokens.annotationTextBackgroundColor,\n textBackgroundOpacity: tokens.annotationTextBackgroundOpacity,\n})\n\nconst getAnnotationPatch = (tokens: TokenThemeDefinition) => {\n const annotationLinePatch = getAnnotationLinePatch(tokens)\n const annotationTextPatch = getAnnotationTextPatch(tokens)\n\n return {\n annotationPoint: {\n textFontSize: tokens.labelFontSize,\n ...annotationTextPatch,\n },\n annotationHorizontalLine: {\n textFontSize: tokens.labelFontSize,\n ...annotationLinePatch,\n },\n annotationVerticalLine: {\n textFontSize: tokens.labelFontSize,\n ...annotationLinePatch,\n },\n annotationDifferenceLine: {\n textFontSize: tokens.labelFontSize,\n lineColor: tokens.annotationLineColor,\n lineStyle: tokens.annotationLineStyle,\n lineDash: tokens.annotationLineDash,\n textColor: tokens.annotationTextColor,\n textBackgroundColor: tokens.annotationTextBackgroundColor,\n textBackgroundOpacity: tokens.annotationTextBackgroundOpacity,\n },\n annotationArea: {\n textFontSize: tokens.labelFontSize,\n areaColor: tokens.annotationAreaColor,\n areaColorOpacity: tokens.annotationAreaColorOpacity,\n ...annotationTextPatch,\n },\n }\n}\n\nconst getRegressionLinePatch = (tokens: TokenThemeDefinition) => ({\n kdeRegressionLine: {\n textFontSize: tokens.labelFontSize,\n },\n ecdfRegressionLine: {\n textFontSize: tokens.labelFontSize,\n },\n linearRegressionLine: {\n textFontSize: tokens.labelFontSize,\n },\n lowessRegressionLine: {\n textFontSize: tokens.labelFontSize,\n },\n polynomialRegressionLine: {\n textFontSize: tokens.labelFontSize,\n },\n logisticRegressionLine: {\n textFontSize: tokens.labelFontSize,\n },\n})\n\nconst withAxesAndExtras = (\n chartType: ThemeConfigKey,\n chartConfig: NonNullable<ThemeConfigMap[ThemeConfigKey]>,\n tokens: TokenThemeDefinition,\n) => {\n let nextChartConfig = mergeThemeNode(chartConfig, getChartPatch(tokens))\n const chartRecord = nextChartConfig as Record<string, unknown>\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'xAxis')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { xAxis: getAxisPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'yAxis')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { yAxis: getAxisPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'primaryYAxis')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { primaryYAxis: getAxisPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'secondaryYAxis')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { secondaryYAxis: getAxisPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'pivotGrid')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { pivotGrid: getPivotGridPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'annotation')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { annotation: getAnnotationPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (Object.prototype.hasOwnProperty.call(chartRecord, 'regressionLine')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { regressionLine: getRegressionLinePatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n if (raceChartTypes.includes(chartType) && Object.prototype.hasOwnProperty.call(chartRecord, 'player')) {\n nextChartConfig = mergeThemeNode(nextChartConfig, { player: getPlayerPatch(tokens) } as Partial<\n typeof nextChartConfig\n >)\n }\n\n return nextChartConfig\n}\n\nexport const createTokenThemeConfig = (tokens: TokenThemeDefinition): CustomThemeConfig => {\n const baseTheme = tokens.baseTheme === 'dark' ? darkTheme() : lightTheme()\n const baseConfig = (baseTheme.config || {}) as ThemeConfigMap\n const nextConfig = {} as ThemeConfigMap\n\n for (const chartType of Object.keys(baseConfig) as ThemeConfigKey[]) {\n const chartConfig = baseConfig[chartType]\n if (!chartConfig) {\n continue\n }\n\n if (chartType === 'table' || chartType === 'pivotTable') {\n nextConfig[chartType] = mergeThemeNode(chartConfig, getTablePatch(tokens)) as ThemeConfigMap[ThemeConfigKey]\n continue\n }\n\n nextConfig[chartType] = withAxesAndExtras(chartType, chartConfig, tokens) as ThemeConfigMap[ThemeConfigKey]\n }\n\n return {\n config: nextConfig as Config,\n }\n}\n\nexport const registerTokenTheme = (\n themeName: string,\n tokens: TokenThemeDefinition,\n options?: RegisterTokenThemeOptions,\n) => {\n ensureRegisterAll(options)\n registerCustomTheme(themeName, createTokenThemeConfig(tokens))\n}\n\nexport const registerTokenThemes = (themes: TokenThemeRegistry, options?: RegisterTokenThemeOptions) => {\n ensureRegisterAll(options)\n\n for (const [themeName, tokens] of Object.entries(themes)) {\n registerCustomTheme(themeName, createTokenThemeConfig(tokens))\n }\n}\n"],"names":["raceChartTypes","hasEnsuredRegisterAll","isRecord","value","Array","mergeThemeNode","base","patch","result","key","patchValue","Object","undefined","currentValue","withAlpha","color","alpha","tinycolor","ensureRegisterAll","options","registerAll","getAccentColor","tokens","getAxisPatch","getPivotGridPatch","getPlayerPatch","accentColor","getTablePatch","getChartPatch","getAnnotationLinePatch","getAnnotationTextPatch","getAnnotationPatch","annotationLinePatch","annotationTextPatch","getRegressionLinePatch","withAxesAndExtras","chartType","chartConfig","nextChartConfig","chartRecord","createTokenThemeConfig","baseTheme","darkTheme","lightTheme","baseConfig","nextConfig","registerTokenTheme","themeName","registerCustomTheme","registerTokenThemes","themes"],"mappings":";;;;;AAwEA,MAAMA,iBAAmC;IAAC;IAAW;IAAc;IAAe;IAAY;IAAW;CAAY;AAErH,IAAIC,wBAAwB;AAE5B,MAAMC,WAAW,CAACC,QACT,AAAiB,YAAjB,OAAOA,SAAsBA,AAAU,SAAVA,SAAkB,CAACC,MAAM,OAAO,CAACD;AAGvE,MAAME,iBAAiB,CAAIC,MAASC;IAClC,IAAI,CAACL,SAASI,SAAS,CAACJ,SAASK,QAC/B,OAAOA;IAGT,MAAMC,SAAkC;QAAE,GAAGF,IAAI;IAAC;IAClD,KAAK,MAAM,CAACG,KAAKC,WAAW,IAAIC,OAAO,OAAO,CAACJ,OAAQ;QACrD,IAAIG,AAAeE,WAAfF,YACF;QAGF,MAAMG,eAAeL,MAA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AI,CAAC;IACzC,MAAMI,aAAa,CAAC;IAEpB,KAAK,MAAMT,aAAazB,OAAO,IAAI,CAACiC,YAAiC;QACnE,MAAMP,cAAcO,UAAU,CAACR,UAAU;QACzC,IAAKC;YAIL,IAAID,AAAc,YAAdA,aAAyBA,AAAc,iBAAdA,WAA4B;gBACvDS,UAAU,CAACT,UAAU,GAAG/B,eAAegC,aAAaV,cAAcL;gBAClE;YACF;YAEAuB,UAAU,CAACT,UAAU,GAAGD,kBAAkBC,WAAWC,aAAaf;;IACpE;IAEA,OAAO;QACL,QAAQuB;IACV;AACF;AAEO,MAAMC,qBAAqB,CAChCC,WACAzB,QACAH;IAEAD,kBAAkBC;IAClB6B,oBAAoBD,WAAWP,uBAAuBlB;AACxD;AAEO,MAAM2B,sBAAsB,CAACC,QAA4B/B;IAC9DD,kBAAkBC;IAElB,KAAK,MAAM,CAAC4B,WAAWzB,OAAO,IAAIX,OAAO,OAAO,CAACuC,QAC/CF,oBAAoBD,WAAWP,uBAAuBlB;AAE1D"}
|
package/dist/umd/index.js
CHANGED
|
@@ -5799,48 +5799,6 @@ self.R = R;
|
|
|
5799
5799
|
const effect = effects[effects.length - 1] ?? EFFECT_NONE;
|
|
5800
5800
|
return effect !== EFFECT_NONE;
|
|
5801
5801
|
};
|
|
5802
|
-
const atmospherePoint = (effect)=>{
|
|
5803
|
-
if (effect === EFFECT_NONE) return {};
|
|
5804
|
-
if ('breath' === effect) return {
|
|
5805
|
-
channel: {
|
|
5806
|
-
scaleX: {
|
|
5807
|
-
from: 0.8,
|
|
5808
|
-
to: 1.2
|
|
5809
|
-
},
|
|
5810
|
-
scaleY: {
|
|
5811
|
-
from: 0.8,
|
|
5812
|
-
to: 1.2
|
|
5813
|
-
}
|
|
5814
|
-
}
|
|
5815
|
-
};
|
|
5816
|
-
if ('reveal' === effect) return {
|
|
5817
|
-
channel: {
|
|
5818
|
-
fillOpacity: {
|
|
5819
|
-
from: 0.6,
|
|
5820
|
-
to: 1
|
|
5821
|
-
},
|
|
5822
|
-
strokeOpacity: {
|
|
5823
|
-
from: 0.6,
|
|
5824
|
-
to: 1
|
|
5825
|
-
}
|
|
5826
|
-
}
|
|
5827
|
-
};
|
|
5828
|
-
return {
|
|
5829
|
-
channel: {
|
|
5830
|
-
outerBorder: {
|
|
5831
|
-
from: {
|
|
5832
|
-
distance: 0,
|
|
5833
|
-
strokeOpacity: 1
|
|
5834
|
-
},
|
|
5835
|
-
to: (...args)=>({
|
|
5836
|
-
distance: 16,
|
|
5837
|
-
strokeOpacity: 1e-8,
|
|
5838
|
-
stroke: args[1]?.attribute?.fill
|
|
5839
|
-
})
|
|
5840
|
-
}
|
|
5841
|
-
}
|
|
5842
|
-
};
|
|
5843
|
-
};
|
|
5844
5802
|
class Generator {
|
|
5845
5803
|
static GenAutoIncrementId() {
|
|
5846
5804
|
return Generator.auto_increment_id++;
|
|
@@ -9068,7 +9026,7 @@ self.R = R;
|
|
|
9068
9026
|
if (loopEffect === VScreenAnimationType.highLight && loop) {
|
|
9069
9027
|
const groupDuration = 0.7;
|
|
9070
9028
|
const stopDuration = 0.85;
|
|
9071
|
-
loopDuration = groupDuration * getGroupCountFromSpec(spec).groupCount + stopDuration;
|
|
9029
|
+
loopDuration = loop.duration ?? groupDuration * getGroupCountFromSpec(spec).groupCount + stopDuration;
|
|
9072
9030
|
result.push(...groupHighLightBar(startTime, loop, loopDuration, interval, atmosphereDuration, barMotion_isHorizontalBar(chartType), spec));
|
|
9073
9031
|
} else if (loop) result.push({
|
|
9074
9032
|
...getLoopResult(loopEffect, chartType, spec),
|
|
@@ -9112,6 +9070,57 @@ self.R = R;
|
|
|
9112
9070
|
}
|
|
9113
9071
|
};
|
|
9114
9072
|
};
|
|
9073
|
+
const pointAtmosphere_EFFECT_NONE = VScreenAnimationType.none;
|
|
9074
|
+
const atmospherePoint = (effect)=>{
|
|
9075
|
+
if (effect === pointAtmosphere_EFFECT_NONE) return {};
|
|
9076
|
+
if ('breath' === effect) return {
|
|
9077
|
+
channel: {
|
|
9078
|
+
scaleX: {
|
|
9079
|
+
from: 0.8,
|
|
9080
|
+
to: 2
|
|
9081
|
+
},
|
|
9082
|
+
scaleY: {
|
|
9083
|
+
from: 0.8,
|
|
9084
|
+
to: 2
|
|
9085
|
+
}
|
|
9086
|
+
}
|
|
9087
|
+
};
|
|
9088
|
+
if ('reveal' === effect) return {
|
|
9089
|
+
channel: {
|
|
9090
|
+
fillOpacity: {
|
|
9091
|
+
from: 0.6,
|
|
9092
|
+
to: 1
|
|
9093
|
+
},
|
|
9094
|
+
strokeOpacity: {
|
|
9095
|
+
from: 0.6,
|
|
9096
|
+
to: 1
|
|
9097
|
+
}
|
|
9098
|
+
}
|
|
9099
|
+
};
|
|
9100
|
+
return {
|
|
9101
|
+
channel: {
|
|
9102
|
+
outerBorder: {
|
|
9103
|
+
from: {
|
|
9104
|
+
distance: 0,
|
|
9105
|
+
strokeOpacity: 1
|
|
9106
|
+
},
|
|
9107
|
+
to: (...args)=>({
|
|
9108
|
+
distance: 16,
|
|
9109
|
+
strokeOpacity: 1e-8,
|
|
9110
|
+
stroke: args[1]?.attribute?.fill
|
|
9111
|
+
})
|
|
9112
|
+
}
|
|
9113
|
+
},
|
|
9114
|
+
custom: (ratio, from, to, out, graphic)=>{
|
|
9115
|
+
graphic.attribute.strokeOpacity = ratio * (to.strokeOpacity - from.strokeOpacity) + from.strokeOpacity;
|
|
9116
|
+
graphic.attribute.outerBorder = {
|
|
9117
|
+
distance: ratio * (to.outerBorder.distance - from.outerBorder.distance) + from.outerBorder.distance,
|
|
9118
|
+
strokeOpacity: ratio * (to.outerBorder.strokeOpacity - from.outerBorder.strokeOpacity) + from.outerBorder.strokeOpacity,
|
|
9119
|
+
stroke: to.outerBorder.stroke
|
|
9120
|
+
};
|
|
9121
|
+
}
|
|
9122
|
+
};
|
|
9123
|
+
};
|
|
9115
9124
|
const growthTopLine = ()=>({
|
|
9116
9125
|
type: 'growPointsYIn',
|
|
9117
9126
|
options: {
|
|
@@ -13536,20 +13545,45 @@ self.R = R;
|
|
|
13536
13545
|
if (hasNegativePart) return reverseStackCornerRadius(cornerRadius);
|
|
13537
13546
|
return 0;
|
|
13538
13547
|
};
|
|
13548
|
+
const createStackCornerRadius = (cornerRadius)=>(_, datum)=>{
|
|
13549
|
+
const stackRangeCornerRadius = getStackRangeCornerRadius(cornerRadius, datum);
|
|
13550
|
+
if (void 0 !== stackRangeCornerRadius) return stackRangeCornerRadius;
|
|
13551
|
+
const value = datum?.[datum?.[FoldMeasureId]];
|
|
13552
|
+
if (value > 0) return cornerRadius;
|
|
13553
|
+
if (value < 0) return reverseStackCornerRadius(cornerRadius);
|
|
13554
|
+
return 0;
|
|
13555
|
+
};
|
|
13556
|
+
const hasMoveInAnimation = (animation)=>{
|
|
13557
|
+
if (!animation) return false;
|
|
13558
|
+
if (Array.isArray(animation)) return animation.some(hasMoveInAnimation);
|
|
13559
|
+
if ('object' != typeof animation) return false;
|
|
13560
|
+
const animationRecord = animation;
|
|
13561
|
+
return 'moveIn' === animationRecord.type || Object.values(animationRecord).some(hasMoveInAnimation);
|
|
13562
|
+
};
|
|
13563
|
+
const hasBarMoveInAnimation = (spec)=>[
|
|
13564
|
+
spec.animationAppear,
|
|
13565
|
+
spec.animationNormal,
|
|
13566
|
+
spec.animationEnter,
|
|
13567
|
+
spec.animationUpdate
|
|
13568
|
+
].some(hasMoveInAnimation);
|
|
13539
13569
|
const stackCornerRadius_stackCornerRadius = (spec, context)=>{
|
|
13540
13570
|
const { advancedVSeed, vseed } = context;
|
|
13541
13571
|
const { chartType } = vseed;
|
|
13542
13572
|
const stackCornerRadius = advancedVSeed.config?.[chartType]?.stackCornerRadius;
|
|
13543
13573
|
if ('dualAxis' === chartType && 'bar' !== spec.type) return spec;
|
|
13574
|
+
const stackCornerRadiusCallback = createStackCornerRadius(stackCornerRadius);
|
|
13575
|
+
if (!hasBarMoveInAnimation(spec)) return {
|
|
13576
|
+
...spec,
|
|
13577
|
+
stackCornerRadius: stackCornerRadiusCallback
|
|
13578
|
+
};
|
|
13544
13579
|
return {
|
|
13545
13580
|
...spec,
|
|
13546
|
-
|
|
13547
|
-
|
|
13548
|
-
|
|
13549
|
-
|
|
13550
|
-
|
|
13551
|
-
|
|
13552
|
-
return 0;
|
|
13581
|
+
bar: {
|
|
13582
|
+
...spec.bar,
|
|
13583
|
+
style: {
|
|
13584
|
+
...spec.bar?.style,
|
|
13585
|
+
cornerRadius: stackCornerRadiusCallback
|
|
13586
|
+
}
|
|
13553
13587
|
}
|
|
13554
13588
|
};
|
|
13555
13589
|
};
|
|
@@ -31937,6 +31971,8 @@ self.R = R;
|
|
|
31937
31971
|
},
|
|
31938
31972
|
annotationArea: {
|
|
31939
31973
|
textFontSize: tokens.labelFontSize,
|
|
31974
|
+
areaColor: tokens.annotationAreaColor,
|
|
31975
|
+
areaColorOpacity: tokens.annotationAreaColorOpacity,
|
|
31940
31976
|
...annotationTextPatch
|
|
31941
31977
|
}
|
|
31942
31978
|
};
|