@pie-players/pie-assessment-toolkit 0.3.74 → 0.3.75
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 +349 -313
- package/dist/attempt/TestSession.d.ts +1 -20
- package/dist/attempt/TestSession.js +8 -99
- package/dist/components/ItemScope.custom-element.d.ts +1 -0
- package/dist/components/ItemScope.custom-element.js +1 -0
- package/dist/components/ItemToolBar.custom-element.js +1 -1
- package/dist/components/PieAssessmentToolkit.custom-element.js +14 -14
- package/dist/components/SectionToolBar.custom-element.js +1 -1
- package/dist/components/chunks/ItemToolBar-7tt7v2xp.js +4 -0
- package/dist/components/chunks/{ItemToolBar-gmrryv2v.js → ItemToolBar-97hx60z4.js} +1 -1
- package/dist/components/chunks/ItemToolBar-bxwyhr5p.js +2 -0
- package/dist/components/chunks/ItemToolBar-jx38w99s.js +2 -0
- package/dist/components/chunks/ItemToolBar-rd2bb4p6.js +40 -0
- package/dist/components/chunks/ItemToolBar-vdkyn9f3.js +2 -0
- package/dist/components/chunks/sre-engine-jd8cc08x.js +1 -0
- package/dist/components/item-scope-element.d.ts +2 -0
- package/dist/components/item-scope-element.js +2 -0
- package/dist/context/assessment-toolkit-context.d.ts +27 -6
- package/dist/index.d.ts +22 -47
- package/dist/index.js +12 -36
- package/dist/policy/core/PolicySource.d.ts +1 -1
- package/dist/policy/core/ToolPolicyEngine.d.ts +77 -32
- package/dist/policy/core/ToolPolicyEngine.js +136 -46
- package/dist/policy/core/compose-decision.d.ts +28 -7
- package/dist/policy/core/compose-decision.js +75 -54
- package/dist/policy/core/decision-types.d.ts +65 -34
- package/dist/policy/core/feature-decision.d.ts +16 -9
- package/dist/policy/core/feature-decision.js +14 -8
- package/dist/policy/core/pnp-policy-inputs.d.ts +24 -33
- package/dist/policy/core/pnp-policy-inputs.js +28 -56
- package/dist/policy/core/provenance.d.ts +9 -4
- package/dist/policy/core/provenance.js +1 -1
- package/dist/policy/engine.d.ts +7 -23
- package/dist/policy/engine.js +5 -20
- package/dist/policy/sources/PnpPolicySource.d.ts +44 -61
- package/dist/policy/sources/PnpPolicySource.js +117 -118
- package/dist/runtime/SectionControllerBinding.d.ts +279 -0
- package/dist/runtime/SectionControllerBinding.js +450 -0
- package/dist/runtime/SectionRuntimeEngine.d.ts +26 -289
- package/dist/runtime/SectionRuntimeEngine.js +30 -372
- package/dist/runtime/adapter/SectionEngineAdapter.d.ts +19 -80
- package/dist/runtime/adapter/SectionEngineAdapter.js +19 -92
- package/dist/runtime/adapter/dom-event-bridge.d.ts +15 -30
- package/dist/runtime/adapter/dom-event-bridge.js +17 -44
- package/dist/runtime/adapter/subscriber-fanout.d.ts +1 -2
- package/dist/runtime/adapter/subscriber-fanout.js +1 -2
- package/dist/runtime/catalog-context.d.ts +19 -0
- package/dist/runtime/catalog-context.js +28 -0
- package/dist/runtime/composition-emit-scheduler.d.ts +9 -15
- package/dist/runtime/composition-emit-scheduler.js +9 -15
- package/dist/runtime/content-language.d.ts +32 -0
- package/dist/runtime/content-language.js +46 -0
- package/dist/runtime/content-region.d.ts +17 -0
- package/dist/runtime/content-region.js +29 -0
- package/dist/runtime/content-registration.d.ts +13 -0
- package/dist/runtime/content-registration.js +25 -0
- package/dist/runtime/core/SectionEngineCore.d.ts +2 -2
- package/dist/runtime/core/SectionEngineCore.js +2 -2
- package/dist/runtime/core/cohort.d.ts +1 -1
- package/dist/runtime/core/cohort.js +1 -1
- package/dist/runtime/core/engine-input.d.ts +18 -30
- package/dist/runtime/core/engine-input.js +11 -12
- package/dist/runtime/core/engine-output.d.ts +16 -40
- package/dist/runtime/core/engine-output.js +9 -21
- package/dist/runtime/core/engine-readiness.d.ts +5 -37
- package/dist/runtime/core/engine-readiness.js +8 -41
- package/dist/runtime/core/engine-resolver.d.ts +46 -74
- package/dist/runtime/core/engine-resolver.js +18 -43
- package/dist/runtime/core/engine-state.d.ts +28 -36
- package/dist/runtime/core/engine-state.js +18 -21
- package/dist/runtime/core/engine-transition.d.ts +14 -19
- package/dist/runtime/core/engine-transition.js +71 -51
- package/dist/runtime/engine.d.ts +16 -19
- package/dist/runtime/engine.js +12 -19
- package/dist/runtime/page-warnings.d.ts +13 -0
- package/dist/runtime/page-warnings.js +22 -0
- package/dist/runtime/policy-input-forwarding.d.ts +25 -0
- package/dist/runtime/policy-input-forwarding.js +25 -0
- package/dist/runtime/registration-events.d.ts +11 -0
- package/dist/runtime/runtime-event-claim.d.ts +8 -0
- package/dist/runtime/runtime-event-claim.js +15 -0
- package/dist/runtime/shell-event-bridge.d.ts +45 -0
- package/dist/runtime/shell-event-bridge.js +127 -0
- package/dist/runtime/shell-registration.d.ts +73 -0
- package/dist/runtime/shell-registration.js +95 -0
- package/dist/runtime/shell-scope.d.ts +68 -0
- package/dist/runtime/shell-scope.js +188 -0
- package/dist/runtime/tool-host-contract.d.ts +8 -10
- package/dist/runtime/tool-host-contract.js +11 -11
- package/dist/runtime/unclaimed-registration-watch.d.ts +7 -0
- package/dist/runtime/unclaimed-registration-watch.js +23 -0
- package/dist/services/ElementToolStateStore.d.ts +14 -10
- package/dist/services/ElementToolStateStore.js +37 -13
- package/dist/services/HighlightCoordinator.d.ts +21 -21
- package/dist/services/HighlightCoordinator.js +431 -325
- package/dist/services/RangeSerializer.d.ts +10 -1
- package/dist/services/RangeSerializer.js +87 -14
- package/dist/services/TTSService.d.ts +117 -70
- package/dist/services/TTSService.js +668 -578
- package/dist/services/ToolCoordinator.d.ts +43 -60
- package/dist/services/ToolCoordinator.js +164 -206
- package/dist/services/ToolRegistry.d.ts +74 -57
- package/dist/services/ToolRegistry.js +104 -114
- package/dist/services/ToolkitCoordinator.d.ts +183 -189
- package/dist/services/ToolkitCoordinator.js +477 -431
- package/dist/services/audio-handoff.d.ts +6 -7
- package/dist/services/audio-handoff.js +20 -14
- package/dist/services/catalog-owner.d.ts +0 -1
- package/dist/services/framework-error-bus.d.ts +3 -6
- package/dist/services/framework-error-bus.js +3 -6
- package/dist/services/framework-error.d.ts +22 -7
- package/dist/services/framework-error.js +9 -7
- package/dist/services/interfaces.d.ts +158 -129
- package/dist/services/section-session-assignment.d.ts +21 -0
- package/dist/services/section-session-assignment.js +82 -0
- package/dist/services/spoken-audio-cards.d.ts +0 -2
- package/dist/services/spoken-audio-cards.js +0 -2
- package/dist/services/tool-config-defaults.d.ts +3 -3
- package/dist/services/tool-config-defaults.js +3 -3
- package/dist/services/tool-config-validation.d.ts +4 -5
- package/dist/services/tool-config-validation.js +36 -61
- package/dist/services/tool-context.d.ts +0 -8
- package/dist/services/tool-context.js +0 -12
- package/dist/services/tool-icons.d.ts +4 -3
- package/dist/services/tool-icons.js +4 -3
- package/dist/services/tool-instance-id.d.ts +0 -1
- package/dist/services/tool-instance-id.js +0 -6
- package/dist/services/tool-providers/TTSToolProvider.d.ts +18 -19
- package/dist/services/tool-providers/TTSToolProvider.js +37 -34
- package/dist/services/tool-providers/ToolProviderApi.d.ts +10 -4
- package/dist/services/tool-providers/ToolProviderRegistry.d.ts +30 -26
- package/dist/services/tool-providers/ToolProviderRegistry.js +119 -93
- package/dist/services/tool-request.d.ts +27 -12
- package/dist/services/tool-request.js +24 -14
- package/dist/services/toolbar-decided-tools.d.ts +15 -0
- package/dist/services/toolbar-decided-tools.js +28 -0
- package/dist/services/tools-config-normalizer.d.ts +17 -22
- package/dist/services/tools-config-normalizer.js +2 -10
- package/dist/services/tts/browser-provider.d.ts +38 -2
- package/dist/services/tts/browser-provider.js +276 -140
- package/dist/services/tts/flat-tree.d.ts +71 -0
- package/dist/services/tts/flat-tree.js +269 -0
- package/dist/services/tts/generated-speech/assemble-plan.d.ts +3 -1
- package/dist/services/tts/generated-speech/assemble-plan.js +3 -1
- package/dist/services/tts/generated-speech/dom/build-dom-plan.d.ts +2 -0
- package/dist/services/tts/generated-speech/dom/build-dom-plan.js +1 -1
- package/dist/services/tts/generated-speech/math-speech-cache.d.ts +3 -1
- package/dist/services/tts/generated-speech/math-speech-cache.js +5 -1
- package/dist/services/tts/highlight-pipeline/create-highlight-plan.js +12 -4
- package/dist/services/tts/highlight-pipeline/prose-boundary-resolver.js +6 -4
- package/dist/services/tts/highlight-pipeline/readable-region.js +3 -2
- package/dist/services/tts/highlight-pipeline/types.d.ts +5 -0
- package/dist/services/tts/highlight-pipeline/visible-map-range.d.ts +12 -0
- package/dist/services/tts/highlight-pipeline/visible-map-range.js +73 -7
- package/dist/services/tts/math-aware-text-processing.d.ts +5 -1
- package/dist/services/tts/math-aware-text-processing.js +32 -18
- package/dist/services/tts/math-control-names.d.ts +21 -0
- package/dist/services/tts/math-control-names.js +142 -0
- package/dist/services/tts/math-speech.d.ts +11 -0
- package/dist/services/tts/math-speech.js +51 -18
- package/dist/services/tts/provider-options.d.ts +41 -0
- package/dist/services/tts/provider-options.js +1 -0
- package/dist/services/tts/ssml/spoken-text.d.ts +2 -26
- package/dist/services/tts/ssml/spoken-text.js +29 -0
- package/dist/services/tts/start-failure.d.ts +11 -0
- package/dist/services/tts/start-failure.js +19 -0
- package/dist/services/tts/text-processing.d.ts +9 -0
- package/dist/services/tts/text-processing.js +46 -33
- package/dist/services/tts/text-segmentation.d.ts +7 -0
- package/dist/services/tts/text-segmentation.js +47 -0
- package/dist/services/tts-runtime-config.d.ts +25 -17
- package/dist/services/tts-runtime-config.js +16 -95
- package/dist/tools/content-capability-resolution.d.ts +7 -9
- package/dist/tools/content-capability-resolution.js +8 -45
- package/dist/tools/registration.d.ts +58 -0
- package/dist/tools/registration.js +54 -0
- package/dist/tools/registrations/toolbar-registration-helpers.js +2 -2
- package/dist/tools/tool-surface-host.d.ts +6 -10
- package/dist/tools/tool-surface-host.js +44 -42
- package/dist/tools/tool-tag-map.d.ts +5 -15
- package/dist/tools/tool-tag-map.js +6 -20
- package/dist/utils/structural-equality.d.ts +11 -0
- package/dist/utils/structural-equality.js +47 -0
- package/package.json +13 -29
- package/dist/attempt/adapters/activity-to-test-attempt-session.d.ts +0 -49
- package/dist/attempt/adapters/activity-to-test-attempt-session.js +0 -138
- package/dist/components/chunks/ItemToolBar-b9dz5jvd.js +0 -40
- package/dist/components/chunks/ItemToolBar-h4xap0t0.js +0 -4
- package/dist/components/chunks/ItemToolBar-wr2myaah.js +0 -2
- package/dist/components/chunks/sre-engine-wf9s43gg.js +0 -1
- package/dist/context/runtime-context-consumer.d.ts +0 -13
- package/dist/context/runtime-context-consumer.js +0 -18
- package/dist/item-loader.d.ts +0 -44
- package/dist/item-loader.js +0 -61
- package/dist/policy/core/engine-context.d.ts +0 -29
- package/dist/policy/core/engine-context.js +0 -27
- package/dist/policy/core/policy-source-tag.d.ts +0 -31
- package/dist/policy/core/policy-source-tag.js +0 -28
- package/dist/policy/internal.d.ts +0 -25
- package/dist/policy/internal.js +0 -25
- package/dist/runtime/adapter/coordinator-bridge.d.ts +0 -92
- package/dist/runtime/adapter/coordinator-bridge.js +0 -126
- package/dist/runtime/adapter/framework-error-bridge.d.ts +0 -36
- package/dist/runtime/adapter/framework-error-bridge.js +0 -46
- package/dist/runtime/adapter/instrumentation-bridge.d.ts +0 -31
- package/dist/runtime/adapter/instrumentation-bridge.js +0 -38
- package/dist/runtime/core/engine-stage-derivation.d.ts +0 -18
- package/dist/runtime/core/engine-stage-derivation.js +0 -29
- package/dist/runtime/engine-context.d.ts +0 -39
- package/dist/runtime/engine-context.js +0 -31
- package/dist/runtime/internal.d.ts +0 -43
- package/dist/runtime/internal.js +0 -45
- package/dist/runtime/section-runtime-engine-host-context.d.ts +0 -74
- package/dist/runtime/section-runtime-engine-host-context.js +0 -57
- package/dist/runtime/stage-emit-gate.d.ts +0 -92
- package/dist/runtime/stage-emit-gate.js +0 -82
- package/dist/services/I18nService.d.ts +0 -47
- package/dist/services/I18nService.js +0 -84
- package/dist/services/ThemeProvider.d.ts +0 -95
- package/dist/services/ThemeProvider.js +0 -334
- package/dist/services/defaultPersonalNeedsProfile.d.ts +0 -21
- package/dist/services/defaultPersonalNeedsProfile.js +0 -26
- package/dist/services/pnp-standard-features.d.ts +0 -238
- package/dist/services/pnp-standard-features.js +0 -338
- package/dist/tools/client.d.ts +0 -10
- package/dist/tools/client.js +0 -10
- package/dist/tools/internal.d.ts +0 -44
- package/dist/tools/internal.js +0 -39
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ThemeProvider
|
|
3
|
-
*
|
|
4
|
-
* Applies consistent accessibility theming across items and tools.
|
|
5
|
-
* Uses CSS custom properties and classes for framework-agnostic theming.
|
|
6
|
-
*
|
|
7
|
-
* Features:
|
|
8
|
-
* - High contrast mode
|
|
9
|
-
* - Font size scaling (small, normal, large, xlarge)
|
|
10
|
-
* - Color customization (background, foreground, accent)
|
|
11
|
-
* - Consistent theming across shadow DOM boundaries
|
|
12
|
-
* - No framework dependencies
|
|
13
|
-
*
|
|
14
|
-
* Part of PIE Assessment Toolkit.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
* Font size scale (in rem units)
|
|
18
|
-
*/
|
|
19
|
-
const FONT_SIZE_SCALE = {
|
|
20
|
-
small: 0.875, // 14px at 16px base
|
|
21
|
-
normal: 1.0, // 16px at 16px base
|
|
22
|
-
large: 1.25, // 20px at 16px base
|
|
23
|
-
xlarge: 1.5, // 24px at 16px base
|
|
24
|
-
};
|
|
25
|
-
/**
|
|
26
|
-
* Default theme values
|
|
27
|
-
*/
|
|
28
|
-
const DEFAULT_THEME = {
|
|
29
|
-
highContrast: false,
|
|
30
|
-
fontSize: "normal",
|
|
31
|
-
backgroundColor: "#ffffff",
|
|
32
|
-
foregroundColor: "#000000",
|
|
33
|
-
accentColor: "#3f51b5",
|
|
34
|
-
linkColor: "#146eb3",
|
|
35
|
-
errorColor: "#ff9800",
|
|
36
|
-
successColor: "#4caf50",
|
|
37
|
-
warningColor: "#d32f2f",
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* High contrast theme overrides
|
|
41
|
-
*/
|
|
42
|
-
const HIGH_CONTRAST_THEME = {
|
|
43
|
-
backgroundColor: "#000000",
|
|
44
|
-
foregroundColor: "#ffffff",
|
|
45
|
-
accentColor: "#ffff00",
|
|
46
|
-
linkColor: "#00ffff",
|
|
47
|
-
errorColor: "#ff0000",
|
|
48
|
-
successColor: "#00ff00",
|
|
49
|
-
warningColor: "#ffff00",
|
|
50
|
-
};
|
|
51
|
-
export class ThemeProvider {
|
|
52
|
-
currentTheme = { ...DEFAULT_THEME };
|
|
53
|
-
styleElement = null;
|
|
54
|
-
rootElement;
|
|
55
|
-
styleContainer = null;
|
|
56
|
-
constructor(rootElement = typeof document !== "undefined"
|
|
57
|
-
? document.documentElement
|
|
58
|
-
: null) {
|
|
59
|
-
this.rootElement = rootElement;
|
|
60
|
-
// SSR guard
|
|
61
|
-
if (typeof document === "undefined") {
|
|
62
|
-
console.warn("ThemeProvider: document not available (SSR context)");
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
this.initializeStyles();
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Initialize theme styles
|
|
69
|
-
*/
|
|
70
|
-
initializeStyles() {
|
|
71
|
-
if (!this.rootElement)
|
|
72
|
-
return;
|
|
73
|
-
const rootNode = this.rootElement.getRootNode();
|
|
74
|
-
if (rootNode instanceof ShadowRoot) {
|
|
75
|
-
this.styleContainer = rootNode;
|
|
76
|
-
this.styleElement = rootNode.querySelector('style[data-pie-theme-styles="true"]');
|
|
77
|
-
}
|
|
78
|
-
else {
|
|
79
|
-
this.styleContainer = document.head;
|
|
80
|
-
this.styleElement = document.getElementById("pie-theme-styles");
|
|
81
|
-
}
|
|
82
|
-
if (!this.styleElement) {
|
|
83
|
-
this.styleElement = document.createElement("style");
|
|
84
|
-
if (this.styleContainer instanceof ShadowRoot) {
|
|
85
|
-
this.styleElement.setAttribute("data-pie-theme-styles", "true");
|
|
86
|
-
this.styleContainer.appendChild(this.styleElement);
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
this.styleElement.id = "pie-theme-styles";
|
|
90
|
-
document.head.appendChild(this.styleElement);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
// Apply default theme
|
|
94
|
-
this.applyTheme({});
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Apply theme configuration
|
|
98
|
-
*
|
|
99
|
-
* @param config Partial theme configuration (merged with current theme)
|
|
100
|
-
*/
|
|
101
|
-
applyTheme(config) {
|
|
102
|
-
if (!this.rootElement)
|
|
103
|
-
return;
|
|
104
|
-
// Merge with current theme
|
|
105
|
-
const newTheme = {
|
|
106
|
-
...this.currentTheme,
|
|
107
|
-
...config,
|
|
108
|
-
};
|
|
109
|
-
// Apply high contrast overrides if enabled
|
|
110
|
-
if (newTheme.highContrast) {
|
|
111
|
-
Object.assign(newTheme, HIGH_CONTRAST_THEME);
|
|
112
|
-
}
|
|
113
|
-
this.currentTheme = newTheme;
|
|
114
|
-
// Apply CSS custom properties
|
|
115
|
-
this.applyCSSVariables();
|
|
116
|
-
// Apply CSS classes
|
|
117
|
-
this.applyCSSClasses();
|
|
118
|
-
// Update global styles
|
|
119
|
-
this.updateGlobalStyles();
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Apply CSS custom properties to root element
|
|
123
|
-
*/
|
|
124
|
-
applyCSSVariables() {
|
|
125
|
-
if (!this.rootElement)
|
|
126
|
-
return;
|
|
127
|
-
const { fontSize, backgroundColor, foregroundColor, accentColor, linkColor, errorColor, successColor, warningColor, } = this.currentTheme;
|
|
128
|
-
// Font sizing
|
|
129
|
-
this.rootElement.style.setProperty("--pie-font-scale", String(FONT_SIZE_SCALE[fontSize]));
|
|
130
|
-
// Canonical PIE variables
|
|
131
|
-
this.rootElement.style.setProperty("--pie-background", backgroundColor);
|
|
132
|
-
this.rootElement.style.setProperty("--pie-text", foregroundColor);
|
|
133
|
-
this.rootElement.style.setProperty("--pie-primary", accentColor);
|
|
134
|
-
this.rootElement.style.setProperty("--pie-tertiary", linkColor);
|
|
135
|
-
this.rootElement.style.setProperty("--pie-incorrect", errorColor);
|
|
136
|
-
this.rootElement.style.setProperty("--pie-correct", successColor);
|
|
137
|
-
this.rootElement.style.setProperty("--pie-missing", warningColor);
|
|
138
|
-
// Derived surface tokens
|
|
139
|
-
this.rootElement.style.setProperty("--pie-background-dark", this.adjustOpacity(backgroundColor, 0.95));
|
|
140
|
-
this.rootElement.style.setProperty("--pie-secondary-background", this.adjustOpacity(backgroundColor, 0.92));
|
|
141
|
-
this.rootElement.style.setProperty("--pie-border", this.adjustOpacity(foregroundColor, 0.25));
|
|
142
|
-
this.rootElement.style.setProperty("--pie-border-light", this.adjustOpacity(foregroundColor, 0.16));
|
|
143
|
-
this.rootElement.style.setProperty("--pie-border-dark", this.adjustOpacity(foregroundColor, 0.4));
|
|
144
|
-
this.rootElement.style.setProperty("--pie-focus-checked", this.adjustOpacity(accentColor, 0.18));
|
|
145
|
-
this.rootElement.style.setProperty("--pie-focus-checked-border", accentColor);
|
|
146
|
-
// Button tokens used by toolkit controls
|
|
147
|
-
this.rootElement.style.setProperty("--pie-button-bg", backgroundColor);
|
|
148
|
-
this.rootElement.style.setProperty("--pie-button-border", this.adjustOpacity(foregroundColor, 0.2));
|
|
149
|
-
this.rootElement.style.setProperty("--pie-button-color", foregroundColor);
|
|
150
|
-
this.rootElement.style.setProperty("--pie-button-hover-bg", this.adjustOpacity(accentColor, 0.1));
|
|
151
|
-
this.rootElement.style.setProperty("--pie-button-hover-border", this.adjustOpacity(accentColor, 0.5));
|
|
152
|
-
this.rootElement.style.setProperty("--pie-button-hover-color", foregroundColor);
|
|
153
|
-
this.rootElement.style.setProperty("--pie-button-active-bg", this.adjustOpacity(accentColor, 0.16));
|
|
154
|
-
this.rootElement.style.setProperty("--pie-button-focus-outline", accentColor);
|
|
155
|
-
}
|
|
156
|
-
/**
|
|
157
|
-
* Apply CSS classes to root element
|
|
158
|
-
*/
|
|
159
|
-
applyCSSClasses() {
|
|
160
|
-
if (!this.rootElement)
|
|
161
|
-
return;
|
|
162
|
-
const { highContrast, fontSize } = this.currentTheme;
|
|
163
|
-
// High contrast class
|
|
164
|
-
this.rootElement.classList.toggle("pie-high-contrast", highContrast);
|
|
165
|
-
// Font size classes
|
|
166
|
-
this.rootElement.classList.remove("pie-font-small", "pie-font-normal", "pie-font-large", "pie-font-xlarge");
|
|
167
|
-
this.rootElement.classList.add(`pie-font-${fontSize}`);
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* Update global theme styles
|
|
171
|
-
*/
|
|
172
|
-
updateGlobalStyles() {
|
|
173
|
-
if (!this.styleElement)
|
|
174
|
-
return;
|
|
175
|
-
this.styleElement.textContent = `
|
|
176
|
-
/* PIE Assessment Toolkit - Theme Styles */
|
|
177
|
-
|
|
178
|
-
/* Font scaling */
|
|
179
|
-
.pie-themed,
|
|
180
|
-
.pie-themed * {
|
|
181
|
-
font-size: calc(1rem * var(--pie-font-scale, 1));
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
/* Color theming */
|
|
185
|
-
.pie-themed {
|
|
186
|
-
background-color: var(--pie-background);
|
|
187
|
-
color: var(--pie-text);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.pie-themed a {
|
|
191
|
-
color: var(--pie-tertiary);
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.pie-themed a:hover {
|
|
195
|
-
opacity: 0.8;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/* High contrast mode */
|
|
199
|
-
.pie-high-contrast .pie-themed {
|
|
200
|
-
border: 2px solid var(--pie-text);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
.pie-high-contrast .pie-themed a {
|
|
204
|
-
text-decoration: underline;
|
|
205
|
-
font-weight: bold;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.pie-high-contrast .pie-themed button {
|
|
209
|
-
border: 2px solid var(--pie-text);
|
|
210
|
-
background-color: var(--pie-background);
|
|
211
|
-
color: var(--pie-text);
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.pie-high-contrast .pie-themed button:hover {
|
|
215
|
-
background-color: var(--pie-text);
|
|
216
|
-
color: var(--pie-background);
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/* Error/Success/Warning states */
|
|
220
|
-
.pie-themed .pie-error {
|
|
221
|
-
color: var(--pie-incorrect);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
.pie-themed .pie-success {
|
|
225
|
-
color: var(--pie-correct);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
.pie-themed .pie-warning {
|
|
229
|
-
color: var(--pie-missing);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/* Focus indicators (accessibility) */
|
|
233
|
-
.pie-themed *:focus-visible {
|
|
234
|
-
outline: 3px solid var(--pie-focus-checked-border);
|
|
235
|
-
outline-offset: 2px;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.pie-high-contrast *:focus-visible {
|
|
239
|
-
outline-width: 4px;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/* Responsive font scaling */
|
|
243
|
-
@media (max-width: 768px) {
|
|
244
|
-
.pie-themed,
|
|
245
|
-
.pie-themed * {
|
|
246
|
-
font-size: calc(1rem * var(--pie-font-scale, 1) * 0.9);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
`;
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Set high contrast mode
|
|
253
|
-
*/
|
|
254
|
-
setHighContrast(enabled) {
|
|
255
|
-
this.applyTheme({ highContrast: enabled });
|
|
256
|
-
}
|
|
257
|
-
/**
|
|
258
|
-
* Set font size
|
|
259
|
-
*/
|
|
260
|
-
setFontSize(size) {
|
|
261
|
-
this.applyTheme({ fontSize: size });
|
|
262
|
-
}
|
|
263
|
-
/**
|
|
264
|
-
* Set color scheme
|
|
265
|
-
*/
|
|
266
|
-
setColors(colors) {
|
|
267
|
-
this.applyTheme(colors);
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Get current theme configuration
|
|
271
|
-
*/
|
|
272
|
-
getCurrentTheme() {
|
|
273
|
-
return { ...this.currentTheme };
|
|
274
|
-
}
|
|
275
|
-
/**
|
|
276
|
-
* Reset to default theme
|
|
277
|
-
*/
|
|
278
|
-
reset() {
|
|
279
|
-
this.currentTheme = { ...DEFAULT_THEME };
|
|
280
|
-
this.applyTheme({});
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* Adjust color opacity (helper)
|
|
284
|
-
*/
|
|
285
|
-
adjustOpacity(color, opacity) {
|
|
286
|
-
// Simple hex to rgba conversion
|
|
287
|
-
if (color.startsWith("#")) {
|
|
288
|
-
const r = parseInt(color.slice(1, 3), 16);
|
|
289
|
-
const g = parseInt(color.slice(3, 5), 16);
|
|
290
|
-
const b = parseInt(color.slice(5, 7), 16);
|
|
291
|
-
return `rgba(${r}, ${g}, ${b}, ${opacity})`;
|
|
292
|
-
}
|
|
293
|
-
// If already rgba/rgb, just return as-is (simplified)
|
|
294
|
-
return color;
|
|
295
|
-
}
|
|
296
|
-
/**
|
|
297
|
-
* Cleanup - remove theme styles
|
|
298
|
-
*/
|
|
299
|
-
destroy() {
|
|
300
|
-
if (this.styleElement) {
|
|
301
|
-
this.styleElement.remove();
|
|
302
|
-
this.styleElement = null;
|
|
303
|
-
}
|
|
304
|
-
this.styleContainer = null;
|
|
305
|
-
if (!this.rootElement)
|
|
306
|
-
return;
|
|
307
|
-
// Remove CSS classes
|
|
308
|
-
this.rootElement.classList.remove("pie-high-contrast", "pie-font-small", "pie-font-normal", "pie-font-large", "pie-font-xlarge");
|
|
309
|
-
// Remove CSS custom properties
|
|
310
|
-
this.rootElement.style.removeProperty("--pie-font-scale");
|
|
311
|
-
this.rootElement.style.removeProperty("--pie-background");
|
|
312
|
-
this.rootElement.style.removeProperty("--pie-text");
|
|
313
|
-
this.rootElement.style.removeProperty("--pie-primary");
|
|
314
|
-
this.rootElement.style.removeProperty("--pie-tertiary");
|
|
315
|
-
this.rootElement.style.removeProperty("--pie-incorrect");
|
|
316
|
-
this.rootElement.style.removeProperty("--pie-correct");
|
|
317
|
-
this.rootElement.style.removeProperty("--pie-missing");
|
|
318
|
-
this.rootElement.style.removeProperty("--pie-background-dark");
|
|
319
|
-
this.rootElement.style.removeProperty("--pie-secondary-background");
|
|
320
|
-
this.rootElement.style.removeProperty("--pie-border");
|
|
321
|
-
this.rootElement.style.removeProperty("--pie-border-light");
|
|
322
|
-
this.rootElement.style.removeProperty("--pie-border-dark");
|
|
323
|
-
this.rootElement.style.removeProperty("--pie-focus-checked");
|
|
324
|
-
this.rootElement.style.removeProperty("--pie-focus-checked-border");
|
|
325
|
-
this.rootElement.style.removeProperty("--pie-button-bg");
|
|
326
|
-
this.rootElement.style.removeProperty("--pie-button-border");
|
|
327
|
-
this.rootElement.style.removeProperty("--pie-button-color");
|
|
328
|
-
this.rootElement.style.removeProperty("--pie-button-hover-bg");
|
|
329
|
-
this.rootElement.style.removeProperty("--pie-button-hover-border");
|
|
330
|
-
this.rootElement.style.removeProperty("--pie-button-hover-color");
|
|
331
|
-
this.rootElement.style.removeProperty("--pie-button-active-bg");
|
|
332
|
-
this.rootElement.style.removeProperty("--pie-button-focus-outline");
|
|
333
|
-
}
|
|
334
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { PersonalNeedsProfile } from "@pie-players/pie-players-shared/types";
|
|
2
|
-
/**
|
|
3
|
-
* An empty personal-needs profile: nothing granted, nothing prohibited, nothing
|
|
4
|
-
* activated at init.
|
|
5
|
-
*
|
|
6
|
-
* The core ships no populated default on purpose. It once derived one from every
|
|
7
|
-
* registered tool's `pnpSupportIds`, which read *registry membership* as
|
|
8
|
-
* *eligibility tier* — registration means "policy-addressable", not "universal,
|
|
9
|
-
* on by default" — so an accommodation-tier capability was granted to every
|
|
10
|
-
* student of every host that supplied no profile. The remedy at the time was a
|
|
11
|
-
* compile-time list of ids to exclude, which a host could not extend for its own
|
|
12
|
-
* accommodation.
|
|
13
|
-
*
|
|
14
|
-
* Which capabilities a deployment grants by default is a property of the
|
|
15
|
-
* program, not of this package: TTS is a universal feature in one program and a
|
|
16
|
-
* documented accommodation in another. That belongs in policy configuration
|
|
17
|
-
* alongside the district and test-administration levels. A named preset of
|
|
18
|
-
* today's universal set ships as data from
|
|
19
|
-
* `@pie-players/pie-default-tool-loaders`, for hosts that want it.
|
|
20
|
-
*/
|
|
21
|
-
export declare function createEmptyPersonalNeedsProfile(): PersonalNeedsProfile;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* An empty personal-needs profile: nothing granted, nothing prohibited, nothing
|
|
3
|
-
* activated at init.
|
|
4
|
-
*
|
|
5
|
-
* The core ships no populated default on purpose. It once derived one from every
|
|
6
|
-
* registered tool's `pnpSupportIds`, which read *registry membership* as
|
|
7
|
-
* *eligibility tier* — registration means "policy-addressable", not "universal,
|
|
8
|
-
* on by default" — so an accommodation-tier capability was granted to every
|
|
9
|
-
* student of every host that supplied no profile. The remedy at the time was a
|
|
10
|
-
* compile-time list of ids to exclude, which a host could not extend for its own
|
|
11
|
-
* accommodation.
|
|
12
|
-
*
|
|
13
|
-
* Which capabilities a deployment grants by default is a property of the
|
|
14
|
-
* program, not of this package: TTS is a universal feature in one program and a
|
|
15
|
-
* documented accommodation in another. That belongs in policy configuration
|
|
16
|
-
* alongside the district and test-administration levels. A named preset of
|
|
17
|
-
* today's universal set ships as data from
|
|
18
|
-
* `@pie-players/pie-default-tool-loaders`, for hosts that want it.
|
|
19
|
-
*/
|
|
20
|
-
export function createEmptyPersonalNeedsProfile() {
|
|
21
|
-
return {
|
|
22
|
-
supports: [],
|
|
23
|
-
prohibitedSupports: [],
|
|
24
|
-
activateAtInit: [],
|
|
25
|
-
};
|
|
26
|
-
}
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* QTI 3.0 / IMS Access for All (AfA) 3.0 Standard Access Features
|
|
3
|
-
*
|
|
4
|
-
* This file contains standardized accessibility feature identifiers from:
|
|
5
|
-
* - IMS Global Access for All (AfA) 3.0 specification
|
|
6
|
-
* - QTI 3.0 Personal Needs and Preferences (PNP)
|
|
7
|
-
* - Schema.org accessibility features vocabulary
|
|
8
|
-
* - WCAG 2.x accessibility guidelines
|
|
9
|
-
*
|
|
10
|
-
* These are the officially recognized values for QTI 3.0's accessibilityInfo.accessFeature
|
|
11
|
-
* and can be used as a reference for PNP profile configuration and tool mapping.
|
|
12
|
-
*
|
|
13
|
-
* References:
|
|
14
|
-
* - IMS AfA 3.0: https://www.imsglobal.org/spec/afa/v3p0
|
|
15
|
-
* - QTI 3.0: https://www.imsglobal.org/spec/qti/v3p0
|
|
16
|
-
* - Schema.org: https://schema.org/accessibilityFeature
|
|
17
|
-
*/
|
|
18
|
-
/**
|
|
19
|
-
* Standard QTI 3.0 accessibility features organized by category
|
|
20
|
-
*/
|
|
21
|
-
export declare const QTI_STANDARD_ACCESS_FEATURES: {
|
|
22
|
-
/**
|
|
23
|
-
* Visual accessibility features
|
|
24
|
-
* For students with low vision, color blindness, or visual processing needs
|
|
25
|
-
*/
|
|
26
|
-
readonly visual: {
|
|
27
|
-
readonly magnification: "magnification";
|
|
28
|
-
readonly screenMagnifier: "screenMagnifier";
|
|
29
|
-
readonly zoomable: "zoomable";
|
|
30
|
-
readonly highContrastDisplay: "highContrastDisplay";
|
|
31
|
-
readonly highContrastAudio: "highContrastAudio";
|
|
32
|
-
readonly colorContrast: "colorContrast";
|
|
33
|
-
readonly invertColors: "invertColors";
|
|
34
|
-
readonly displayTransformability: "displayTransformability";
|
|
35
|
-
readonly largePrint: "largePrint";
|
|
36
|
-
readonly fontEnlargement: "fontEnlargement";
|
|
37
|
-
readonly resizeText: "resizeText";
|
|
38
|
-
readonly alternativeText: "alternativeText";
|
|
39
|
-
readonly longDescription: "longDescription";
|
|
40
|
-
readonly describedMath: "describedMath";
|
|
41
|
-
readonly tactileGraphic: "tactileGraphic";
|
|
42
|
-
readonly tactileObject: "tactileObject";
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Auditory accessibility features
|
|
46
|
-
* For students who are deaf, hard of hearing, or benefit from audio
|
|
47
|
-
*/
|
|
48
|
-
readonly auditory: {
|
|
49
|
-
readonly audioDescription: "audioDescription";
|
|
50
|
-
readonly textToSpeech: "textToSpeech";
|
|
51
|
-
readonly readAloud: "readAloud";
|
|
52
|
-
readonly humanVoice: "humanVoice";
|
|
53
|
-
readonly syntheticVoice: "syntheticVoice";
|
|
54
|
-
readonly speechRate: "speechRate";
|
|
55
|
-
readonly speechVolume: "speechVolume";
|
|
56
|
-
readonly voicePitch: "voicePitch";
|
|
57
|
-
readonly captions: "captions";
|
|
58
|
-
readonly closedCaptions: "closedCaptions";
|
|
59
|
-
readonly openCaptions: "openCaptions";
|
|
60
|
-
readonly transcript: "transcript";
|
|
61
|
-
readonly signLanguage: "signLanguage";
|
|
62
|
-
readonly subtitles: "subtitles";
|
|
63
|
-
readonly audioControl: "audioControl";
|
|
64
|
-
readonly noBackgroundAudio: "noBackgroundAudio";
|
|
65
|
-
};
|
|
66
|
-
/**
|
|
67
|
-
* Motor/physical accessibility features
|
|
68
|
-
* For students with limited mobility or motor control
|
|
69
|
-
*/
|
|
70
|
-
readonly motor: {
|
|
71
|
-
readonly keyboardControl: "keyboardControl";
|
|
72
|
-
readonly mouseControl: "mouseControl";
|
|
73
|
-
readonly touchControl: "touchControl";
|
|
74
|
-
readonly voiceControl: "voiceControl";
|
|
75
|
-
readonly switchControl: "switchControl";
|
|
76
|
-
readonly eyeGazeControl: "eyeGazeControl";
|
|
77
|
-
readonly singleSwitchAccess: "singleSwitchAccess";
|
|
78
|
-
readonly stickyKeys: "stickyKeys";
|
|
79
|
-
readonly keyboardShortcuts: "keyboardShortcuts";
|
|
80
|
-
readonly timingControl: "timingControl";
|
|
81
|
-
readonly unlimitedTime: "unlimitedTime";
|
|
82
|
-
readonly extendedTime: "extendedTime";
|
|
83
|
-
readonly pauseControl: "pauseControl";
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Cognitive/learning accessibility features
|
|
87
|
-
* For students with learning disabilities, ADHD, autism, etc.
|
|
88
|
-
*/
|
|
89
|
-
readonly cognitive: {
|
|
90
|
-
readonly simplifiedLanguage: "simplifiedLanguage";
|
|
91
|
-
readonly reducedComplexity: "reducedComplexity";
|
|
92
|
-
readonly structuralNavigation: "structuralNavigation";
|
|
93
|
-
readonly tableOfContents: "tableOfContents";
|
|
94
|
-
readonly reducedDistraction: "reducedDistraction";
|
|
95
|
-
readonly noFlashing: "noFlashing";
|
|
96
|
-
readonly pauseAnimation: "pauseAnimation";
|
|
97
|
-
readonly annotations: "annotations";
|
|
98
|
-
readonly bookmarking: "bookmarking";
|
|
99
|
-
readonly highlighting: "highlighting";
|
|
100
|
-
readonly guidedNavigation: "guidedNavigation";
|
|
101
|
-
readonly calculator: "calculator";
|
|
102
|
-
readonly thesaurus: "thesaurus";
|
|
103
|
-
readonly spellingAssistance: "spellingAssistance";
|
|
104
|
-
readonly grammarAssistance: "grammarAssistance";
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* Reading support features
|
|
108
|
-
* For students with dyslexia or reading challenges
|
|
109
|
-
*/
|
|
110
|
-
readonly reading: {
|
|
111
|
-
readonly lineSpacing: "lineSpacing";
|
|
112
|
-
readonly wordSpacing: "wordSpacing";
|
|
113
|
-
readonly letterSpacing: "letterSpacing";
|
|
114
|
-
readonly fontFamily: "fontFamily";
|
|
115
|
-
readonly readingMask: "readingMask";
|
|
116
|
-
readonly readingGuide: "readingGuide";
|
|
117
|
-
readonly readingRuler: "readingRuler";
|
|
118
|
-
readonly wordHighlighting: "wordHighlighting";
|
|
119
|
-
readonly lineHighlighting: "lineHighlighting";
|
|
120
|
-
readonly focusIndicator: "focusIndicator";
|
|
121
|
-
readonly printableResource: "printableResource";
|
|
122
|
-
readonly braille: "braille";
|
|
123
|
-
readonly nemeth: "nemeth";
|
|
124
|
-
readonly refreshableBraille: "refreshableBraille";
|
|
125
|
-
};
|
|
126
|
-
/**
|
|
127
|
-
* Navigation features
|
|
128
|
-
* For efficient content navigation
|
|
129
|
-
*/
|
|
130
|
-
readonly navigation: {
|
|
131
|
-
readonly index: "index";
|
|
132
|
-
readonly pageNavigation: "pageNavigation";
|
|
133
|
-
readonly skipContent: "skipContent";
|
|
134
|
-
readonly breadcrumbs: "breadcrumbs";
|
|
135
|
-
readonly searchable: "searchable";
|
|
136
|
-
readonly fullTextSearch: "fullTextSearch";
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* Linguistic features
|
|
140
|
-
* For language support
|
|
141
|
-
*/
|
|
142
|
-
readonly linguistic: {
|
|
143
|
-
readonly multilingualText: "multilingualText";
|
|
144
|
-
readonly translatedText: "translatedText";
|
|
145
|
-
readonly glossary: "glossary";
|
|
146
|
-
readonly signLanguageInterpretation: "signLanguageInterpretation";
|
|
147
|
-
readonly visualLanguage: "visualLanguage";
|
|
148
|
-
};
|
|
149
|
-
/**
|
|
150
|
-
* Assessment-specific features
|
|
151
|
-
* Features specific to test-taking environments
|
|
152
|
-
*/
|
|
153
|
-
readonly assessment: {
|
|
154
|
-
readonly protractor: "protractor";
|
|
155
|
-
readonly ruler: "ruler";
|
|
156
|
-
readonly graph: "graph";
|
|
157
|
-
readonly graphingCalculator: "graphingCalculator";
|
|
158
|
-
readonly periodicTable: "periodicTable";
|
|
159
|
-
readonly formulaSheet: "formulaSheet";
|
|
160
|
-
readonly answerMasking: "answerMasking";
|
|
161
|
-
readonly answerEliminator: "answerEliminator";
|
|
162
|
-
readonly strikethrough: "strikethrough";
|
|
163
|
-
readonly itemGlossary: "itemGlossary";
|
|
164
|
-
readonly tutorialAvailable: "tutorialAvailable";
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
/**
|
|
168
|
-
* Flat list of all standard access features for validation
|
|
169
|
-
*/
|
|
170
|
-
export declare const ALL_STANDARD_ACCESS_FEATURES: ("transcript" | "braille" | "textToSpeech" | "calculator" | "graph" | "periodicTable" | "ruler" | "protractor" | "answerEliminator" | "signLanguage" | "readAloud" | "index" | "strikethrough" | "magnification" | "screenMagnifier" | "zoomable" | "highContrastDisplay" | "highContrastAudio" | "colorContrast" | "invertColors" | "displayTransformability" | "largePrint" | "fontEnlargement" | "resizeText" | "alternativeText" | "longDescription" | "describedMath" | "tactileGraphic" | "tactileObject" | "audioDescription" | "humanVoice" | "syntheticVoice" | "speechRate" | "speechVolume" | "voicePitch" | "captions" | "closedCaptions" | "openCaptions" | "subtitles" | "audioControl" | "noBackgroundAudio" | "keyboardControl" | "mouseControl" | "touchControl" | "voiceControl" | "switchControl" | "eyeGazeControl" | "singleSwitchAccess" | "stickyKeys" | "keyboardShortcuts" | "timingControl" | "unlimitedTime" | "extendedTime" | "pauseControl" | "simplifiedLanguage" | "reducedComplexity" | "structuralNavigation" | "tableOfContents" | "reducedDistraction" | "noFlashing" | "pauseAnimation" | "annotations" | "bookmarking" | "highlighting" | "guidedNavigation" | "thesaurus" | "spellingAssistance" | "grammarAssistance" | "lineSpacing" | "wordSpacing" | "letterSpacing" | "fontFamily" | "readingMask" | "readingGuide" | "readingRuler" | "wordHighlighting" | "lineHighlighting" | "focusIndicator" | "printableResource" | "nemeth" | "refreshableBraille" | "pageNavigation" | "skipContent" | "breadcrumbs" | "searchable" | "fullTextSearch" | "multilingualText" | "translatedText" | "glossary" | "signLanguageInterpretation" | "visualLanguage" | "graphingCalculator" | "formulaSheet" | "answerMasking" | "itemGlossary" | "tutorialAvailable")[];
|
|
171
|
-
/**
|
|
172
|
-
* Example PNP configurations for common accessibility needs
|
|
173
|
-
* These are NOT official profiles but illustrative examples showing
|
|
174
|
-
* how standard features can be combined for different student needs.
|
|
175
|
-
*/
|
|
176
|
-
export declare const EXAMPLE_PNP_CONFIGURATIONS: {
|
|
177
|
-
/**
|
|
178
|
-
* Example: Student with low vision
|
|
179
|
-
*/
|
|
180
|
-
readonly lowVision: {
|
|
181
|
-
readonly label: "Example: Low Vision Support";
|
|
182
|
-
readonly features: readonly ["magnification", "screenMagnifier", "highContrastDisplay", "colorContrast", "fontEnlargement", "textToSpeech", "alternativeText", "describedMath"];
|
|
183
|
-
};
|
|
184
|
-
/**
|
|
185
|
-
* Example: Student who is blind
|
|
186
|
-
*/
|
|
187
|
-
readonly blind: {
|
|
188
|
-
readonly label: "Example: Blind Student Support";
|
|
189
|
-
readonly features: readonly ["textToSpeech", "screenReader", "alternativeText", "longDescription", "describedMath", "braille", "refreshableBraille", "keyboardControl", "structuralNavigation"];
|
|
190
|
-
};
|
|
191
|
-
/**
|
|
192
|
-
* Example: Student who is deaf or hard of hearing
|
|
193
|
-
*/
|
|
194
|
-
readonly deafHardOfHearing: {
|
|
195
|
-
readonly label: "Example: Deaf/Hard of Hearing Support";
|
|
196
|
-
readonly features: readonly ["captions", "closedCaptions", "signLanguage", "transcript", "visualLanguage", "noBackgroundAudio"];
|
|
197
|
-
};
|
|
198
|
-
/**
|
|
199
|
-
* Example: Student with dyslexia
|
|
200
|
-
*/
|
|
201
|
-
readonly dyslexia: {
|
|
202
|
-
readonly label: "Example: Dyslexia Support";
|
|
203
|
-
readonly features: readonly ["textToSpeech", "readAloud", "highlighting", "wordHighlighting", "lineHighlighting", "readingMask", "readingGuide", "fontFamily", "lineSpacing", "wordSpacing", "simplifiedLanguage"];
|
|
204
|
-
};
|
|
205
|
-
/**
|
|
206
|
-
* Example: Student with ADHD
|
|
207
|
-
*/
|
|
208
|
-
readonly adhd: {
|
|
209
|
-
readonly label: "Example: ADHD Support";
|
|
210
|
-
readonly features: readonly ["reducedDistraction", "noFlashing", "pauseAnimation", "timingControl", "extendedTime", "highlighting", "annotations", "guidedNavigation", "structuralNavigation"];
|
|
211
|
-
};
|
|
212
|
-
/**
|
|
213
|
-
* Example: Student with motor limitations
|
|
214
|
-
*/
|
|
215
|
-
readonly motorLimitations: {
|
|
216
|
-
readonly label: "Example: Motor Limitations Support";
|
|
217
|
-
readonly features: readonly ["keyboardControl", "stickyKeys", "keyboardShortcuts", "voiceControl", "switchControl", "timingControl", "extendedTime", "unlimitedTime"];
|
|
218
|
-
};
|
|
219
|
-
/**
|
|
220
|
-
* Example: English language learner
|
|
221
|
-
*/
|
|
222
|
-
readonly englishLearner: {
|
|
223
|
-
readonly label: "Example: English Language Learner Support";
|
|
224
|
-
readonly features: readonly ["textToSpeech", "translatedText", "glossary", "simplifiedLanguage", "readAloud", "highlighting"];
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
/**
|
|
228
|
-
* Helper to validate if a feature ID is a standard QTI 3.0 feature
|
|
229
|
-
*/
|
|
230
|
-
export declare function isStandardAccessFeature(featureId: string): boolean;
|
|
231
|
-
/**
|
|
232
|
-
* Helper to get category for a feature
|
|
233
|
-
*/
|
|
234
|
-
export declare function getFeatureCategory(featureId: string): keyof typeof QTI_STANDARD_ACCESS_FEATURES | null;
|
|
235
|
-
/**
|
|
236
|
-
* Helper to get all features in a category
|
|
237
|
-
*/
|
|
238
|
-
export declare function getFeaturesInCategory(category: keyof typeof QTI_STANDARD_ACCESS_FEATURES): string[];
|