@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.
Files changed (228) hide show
  1. package/README.md +349 -313
  2. package/dist/attempt/TestSession.d.ts +1 -20
  3. package/dist/attempt/TestSession.js +8 -99
  4. package/dist/components/ItemScope.custom-element.d.ts +1 -0
  5. package/dist/components/ItemScope.custom-element.js +1 -0
  6. package/dist/components/ItemToolBar.custom-element.js +1 -1
  7. package/dist/components/PieAssessmentToolkit.custom-element.js +14 -14
  8. package/dist/components/SectionToolBar.custom-element.js +1 -1
  9. package/dist/components/chunks/ItemToolBar-7tt7v2xp.js +4 -0
  10. package/dist/components/chunks/{ItemToolBar-gmrryv2v.js → ItemToolBar-97hx60z4.js} +1 -1
  11. package/dist/components/chunks/ItemToolBar-bxwyhr5p.js +2 -0
  12. package/dist/components/chunks/ItemToolBar-jx38w99s.js +2 -0
  13. package/dist/components/chunks/ItemToolBar-rd2bb4p6.js +40 -0
  14. package/dist/components/chunks/ItemToolBar-vdkyn9f3.js +2 -0
  15. package/dist/components/chunks/sre-engine-jd8cc08x.js +1 -0
  16. package/dist/components/item-scope-element.d.ts +2 -0
  17. package/dist/components/item-scope-element.js +2 -0
  18. package/dist/context/assessment-toolkit-context.d.ts +27 -6
  19. package/dist/index.d.ts +22 -47
  20. package/dist/index.js +12 -36
  21. package/dist/policy/core/PolicySource.d.ts +1 -1
  22. package/dist/policy/core/ToolPolicyEngine.d.ts +77 -32
  23. package/dist/policy/core/ToolPolicyEngine.js +136 -46
  24. package/dist/policy/core/compose-decision.d.ts +28 -7
  25. package/dist/policy/core/compose-decision.js +75 -54
  26. package/dist/policy/core/decision-types.d.ts +65 -34
  27. package/dist/policy/core/feature-decision.d.ts +16 -9
  28. package/dist/policy/core/feature-decision.js +14 -8
  29. package/dist/policy/core/pnp-policy-inputs.d.ts +24 -33
  30. package/dist/policy/core/pnp-policy-inputs.js +28 -56
  31. package/dist/policy/core/provenance.d.ts +9 -4
  32. package/dist/policy/core/provenance.js +1 -1
  33. package/dist/policy/engine.d.ts +7 -23
  34. package/dist/policy/engine.js +5 -20
  35. package/dist/policy/sources/PnpPolicySource.d.ts +44 -61
  36. package/dist/policy/sources/PnpPolicySource.js +117 -118
  37. package/dist/runtime/SectionControllerBinding.d.ts +279 -0
  38. package/dist/runtime/SectionControllerBinding.js +450 -0
  39. package/dist/runtime/SectionRuntimeEngine.d.ts +26 -289
  40. package/dist/runtime/SectionRuntimeEngine.js +30 -372
  41. package/dist/runtime/adapter/SectionEngineAdapter.d.ts +19 -80
  42. package/dist/runtime/adapter/SectionEngineAdapter.js +19 -92
  43. package/dist/runtime/adapter/dom-event-bridge.d.ts +15 -30
  44. package/dist/runtime/adapter/dom-event-bridge.js +17 -44
  45. package/dist/runtime/adapter/subscriber-fanout.d.ts +1 -2
  46. package/dist/runtime/adapter/subscriber-fanout.js +1 -2
  47. package/dist/runtime/catalog-context.d.ts +19 -0
  48. package/dist/runtime/catalog-context.js +28 -0
  49. package/dist/runtime/composition-emit-scheduler.d.ts +9 -15
  50. package/dist/runtime/composition-emit-scheduler.js +9 -15
  51. package/dist/runtime/content-language.d.ts +32 -0
  52. package/dist/runtime/content-language.js +46 -0
  53. package/dist/runtime/content-region.d.ts +17 -0
  54. package/dist/runtime/content-region.js +29 -0
  55. package/dist/runtime/content-registration.d.ts +13 -0
  56. package/dist/runtime/content-registration.js +25 -0
  57. package/dist/runtime/core/SectionEngineCore.d.ts +2 -2
  58. package/dist/runtime/core/SectionEngineCore.js +2 -2
  59. package/dist/runtime/core/cohort.d.ts +1 -1
  60. package/dist/runtime/core/cohort.js +1 -1
  61. package/dist/runtime/core/engine-input.d.ts +18 -30
  62. package/dist/runtime/core/engine-input.js +11 -12
  63. package/dist/runtime/core/engine-output.d.ts +16 -40
  64. package/dist/runtime/core/engine-output.js +9 -21
  65. package/dist/runtime/core/engine-readiness.d.ts +5 -37
  66. package/dist/runtime/core/engine-readiness.js +8 -41
  67. package/dist/runtime/core/engine-resolver.d.ts +46 -74
  68. package/dist/runtime/core/engine-resolver.js +18 -43
  69. package/dist/runtime/core/engine-state.d.ts +28 -36
  70. package/dist/runtime/core/engine-state.js +18 -21
  71. package/dist/runtime/core/engine-transition.d.ts +14 -19
  72. package/dist/runtime/core/engine-transition.js +71 -51
  73. package/dist/runtime/engine.d.ts +16 -19
  74. package/dist/runtime/engine.js +12 -19
  75. package/dist/runtime/page-warnings.d.ts +13 -0
  76. package/dist/runtime/page-warnings.js +22 -0
  77. package/dist/runtime/policy-input-forwarding.d.ts +25 -0
  78. package/dist/runtime/policy-input-forwarding.js +25 -0
  79. package/dist/runtime/registration-events.d.ts +11 -0
  80. package/dist/runtime/runtime-event-claim.d.ts +8 -0
  81. package/dist/runtime/runtime-event-claim.js +15 -0
  82. package/dist/runtime/shell-event-bridge.d.ts +45 -0
  83. package/dist/runtime/shell-event-bridge.js +127 -0
  84. package/dist/runtime/shell-registration.d.ts +73 -0
  85. package/dist/runtime/shell-registration.js +95 -0
  86. package/dist/runtime/shell-scope.d.ts +68 -0
  87. package/dist/runtime/shell-scope.js +188 -0
  88. package/dist/runtime/tool-host-contract.d.ts +8 -10
  89. package/dist/runtime/tool-host-contract.js +11 -11
  90. package/dist/runtime/unclaimed-registration-watch.d.ts +7 -0
  91. package/dist/runtime/unclaimed-registration-watch.js +23 -0
  92. package/dist/services/ElementToolStateStore.d.ts +14 -10
  93. package/dist/services/ElementToolStateStore.js +37 -13
  94. package/dist/services/HighlightCoordinator.d.ts +21 -21
  95. package/dist/services/HighlightCoordinator.js +431 -325
  96. package/dist/services/RangeSerializer.d.ts +10 -1
  97. package/dist/services/RangeSerializer.js +87 -14
  98. package/dist/services/TTSService.d.ts +117 -70
  99. package/dist/services/TTSService.js +668 -578
  100. package/dist/services/ToolCoordinator.d.ts +43 -60
  101. package/dist/services/ToolCoordinator.js +164 -206
  102. package/dist/services/ToolRegistry.d.ts +74 -57
  103. package/dist/services/ToolRegistry.js +104 -114
  104. package/dist/services/ToolkitCoordinator.d.ts +183 -189
  105. package/dist/services/ToolkitCoordinator.js +477 -431
  106. package/dist/services/audio-handoff.d.ts +6 -7
  107. package/dist/services/audio-handoff.js +20 -14
  108. package/dist/services/catalog-owner.d.ts +0 -1
  109. package/dist/services/framework-error-bus.d.ts +3 -6
  110. package/dist/services/framework-error-bus.js +3 -6
  111. package/dist/services/framework-error.d.ts +22 -7
  112. package/dist/services/framework-error.js +9 -7
  113. package/dist/services/interfaces.d.ts +158 -129
  114. package/dist/services/section-session-assignment.d.ts +21 -0
  115. package/dist/services/section-session-assignment.js +82 -0
  116. package/dist/services/spoken-audio-cards.d.ts +0 -2
  117. package/dist/services/spoken-audio-cards.js +0 -2
  118. package/dist/services/tool-config-defaults.d.ts +3 -3
  119. package/dist/services/tool-config-defaults.js +3 -3
  120. package/dist/services/tool-config-validation.d.ts +4 -5
  121. package/dist/services/tool-config-validation.js +36 -61
  122. package/dist/services/tool-context.d.ts +0 -8
  123. package/dist/services/tool-context.js +0 -12
  124. package/dist/services/tool-icons.d.ts +4 -3
  125. package/dist/services/tool-icons.js +4 -3
  126. package/dist/services/tool-instance-id.d.ts +0 -1
  127. package/dist/services/tool-instance-id.js +0 -6
  128. package/dist/services/tool-providers/TTSToolProvider.d.ts +18 -19
  129. package/dist/services/tool-providers/TTSToolProvider.js +37 -34
  130. package/dist/services/tool-providers/ToolProviderApi.d.ts +10 -4
  131. package/dist/services/tool-providers/ToolProviderRegistry.d.ts +30 -26
  132. package/dist/services/tool-providers/ToolProviderRegistry.js +119 -93
  133. package/dist/services/tool-request.d.ts +27 -12
  134. package/dist/services/tool-request.js +24 -14
  135. package/dist/services/toolbar-decided-tools.d.ts +15 -0
  136. package/dist/services/toolbar-decided-tools.js +28 -0
  137. package/dist/services/tools-config-normalizer.d.ts +17 -22
  138. package/dist/services/tools-config-normalizer.js +2 -10
  139. package/dist/services/tts/browser-provider.d.ts +38 -2
  140. package/dist/services/tts/browser-provider.js +276 -140
  141. package/dist/services/tts/flat-tree.d.ts +71 -0
  142. package/dist/services/tts/flat-tree.js +269 -0
  143. package/dist/services/tts/generated-speech/assemble-plan.d.ts +3 -1
  144. package/dist/services/tts/generated-speech/assemble-plan.js +3 -1
  145. package/dist/services/tts/generated-speech/dom/build-dom-plan.d.ts +2 -0
  146. package/dist/services/tts/generated-speech/dom/build-dom-plan.js +1 -1
  147. package/dist/services/tts/generated-speech/math-speech-cache.d.ts +3 -1
  148. package/dist/services/tts/generated-speech/math-speech-cache.js +5 -1
  149. package/dist/services/tts/highlight-pipeline/create-highlight-plan.js +12 -4
  150. package/dist/services/tts/highlight-pipeline/prose-boundary-resolver.js +6 -4
  151. package/dist/services/tts/highlight-pipeline/readable-region.js +3 -2
  152. package/dist/services/tts/highlight-pipeline/types.d.ts +5 -0
  153. package/dist/services/tts/highlight-pipeline/visible-map-range.d.ts +12 -0
  154. package/dist/services/tts/highlight-pipeline/visible-map-range.js +73 -7
  155. package/dist/services/tts/math-aware-text-processing.d.ts +5 -1
  156. package/dist/services/tts/math-aware-text-processing.js +32 -18
  157. package/dist/services/tts/math-control-names.d.ts +21 -0
  158. package/dist/services/tts/math-control-names.js +142 -0
  159. package/dist/services/tts/math-speech.d.ts +11 -0
  160. package/dist/services/tts/math-speech.js +51 -18
  161. package/dist/services/tts/provider-options.d.ts +41 -0
  162. package/dist/services/tts/provider-options.js +1 -0
  163. package/dist/services/tts/ssml/spoken-text.d.ts +2 -26
  164. package/dist/services/tts/ssml/spoken-text.js +29 -0
  165. package/dist/services/tts/start-failure.d.ts +11 -0
  166. package/dist/services/tts/start-failure.js +19 -0
  167. package/dist/services/tts/text-processing.d.ts +9 -0
  168. package/dist/services/tts/text-processing.js +46 -33
  169. package/dist/services/tts/text-segmentation.d.ts +7 -0
  170. package/dist/services/tts/text-segmentation.js +47 -0
  171. package/dist/services/tts-runtime-config.d.ts +25 -17
  172. package/dist/services/tts-runtime-config.js +16 -95
  173. package/dist/tools/content-capability-resolution.d.ts +7 -9
  174. package/dist/tools/content-capability-resolution.js +8 -45
  175. package/dist/tools/registration.d.ts +58 -0
  176. package/dist/tools/registration.js +54 -0
  177. package/dist/tools/registrations/toolbar-registration-helpers.js +2 -2
  178. package/dist/tools/tool-surface-host.d.ts +6 -10
  179. package/dist/tools/tool-surface-host.js +44 -42
  180. package/dist/tools/tool-tag-map.d.ts +5 -15
  181. package/dist/tools/tool-tag-map.js +6 -20
  182. package/dist/utils/structural-equality.d.ts +11 -0
  183. package/dist/utils/structural-equality.js +47 -0
  184. package/package.json +13 -29
  185. package/dist/attempt/adapters/activity-to-test-attempt-session.d.ts +0 -49
  186. package/dist/attempt/adapters/activity-to-test-attempt-session.js +0 -138
  187. package/dist/components/chunks/ItemToolBar-b9dz5jvd.js +0 -40
  188. package/dist/components/chunks/ItemToolBar-h4xap0t0.js +0 -4
  189. package/dist/components/chunks/ItemToolBar-wr2myaah.js +0 -2
  190. package/dist/components/chunks/sre-engine-wf9s43gg.js +0 -1
  191. package/dist/context/runtime-context-consumer.d.ts +0 -13
  192. package/dist/context/runtime-context-consumer.js +0 -18
  193. package/dist/item-loader.d.ts +0 -44
  194. package/dist/item-loader.js +0 -61
  195. package/dist/policy/core/engine-context.d.ts +0 -29
  196. package/dist/policy/core/engine-context.js +0 -27
  197. package/dist/policy/core/policy-source-tag.d.ts +0 -31
  198. package/dist/policy/core/policy-source-tag.js +0 -28
  199. package/dist/policy/internal.d.ts +0 -25
  200. package/dist/policy/internal.js +0 -25
  201. package/dist/runtime/adapter/coordinator-bridge.d.ts +0 -92
  202. package/dist/runtime/adapter/coordinator-bridge.js +0 -126
  203. package/dist/runtime/adapter/framework-error-bridge.d.ts +0 -36
  204. package/dist/runtime/adapter/framework-error-bridge.js +0 -46
  205. package/dist/runtime/adapter/instrumentation-bridge.d.ts +0 -31
  206. package/dist/runtime/adapter/instrumentation-bridge.js +0 -38
  207. package/dist/runtime/core/engine-stage-derivation.d.ts +0 -18
  208. package/dist/runtime/core/engine-stage-derivation.js +0 -29
  209. package/dist/runtime/engine-context.d.ts +0 -39
  210. package/dist/runtime/engine-context.js +0 -31
  211. package/dist/runtime/internal.d.ts +0 -43
  212. package/dist/runtime/internal.js +0 -45
  213. package/dist/runtime/section-runtime-engine-host-context.d.ts +0 -74
  214. package/dist/runtime/section-runtime-engine-host-context.js +0 -57
  215. package/dist/runtime/stage-emit-gate.d.ts +0 -92
  216. package/dist/runtime/stage-emit-gate.js +0 -82
  217. package/dist/services/I18nService.d.ts +0 -47
  218. package/dist/services/I18nService.js +0 -84
  219. package/dist/services/ThemeProvider.d.ts +0 -95
  220. package/dist/services/ThemeProvider.js +0 -334
  221. package/dist/services/defaultPersonalNeedsProfile.d.ts +0 -21
  222. package/dist/services/defaultPersonalNeedsProfile.js +0 -26
  223. package/dist/services/pnp-standard-features.d.ts +0 -238
  224. package/dist/services/pnp-standard-features.js +0 -338
  225. package/dist/tools/client.d.ts +0 -10
  226. package/dist/tools/client.js +0 -10
  227. package/dist/tools/internal.d.ts +0 -44
  228. package/dist/tools/internal.js +0 -39
