@pie-players/pie-tool-theme 0.3.5 → 0.3.7
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/README.md +38 -0
- package/package.json +5 -5
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @pie-players/pie-tool-theme
|
|
2
|
+
|
|
3
|
+
Accessible color scheme selection tool for PIE assessment players.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Provides a theme/color scheme picker that applies accessible color schemes via the `<pie-theme>` provider. Addresses WCAG 2.1 Level AA criteria 1.4.1, 1.4.3, and 1.4.11.
|
|
8
|
+
|
|
9
|
+
## Custom Element
|
|
10
|
+
|
|
11
|
+
Tag: `pie-tool-theme`
|
|
12
|
+
|
|
13
|
+
| Attribute | Type | Default | Description |
|
|
14
|
+
|---|---|---|---|
|
|
15
|
+
| `visible` | `boolean` | `false` | Controls visibility |
|
|
16
|
+
| `tool-id` | `string` | `'theme'` | Identifier used by the ToolCoordinator |
|
|
17
|
+
| `schemes` | `string` | `''` | JSON string of custom scheme definitions |
|
|
18
|
+
|
|
19
|
+
| JS Property | Type | Description |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `schemeCatalog` | `object[]` | Array of scheme objects (alternative to the `schemes` attribute) |
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
- Dropdown scheme selector with color previews
|
|
26
|
+
- Discovers available schemes from `<pie-theme>` provider, `schemeCatalog` property, or `schemes` JSON attribute
|
|
27
|
+
- Persists selection to `localStorage` (key: `pie-color-scheme`)
|
|
28
|
+
- Applies scheme by setting the `scheme` attribute on the nearest `<pie-theme>` element
|
|
29
|
+
- Focus trap when visible; keyboard navigation with arrow keys and Escape
|
|
30
|
+
- Connects to `AssessmentToolkitRuntimeContext` for ToolCoordinator integration
|
|
31
|
+
|
|
32
|
+
## Integration
|
|
33
|
+
|
|
34
|
+
Registered through the `ToolRegistry` as `theme`. Managed by `ToolkitCoordinator` via `tools.placement`.
|
|
35
|
+
|
|
36
|
+
## License
|
|
37
|
+
|
|
38
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-players/pie-tool-theme",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Theme tool for PIE assessment player - provides accessible themes and color schemes",
|
|
6
6
|
"repository": {
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"unpkg": "./dist/tool-color-scheme.js",
|
|
41
41
|
"jsdelivr": "./dist/tool-color-scheme.js",
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@pie-players/pie-assessment-toolkit": "0.3.
|
|
44
|
-
"@pie-players/pie-context": "0.3.
|
|
45
|
-
"@pie-players/pie-players-shared": "0.3.
|
|
46
|
-
"@pie-players/pie-theme": "0.3.
|
|
43
|
+
"@pie-players/pie-assessment-toolkit": "0.3.7",
|
|
44
|
+
"@pie-players/pie-context": "0.3.7",
|
|
45
|
+
"@pie-players/pie-players-shared": "0.3.7",
|
|
46
|
+
"@pie-players/pie-theme": "0.3.7"
|
|
47
47
|
},
|
|
48
48
|
"types": "./dist/index.d.ts",
|
|
49
49
|
"scripts": {
|