This commit is contained in:
parent
4b35583782
commit
e77051ccc4
1987 changed files with 1147290 additions and 5648 deletions
12
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/axis/bandAxis.d.ts
vendored
Normal file
12
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/axis/bandAxis.d.ts
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
import type { TextDimensionCalculator } from '../../textDimensionCalculator.js';
|
||||
import { BaseAxis } from './baseAxis.js';
|
||||
import type { XYChartAxisThemeConfig, XYChartAxisConfig } from '../../interfaces.js';
|
||||
export declare class BandAxis extends BaseAxis {
|
||||
private scale;
|
||||
private categories;
|
||||
constructor(axisConfig: XYChartAxisConfig, axisThemeConfig: XYChartAxisThemeConfig, categories: string[], title: string, textDimensionCalculator: TextDimensionCalculator);
|
||||
setRange(range: [number, number]): void;
|
||||
recalculateScale(): void;
|
||||
getTickValues(): (string | number)[];
|
||||
getScaleValue(value: string): number;
|
||||
}
|
38
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/axis/baseAxis.d.ts
vendored
Normal file
38
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/axis/baseAxis.d.ts
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
import type { BoundingRect, Dimension, DrawableElem, Point, XYChartAxisConfig, XYChartAxisThemeConfig } from '../../interfaces.js';
|
||||
import type { TextDimensionCalculator } from '../../textDimensionCalculator.js';
|
||||
import type { Axis, AxisPosition } from './index.js';
|
||||
export declare abstract class BaseAxis implements Axis {
|
||||
protected axisConfig: XYChartAxisConfig;
|
||||
protected title: string;
|
||||
protected textDimensionCalculator: TextDimensionCalculator;
|
||||
protected axisThemeConfig: XYChartAxisThemeConfig;
|
||||
protected boundingRect: BoundingRect;
|
||||
protected axisPosition: AxisPosition;
|
||||
private range;
|
||||
protected showTitle: boolean;
|
||||
protected showLabel: boolean;
|
||||
protected showTick: boolean;
|
||||
protected showAxisLine: boolean;
|
||||
protected outerPadding: number;
|
||||
protected titleTextHeight: number;
|
||||
protected labelTextHeight: number;
|
||||
constructor(axisConfig: XYChartAxisConfig, title: string, textDimensionCalculator: TextDimensionCalculator, axisThemeConfig: XYChartAxisThemeConfig);
|
||||
setRange(range: [number, number]): void;
|
||||
getRange(): [number, number];
|
||||
setAxisPosition(axisPosition: AxisPosition): void;
|
||||
abstract getScaleValue(value: number | string): number;
|
||||
abstract recalculateScale(): void;
|
||||
abstract getTickValues(): Array<string | number>;
|
||||
getTickDistance(): number;
|
||||
getAxisOuterPadding(): number;
|
||||
private getLabelDimension;
|
||||
recalculateOuterPaddingToDrawBar(): void;
|
||||
private calculateSpaceIfDrawnHorizontally;
|
||||
private calculateSpaceIfDrawnVertical;
|
||||
calculateSpace(availableSpace: Dimension): Dimension;
|
||||
setBoundingBoxXY(point: Point): void;
|
||||
private getDrawableElementsForLeftAxis;
|
||||
private getDrawableElementsForBottomAxis;
|
||||
private getDrawableElementsForTopAxis;
|
||||
getDrawableElements(): DrawableElem[];
|
||||
}
|
12
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/axis/index.d.ts
vendored
Normal file
12
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/axis/index.d.ts
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
import type { Group } from '../../../../../diagram-api/types.js';
|
||||
import type { AxisDataType, ChartComponent, XYChartAxisConfig, XYChartAxisThemeConfig } from '../../interfaces.js';
|
||||
export type AxisPosition = 'left' | 'right' | 'top' | 'bottom';
|
||||
export interface Axis extends ChartComponent {
|
||||
getScaleValue(value: string | number): number;
|
||||
setAxisPosition(axisPosition: AxisPosition): void;
|
||||
getAxisOuterPadding(): number;
|
||||
getTickDistance(): number;
|
||||
recalculateOuterPaddingToDrawBar(): void;
|
||||
setRange(range: [number, number]): void;
|
||||
}
|
||||
export declare function getAxis(data: AxisDataType, axisConfig: XYChartAxisConfig, axisThemeConfig: XYChartAxisThemeConfig, tmpSVGGroup: Group): Axis;
|
11
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/axis/linearAxis.d.ts
vendored
Normal file
11
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/axis/linearAxis.d.ts
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
import type { TextDimensionCalculator } from '../../textDimensionCalculator.js';
|
||||
import { BaseAxis } from './baseAxis.js';
|
||||
import type { XYChartAxisThemeConfig, XYChartAxisConfig } from '../../interfaces.js';
|
||||
export declare class LinearAxis extends BaseAxis {
|
||||
private scale;
|
||||
private domain;
|
||||
constructor(axisConfig: XYChartAxisConfig, axisThemeConfig: XYChartAxisThemeConfig, domain: [number, number], title: string, textDimensionCalculator: TextDimensionCalculator);
|
||||
getTickValues(): (string | number)[];
|
||||
recalculateScale(): void;
|
||||
getScaleValue(value: number): number;
|
||||
}
|
16
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/chartTitle.d.ts
vendored
Normal file
16
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/chartTitle.d.ts
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
import type { Group } from '../../../../diagram-api/types.js';
|
||||
import type { ChartComponent, Dimension, DrawableElem, Point, XYChartData, XYChartThemeConfig, XYChartConfig } from '../interfaces.js';
|
||||
import type { TextDimensionCalculator } from '../textDimensionCalculator.js';
|
||||
export declare class ChartTitle implements ChartComponent {
|
||||
private textDimensionCalculator;
|
||||
private chartConfig;
|
||||
private chartData;
|
||||
private chartThemeConfig;
|
||||
private boundingRect;
|
||||
private showChartTitle;
|
||||
constructor(textDimensionCalculator: TextDimensionCalculator, chartConfig: XYChartConfig, chartData: XYChartData, chartThemeConfig: XYChartThemeConfig);
|
||||
setBoundingBoxXY(point: Point): void;
|
||||
calculateSpace(availableSpace: Dimension): Dimension;
|
||||
getDrawableElements(): DrawableElem[];
|
||||
}
|
||||
export declare function getChartTitleComponent(chartConfig: XYChartConfig, chartData: XYChartData, chartThemeConfig: XYChartThemeConfig, tmpSVGGroup: Group): ChartComponent;
|
12
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/plot/barPlot.d.ts
vendored
Normal file
12
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/plot/barPlot.d.ts
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
import type { BarPlotData, BoundingRect, DrawableElem, XYChartConfig } from '../../interfaces.js';
|
||||
import type { Axis } from '../axis/index.js';
|
||||
export declare class BarPlot {
|
||||
private barData;
|
||||
private boundingRect;
|
||||
private xAxis;
|
||||
private yAxis;
|
||||
private orientation;
|
||||
private plotIndex;
|
||||
constructor(barData: BarPlotData, boundingRect: BoundingRect, xAxis: Axis, yAxis: Axis, orientation: XYChartConfig['chartOrientation'], plotIndex: number);
|
||||
getDrawableElement(): DrawableElem[];
|
||||
}
|
20
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/plot/index.d.ts
vendored
Normal file
20
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/plot/index.d.ts
vendored
Normal file
|
@ -0,0 +1,20 @@
|
|||
import type { XYChartData, Dimension, DrawableElem, Point, XYChartThemeConfig, XYChartConfig } from '../../interfaces.js';
|
||||
import type { Axis } from '../axis/index.js';
|
||||
import type { ChartComponent } from '../../interfaces.js';
|
||||
export interface Plot extends ChartComponent {
|
||||
setAxes(xAxis: Axis, yAxis: Axis): void;
|
||||
}
|
||||
export declare class BasePlot implements Plot {
|
||||
private chartConfig;
|
||||
private chartData;
|
||||
private chartThemeConfig;
|
||||
private boundingRect;
|
||||
private xAxis?;
|
||||
private yAxis?;
|
||||
constructor(chartConfig: XYChartConfig, chartData: XYChartData, chartThemeConfig: XYChartThemeConfig);
|
||||
setAxes(xAxis: Axis, yAxis: Axis): void;
|
||||
setBoundingBoxXY(point: Point): void;
|
||||
calculateSpace(availableSpace: Dimension): Dimension;
|
||||
getDrawableElements(): DrawableElem[];
|
||||
}
|
||||
export declare function getPlotComponent(chartConfig: XYChartConfig, chartData: XYChartData, chartThemeConfig: XYChartThemeConfig): Plot;
|
11
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/plot/linePlot.d.ts
vendored
Normal file
11
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/components/plot/linePlot.d.ts
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
import type { DrawableElem, LinePlotData, XYChartConfig } from '../../interfaces.js';
|
||||
import type { Axis } from '../axis/index.js';
|
||||
export declare class LinePlot {
|
||||
private plotData;
|
||||
private xAxis;
|
||||
private yAxis;
|
||||
private orientation;
|
||||
private plotIndex;
|
||||
constructor(plotData: LinePlotData, xAxis: Axis, yAxis: Axis, orientation: XYChartConfig['chartOrientation'], plotIndex: number);
|
||||
getDrawableElement(): DrawableElem[];
|
||||
}
|
5
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/index.d.ts
vendored
Normal file
5
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/index.d.ts
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
import type { Group } from '../../../diagram-api/types.js';
|
||||
import type { DrawableElem, XYChartConfig, XYChartData, XYChartThemeConfig } from './interfaces.js';
|
||||
export declare class XYChartBuilder {
|
||||
static build(config: XYChartConfig, chartData: XYChartData, chartThemeConfig: XYChartThemeConfig, tmpSVGGroup: Group): DrawableElem[];
|
||||
}
|
132
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/interfaces.d.ts
vendored
Normal file
132
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/interfaces.d.ts
vendored
Normal file
|
@ -0,0 +1,132 @@
|
|||
export interface XYChartAxisThemeConfig {
|
||||
titleColor: string;
|
||||
labelColor: string;
|
||||
tickColor: string;
|
||||
axisLineColor: string;
|
||||
}
|
||||
export interface XYChartThemeConfig {
|
||||
backgroundColor: string;
|
||||
titleColor: string;
|
||||
xAxisLabelColor: string;
|
||||
xAxisTitleColor: string;
|
||||
xAxisTickColor: string;
|
||||
xAxisLineColor: string;
|
||||
yAxisLabelColor: string;
|
||||
yAxisTitleColor: string;
|
||||
yAxisTickColor: string;
|
||||
yAxisLineColor: string;
|
||||
plotColorPalette: string;
|
||||
}
|
||||
export interface ChartComponent {
|
||||
calculateSpace(availableSpace: Dimension): Dimension;
|
||||
setBoundingBoxXY(point: Point): void;
|
||||
getDrawableElements(): DrawableElem[];
|
||||
}
|
||||
export type SimplePlotDataType = [string, number][];
|
||||
export interface LinePlotData {
|
||||
type: 'line';
|
||||
strokeFill: string;
|
||||
strokeWidth: number;
|
||||
data: SimplePlotDataType;
|
||||
}
|
||||
export interface BarPlotData {
|
||||
type: 'bar';
|
||||
fill: string;
|
||||
data: SimplePlotDataType;
|
||||
}
|
||||
export type PlotData = LinePlotData | BarPlotData;
|
||||
export declare function isBarPlot(data: PlotData): data is BarPlotData;
|
||||
export interface BandAxisDataType {
|
||||
type: 'band';
|
||||
title: string;
|
||||
categories: string[];
|
||||
}
|
||||
export interface LinearAxisDataType {
|
||||
type: 'linear';
|
||||
title: string;
|
||||
min: number;
|
||||
max: number;
|
||||
}
|
||||
export type AxisDataType = LinearAxisDataType | BandAxisDataType;
|
||||
export declare function isBandAxisData(data: AxisDataType): data is BandAxisDataType;
|
||||
export declare function isLinearAxisData(data: AxisDataType): data is LinearAxisDataType;
|
||||
/**
|
||||
* For now we are keeping this configs as we are removing the required fields while generating the config.type.ts file
|
||||
* we should remove `XYChartAxisConfig` and `XYChartConfig` after we started using required fields
|
||||
*/
|
||||
export interface XYChartAxisConfig {
|
||||
showLabel: boolean;
|
||||
labelFontSize: number;
|
||||
labelPadding: number;
|
||||
showTitle: boolean;
|
||||
titleFontSize: number;
|
||||
titlePadding: number;
|
||||
showTick: boolean;
|
||||
tickLength: number;
|
||||
tickWidth: number;
|
||||
showAxisLine: boolean;
|
||||
axisLineWidth: number;
|
||||
}
|
||||
export interface XYChartConfig {
|
||||
width: number;
|
||||
height: number;
|
||||
titleFontSize: number;
|
||||
titlePadding: number;
|
||||
showTitle: boolean;
|
||||
xAxis: XYChartAxisConfig;
|
||||
yAxis: XYChartAxisConfig;
|
||||
chartOrientation: 'vertical' | 'horizontal';
|
||||
plotReservedSpacePercent: number;
|
||||
}
|
||||
export interface XYChartData {
|
||||
xAxis: AxisDataType;
|
||||
yAxis: AxisDataType;
|
||||
title: string;
|
||||
plots: PlotData[];
|
||||
}
|
||||
export interface Dimension {
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
export interface BoundingRect extends Point, Dimension {
|
||||
}
|
||||
export interface Point {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
export type TextHorizontalPos = 'left' | 'center' | 'right';
|
||||
export type TextVerticalPos = 'top' | 'middle';
|
||||
export interface RectElem extends Point {
|
||||
width: number;
|
||||
height: number;
|
||||
fill: string;
|
||||
strokeWidth: number;
|
||||
strokeFill: string;
|
||||
}
|
||||
export interface TextElem extends Point {
|
||||
text: string;
|
||||
fill: string;
|
||||
verticalPos: TextVerticalPos;
|
||||
horizontalPos: TextHorizontalPos;
|
||||
fontSize: number;
|
||||
rotation: number;
|
||||
}
|
||||
export interface PathElem {
|
||||
path: string;
|
||||
fill?: string;
|
||||
strokeWidth: number;
|
||||
strokeFill: string;
|
||||
}
|
||||
export type DrawableElem = {
|
||||
groupTexts: string[];
|
||||
type: 'rect';
|
||||
data: RectElem[];
|
||||
} | {
|
||||
groupTexts: string[];
|
||||
type: 'text';
|
||||
data: TextElem[];
|
||||
} | {
|
||||
groupTexts: string[];
|
||||
type: 'path';
|
||||
data: PathElem[];
|
||||
};
|
12
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/orchestrator.d.ts
vendored
Normal file
12
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/orchestrator.d.ts
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
import type { DrawableElem, XYChartConfig, XYChartData, XYChartThemeConfig } from './interfaces.js';
|
||||
import type { Group } from '../../../diagram-api/types.js';
|
||||
export declare class Orchestrator {
|
||||
private chartConfig;
|
||||
private chartData;
|
||||
private componentStore;
|
||||
constructor(chartConfig: XYChartConfig, chartData: XYChartData, chartThemeConfig: XYChartThemeConfig, tmpSVGGroup: Group);
|
||||
private calculateVerticalSpace;
|
||||
private calculateHorizontalSpace;
|
||||
private calculateSpace;
|
||||
getDrawableElement(): DrawableElem[];
|
||||
}
|
10
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/textDimensionCalculator.d.ts
vendored
Normal file
10
themes/blowfish/assets/lib/mermaid/diagrams/xychart/chartBuilder/textDimensionCalculator.d.ts
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
import type { Dimension } from './interfaces.js';
|
||||
import type { Group } from '../../../diagram-api/types.js';
|
||||
export interface TextDimensionCalculator {
|
||||
getMaxDimension(texts: string[], fontSize: number): Dimension;
|
||||
}
|
||||
export declare class TextDimensionCalculatorWithFont implements TextDimensionCalculator {
|
||||
private parentGroup;
|
||||
constructor(parentGroup: Group);
|
||||
getMaxDimension(texts: string[], fontSize: number): Dimension;
|
||||
}
|
1
themes/blowfish/assets/lib/mermaid/diagrams/xychart/parser/xychart.jison.spec.d.ts
vendored
Normal file
1
themes/blowfish/assets/lib/mermaid/diagrams/xychart/parser/xychart.jison.spec.d.ts
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
export {};
|
40
themes/blowfish/assets/lib/mermaid/diagrams/xychart/xychartDb.d.ts
vendored
Normal file
40
themes/blowfish/assets/lib/mermaid/diagrams/xychart/xychartDb.d.ts
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
import type { DrawableElem, XYChartConfig, XYChartThemeConfig } from './chartBuilder/interfaces.js';
|
||||
import type { Group } from '../../diagram-api/types.js';
|
||||
interface NormalTextType {
|
||||
type: 'text';
|
||||
text: string;
|
||||
}
|
||||
declare function setTmpSVGG(SVGG: Group): void;
|
||||
declare function setOrientation(orientation: string): void;
|
||||
declare function setXAxisTitle(title: NormalTextType): void;
|
||||
declare function setXAxisRangeData(min: number, max: number): void;
|
||||
declare function setXAxisBand(categories: NormalTextType[]): void;
|
||||
declare function setYAxisTitle(title: NormalTextType): void;
|
||||
declare function setYAxisRangeData(min: number, max: number): void;
|
||||
declare function setLineData(title: NormalTextType, data: number[]): void;
|
||||
declare function setBarData(title: NormalTextType, data: number[]): void;
|
||||
declare function getDrawableElem(): DrawableElem[];
|
||||
declare function getChartThemeConfig(): XYChartThemeConfig;
|
||||
declare function getChartConfig(): XYChartConfig;
|
||||
declare const _default: {
|
||||
getDrawableElem: typeof getDrawableElem;
|
||||
clear: () => void;
|
||||
setAccTitle: (txt: string) => void;
|
||||
getAccTitle: () => string;
|
||||
setDiagramTitle: (txt: string) => void;
|
||||
getDiagramTitle: () => string;
|
||||
getAccDescription: () => string;
|
||||
setAccDescription: (txt: string) => void;
|
||||
setOrientation: typeof setOrientation;
|
||||
setXAxisTitle: typeof setXAxisTitle;
|
||||
setXAxisRangeData: typeof setXAxisRangeData;
|
||||
setXAxisBand: typeof setXAxisBand;
|
||||
setYAxisTitle: typeof setYAxisTitle;
|
||||
setYAxisRangeData: typeof setYAxisRangeData;
|
||||
setLineData: typeof setLineData;
|
||||
setBarData: typeof setBarData;
|
||||
setTmpSVGG: typeof setTmpSVGG;
|
||||
getChartThemeConfig: typeof getChartThemeConfig;
|
||||
getChartConfig: typeof getChartConfig;
|
||||
};
|
||||
export default _default;
|
3
themes/blowfish/assets/lib/mermaid/diagrams/xychart/xychartDetector.d.ts
vendored
Normal file
3
themes/blowfish/assets/lib/mermaid/diagrams/xychart/xychartDetector.d.ts
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
import type { ExternalDiagramDefinition } from '../../diagram-api/types.js';
|
||||
declare const plugin: ExternalDiagramDefinition;
|
||||
export default plugin;
|
2
themes/blowfish/assets/lib/mermaid/diagrams/xychart/xychartDiagram.d.ts
vendored
Normal file
2
themes/blowfish/assets/lib/mermaid/diagrams/xychart/xychartDiagram.d.ts
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
import type { DiagramDefinition } from '../../diagram-api/types.js';
|
||||
export declare const diagram: DiagramDefinition;
|
6
themes/blowfish/assets/lib/mermaid/diagrams/xychart/xychartRenderer.d.ts
vendored
Normal file
6
themes/blowfish/assets/lib/mermaid/diagrams/xychart/xychartRenderer.d.ts
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
import type { Diagram } from '../../Diagram.js';
|
||||
export declare const draw: (txt: string, id: string, _version: string, diagObj: Diagram) => void;
|
||||
declare const _default: {
|
||||
draw: (txt: string, id: string, _version: string, diagObj: Diagram) => void;
|
||||
};
|
||||
export default _default;
|
Loading…
Add table
Add a link
Reference in a new issue