@pie-players/pie-tool-theme 0.3.65 → 0.3.67
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 +6 -7
- package/dist/tool-color-scheme.js +3546 -4187
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Accessible color scheme selection tool for PIE assessment players.
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
Provides a theme/color scheme picker that applies accessible color schemes via the `<pie-theme>` provider.
|
|
7
|
+
Provides a theme/color scheme picker that applies accessible color schemes via the `<pie-theme>` provider. It is designed for the relevant WCAG 2.2 Level AA color, contrast, focus, and keyboard requirements.
|
|
8
8
|
|
|
9
9
|
## Custom Element
|
|
10
10
|
|
|
@@ -14,16 +14,13 @@ Tag: `pie-tool-theme`
|
|
|
14
14
|
|---|---|---|---|
|
|
15
15
|
| `visible` | `boolean` | `false` | Controls visibility |
|
|
16
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
17
|
|
|
23
18
|
## Features
|
|
24
19
|
|
|
25
20
|
- Dropdown scheme selector with color previews
|
|
26
|
-
-
|
|
21
|
+
- Reads the shared `@pie-players/pie-theme` scheme catalog and updates immediately when a custom scheme is registered or unregistered
|
|
22
|
+
- Uses centrally derived catalog previews instead of carrying a duplicate palette; custom previews use PIE's canonical light-base resolution on a stable opaque swatch
|
|
23
|
+
- Retains a requested custom scheme when it is temporarily unavailable, clearly labels it as unavailable, and restores it automatically if it is registered again
|
|
27
24
|
- Persists selection to `localStorage` (key: `pie-color-scheme`)
|
|
28
25
|
- Applies scheme by setting the `scheme` attribute on the nearest `<pie-theme>` element
|
|
29
26
|
- Focus trap when visible; keyboard navigation with arrow keys and Escape
|
|
@@ -33,6 +30,8 @@ Tag: `pie-tool-theme`
|
|
|
33
30
|
|
|
34
31
|
Registered through the `ToolRegistry` as `theme`. Managed by `ToolkitCoordinator` via `tools.placement`.
|
|
35
32
|
|
|
33
|
+
Register custom schemes globally with `registerPieColorSchemes` from `@pie-players/pie-theme`. Every mounted theme picker observes the same immutable catalog; per-element scheme catalogs are not supported.
|
|
34
|
+
|
|
36
35
|
## License
|
|
37
36
|
|
|
38
37
|
MIT
|