@depup/chart.js 4.5.1-depup.28
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/LICENSE.md +9 -0
- package/README.md +31 -0
- package/auto/auto.cjs +6 -0
- package/auto/auto.d.ts +4 -0
- package/auto/auto.js +6 -0
- package/auto/package.json +14 -0
- package/changes.json +10 -0
- package/dist/chart.cjs +11647 -0
- package/dist/chart.cjs.map +1 -0
- package/dist/chart.js +11599 -0
- package/dist/chart.js.map +1 -0
- package/dist/chart.umd.js +14 -0
- package/dist/chart.umd.js.map +1 -0
- package/dist/chart.umd.min.js +14 -0
- package/dist/chart.umd.min.js.map +1 -0
- package/dist/chunks/helpers.dataset.cjs +2915 -0
- package/dist/chunks/helpers.dataset.cjs.map +1 -0
- package/dist/chunks/helpers.dataset.js +2788 -0
- package/dist/chunks/helpers.dataset.js.map +1 -0
- package/dist/controllers/controller.bar.d.ts +65 -0
- package/dist/controllers/controller.bubble.d.ts +35 -0
- package/dist/controllers/controller.doughnut.d.ts +64 -0
- package/dist/controllers/controller.line.d.ts +13 -0
- package/dist/controllers/controller.pie.d.ts +3 -0
- package/dist/controllers/controller.polarArea.d.ts +35 -0
- package/dist/controllers/controller.radar.d.ts +19 -0
- package/dist/controllers/controller.scatter.d.ts +20 -0
- package/dist/controllers/index.d.ts +8 -0
- package/dist/core/core.adapters.d.ts +67 -0
- package/dist/core/core.animation.d.ts +21 -0
- package/dist/core/core.animations.d.ts +22 -0
- package/dist/core/core.animations.defaults.d.ts +1 -0
- package/dist/core/core.animator.d.ts +67 -0
- package/dist/core/core.config.d.ts +86 -0
- package/dist/core/core.controller.d.ts +257 -0
- package/dist/core/core.datasetController.d.ts +251 -0
- package/dist/core/core.defaults.d.ts +80 -0
- package/dist/core/core.element.d.ts +21 -0
- package/dist/core/core.interaction.d.ts +92 -0
- package/dist/core/core.layouts.d.ts +88 -0
- package/dist/core/core.layouts.defaults.d.ts +1 -0
- package/dist/core/core.plugins.d.ts +64 -0
- package/dist/core/core.registry.d.ts +90 -0
- package/dist/core/core.scale.autoskip.d.ts +19 -0
- package/dist/core/core.scale.d.ts +343 -0
- package/dist/core/core.scale.defaults.d.ts +1 -0
- package/dist/core/core.ticks.d.ts +31 -0
- package/dist/core/core.typedRegistry.d.ts +33 -0
- package/dist/core/index.d.ts +15 -0
- package/dist/elements/element.arc.d.ts +51 -0
- package/dist/elements/element.bar.d.ts +32 -0
- package/dist/elements/element.line.d.ts +87 -0
- package/dist/elements/element.point.d.ts +39 -0
- package/dist/elements/index.d.ts +4 -0
- package/dist/helpers/helpers.canvas.d.ts +75 -0
- package/dist/helpers/helpers.collection.d.ts +68 -0
- package/dist/helpers/helpers.color.d.ts +13 -0
- package/dist/helpers/helpers.config.d.ts +31 -0
- package/dist/helpers/helpers.config.types.d.ts +41 -0
- package/dist/helpers/helpers.core.d.ts +147 -0
- package/dist/helpers/helpers.curve.d.ts +17 -0
- package/dist/helpers/helpers.dataset.d.ts +2 -0
- package/dist/helpers/helpers.dom.d.ts +48 -0
- package/dist/helpers/helpers.easing.d.ts +40 -0
- package/dist/helpers/helpers.extras.d.ts +45 -0
- package/dist/helpers/helpers.interpolation.d.ts +22 -0
- package/dist/helpers/helpers.intl.d.ts +1 -0
- package/dist/helpers/helpers.math.d.ts +84 -0
- package/dist/helpers/helpers.options.d.ts +97 -0
- package/dist/helpers/helpers.rtl.d.ts +10 -0
- package/dist/helpers/helpers.segment.d.ts +65 -0
- package/dist/helpers/index.d.ts +16 -0
- package/dist/helpers.cjs +136 -0
- package/dist/helpers.cjs.map +1 -0
- package/dist/helpers.js +9 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.umd.d.ts +5 -0
- package/dist/platform/index.d.ts +5 -0
- package/dist/platform/platform.base.d.ts +63 -0
- package/dist/platform/platform.basic.d.ts +10 -0
- package/dist/platform/platform.dom.d.ts +19 -0
- package/dist/plugins/index.d.ts +7 -0
- package/dist/plugins/plugin.colors.d.ts +11 -0
- package/dist/plugins/plugin.decimation.d.ts +10 -0
- package/dist/plugins/plugin.filler/filler.drawing.d.ts +1 -0
- package/dist/plugins/plugin.filler/filler.helper.d.ts +14 -0
- package/dist/plugins/plugin.filler/filler.options.d.ts +30 -0
- package/dist/plugins/plugin.filler/filler.segment.d.ts +36 -0
- package/dist/plugins/plugin.filler/filler.target.d.ts +9 -0
- package/dist/plugins/plugin.filler/filler.target.stack.d.ts +14 -0
- package/dist/plugins/plugin.filler/index.d.ts +12 -0
- package/dist/plugins/plugin.filler/simpleArc.d.ts +12 -0
- package/dist/plugins/plugin.legend.d.ts +114 -0
- package/dist/plugins/plugin.subtitle.d.ts +27 -0
- package/dist/plugins/plugin.title.d.ts +61 -0
- package/dist/plugins/plugin.tooltip.d.ts +288 -0
- package/dist/scales/index.d.ts +6 -0
- package/dist/scales/scale.category.d.ts +21 -0
- package/dist/scales/scale.linear.d.ts +10 -0
- package/dist/scales/scale.linearbase.d.ts +20 -0
- package/dist/scales/scale.logarithmic.d.ts +25 -0
- package/dist/scales/scale.radialLinear.d.ts +63 -0
- package/dist/scales/scale.time.d.ts +130 -0
- package/dist/scales/scale.timeseries.d.ts +39 -0
- package/dist/types/animation.d.ts +34 -0
- package/dist/types/basic.d.ts +3 -0
- package/dist/types/color.d.ts +1 -0
- package/dist/types/geometric.d.ts +52 -0
- package/dist/types/index.d.ts +3885 -0
- package/dist/types/layout.d.ts +65 -0
- package/dist/types/utils.d.ts +30 -0
- package/dist/types.d.ts +10 -0
- package/helpers/helpers.cjs +1 -0
- package/helpers/helpers.d.ts +1 -0
- package/helpers/helpers.js +1 -0
- package/helpers/package.json +14 -0
- package/package.json +160 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import {ChartArea} from './geometric.js';
|
|
2
|
+
|
|
3
|
+
export type LayoutPosition = 'left' | 'top' | 'right' | 'bottom' | 'center' | 'chartArea' | {[scaleId: string]: number};
|
|
4
|
+
|
|
5
|
+
export interface LayoutItem {
|
|
6
|
+
/**
|
|
7
|
+
* The position of the item in the chart layout. Possible values are
|
|
8
|
+
*/
|
|
9
|
+
position: LayoutPosition;
|
|
10
|
+
/**
|
|
11
|
+
* The weight used to sort the item. Higher weights are further away from the chart area
|
|
12
|
+
*/
|
|
13
|
+
weight: number;
|
|
14
|
+
/**
|
|
15
|
+
* if true, and the item is horizontal, then push vertical boxes down
|
|
16
|
+
*/
|
|
17
|
+
fullSize: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Width of item. Must be valid after update()
|
|
20
|
+
*/
|
|
21
|
+
width: number;
|
|
22
|
+
/**
|
|
23
|
+
* Height of item. Must be valid after update()
|
|
24
|
+
*/
|
|
25
|
+
height: number;
|
|
26
|
+
/**
|
|
27
|
+
* Left edge of the item. Set by layout system and cannot be used in update
|
|
28
|
+
*/
|
|
29
|
+
left: number;
|
|
30
|
+
/**
|
|
31
|
+
* Top edge of the item. Set by layout system and cannot be used in update
|
|
32
|
+
*/
|
|
33
|
+
top: number;
|
|
34
|
+
/**
|
|
35
|
+
* Right edge of the item. Set by layout system and cannot be used in update
|
|
36
|
+
*/
|
|
37
|
+
right: number;
|
|
38
|
+
/**
|
|
39
|
+
* Bottom edge of the item. Set by layout system and cannot be used in update
|
|
40
|
+
*/
|
|
41
|
+
bottom: number;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Called before the layout process starts
|
|
45
|
+
*/
|
|
46
|
+
beforeLayout?(): void;
|
|
47
|
+
/**
|
|
48
|
+
* Draws the element
|
|
49
|
+
*/
|
|
50
|
+
draw(chartArea: ChartArea): void;
|
|
51
|
+
/**
|
|
52
|
+
* Returns an object with padding on the edges
|
|
53
|
+
*/
|
|
54
|
+
getPadding?(): ChartArea;
|
|
55
|
+
/**
|
|
56
|
+
* returns true if the layout item is horizontal (ie. top or bottom)
|
|
57
|
+
*/
|
|
58
|
+
isHorizontal(): boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Takes two parameters: width and height.
|
|
61
|
+
* @param width
|
|
62
|
+
* @param height
|
|
63
|
+
*/
|
|
64
|
+
update(width: number, height: number, margins?: ChartArea): void;
|
|
65
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
2
|
+
|
|
3
|
+
// DeepPartial implementation taken from the utility-types NPM package, which is
|
|
4
|
+
// Copyright (c) 2016 Piotr Witek <piotrek.witek@gmail.com> (http://piotrwitek.github.io)
|
|
5
|
+
// and used under the terms of the MIT license
|
|
6
|
+
export type DeepPartial<T> = T extends Function
|
|
7
|
+
? T
|
|
8
|
+
: T extends Array<infer U>
|
|
9
|
+
? _DeepPartialArray<U>
|
|
10
|
+
: T extends object
|
|
11
|
+
? _DeepPartialObject<T>
|
|
12
|
+
: T | undefined;
|
|
13
|
+
|
|
14
|
+
type _DeepPartialArray<T> = Array<DeepPartial<T>>
|
|
15
|
+
type _DeepPartialObject<T> = { [P in keyof T]?: DeepPartial<T[P]> };
|
|
16
|
+
|
|
17
|
+
export type DistributiveArray<T> = [T] extends [unknown] ? Array<T> : never
|
|
18
|
+
|
|
19
|
+
// https://stackoverflow.com/a/50375286
|
|
20
|
+
export type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
21
|
+
|
|
22
|
+
export type AllKeys<T> = T extends any ? keyof T : never;
|
|
23
|
+
|
|
24
|
+
export type PickType<T, K extends AllKeys<T>> = T extends { [k in K]?: any }
|
|
25
|
+
? T[K]
|
|
26
|
+
: undefined;
|
|
27
|
+
|
|
28
|
+
export type Merge<T extends object> = {
|
|
29
|
+
[k in AllKeys<T>]: PickType<T, k>;
|
|
30
|
+
};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Temporary entry point of the types at the time of the transition.
|
|
3
|
+
* After transition done need to remove it in favor of index.ts
|
|
4
|
+
*/
|
|
5
|
+
export * from './index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Explicitly re-exporting to resolve the ambiguity.
|
|
8
|
+
*/
|
|
9
|
+
export { BarController, BubbleController, DoughnutController, LineController, PieController, PolarAreaController, RadarController, ScatterController, Animation, Animations, Chart, DatasetController, Interaction, Scale, Ticks, defaults, layouts, registry, ArcElement, BarElement, LineElement, PointElement, BasePlatform, BasicPlatform, DomPlatform, Decimation, Filler, Legend, SubTitle, Title, Tooltip, CategoryScale, LinearScale, LogarithmicScale, RadialLinearScale, TimeScale, TimeSeriesScale, PluginOptionsByType, ElementOptionsByType, ChartDatasetProperties, UpdateModeEnum, registerables } from './types/index.js';
|
|
10
|
+
export * from './types/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/helpers.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/helpers/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/helpers.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "chart.js-helpers",
|
|
3
|
+
"private": true,
|
|
4
|
+
"description": "Helpers package. Exists to support bundlers without exports support such as webpack 4.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./helpers.cjs",
|
|
7
|
+
"module": "./helpers.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
"types": "./helpers.d.ts",
|
|
10
|
+
"import": "./helpers.js",
|
|
11
|
+
"require": "./helpers.cjs"
|
|
12
|
+
},
|
|
13
|
+
"types": "./helpers.d.ts"
|
|
14
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@depup/chart.js",
|
|
3
|
+
"homepage": "https://www.chartjs.org",
|
|
4
|
+
"description": "Simple HTML5 charts using the canvas element. (with updated dependencies)",
|
|
5
|
+
"version": "4.5.1-depup.28",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"sideEffects": [
|
|
9
|
+
"./auto/auto.js",
|
|
10
|
+
"./auto/auto.cjs",
|
|
11
|
+
"./dist/chart.umd.min.js",
|
|
12
|
+
"./dist/chart.umd.js"
|
|
13
|
+
],
|
|
14
|
+
"jsdelivr": "./dist/chart.umd.min.js",
|
|
15
|
+
"unpkg": "./dist/chart.umd.min.js",
|
|
16
|
+
"main": "./dist/chart.cjs",
|
|
17
|
+
"module": "./dist/chart.js",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/types.d.ts",
|
|
21
|
+
"import": "./dist/chart.js",
|
|
22
|
+
"require": "./dist/chart.cjs"
|
|
23
|
+
},
|
|
24
|
+
"./auto": {
|
|
25
|
+
"types": "./auto/auto.d.ts",
|
|
26
|
+
"import": "./auto/auto.js",
|
|
27
|
+
"require": "./auto/auto.cjs"
|
|
28
|
+
},
|
|
29
|
+
"./helpers": {
|
|
30
|
+
"types": "./helpers/helpers.d.ts",
|
|
31
|
+
"import": "./helpers/helpers.js",
|
|
32
|
+
"require": "./helpers/helpers.cjs"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"types": "./dist/types.d.ts",
|
|
36
|
+
"keywords": [
|
|
37
|
+
"chart.js",
|
|
38
|
+
"depup",
|
|
39
|
+
"updated-dependencies",
|
|
40
|
+
"security",
|
|
41
|
+
"latest",
|
|
42
|
+
"patched",
|
|
43
|
+
"canvas",
|
|
44
|
+
"charts",
|
|
45
|
+
"data",
|
|
46
|
+
"graphs",
|
|
47
|
+
"html5",
|
|
48
|
+
"responsive"
|
|
49
|
+
],
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "https://github.com/chartjs/Chart.js.git"
|
|
53
|
+
},
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/chartjs/Chart.js/issues"
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"auto/**",
|
|
59
|
+
"dist/**",
|
|
60
|
+
"!dist/docs/**",
|
|
61
|
+
"helpers/**",
|
|
62
|
+
"changes.json",
|
|
63
|
+
"README.md"
|
|
64
|
+
],
|
|
65
|
+
"scripts": {
|
|
66
|
+
"autobuild": "rollup -c -w",
|
|
67
|
+
"copyDeclarations": "node -e \"fs.cpSync('./src/types/', './dist/types/', {recursive:true})\"",
|
|
68
|
+
"emitDeclarations": "tsc --emitDeclarationOnly && pnpm copyDeclarations",
|
|
69
|
+
"build": "rollup -c && pnpm emitDeclarations",
|
|
70
|
+
"dev": "karma start ./karma.conf.cjs --auto-watch --no-single-run --browsers chrome --grep",
|
|
71
|
+
"dev:ff": "karma start ./karma.conf.cjs --auto-watch --no-single-run --browsers firefox --grep",
|
|
72
|
+
"docs": "pnpm run build && pnpm --filter \"./docs/**\" build",
|
|
73
|
+
"docs:dev": "pnpm run build && pnpm --filter \"./docs/**\" dev",
|
|
74
|
+
"lint-js": "eslint \"src/**/*.{js,ts}\" \"test/**/*.js\" \"docs/**/*.js\" --cache",
|
|
75
|
+
"lint-md": "eslint \"**/*.md\" --cache",
|
|
76
|
+
"lint-types": "pnpm build && node test/types/autogen.js && tsc -p test/types",
|
|
77
|
+
"lint": "concurrently \"pnpm:lint-*\"",
|
|
78
|
+
"test": "pnpm lint && pnpm test-ci",
|
|
79
|
+
"test-ci": "concurrently \"pnpm:test-ci-*\"",
|
|
80
|
+
"test-ci-karma": "cross-env NODE_ENV=test karma start ./karma.conf.cjs --auto-watch --single-run --coverage --grep",
|
|
81
|
+
"test-ci-integration": "pnpm --filter \"./test/integration/**\" test"
|
|
82
|
+
},
|
|
83
|
+
"dependencies": {
|
|
84
|
+
"@kurkle/color": "^0.4.0"
|
|
85
|
+
},
|
|
86
|
+
"devDependencies": {
|
|
87
|
+
"@rollup/plugin-commonjs": "^23.0.2",
|
|
88
|
+
"@rollup/plugin-inject": "^5.0.2",
|
|
89
|
+
"@rollup/plugin-json": "^5.0.1",
|
|
90
|
+
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
91
|
+
"@swc/core": "^1.3.18",
|
|
92
|
+
"@types/estree": "^1.0.0",
|
|
93
|
+
"@types/offscreencanvas": "^2019.7.0",
|
|
94
|
+
"@typescript-eslint/eslint-plugin": "^5.32.0",
|
|
95
|
+
"@typescript-eslint/parser": "^5.32.0",
|
|
96
|
+
"chartjs-adapter-luxon": "^1.2.0",
|
|
97
|
+
"chartjs-adapter-moment": "^1.0.0",
|
|
98
|
+
"chartjs-test-utils": "^0.4.0",
|
|
99
|
+
"concurrently": "^7.3.0",
|
|
100
|
+
"coveralls": "^3.1.1",
|
|
101
|
+
"cross-env": "^7.0.3",
|
|
102
|
+
"eslint": "^8.21.0",
|
|
103
|
+
"eslint-config-chartjs": "^0.3.0",
|
|
104
|
+
"eslint-plugin-es": "^4.1.0",
|
|
105
|
+
"eslint-plugin-html": "^7.1.0",
|
|
106
|
+
"eslint-plugin-markdown": "^3.0.0",
|
|
107
|
+
"esm": "^3.2.25",
|
|
108
|
+
"glob": "^8.0.3",
|
|
109
|
+
"jasmine": "^3.7.0",
|
|
110
|
+
"jasmine-core": "^3.7.1",
|
|
111
|
+
"karma": "^6.3.2",
|
|
112
|
+
"karma-chrome-launcher": "^3.1.0",
|
|
113
|
+
"karma-coverage": "^2.0.3",
|
|
114
|
+
"karma-edge-launcher": "^0.4.2",
|
|
115
|
+
"karma-firefox-launcher": "^2.1.0",
|
|
116
|
+
"karma-jasmine": "^4.0.1",
|
|
117
|
+
"karma-jasmine-html-reporter": "^1.5.4",
|
|
118
|
+
"karma-rollup-preprocessor": "7.0.7",
|
|
119
|
+
"karma-safari-private-launcher": "^1.0.0",
|
|
120
|
+
"karma-spec-reporter": "0.0.32",
|
|
121
|
+
"luxon": "^3.0.1",
|
|
122
|
+
"moment": "^2.29.4",
|
|
123
|
+
"moment-timezone": "^0.5.34",
|
|
124
|
+
"pixelmatch": "^5.3.0",
|
|
125
|
+
"rollup": "^3.3.0",
|
|
126
|
+
"rollup-plugin-cleanup": "^3.2.1",
|
|
127
|
+
"rollup-plugin-istanbul": "^4.0.0",
|
|
128
|
+
"rollup-plugin-swc3": "^0.7.0",
|
|
129
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
130
|
+
"typescript": "^4.7.4",
|
|
131
|
+
"yargs": "^17.5.1"
|
|
132
|
+
},
|
|
133
|
+
"engines": {
|
|
134
|
+
"pnpm": ">=8"
|
|
135
|
+
},
|
|
136
|
+
"packageManager": "pnpm@8.13.0",
|
|
137
|
+
"pnpm": {
|
|
138
|
+
"overrides": {
|
|
139
|
+
"html-entities": "1.4.0"
|
|
140
|
+
},
|
|
141
|
+
"peerDependencyRules": {
|
|
142
|
+
"ignoreMissing": [
|
|
143
|
+
"chart.js"
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"depup": {
|
|
148
|
+
"changes": {
|
|
149
|
+
"@kurkle/color": {
|
|
150
|
+
"from": "^0.3.0",
|
|
151
|
+
"to": "^0.4.0"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
"depsUpdated": 1,
|
|
155
|
+
"originalPackage": "chart.js",
|
|
156
|
+
"originalVersion": "4.5.1",
|
|
157
|
+
"processedAt": "2026-07-21T17:22:08.064Z",
|
|
158
|
+
"smokeTest": "passed"
|
|
159
|
+
}
|
|
160
|
+
}
|