@@ -1,338 +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 const QTI_STANDARD_ACCESS_FEATURES = {
22
- /**
23
- * Visual accessibility features
24
- * For students with low vision, color blindness, or visual processing needs
25
- */
26
- visual: {
27
- // Magnification and zoom
28
- magnification: "magnification",
29
- screenMagnifier: "screenMagnifier",
30
- zoomable: "zoomable",
31
- // Color and contrast
32
- highContrastDisplay: "highContrastDisplay",
33
- highContrastAudio: "highContrastAudio",
34
- colorContrast: "colorContrast",
35
- invertColors: "invertColors",
36
- // Display customization
37
- displayTransformability: "displayTransformability",
38
- largePrint: "largePrint",
39
- fontEnlargement: "fontEnlargement",
40
- resizeText: "resizeText",
41
- // Visual alternatives
42
- alternativeText: "alternativeText",
43
- longDescription: "longDescription",
44
- describedMath: "describedMath",
45
- tactileGraphic: "tactileGraphic",
46
- tactileObject: "tactileObject",
47
- },
48
- /**
49
- * Auditory accessibility features
50
- * For students who are deaf, hard of hearing, or benefit from audio
51
- */
52
- auditory: {
53
- // Audio output
54
- audioDescription: "audioDescription",
55
- textToSpeech: "textToSpeech",
56
- readAloud: "readAloud",
57
- humanVoice: "humanVoice",
58
- syntheticVoice: "syntheticVoice",
59
- // Speech control
60
- speechRate: "speechRate",
61
- speechVolume: "speechVolume",
62
- voicePitch: "voicePitch",
63
- // Visual alternatives for audio
64
- captions: "captions",
65
- closedCaptions: "closedCaptions",
66
- openCaptions: "openCaptions",
67
- transcript: "transcript",
68
- signLanguage: "signLanguage",
69
- subtitles: "subtitles",
70
- // Audio adjustments
71
- audioControl: "audioControl",
72
- noBackgroundAudio: "noBackgroundAudio",
73
- },
74
- /**
75
- * Motor/physical accessibility features
76
- * For students with limited mobility or motor control
77
- */
78
- motor: {
79
- // Input alternatives
80
- keyboardControl: "keyboardControl",
81
- mouseControl: "mouseControl",
82
- touchControl: "touchControl",
83
- voiceControl: "voiceControl",
84
- switchControl: "switchControl",
85
- eyeGazeControl: "eyeGazeControl",
86
- // Keyboard features
87
- singleSwitchAccess: "singleSwitchAccess",
88
- stickyKeys: "stickyKeys",
89
- keyboardShortcuts: "keyboardShortcuts",
90
- // Timing
91
- timingControl: "timingControl",
92
- unlimitedTime: "unlimitedTime",
93
- extendedTime: "extendedTime",
94
- pauseControl: "pauseControl",
95
- },
96
- /**
97
- * Cognitive/learning accessibility features
98
- * For students with learning disabilities, ADHD, autism, etc.
99
- */
100
- cognitive: {
101
- // Content simplification
102
- simplifiedLanguage: "simplifiedLanguage",
103
- reducedComplexity: "reducedComplexity",
104
- structuralNavigation: "structuralNavigation",
105
- tableOfContents: "tableOfContents",
106
- // Focus and attention
107
- reducedDistraction: "reducedDistraction",
108
- noFlashing: "noFlashing",
109
- pauseAnimation: "pauseAnimation",
110
- // Organization and support
111
- annotations: "annotations",
112
- bookmarking: "bookmarking",
113
- highlighting: "highlighting",
114
- guidedNavigation: "guidedNavigation",
115
- // Tools
116
- calculator: "calculator",
117
- thesaurus: "thesaurus",
118
- spellingAssistance: "spellingAssistance",
119
- grammarAssistance: "grammarAssistance",
120
- },
121
- /**
122
- * Reading support features
123
- * For students with dyslexia or reading challenges
124
- */
125
- reading: {
126
- // Text presentation
127
- lineSpacing: "lineSpacing",
128
- wordSpacing: "wordSpacing",
129
- letterSpacing: "letterSpacing",
130
- fontFamily: "fontFamily",
131
- readingMask: "readingMask",
132
- readingGuide: "readingGuide",
133
- readingRuler: "readingRuler",
134
- // Highlighting and emphasis
135
- wordHighlighting: "wordHighlighting",
136
- lineHighlighting: "lineHighlighting",
137
- focusIndicator: "focusIndicator",
138
- // Content support
139
- printableResource: "printableResource",
140
- braille: "braille",
141
- nemeth: "nemeth",
142
- refreshableBraille: "refreshableBraille",
143
- },
144
- /**
145
- * Navigation features
146
- * For efficient content navigation
147
- */
148
- navigation: {
149
- // Structure
150
- index: "index",
151
- pageNavigation: "pageNavigation",
152
- skipContent: "skipContent",
153
- breadcrumbs: "breadcrumbs",
154
- // Search
155
- searchable: "searchable",
156
- fullTextSearch: "fullTextSearch",
157
- },
158
- /**
159
- * Linguistic features
160
- * For language support
161
- */
162
- linguistic: {
163
- // Languages
164
- multilingualText: "multilingualText",
165
- translatedText: "translatedText",
166
- glossary: "glossary",
167
- // Sign language
168
- signLanguageInterpretation: "signLanguageInterpretation",
169
- visualLanguage: "visualLanguage",
170
- },
171
- /**
172
- * Assessment-specific features
173
- * Features specific to test-taking environments
174
- */
175
- assessment: {
176
- // Tools
177
- protractor: "protractor",
178
- ruler: "ruler",
179
- graph: "graph",
180
- graphingCalculator: "graphingCalculator",
181
- periodicTable: "periodicTable",
182
- formulaSheet: "formulaSheet",
183
- // Answer support
184
- answerMasking: "answerMasking",
185
- answerEliminator: "answerEliminator",
186
- strikethrough: "strikethrough",
187
- // Item features
188
- itemGlossary: "itemGlossary",
189
- tutorialAvailable: "tutorialAvailable",
190
- },
191
- };
192
- /**
193
- * Flat list of all standard access features for validation
194
- */
195
- export const ALL_STANDARD_ACCESS_FEATURES = Object.values(QTI_STANDARD_ACCESS_FEATURES).flatMap((category) => Object.values(category));
196
- /**
197
- * Example PNP configurations for common accessibility needs
198
- * These are NOT official profiles but illustrative examples showing
199
- * how standard features can be combined for different student needs.
200
- */
201
- export const EXAMPLE_PNP_CONFIGURATIONS = {
202
- /**
203
- * Example: Student with low vision
204
- */
205
- lowVision: {
206
- label: "Example: Low Vision Support",
207
- features: [
208
- "magnification",
209
- "screenMagnifier",
210
- "highContrastDisplay",
211
- "colorContrast",
212
- "fontEnlargement",
213
- "textToSpeech",
214
- "alternativeText",
215
- "describedMath",
216
- ],
217
- },
218
- /**
219
- * Example: Student who is blind
220
- */
221
- blind: {
222
- label: "Example: Blind Student Support",
223
- features: [
224
- "textToSpeech",
225
- "screenReader",
226
- "alternativeText",
227
- "longDescription",
228
- "describedMath",
229
- "braille",
230
- "refreshableBraille",
231
- "keyboardControl",
232
- "structuralNavigation",
233
- ],
234
- },
235
- /**
236
- * Example: Student who is deaf or hard of hearing
237
- */
238
- deafHardOfHearing: {
239
- label: "Example: Deaf/Hard of Hearing Support",
240
- features: [
241
- "captions",
242
- "closedCaptions",
243
- "signLanguage",
244
- "transcript",
245
- "visualLanguage",
246
- "noBackgroundAudio",
247
- ],
248
- },
249
- /**
250
- * Example: Student with dyslexia
251
- */
252
- dyslexia: {
253
- label: "Example: Dyslexia Support",
254
- features: [
255
- "textToSpeech",
256
- "readAloud",
257
- "highlighting",
258
- "wordHighlighting",
259
- "lineHighlighting",
260
- "readingMask",
261
- "readingGuide",
262
- "fontFamily",
263
- "lineSpacing",
264
- "wordSpacing",
265
- "simplifiedLanguage",
266
- ],
267
- },
268
- /**
269
- * Example: Student with ADHD
270
- */
271
- adhd: {
272
- label: "Example: ADHD Support",
273
- features: [
274
- "reducedDistraction",
275
- "noFlashing",
276
- "pauseAnimation",
277
- "timingControl",
278
- "extendedTime",
279
- "highlighting",
280
- "annotations",
281
- "guidedNavigation",
282
- "structuralNavigation",
283
- ],
284
- },
285
- /**
286
- * Example: Student with motor limitations
287
- */
288
- motorLimitations: {
289
- label: "Example: Motor Limitations Support",
290
- features: [
291
- "keyboardControl",
292
- "stickyKeys",
293
- "keyboardShortcuts",
294
- "voiceControl",
295
- "switchControl",
296
- "timingControl",
297
- "extendedTime",
298
- "unlimitedTime",
299
- ],
300
- },
301
- /**
302
- * Example: English language learner
303
- */
304
- englishLearner: {
305
- label: "Example: English Language Learner Support",
306
- features: [
307
- "textToSpeech",
308
- "translatedText",
309
- "glossary",
310
- "simplifiedLanguage",
311
- "readAloud",
312
- "highlighting",
313
- ],
314
- },
315
- };
316
- /**
317
- * Helper to validate if a feature ID is a standard QTI 3.0 feature
318
- */
319
- export function isStandardAccessFeature(featureId) {
320
- return ALL_STANDARD_ACCESS_FEATURES.includes(featureId);
321
- }
322
- /**
323
- * Helper to get category for a feature
324
- */
325
- export function getFeatureCategory(featureId) {
326
- for (const [category, features] of Object.entries(QTI_STANDARD_ACCESS_FEATURES)) {
327
- if (Object.values(features).includes(featureId)) {
328
- return category;
329
- }
330
- }
331
- return null;
332
- }
333
- /**
334
- * Helper to get all features in a category
335
- */
336
- export function getFeaturesInCategory(category) {
337
- return Object.values(QTI_STANDARD_ACCESS_FEATURES[category]);
338
- }
@@ -1,10 +0,0 @@
1
- /**
2
- * Client-only tool system exports
3
- *
4
- * This entry point exports only browser-safe code for use in custom elements.
5
- *
6
- * Tools should import from '@pie-players/pie-assessment-toolkit/tools/client' instead of
7
- * '@pie-players/pie-assessment-toolkit' to ensure
8
- * they don't accidentally pull in server-side dependencies.
9
- */
10
- export type { CalculationHistoryEntry, Calculator, CalculatorProvider, CalculatorProviderCapabilities, CalculatorProviderConfig, CalculatorState, CalculatorType, } from "@pie-players/pie-calculator";
@@ -1,10 +0,0 @@
1
- /**
2
- * Client-only tool system exports
3
- *
4
- * This entry point exports only browser-safe code for use in custom elements.
5
- *
6
- * Tools should import from '@pie-players/pie-assessment-toolkit/tools/client' instead of
7
- * '@pie-players/pie-assessment-toolkit' to ensure
8
- * they don't accidentally pull in server-side dependencies.
9
- */
10
- export {};
@@ -1,44 +0,0 @@
1
- /**
2
- * Registration-authoring surface.
3
- *
4
- * What a package outside this one needs to write a `ToolRegistration`: the
5
- * registration types, the context predicates a tool answers `isVisibleInContext`
6
- * with, scoped-id and element-creation helpers, the toolbar button/overlay
7
- * helpers, the provider contract a registration's descriptor creates, and the
8
- * TTS provider.
9
- *
10
- * A separate entry point rather than additions to `.` for the same reason
11
- * `runtime/internal` and `policy/internal` exist: this is a surface for sibling
12
- * packages in this repo, not a contract offered to hosts. Widening `.` with two
13
- * dozen registration-authoring helpers would make every one of them something a
14
- * host could reasonably expect us to keep.
15
- *
16
- * It exists because the packaged registrations moved out to the composition layer
17
- * (`@pie-players/pie-default-tool-loaders`) so core stops naming capabilities.
18
- * A host writing its own capability package imports from here too, which is the
19
- * point — the mechanism is the same one our own registrations use.
20
- */
21
- export type { HostedToolContext, HostedToolSize, ResolvedToolContext, ToolActivation, ToolContentDependency, ToolContentDependencyContext, ToolModuleLoader, ToolProviderDescriptor, ToolRegistration, ToolRenderElement, ToolSingletonScope, ToolSurfaceRenderContext, ToolSurfaceRenderResult, ToolSurfaceServices, ToolToolbarButtonDefinition, ToolToolbarRenderResult, ToolWindowShellConfig, ToolbarContext, } from "../services/ToolRegistry.js";
22
- export { resolveToolProviderId, ToolRegistry, } from "../services/ToolRegistry.js";
23
- export { resolveToolRegistrationName } from "../services/ToolRegistry.js";
24
- export type { CatalogOwnerCard, CatalogOwnerSnapshot, } from "../services/AccessibilityCatalogResolver.js";
25
- export type { ToolSelectionAction, ToolSelectionContext, } from "../services/selection-action.js";
26
- export type { ToolOpenRequest, ToolRequestTarget, } from "../services/tool-request.js";
27
- export { resolveFallbackToolIcon, TOOL_FALLBACK_ICONS, } from "../services/tool-icons.js";
28
- export type { ContentCapabilityPhase, ContentCapabilityPolicy, ResolveContentCapabilitiesArgs, ResolvedContentCapability, } from "./content-capability-resolution.js";
29
- export { resolveContentCapabilities } from "./content-capability-resolution.js";
30
- export type { ToolSurfaceHost, ToolSurfaceHostInput, ToolSurfaceHostOptions, ToolSurfaceHostSnapshot, ToolSurfaceScope, } from "./tool-surface-host.js";
31
- export { createToolSurfaceHost } from "./tool-surface-host.js";
32
- export type { ToolContext, ToolLevel } from "../services/tool-context.js";
33
- export { hasChoiceInteraction, hasMathContent, hasReadableText, hasScienceContent, } from "../services/tool-context.js";
34
- export { createScopedToolId } from "../services/tool-instance-id.js";
35
- export type { ToolComponentFactory, ToolComponentFactoryMap, ToolComponentOverrides, ToolTagMap, } from "./tool-tag-map.js";
36
- export { createToolElement, resolveToolTag, toToolIdFromTag, } from "./tool-tag-map.js";
37
- export { applyOverlaySurface, createScopedVisibilityBinding, syncButtonAndOverlayVisibility, } from "./registrations/toolbar-registration-helpers.js";
38
- export type { ElementToolStateStoreApi, ToolCoordinatorApi, ToolkitCoordinatorApi, TtsServiceApi, } from "../services/interfaces.js";
39
- export type { CalculatorToolProviderConfig, ToolPlacementConfig, ToolProviderConfig, } from "../services/tools-config-normalizer.js";
40
- export type { ToolConfigDiagnostic } from "../services/tool-config-validation.js";
41
- export type { ToolProviderApi, ToolProviderCapabilities, } from "../services/tool-providers/ToolProviderApi.js";
42
- export { TTSToolProvider } from "../services/tool-providers/index.js";
43
- export type { NormalizedTTSSpeedOption } from "../services/tts-runtime-config.js";
44
- export { buildRuntimeTTSConfig, normalizeTTSLayoutMode, normalizeTTSSpeedControlOptions, resolveRuntimeProvider, resolveTTSBackend, resolveTTSHostToolbarLayout, resolveTTSLayoutMode, resolveTTSRuntimeSettings, resolveTransportMode, } from "../services/tts-runtime-config.js";
@@ -1,39 +0,0 @@
1
- /**
2
- * Registration-authoring surface.
3
- *
4
- * What a package outside this one needs to write a `ToolRegistration`: the
5
- * registration types, the context predicates a tool answers `isVisibleInContext`
6
- * with, scoped-id and element-creation helpers, the toolbar button/overlay
7
- * helpers, the provider contract a registration's descriptor creates, and the
8
- * TTS provider.
9
- *
10
- * A separate entry point rather than additions to `.` for the same reason
11
- * `runtime/internal` and `policy/internal` exist: this is a surface for sibling
12
- * packages in this repo, not a contract offered to hosts. Widening `.` with two
13
- * dozen registration-authoring helpers would make every one of them something a
14
- * host could reasonably expect us to keep.
15
- *
16
- * It exists because the packaged registrations moved out to the composition layer
17
- * (`@pie-players/pie-default-tool-loaders`) so core stops naming capabilities.
18
- * A host writing its own capability package imports from here too, which is the
19
- * point — the mechanism is the same one our own registrations use.
20
- */
21
- export { resolveToolProviderId, ToolRegistry, } from "../services/ToolRegistry.js";
22
- // A registration's own display name in the interface locale. A tool window's
23
- // title is the registration's name, so the shell needs the same `nameKey`-then-
24
- // `name` precedence the toolbar uses rather than the raw English field.
25
- export { resolveToolRegistrationName } from "../services/ToolRegistry.js";
26
- // So a gateway button and the toolbar button for the same tool draw one icon.
27
- export { resolveFallbackToolIcon, TOOL_FALLBACK_ICONS, } from "../services/tool-icons.js";
28
- export { resolveContentCapabilities } from "./content-capability-resolution.js";
29
- export { createToolSurfaceHost } from "./tool-surface-host.js";
30
- export { hasChoiceInteraction, hasMathContent, hasReadableText, hasScienceContent, } from "../services/tool-context.js";
31
- // Scoped tool instance ids, so two placements of one tool do not share state.
32
- export { createScopedToolId } from "../services/tool-instance-id.js";
33
- export { createToolElement, resolveToolTag, toToolIdFromTag, } from "./tool-tag-map.js";
34
- // Toolbar button/overlay wiring shared by every toolbar-toggle registration.
35
- export { applyOverlaySurface, createScopedVisibilityBinding, syncButtonAndOverlayVisibility, } from "./registrations/toolbar-registration-helpers.js";
36
- // The TTS provider stays here because it is written against the `pie-tts`
37
- // contract package, which the toolkit's own `TTSService` also depends on.
38
- export { TTSToolProvider } from "../services/tool-providers/index.js";
39
- export { buildRuntimeTTSConfig, normalizeTTSLayoutMode, normalizeTTSSpeedControlOptions, resolveRuntimeProvider, resolveTTSBackend, resolveTTSHostToolbarLayout, resolveTTSLayoutMode, resolveTTSRuntimeSettings, resolveTransportMode, } from "../services/tts-runtime-config.js";