@pie-players/pie-tool-theme 0.3.64 → 0.3.66

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 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. Addresses WCAG 2.1 Level AA criteria 1.4.1, 1.4.3, and 1.4.11.
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
- - Discovers available schemes from `<pie-theme>` provider, `schemeCatalog` property, or `schemes` JSON attribute
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
package/dist/index.d.ts CHANGED
@@ -1,7 +1 @@
1
- /**
2
- * pie-tool-theme - PIE Assessment Tool
3
- *
4
- * This package exports the theme custom element used by toolkit toolbars.
5
- * Import the built version for CDN usage, or the .svelte source for Svelte projects.
6
- */
7
- export {};
1
+ export {}