@pie-players/pie-tool-theme 0.3.4 → 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 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