enarratio-emdash 0.4.5 → 0.5.0
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/CHANGELOG.md +10 -0
- package/README.md +1 -0
- package/dist/block.d.ts +1 -0
- package/dist/block.js +5 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/src/astro/Chart.astro +1 -0
- package/src/block.ts +7 -0
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ the saved block's fields; every such change is listed here.
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.5.0] - 2026-11-08
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- A "Language" field on the Chart block (`lang`, optional): the language of the chart's text as a BCP 47 tag, so screen readers switch voice when it differs from the page's. Blocks saved earlier have no value and are unchanged.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Draws with enarratio-astro 0.5.0 and Enarratio 0.10.0.
|
|
19
|
+
|
|
10
20
|
## [0.4.5] - 2026-11-07
|
|
11
21
|
|
|
12
22
|
### Changed
|
package/README.md
CHANGED
|
@@ -67,6 +67,7 @@ it only reads the block an editor saved and draws it.
|
|
|
67
67
|
| Bar: several series, direction | bar | Stacked or side by side; vertical or horizontal. |
|
|
68
68
|
| y scale | line, scatter | Linear or logarithmic. |
|
|
69
69
|
| Regression | scatter | Least-squares line with its 95% confidence band. |
|
|
70
|
+
| Language | all | Optional. The language of the chart's text as a BCP 47 tag, such as `de`, so screen readers switch voice. Leave it blank for the page's language. |
|
|
70
71
|
| Data table | all | Behind a "Data table" toggle (default) or hidden for screen readers only. Every chart has one. |
|
|
71
72
|
| Interactive | all | Adds Enarratio's enhancement script to the page. Off by default, so pages stay script-free. |
|
|
72
73
|
|
package/dist/block.d.ts
CHANGED
package/dist/block.js
CHANGED
|
@@ -101,6 +101,11 @@ export const chartBlock = {
|
|
|
101
101
|
initial_value: "linear",
|
|
102
102
|
},
|
|
103
103
|
{ type: "toggle", action_id: "regression", label: "Scatter: regression line with 95% band" },
|
|
104
|
+
{
|
|
105
|
+
type: "text_input",
|
|
106
|
+
action_id: "lang",
|
|
107
|
+
label: "Language of the chart text, such as de (optional; leave blank for the page's language)",
|
|
108
|
+
},
|
|
104
109
|
{
|
|
105
110
|
type: "select",
|
|
106
111
|
action_id: "dataTable",
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import type { PluginDescriptor, ResolvedPlugin } from "emdash";
|
|
11
11
|
export { BLOCK_TYPE, type ChartNode, chartBlock } from "./block.js";
|
|
12
12
|
/** Kept equal to package.json's version, which a test checks. */
|
|
13
|
-
export declare const VERSION = "0.
|
|
13
|
+
export declare const VERSION = "0.5.0";
|
|
14
14
|
/** Options for {@link enarratioPlugin}. */
|
|
15
15
|
export interface EnarratioPluginOptions {
|
|
16
16
|
/**
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { definePlugin } from "emdash";
|
|
|
2
2
|
import { chartBlock } from "./block.js";
|
|
3
3
|
export { BLOCK_TYPE, chartBlock } from "./block.js";
|
|
4
4
|
/** Kept equal to package.json's version, which a test checks. */
|
|
5
|
-
export const VERSION = "0.
|
|
5
|
+
export const VERSION = "0.5.0";
|
|
6
6
|
const ID = "enarratio";
|
|
7
7
|
const COMPONENTS = {
|
|
8
8
|
theme: "enarratio-emdash/astro",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "enarratio-emdash",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "EmDash plugin: a Chart block for the Portable Text editor, drawn on the server by Enarratio as accessible HTML and SVG",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"accessibility",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"prepare": "npm run build"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"enarratio-astro": "0.
|
|
53
|
+
"enarratio-astro": "0.5.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"astro": ">=6",
|
package/src/astro/Chart.astro
CHANGED
package/src/block.ts
CHANGED
|
@@ -30,6 +30,7 @@ export interface ChartNode {
|
|
|
30
30
|
readonly scale?: string;
|
|
31
31
|
readonly regression?: boolean;
|
|
32
32
|
readonly dataTable?: string;
|
|
33
|
+
readonly lang?: string;
|
|
33
34
|
readonly interactive?: boolean;
|
|
34
35
|
}
|
|
35
36
|
|
|
@@ -135,6 +136,12 @@ export const chartBlock: PortableTextBlockConfig = {
|
|
|
135
136
|
initial_value: "linear",
|
|
136
137
|
},
|
|
137
138
|
{ type: "toggle", action_id: "regression", label: "Scatter: regression line with 95% band" },
|
|
139
|
+
{
|
|
140
|
+
type: "text_input",
|
|
141
|
+
action_id: "lang",
|
|
142
|
+
label:
|
|
143
|
+
"Language of the chart text, such as de (optional; leave blank for the page's language)",
|
|
144
|
+
},
|
|
138
145
|
{
|
|
139
146
|
type: "select",
|
|
140
147
|
action_id: "dataTable",
|
package/src/index.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { chartBlock } from "./block.js";
|
|
|
14
14
|
export { BLOCK_TYPE, type ChartNode, chartBlock } from "./block.js";
|
|
15
15
|
|
|
16
16
|
/** Kept equal to package.json's version, which a test checks. */
|
|
17
|
-
export const VERSION = "0.
|
|
17
|
+
export const VERSION = "0.5.0";
|
|
18
18
|
const ID = "enarratio";
|
|
19
19
|
|
|
20
20
|
/** Options for {@link enarratioPlugin}. */
|