chart2music
Advanced tools
Comparing version 0.4.3 to 0.5.0
@@ -112,2 +112,3 @@ interface AudioEngine { | ||
private _initializeData; | ||
private _focusEvent; | ||
private _startListening; | ||
@@ -114,0 +115,0 @@ private _playAndSpeak; |
@@ -601,2 +601,3 @@ var c2mChart = (function (exports) { | ||
this._chartElement = input.element; | ||
this._explicitAxes = input.axes ?? {}; | ||
if (!this._chartElement.hasAttribute("alt") && | ||
@@ -607,10 +608,3 @@ !this._chartElement.hasAttribute("aria-label")) { | ||
this._ccElement = input.cc ?? this._chartElement; | ||
this._initializeData(input.data); | ||
this._metadataByGroup = calculateMetadataByGroup(this._data); | ||
this._metadataByGroup = checkForNumberInput(this._metadataByGroup, input.data); | ||
this._xAxis = initializeAxis(this._data, "x", input.axes?.x); | ||
this._yAxis = initializeAxis(this._data, "y", input.axes?.y); | ||
if (usesAxis(this._data, "y2")) { | ||
this._y2Axis = initializeAxis(this._data, "y2", input.axes?.y2); | ||
} | ||
this.setData(input.data, input.axes); | ||
if (input?.options) { | ||
@@ -622,4 +616,11 @@ this._options = { | ||
} | ||
this._generateSummary(); | ||
ScreenReaderBridge.addAriaAttributes(this._ccElement); | ||
this._sr = new ScreenReaderBridge(this._ccElement); | ||
this._initializeKeyActionMap(); | ||
this._startListening(); | ||
} | ||
_generateSummary() { | ||
this._summary = generateSummary({ | ||
type: input.type, | ||
type: this._type, | ||
title: this._title, | ||
@@ -632,7 +633,14 @@ x: this._xAxis, | ||
}); | ||
ScreenReaderBridge.addAriaAttributes(this._ccElement); | ||
this._sr = new ScreenReaderBridge(this._ccElement); | ||
this._initializeKeyActionMap(); | ||
this._startListening(); | ||
} | ||
setData(data, axes) { | ||
this._initializeData(data); | ||
this._metadataByGroup = calculateMetadataByGroup(this._data); | ||
this._metadataByGroup = checkForNumberInput(this._metadataByGroup, data); | ||
this._xAxis = initializeAxis(this._data, "x", { ...this._explicitAxes.x, ...axes?.x }); | ||
this._yAxis = initializeAxis(this._data, "y", { ...this._explicitAxes.y, ...axes?.y }); | ||
if (usesAxis(this._data, "y2")) { | ||
this._y2Axis = initializeAxis(this._data, "y2", { ...this._explicitAxes.y2, ...axes?.y2 }); | ||
} | ||
this._generateSummary(); | ||
} | ||
setOptions(option) { | ||
@@ -959,11 +967,3 @@ this._options = { | ||
if (this._options.live) { | ||
this._summary = generateSummary({ | ||
type: this._type, | ||
title: this._title, | ||
x: this._xAxis, | ||
y: this._yAxis, | ||
dataRows: this._groups.length, | ||
y2: this._y2Axis, | ||
live: this._options.live | ||
}); | ||
this._generateSummary(); | ||
} | ||
@@ -970,0 +970,0 @@ if (this._options.enableSpeech) { |
{ | ||
"name": "chart2music", | ||
"version": "0.4.3", | ||
"version": "0.5.0", | ||
"main": "dist/index.js", | ||
@@ -34,2 +34,5 @@ "module": "dist/index.mjs", | ||
"clean": "rimraf ./dist ./coverage", | ||
"docs-start": "docusaurus start", | ||
"docs-build": "docusaurus build", | ||
"docs-serve": "docusaurus serve", | ||
"start": "concurrently \"rollup -c rollup.config.js -w\" \"http-server .\" \"jest -o\"", | ||
@@ -44,2 +47,4 @@ "lint": "eslint src/ --ext .ts --fix", | ||
"devDependencies": { | ||
"@docusaurus/core": "^2.0.1", | ||
"@docusaurus/preset-classic": "^2.0.1", | ||
"@rollup/plugin-typescript": "^8.3.3", | ||
@@ -66,3 +71,7 @@ "@types/jest": "^28.1.6", | ||
"typescript": "^4.7.4" | ||
}, | ||
"resolutions": { | ||
"got": "^11.8.5", | ||
"trim": "^0.0.3" | ||
} | ||
} |
@@ -7,2 +7,3 @@ # Chart2Music | ||
![Build verification](https://github.com/julianna-langston/chart2music/actions/workflows/ci-build.yml/badge.svg) | ||
![Documentation](https://github.com/julianna-langston/chart2music/actions/workflows/ci-docs-build.yml/badge.svg?event=push) | ||
[![Known Vulnerabilities](https://snyk.io/test/github/julianna-langston/chart2music/badge.svg)](https://snyk.io/test/github/julianna-langston/chart2music) | ||
@@ -9,0 +10,0 @@ [![codecov](https://codecov.io/gh/julianna-langston/chart2music/branch/main/graph/badge.svg?token=4T7MV9XKFS)](https://codecov.io/gh/julianna-langston/chart2music) |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
124026
28
2996
51
0
23