@pie-players/pie-tool-graph 0.3.59 → 0.3.61
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/dist/tool-graph.js +113 -1
- package/package.json +4 -4
package/dist/tool-graph.js
CHANGED
|
@@ -2917,6 +2917,116 @@ var Ds = class Qn {
|
|
|
2917
2917
|
text-underline-offset: 2px;
|
|
2918
2918
|
color: inherit;
|
|
2919
2919
|
}
|
|
2920
|
+
|
|
2921
|
+
/* The blocks below cover annotation swatches, print, and reduced motion.
|
|
2922
|
+
They deliberately do NOT retune the TTS layers: applyAdaptiveTTSStyle()
|
|
2923
|
+
writes the pie-tts custom properties inline on documentElement on every
|
|
2924
|
+
paint and on theme change, so a media query that only varies a var()
|
|
2925
|
+
fallback for those can never take effect. Annotation colours have no such
|
|
2926
|
+
adaptive path -- they are fixed swatches a student chose -- so a media
|
|
2927
|
+
query is the only way to adjust them, and each keeps its var() so a host
|
|
2928
|
+
override still wins.
|
|
2929
|
+
|
|
2930
|
+
The names above are spelled without their leading dashes on purpose.
|
|
2931
|
+
check-theme-tokens scans comments, and its token pattern stops at the
|
|
2932
|
+
first non-alphanumeric character, so writing the wildcard form reads as
|
|
2933
|
+
consumption of a shorter token that is not in the registry and fails the
|
|
2934
|
+
check. Spell property names in full, or omit the dashes. */
|
|
2935
|
+
|
|
2936
|
+
@media (prefers-color-scheme: dark) {
|
|
2937
|
+
::highlight(annotation-yellow) {
|
|
2938
|
+
background-color: var(--pie-annotation-yellow-highlight, rgba(139, 117, 0, 0.6));
|
|
2939
|
+
}
|
|
2940
|
+
::highlight(annotation-green) {
|
|
2941
|
+
background-color: var(--pie-annotation-green-highlight, rgba(45, 92, 63, 0.6));
|
|
2942
|
+
}
|
|
2943
|
+
::highlight(annotation-blue) {
|
|
2944
|
+
background-color: var(--pie-annotation-blue-highlight, rgba(0, 102, 170, 0.6));
|
|
2945
|
+
}
|
|
2946
|
+
::highlight(annotation-pink) {
|
|
2947
|
+
background-color: var(--pie-annotation-pink-highlight, rgba(139, 51, 74, 0.6));
|
|
2948
|
+
}
|
|
2949
|
+
::highlight(annotation-orange) {
|
|
2950
|
+
background-color: var(--pie-annotation-orange-highlight, rgba(154, 99, 0, 0.6));
|
|
2951
|
+
}
|
|
2952
|
+
::highlight(annotation-underline) {
|
|
2953
|
+
text-decoration-color: var(--pie-primary, #4da6ff);
|
|
2954
|
+
}
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
/* WCAG 2.2 SC 1.4.11 non-text contrast: a highlight is the only indication
|
|
2958
|
+
that text is annotated, so the swatches saturate and the underline
|
|
2959
|
+
thickens when the user asks for more contrast.
|
|
2960
|
+
|
|
2961
|
+
The value is "more", not "high". The stylesheet this was recovered from
|
|
2962
|
+
used prefers-contrast: high, which is not a valid value for the feature
|
|
2963
|
+
-- the keywords are no-preference, more, less, custom. An invalid query
|
|
2964
|
+
evaluates to "not all", so that block could never have matched in any
|
|
2965
|
+
browser even had the file been loaded. Verified with matchMedia under
|
|
2966
|
+
emulation: "high" stays false where "more" flips true. */
|
|
2967
|
+
@media (prefers-contrast: more) {
|
|
2968
|
+
::highlight(annotation-yellow) {
|
|
2969
|
+
background-color: var(--pie-annotation-yellow-highlight, rgba(255, 255, 0, 0.7));
|
|
2970
|
+
}
|
|
2971
|
+
::highlight(annotation-green) {
|
|
2972
|
+
background-color: var(--pie-annotation-green-highlight, rgba(0, 255, 127, 0.7));
|
|
2973
|
+
}
|
|
2974
|
+
::highlight(annotation-blue) {
|
|
2975
|
+
background-color: var(--pie-annotation-blue-highlight, rgba(0, 191, 255, 0.7));
|
|
2976
|
+
}
|
|
2977
|
+
::highlight(annotation-pink) {
|
|
2978
|
+
background-color: var(--pie-annotation-pink-highlight, rgba(255, 105, 180, 0.7));
|
|
2979
|
+
}
|
|
2980
|
+
::highlight(annotation-orange) {
|
|
2981
|
+
background-color: var(--pie-annotation-orange-highlight, rgba(255, 165, 0, 0.85));
|
|
2982
|
+
}
|
|
2983
|
+
::highlight(annotation-underline) {
|
|
2984
|
+
text-decoration-thickness: 3px;
|
|
2985
|
+
}
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2988
|
+
@media print {
|
|
2989
|
+
/* TTS highlighting is a transient read-along cue, not content. */
|
|
2990
|
+
::highlight(tts-word),
|
|
2991
|
+
::highlight(tts-sentence),
|
|
2992
|
+
[data-pie-tts-word-element="true"],
|
|
2993
|
+
[data-pie-tts-sentence-element="true"] {
|
|
2994
|
+
background-color: transparent;
|
|
2995
|
+
text-decoration: none;
|
|
2996
|
+
text-shadow: none;
|
|
2997
|
+
border-bottom: none;
|
|
2998
|
+
}
|
|
2999
|
+
|
|
3000
|
+
/* Annotations are student work and must survive printing, but a fill
|
|
3001
|
+
that reads fine on screen can print as an illegible wash, so each
|
|
3002
|
+
becomes an underline that keeps its colour coding. */
|
|
3003
|
+
::highlight(annotation-yellow),
|
|
3004
|
+
::highlight(annotation-green),
|
|
3005
|
+
::highlight(annotation-blue),
|
|
3006
|
+
::highlight(annotation-pink),
|
|
3007
|
+
::highlight(annotation-orange) {
|
|
3008
|
+
background-color: transparent;
|
|
3009
|
+
border-bottom: 2px solid currentColor;
|
|
3010
|
+
}
|
|
3011
|
+
::highlight(annotation-yellow) { border-bottom-color: #ffeb3b; }
|
|
3012
|
+
::highlight(annotation-green) { border-bottom-color: #a6e1c5; }
|
|
3013
|
+
::highlight(annotation-blue) { border-bottom-color: #a7e0f6; }
|
|
3014
|
+
::highlight(annotation-pink) { border-bottom-color: #ff9fae; }
|
|
3015
|
+
::highlight(annotation-orange) { border-bottom-color: #ffa500; }
|
|
3016
|
+
::highlight(annotation-underline) {
|
|
3017
|
+
text-decoration-color: #000;
|
|
3018
|
+
border-bottom: none;
|
|
3019
|
+
}
|
|
3020
|
+
}
|
|
3021
|
+
|
|
3022
|
+
/* text-shadow is a direct property rather than a var(), so unlike the
|
|
3023
|
+
other TTS rules this one is not overridden by the adaptive path. */
|
|
3024
|
+
@media (prefers-reduced-motion: reduce) {
|
|
3025
|
+
::highlight(tts-word),
|
|
3026
|
+
[data-pie-tts-word-element="true"] {
|
|
3027
|
+
text-shadow: none;
|
|
3028
|
+
}
|
|
3029
|
+
}
|
|
2920
3030
|
`, document.head.appendChild(t);
|
|
2921
3031
|
}
|
|
2922
3032
|
highlightTTSWord(t, r, n) {
|
|
@@ -3481,9 +3591,11 @@ function au(e) {
|
|
|
3481
3591
|
"pie-multiple-choice",
|
|
3482
3592
|
"pie-inline-choice",
|
|
3483
3593
|
"pie-select-text",
|
|
3594
|
+
"pie-ebsr",
|
|
3484
3595
|
"multiple-choice",
|
|
3485
3596
|
"inline-choice",
|
|
3486
|
-
"select-text"
|
|
3597
|
+
"select-text",
|
|
3598
|
+
"ebsr"
|
|
3487
3599
|
];
|
|
3488
3600
|
if (qs(e)) {
|
|
3489
3601
|
const r = e.item.config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-players/pie-tool-graph",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.61",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Interactive coordinate grid graphing tool for PIE assessment player",
|
|
6
6
|
"repository": {
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"unpkg": "./dist/tool-graph.js",
|
|
36
36
|
"jsdelivr": "./dist/tool-graph.js",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@pie-players/pie-assessment-toolkit": "0.3.
|
|
39
|
-
"@pie-players/pie-context": "0.3.
|
|
40
|
-
"@pie-players/pie-players-shared": "0.3.
|
|
38
|
+
"@pie-players/pie-assessment-toolkit": "0.3.61",
|
|
39
|
+
"@pie-players/pie-context": "0.3.61",
|
|
40
|
+
"@pie-players/pie-players-shared": "0.3.61"
|
|
41
41
|
},
|
|
42
42
|
"types": "./dist/index.d.ts",
|
|
43
43
|
"scripts": {
|