2014-06-29 19:37:07 +02:00
|
|
|
{
|
2021-10-23 19:21:28 +02:00
|
|
|
"name": "chart.js",
|
|
|
|
"homepage": "https://www.chartjs.org",
|
|
|
|
"description": "Simple HTML5 charts using the canvas element.",
|
2023-02-10 07:33:01 +01:00
|
|
|
"version": "4.2.1",
|
2021-10-23 19:21:28 +02:00
|
|
|
"license": "MIT",
|
2022-08-05 00:43:26 +02:00
|
|
|
"type": "module",
|
2022-08-06 14:45:41 +02:00
|
|
|
"sideEffects": [
|
|
|
|
"./auto/auto.js",
|
2022-12-16 13:53:27 +01:00
|
|
|
"./auto/auto.cjs",
|
2022-08-06 14:45:41 +02:00
|
|
|
"./dist/chart.umd.js"
|
|
|
|
],
|
2022-08-22 17:58:57 +02:00
|
|
|
"jsdelivr": "./dist/chart.umd.js",
|
|
|
|
"unpkg": "./dist/chart.umd.js",
|
2023-01-05 16:28:07 +01:00
|
|
|
"main": "./dist/chart.cjs",
|
2023-01-10 18:01:59 +01:00
|
|
|
"module": "./dist/chart.js",
|
2022-08-05 00:43:26 +02:00
|
|
|
"exports": {
|
2022-09-14 12:44:57 +02:00
|
|
|
".": {
|
2022-11-17 07:22:47 +01:00
|
|
|
"types": "./dist/types.d.ts",
|
2022-12-16 00:11:11 +01:00
|
|
|
"import": "./dist/chart.js",
|
|
|
|
"require": "./dist/chart.cjs"
|
2022-09-14 12:44:57 +02:00
|
|
|
},
|
|
|
|
"./auto": {
|
2022-11-17 07:22:47 +01:00
|
|
|
"types": "./auto/auto.d.ts",
|
2022-12-16 00:11:11 +01:00
|
|
|
"import": "./auto/auto.js",
|
|
|
|
"require": "./auto/auto.cjs"
|
2022-09-14 12:44:57 +02:00
|
|
|
},
|
|
|
|
"./helpers": {
|
2022-11-17 07:22:47 +01:00
|
|
|
"types": "./helpers/helpers.d.ts",
|
2022-12-16 00:11:11 +01:00
|
|
|
"import": "./helpers/helpers.js",
|
|
|
|
"require": "./helpers/helpers.cjs"
|
2022-09-14 12:44:57 +02:00
|
|
|
}
|
2022-08-05 00:43:26 +02:00
|
|
|
},
|
2022-08-22 17:58:57 +02:00
|
|
|
"types": "./dist/types.d.ts",
|
2021-10-23 19:21:28 +02:00
|
|
|
"keywords": [
|
|
|
|
"canvas",
|
|
|
|
"charts",
|
|
|
|
"data",
|
|
|
|
"graphs",
|
|
|
|
"html5",
|
|
|
|
"responsive"
|
|
|
|
],
|
|
|
|
"repository": {
|
|
|
|
"type": "git",
|
|
|
|
"url": "https://github.com/chartjs/Chart.js.git"
|
|
|
|
},
|
|
|
|
"bugs": {
|
|
|
|
"url": "https://github.com/chartjs/Chart.js/issues"
|
|
|
|
},
|
|
|
|
"files": [
|
2022-07-30 17:25:23 +02:00
|
|
|
"auto/**",
|
|
|
|
"dist/**",
|
2022-11-01 15:54:03 +01:00
|
|
|
"!dist/docs/**",
|
2022-12-16 13:56:06 +01:00
|
|
|
"helpers/**"
|
2021-10-23 19:21:28 +02:00
|
|
|
],
|
|
|
|
"scripts": {
|
|
|
|
"autobuild": "rollup -c -w",
|
2022-12-19 09:39:23 +01:00
|
|
|
"copyDeclarations": "node -e \"fs.cpSync('./src/types/', './dist/types/', {recursive:true})\"",
|
|
|
|
"emitDeclarations": "tsc --emitDeclarationOnly && pnpm copyDeclarations",
|
2022-11-17 14:08:44 +01:00
|
|
|
"build": "rollup -c && pnpm emitDeclarations",
|
2022-08-05 00:43:26 +02:00
|
|
|
"dev": "karma start ./karma.conf.cjs --auto-watch --no-single-run --browsers chrome --grep",
|
|
|
|
"dev:ff": "karma start ./karma.conf.cjs --auto-watch --no-single-run --browsers firefox --grep",
|
2022-08-22 22:30:29 +02:00
|
|
|
"docs": "pnpm run build && pnpm --filter \"./docs/**\" build",
|
|
|
|
"docs:dev": "pnpm run build && pnpm --filter \"./docs/**\" dev",
|
2022-12-14 22:24:43 +01:00
|
|
|
"lint-js": "eslint \"src/**/*.{js,ts}\" \"test/**/*.js\" \"docs/**/*.js\" --cache",
|
|
|
|
"lint-md": "eslint \"**/*.md\" --cache",
|
2022-12-16 13:56:06 +01:00
|
|
|
"lint-types": "pnpm build && node test/types/autogen.js && tsc -p test/types",
|
2022-08-22 20:42:43 +02:00
|
|
|
"lint": "concurrently \"pnpm:lint-*\"",
|
2022-08-04 15:17:40 +02:00
|
|
|
"test-size": "size-limit",
|
2022-08-22 20:42:43 +02:00
|
|
|
"test": "pnpm lint && pnpm test-ci",
|
|
|
|
"test-ci": "concurrently \"pnpm:test-ci-*\"",
|
2022-08-05 00:43:26 +02:00
|
|
|
"test-ci-karma": "cross-env NODE_ENV=test karma start ./karma.conf.cjs --auto-watch --single-run --coverage --grep",
|
2022-08-22 22:30:29 +02:00
|
|
|
"test-ci-integration": "pnpm --filter \"./test/integration/**\" test"
|
2021-10-23 19:21:28 +02:00
|
|
|
},
|
2022-11-30 15:31:43 +01:00
|
|
|
"dependencies": {
|
|
|
|
"@kurkle/color": "^0.3.0"
|
|
|
|
},
|
2021-10-23 19:21:28 +02:00
|
|
|
"devDependencies": {
|
2022-11-17 14:08:44 +01:00
|
|
|
"@rollup/plugin-commonjs": "^23.0.2",
|
|
|
|
"@rollup/plugin-inject": "^5.0.2",
|
|
|
|
"@rollup/plugin-json": "^5.0.1",
|
|
|
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
2022-08-18 08:09:09 +02:00
|
|
|
"@size-limit/preset-big-lib": "^8.0.0",
|
2022-11-17 14:08:44 +01:00
|
|
|
"@swc/core": "^1.3.18",
|
2022-08-04 15:17:40 +02:00
|
|
|
"@types/estree": "^1.0.0",
|
2022-08-18 08:09:09 +02:00
|
|
|
"@types/offscreencanvas": "^2019.7.0",
|
|
|
|
"@typescript-eslint/eslint-plugin": "^5.32.0",
|
|
|
|
"@typescript-eslint/parser": "^5.32.0",
|
|
|
|
"chartjs-adapter-luxon": "^1.2.0",
|
2021-10-23 19:21:28 +02:00
|
|
|
"chartjs-adapter-moment": "^1.0.0",
|
Interaction functions (#10046)
* Refactor get...Items functions to take events rather than positions
To work toward exposing something like the get...Items functions.
* Switch getAxisItems to use optimizedEvaluateItems
optimizedEvaluateItems falls back to evaluating all items for unsorted items, and sorting / optimizing ought to be okay, so this ought to be equivalent.
* Performance
* Consolidate getRelativePosition
helpers.dom.js's getRelativePosition already had logic to handle ChartEvent vs. Event (as demonstrated by the `native` check within `getCanvasPosition`), so it's redundant for core.interaction.js to have its own `native` check.
Update `getRelativePosition` to use the same `native` check as core.interaction.js's version. As best as I can tell, the ChartEvent's x and y are populated from `getRelativePosition`, so the previous `getCanvasPosition` was effectively just duplicating `getRelativePosition'`s work. I added a test to verify this; it depends on a local, not-yet-submitted change in chartjs-test-utils' `triggerMouseEvent` to return the mouse event that it triggers.
* Add an API to refactor duplicate isPointInArea
* Rename and update JSDoc to prepare for making this public
* Give functions a consistent, generic interface
* Export functions for discussion
* Code review feedback
Add a non-null assertion, as requested in code review.
Add JSDoc to clarify that `getCanvasPosition` now expects a native `Event`, not a `ChartEvent`. Add `@ts-ignore`; `getCanvasPosition` relied on some loose conversions between `Event`, `TouchEvent`, and `Touch` that would require several changes to make TypeScript happy.
* Code review feedback
Return the event directly, to speed up the code a bit. Add JSDoc to help communicate its intent. Update various comments.
* Finalize exports; add docs and TypeScript
* Update src/helpers/helpers.dom.js
* Update src/helpers/helpers.dom.js
Only thing needed actually is the update of chartjs-test-utils to 0.4.0
* Bump chartjs-test-utils dependency
To get supporting work from https://github.com/chartjs/chartjs-test-utils/pull/19
Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
2022-03-24 14:02:30 +01:00
|
|
|
"chartjs-test-utils": "^0.4.0",
|
2022-08-18 08:09:09 +02:00
|
|
|
"concurrently": "^7.3.0",
|
|
|
|
"coveralls": "^3.1.1",
|
2021-10-23 19:21:28 +02:00
|
|
|
"cross-env": "^7.0.3",
|
2022-08-18 08:09:09 +02:00
|
|
|
"eslint": "^8.21.0",
|
2021-10-23 19:21:28 +02:00
|
|
|
"eslint-config-chartjs": "^0.3.0",
|
|
|
|
"eslint-plugin-es": "^4.1.0",
|
2022-08-18 08:09:09 +02:00
|
|
|
"eslint-plugin-html": "^7.1.0",
|
|
|
|
"eslint-plugin-markdown": "^3.0.0",
|
2021-10-23 19:21:28 +02:00
|
|
|
"esm": "^3.2.25",
|
2022-08-18 08:09:09 +02:00
|
|
|
"glob": "^8.0.3",
|
2021-10-23 19:21:28 +02:00
|
|
|
"jasmine": "^3.7.0",
|
|
|
|
"jasmine-core": "^3.7.1",
|
|
|
|
"karma": "^6.3.2",
|
|
|
|
"karma-chrome-launcher": "^3.1.0",
|
|
|
|
"karma-coverage": "^2.0.3",
|
|
|
|
"karma-edge-launcher": "^0.4.2",
|
|
|
|
"karma-firefox-launcher": "^2.1.0",
|
|
|
|
"karma-jasmine": "^4.0.1",
|
|
|
|
"karma-jasmine-html-reporter": "^1.5.4",
|
2022-08-13 00:15:47 +02:00
|
|
|
"karma-rollup-preprocessor": "7.0.7",
|
2021-10-23 19:21:28 +02:00
|
|
|
"karma-safari-private-launcher": "^1.0.0",
|
|
|
|
"karma-spec-reporter": "0.0.32",
|
2022-08-18 08:09:09 +02:00
|
|
|
"luxon": "^3.0.1",
|
|
|
|
"moment": "^2.29.4",
|
2021-12-06 13:38:39 +01:00
|
|
|
"moment-timezone": "^0.5.34",
|
2022-08-18 08:09:09 +02:00
|
|
|
"pixelmatch": "^5.3.0",
|
2022-11-17 14:08:44 +01:00
|
|
|
"rollup": "^3.3.0",
|
2021-10-23 19:21:28 +02:00
|
|
|
"rollup-plugin-cleanup": "^3.2.1",
|
2022-11-17 14:08:44 +01:00
|
|
|
"rollup-plugin-istanbul": "^4.0.0",
|
|
|
|
"rollup-plugin-swc3": "^0.7.0",
|
2021-10-23 19:21:28 +02:00
|
|
|
"rollup-plugin-terser": "^7.0.2",
|
2022-08-18 08:09:09 +02:00
|
|
|
"size-limit": "^8.0.0",
|
2022-08-05 14:02:04 +02:00
|
|
|
"typescript": "^4.7.4",
|
2022-08-18 08:09:09 +02:00
|
|
|
"yargs": "^17.5.1"
|
2022-08-22 20:42:43 +02:00
|
|
|
},
|
|
|
|
"engines": {
|
2023-03-29 17:00:29 +02:00
|
|
|
"pnpm": ">=7"
|
2022-08-22 20:42:43 +02:00
|
|
|
},
|
|
|
|
"packageManager": "pnpm@7.9.0",
|
|
|
|
"pnpm": {
|
|
|
|
"overrides": {
|
|
|
|
"html-entities": "1.4.0"
|
|
|
|
},
|
|
|
|
"peerDependencyRules": {
|
2022-09-14 12:44:57 +02:00
|
|
|
"ignoreMissing": [
|
|
|
|
"chart.js"
|
|
|
|
]
|
2022-08-22 20:42:43 +02:00
|
|
|
}
|
2021-10-23 19:21:28 +02:00
|
|
|
}
|
2021-11-30 19:14:49 +01:00
|
|
|
}
|