@pie-players/pie-assessment-toolkit 0.2.2 → 0.2.4

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 (100) hide show
  1. package/README.md +159 -1
  2. package/dist/index.d.ts +16 -2
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +9 -2
  5. package/dist/index.js.map +1 -1
  6. package/dist/player/AssessmentPlayer.d.ts +9 -0
  7. package/dist/player/AssessmentPlayer.d.ts.map +1 -1
  8. package/dist/player/AssessmentPlayer.js +13 -4
  9. package/dist/player/AssessmentPlayer.js.map +1 -1
  10. package/dist/services/AnnotationToolbarConfig.d.ts +134 -0
  11. package/dist/services/AnnotationToolbarConfig.d.ts.map +1 -0
  12. package/dist/services/AnnotationToolbarConfig.js +100 -0
  13. package/dist/services/AnnotationToolbarConfig.js.map +1 -0
  14. package/dist/services/HighlightCoordinator.d.ts +23 -10
  15. package/dist/services/HighlightCoordinator.d.ts.map +1 -1
  16. package/dist/services/HighlightCoordinator.js +87 -40
  17. package/dist/services/HighlightCoordinator.js.map +1 -1
  18. package/dist/services/PNPToolResolver.d.ts +171 -15
  19. package/dist/services/PNPToolResolver.d.ts.map +1 -1
  20. package/dist/services/PNPToolResolver.js +324 -32
  21. package/dist/services/PNPToolResolver.js.map +1 -1
  22. package/dist/services/RangeSerializer.d.ts +119 -0
  23. package/dist/services/RangeSerializer.d.ts.map +1 -0
  24. package/dist/services/RangeSerializer.js +199 -0
  25. package/dist/services/RangeSerializer.js.map +1 -0
  26. package/dist/services/TTSService.d.ts +4 -1
  27. package/dist/services/TTSService.d.ts.map +1 -1
  28. package/dist/services/TTSService.js +58 -3
  29. package/dist/services/TTSService.js.map +1 -1
  30. package/dist/services/ToolRegistry.d.ts +225 -0
  31. package/dist/services/ToolRegistry.d.ts.map +1 -0
  32. package/dist/services/ToolRegistry.js +248 -0
  33. package/dist/services/ToolRegistry.js.map +1 -0
  34. package/dist/services/ToolkitCoordinator.d.ts +22 -0
  35. package/dist/services/ToolkitCoordinator.d.ts.map +1 -1
  36. package/dist/services/ToolkitCoordinator.js +44 -0
  37. package/dist/services/ToolkitCoordinator.js.map +1 -1
  38. package/dist/services/createDefaultToolRegistry.d.ts +72 -0
  39. package/dist/services/createDefaultToolRegistry.d.ts.map +1 -0
  40. package/dist/services/createDefaultToolRegistry.js +147 -0
  41. package/dist/services/createDefaultToolRegistry.js.map +1 -0
  42. package/dist/services/interfaces.d.ts +8 -0
  43. package/dist/services/interfaces.d.ts.map +1 -1
  44. package/dist/services/interfaces.js.map +1 -1
  45. package/dist/services/pnp-provenance.d.ts +167 -0
  46. package/dist/services/pnp-provenance.d.ts.map +1 -0
  47. package/dist/services/pnp-provenance.js +230 -0
  48. package/dist/services/pnp-provenance.js.map +1 -0
  49. package/dist/services/pnp-standard-features.d.ts +240 -0
  50. package/dist/services/pnp-standard-features.d.ts.map +1 -0
  51. package/dist/services/pnp-standard-features.js +342 -0
  52. package/dist/services/pnp-standard-features.js.map +1 -0
  53. package/dist/services/tool-context.d.ts +150 -0
  54. package/dist/services/tool-context.d.ts.map +1 -0
  55. package/dist/services/tool-context.js +157 -0
  56. package/dist/services/tool-context.js.map +1 -0
  57. package/dist/services/tool-providers/ToolProviderRegistry.d.ts.map +1 -1
  58. package/dist/services/tool-providers/ToolProviderRegistry.js +7 -7
  59. package/dist/services/tool-providers/ToolProviderRegistry.js.map +1 -1
  60. package/dist/tools/registrations/accessibility-tools.d.ts +43 -0
  61. package/dist/tools/registrations/accessibility-tools.d.ts.map +1 -0
  62. package/dist/tools/registrations/accessibility-tools.js +230 -0
  63. package/dist/tools/registrations/accessibility-tools.js.map +1 -0
  64. package/dist/tools/registrations/calculator.d.ts +21 -0
  65. package/dist/tools/registrations/calculator.d.ts.map +1 -0
  66. package/dist/tools/registrations/calculator.js +98 -0
  67. package/dist/tools/registrations/calculator.js.map +1 -0
  68. package/dist/tools/registrations/interaction-tools.d.ts +28 -0
  69. package/dist/tools/registrations/interaction-tools.d.ts.map +1 -0
  70. package/dist/tools/registrations/interaction-tools.js +124 -0
  71. package/dist/tools/registrations/interaction-tools.js.map +1 -0
  72. package/dist/tools/registrations/measurement-tools.d.ts +25 -0
  73. package/dist/tools/registrations/measurement-tools.d.ts.map +1 -0
  74. package/dist/tools/registrations/measurement-tools.js +112 -0
  75. package/dist/tools/registrations/measurement-tools.js.map +1 -0
  76. package/dist/tools/registrations/subject-specific-tools.d.ts +28 -0
  77. package/dist/tools/registrations/subject-specific-tools.d.ts.map +1 -0
  78. package/dist/tools/registrations/subject-specific-tools.js +118 -0
  79. package/dist/tools/registrations/subject-specific-tools.js.map +1 -0
  80. package/dist/tools/registrations/tts.d.ts +20 -0
  81. package/dist/tools/registrations/tts.d.ts.map +1 -0
  82. package/dist/tools/registrations/tts.js +86 -0
  83. package/dist/tools/registrations/tts.js.map +1 -0
  84. package/dist/tools/tool-tag-map.d.ts +24 -0
  85. package/dist/tools/tool-tag-map.d.ts.map +1 -0
  86. package/dist/tools/tool-tag-map.js +38 -0
  87. package/dist/tools/tool-tag-map.js.map +1 -0
  88. package/package.json +15 -7
  89. package/src/README.md +25 -11
  90. package/src/components/PNPProfileTester.example.svelte +188 -0
  91. package/src/components/PNPProfileTester.svelte +397 -0
  92. package/src/components/PNPProvenanceViewer.svelte +260 -0
  93. package/src/components/QuestionToolBar.svelte +160 -83
  94. package/src/components/ToolButton.svelte +146 -0
  95. package/src/components/ToolButtonGroup.svelte +109 -0
  96. package/src/reference-layout/ReferenceLayout.svelte +5 -13
  97. package/dist/services/PNPMapper.d.ts +0 -71
  98. package/dist/services/PNPMapper.d.ts.map +0 -1
  99. package/dist/services/PNPMapper.js +0 -98
  100. package/dist/services/PNPMapper.js.map +0 -1
@@ -0,0 +1,230 @@
1
+ /**
2
+ * Accessibility Tools Registrations
3
+ *
4
+ * Registers tools for visual accessibility and reading support:
5
+ * - Magnifier (zoom lens)
6
+ * - Line Reader (reading guide)
7
+ * - Color Scheme (theme/contrast)
8
+ * - Annotation Toolbar (text highlighting)
9
+ *
10
+ * Maps to QTI 3.0 standard access features from:
11
+ * - visual category: magnification, highContrastDisplay, colorContrast
12
+ * - reading category: readingMask, readingGuide, highlighting
13
+ */
14
+ import { hasReadableText } from "../../services/tool-context";
15
+ import { createToolElement, } from "../tool-tag-map";
16
+ /**
17
+ * Magnifier tool registration
18
+ *
19
+ * Provides a draggable zoom lens for visual accessibility.
20
+ * Global tool that works across entire assessment.
21
+ */
22
+ export const magnifierToolRegistration = {
23
+ toolId: "magnifier",
24
+ name: "Magnifier",
25
+ description: "Zoom lens for visual accessibility",
26
+ icon: "magnifying-glass",
27
+ // Magnifier is assessment-wide (global)
28
+ supportedLevels: ["assessment", "section"],
29
+ // PNP support IDs
30
+ // Maps to QTI 3.0 standard features: magnification, screenMagnifier, zoomable
31
+ pnpSupportIds: [
32
+ "magnification", // QTI 3.0 standard (visual.magnification)
33
+ "screenMagnifier", // QTI 3.0 standard (visual.screenMagnifier)
34
+ "zoomable", // QTI 3.0 standard (visual.zoomable)
35
+ "magnifier", // Common variant
36
+ "zoom", // Common variant
37
+ "visualZoom", // Common variant
38
+ ],
39
+ /**
40
+ * Pass 2: Magnifier is always relevant when allowed
41
+ */
42
+ isVisibleInContext(context) {
43
+ return true; // Always show if allowed by orchestrator
44
+ },
45
+ createButton(context, options) {
46
+ return {
47
+ toolId: this.toolId,
48
+ label: this.name,
49
+ icon: typeof this.icon === "function" ? this.icon(context) : this.icon,
50
+ disabled: options.disabled || false,
51
+ ariaLabel: options.ariaLabel || "Magnifier - Zoom in on content",
52
+ tooltip: options.tooltip || "Magnifier",
53
+ onClick: options.onClick || (() => { }),
54
+ className: options.className,
55
+ };
56
+ },
57
+ createToolInstance(context, options) {
58
+ const componentOverrides = options.config ?? {};
59
+ const magnifier = createToolElement(this.toolId, context, options, componentOverrides);
60
+ magnifier.visible = true;
61
+ if (options.config?.toolkitCoordinator) {
62
+ magnifier.toolkitCoordinator = options.config.toolkitCoordinator;
63
+ }
64
+ if (options.onClose) {
65
+ magnifier.addEventListener("close", options.onClose);
66
+ }
67
+ return magnifier;
68
+ },
69
+ };
70
+ /**
71
+ * Line Reader tool registration
72
+ *
73
+ * Provides a reading guide overlay to help track reading position.
74
+ * Useful for text-heavy passages and questions.
75
+ */
76
+ export const lineReaderToolRegistration = {
77
+ toolId: "lineReader",
78
+ name: "Line Reader",
79
+ description: "Reading guide overlay",
80
+ icon: "bars-3",
81
+ // Line reader appears where there's text to read
82
+ supportedLevels: ["passage", "rubric", "item"],
83
+ // PNP support IDs
84
+ // Maps to QTI 3.0 standard features: readingMask, readingGuide, readingRuler
85
+ pnpSupportIds: [
86
+ "readingMask", // QTI 3.0 standard (reading.readingMask)
87
+ "readingGuide", // QTI 3.0 standard (reading.readingGuide)
88
+ "readingRuler", // QTI 3.0 standard (reading.readingRuler)
89
+ "lineReader", // Common variant
90
+ "trackingGuide", // Common variant
91
+ ],
92
+ /**
93
+ * Pass 2: Line reader is relevant when readable text is present
94
+ */
95
+ isVisibleInContext(context) {
96
+ return hasReadableText(context);
97
+ },
98
+ createButton(context, options) {
99
+ return {
100
+ toolId: this.toolId,
101
+ label: this.name,
102
+ icon: typeof this.icon === "function" ? this.icon(context) : this.icon,
103
+ disabled: options.disabled || false,
104
+ ariaLabel: options.ariaLabel || "Line reader - Reading guide",
105
+ tooltip: options.tooltip || "Line Reader",
106
+ onClick: options.onClick || (() => { }),
107
+ className: options.className,
108
+ };
109
+ },
110
+ createToolInstance(context, options) {
111
+ const componentOverrides = options.config ?? {};
112
+ const lineReader = createToolElement(this.toolId, context, options, componentOverrides);
113
+ lineReader.visible = true;
114
+ if (options.config?.toolkitCoordinator) {
115
+ lineReader.toolkitCoordinator = options.config.toolkitCoordinator;
116
+ }
117
+ if (options.onClose) {
118
+ lineReader.addEventListener("close", options.onClose);
119
+ }
120
+ return lineReader;
121
+ },
122
+ };
123
+ /**
124
+ * Color Scheme tool registration
125
+ *
126
+ * Provides Learnosity-standard accessible color schemes and theme controls.
127
+ * Global tool that affects entire assessment.
128
+ */
129
+ export const colorSchemeToolRegistration = {
130
+ toolId: "colorScheme",
131
+ name: "Color Scheme",
132
+ description: "Accessible color themes and contrast",
133
+ icon: "swatch",
134
+ // Color scheme is assessment-wide
135
+ supportedLevels: ["assessment", "section"],
136
+ // PNP support IDs
137
+ // Maps to QTI 3.0 standard features: highContrastDisplay, colorContrast, invertColors
138
+ pnpSupportIds: [
139
+ "highContrastDisplay", // QTI 3.0 standard (visual.highContrastDisplay)
140
+ "colorContrast", // QTI 3.0 standard (visual.colorContrast)
141
+ "invertColors", // QTI 3.0 standard (visual.invertColors)
142
+ "colorScheme", // Common variant
143
+ "highContrast", // Common variant
144
+ "customColors", // Common variant
145
+ ],
146
+ /**
147
+ * Pass 2: Color scheme is always relevant when allowed
148
+ */
149
+ isVisibleInContext(context) {
150
+ return true; // Always show if allowed by orchestrator
151
+ },
152
+ createButton(context, options) {
153
+ return {
154
+ toolId: this.toolId,
155
+ label: this.name,
156
+ icon: typeof this.icon === "function" ? this.icon(context) : this.icon,
157
+ disabled: options.disabled || false,
158
+ ariaLabel: options.ariaLabel || "Color scheme - Change colors and contrast",
159
+ tooltip: options.tooltip || "Color Scheme",
160
+ onClick: options.onClick || (() => { }),
161
+ className: options.className,
162
+ };
163
+ },
164
+ createToolInstance(context, options) {
165
+ const componentOverrides = options.config ?? {};
166
+ const colorScheme = createToolElement(this.toolId, context, options, componentOverrides);
167
+ colorScheme.visible = true;
168
+ if (options.config?.toolkitCoordinator) {
169
+ colorScheme.toolkitCoordinator = options.config.toolkitCoordinator;
170
+ }
171
+ if (options.onClose) {
172
+ colorScheme.addEventListener("close", options.onClose);
173
+ }
174
+ return colorScheme;
175
+ },
176
+ };
177
+ /**
178
+ * Annotation Toolbar registration
179
+ *
180
+ * Text highlighting with CSS Custom Highlight API.
181
+ * Zero DOM mutation, optimal performance.
182
+ */
183
+ export const annotationToolbarRegistration = {
184
+ toolId: "annotationToolbar",
185
+ name: "Highlighter",
186
+ description: "Highlight and annotate text",
187
+ icon: "highlighter",
188
+ // Annotation appears where there's text content
189
+ supportedLevels: ["passage", "rubric", "item", "element"],
190
+ // PNP support IDs
191
+ // Maps to QTI 3.0 standard features: highlighting, annotations
192
+ pnpSupportIds: [
193
+ "highlighting", // QTI 3.0 standard (cognitive.highlighting / reading.wordHighlighting)
194
+ "annotations", // QTI 3.0 standard (cognitive.annotations)
195
+ "highlighter", // Common variant
196
+ "textHighlight", // Common variant
197
+ "annotation", // Common variant
198
+ ],
199
+ /**
200
+ * Pass 2: Annotation is relevant when readable text is present
201
+ */
202
+ isVisibleInContext(context) {
203
+ return hasReadableText(context);
204
+ },
205
+ createButton(context, options) {
206
+ return {
207
+ toolId: this.toolId,
208
+ label: this.name,
209
+ icon: typeof this.icon === "function" ? this.icon(context) : this.icon,
210
+ disabled: options.disabled || false,
211
+ ariaLabel: options.ariaLabel || "Annotation toolbar - Highlight text",
212
+ tooltip: options.tooltip || "Highlight",
213
+ onClick: options.onClick || (() => { }),
214
+ className: options.className,
215
+ };
216
+ },
217
+ createToolInstance(context, options) {
218
+ const componentOverrides = options.config ?? {};
219
+ const toolbar = createToolElement(this.toolId, context, options, componentOverrides);
220
+ toolbar.visible = true;
221
+ if (options.config?.toolkitCoordinator) {
222
+ toolbar.toolkitCoordinator = options.config.toolkitCoordinator;
223
+ }
224
+ if (options.onClose) {
225
+ toolbar.addEventListener("close", options.onClose);
226
+ }
227
+ return toolbar;
228
+ },
229
+ };
230
+ //# sourceMappingURL=accessibility-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accessibility-tools.js","sourceRoot":"","sources":["../../../src/tools/registrations/accessibility-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AASH,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EACN,iBAAiB,GAEjB,MAAM,iBAAiB,CAAC;AAEzB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB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AIlB,CAAC;QAEF,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;QAEvB,IAAI,OAAO,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAC;YACxC,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC;QAChE,CAAC;QAED,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACrB,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACpD,CAAC;QAED,OAAO,OAAO,CAAC;IAChB,CAAC;CACD,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Calculator Tool Registration
3
+ *
4
+ * Registers the calculator tool with support for multiple calculator types
5
+ * (basic, scientific, graphing) via Desmos provider.
6
+ *
7
+ * Maps to QTI 3.0 standard access features:
8
+ * - calculator (cognitive support)
9
+ * - graphingCalculator (assessment tool)
10
+ */
11
+ import type { ToolRegistration } from "../../services/ToolRegistry";
12
+ /**
13
+ * Calculator tool registration
14
+ *
15
+ * Supports:
16
+ * - Basic, scientific, and graphing calculators via Desmos
17
+ * - Context-aware visibility (shows when math content is detected)
18
+ * - All levels except assessment (section, item, passage, rubric, element)
19
+ */
20
+ export declare const calculatorToolRegistration: ToolRegistration;
21
+ //# sourceMappingURL=calculator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calculator.d.ts","sourceRoot":"","sources":["../../../src/tools/registrations/calculator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EACX,gBAAgB,EAIhB,MAAM,6BAA6B,CAAC;AAQrC;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,EAAE,gBA4GxC,CAAC"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Calculator Tool Registration
3
+ *
4
+ * Registers the calculator tool with support for multiple calculator types
5
+ * (basic, scientific, graphing) via Desmos provider.
6
+ *
7
+ * Maps to QTI 3.0 standard access features:
8
+ * - calculator (cognitive support)
9
+ * - graphingCalculator (assessment tool)
10
+ */
11
+ import { hasMathContent } from "../../services/tool-context";
12
+ import { createToolElement, } from "../tool-tag-map";
13
+ /**
14
+ * Calculator tool registration
15
+ *
16
+ * Supports:
17
+ * - Basic, scientific, and graphing calculators via Desmos
18
+ * - Context-aware visibility (shows when math content is detected)
19
+ * - All levels except assessment (section, item, passage, rubric, element)
20
+ */
21
+ export const calculatorToolRegistration = {
22
+ toolId: "calculator",
23
+ name: "Calculator",
24
+ description: "Multi-type calculator (basic, scientific, graphing)",
25
+ icon: "calculator",
26
+ // Calculator can appear at all levels except assessment
27
+ supportedLevels: ["section", "item", "passage", "rubric", "element"],
28
+ // PNP support IDs that enable this tool
29
+ // Maps to QTI 3.0 standard features: calculator, graphingCalculator
30
+ pnpSupportIds: [
31
+ "calculator", // QTI 3.0 standard (cognitive.calculator)
32
+ "graphingCalculator", // QTI 3.0 standard (assessment.graphingCalculator)
33
+ "basicCalculator", // Common variant
34
+ "scientificCalculator", // Common variant
35
+ ],
36
+ /**
37
+ * Pass 2: Determine if calculator is relevant in this context
38
+ *
39
+ * Calculator is relevant when:
40
+ * - Context contains mathematical content (MathML, LaTeX, arithmetic)
41
+ * - Section/item level (always show - student might need for any problem)
42
+ */
43
+ isVisibleInContext(context) {
44
+ // At section/item level, always show (student might need it)
45
+ if (context.level === "section" || context.level === "item") {
46
+ return true;
47
+ }
48
+ // At passage/rubric/element level, show if math content detected
49
+ return hasMathContent(context);
50
+ },
51
+ /**
52
+ * Create calculator button for toolbar
53
+ */
54
+ createButton(context, options) {
55
+ const icon = typeof this.icon === "function" ? this.icon(context) : this.icon;
56
+ return {
57
+ toolId: this.toolId,
58
+ label: this.name,
59
+ icon: icon,
60
+ disabled: options.disabled || false,
61
+ ariaLabel: options.ariaLabel ||
62
+ "Open calculator - Press to activate calculator tool",
63
+ tooltip: options.tooltip || "Calculator",
64
+ onClick: options.onClick || (() => { }),
65
+ className: options.className,
66
+ };
67
+ },
68
+ /**
69
+ * Create calculator tool instance
70
+ *
71
+ * Creates a <pie-tool-calculator> web component and initializes it.
72
+ */
73
+ createToolInstance(context, options) {
74
+ const componentOverrides = options.config ?? {};
75
+ const calculator = createToolElement(this.toolId, context, options, componentOverrides);
76
+ // Set default calculator type (can be overridden via config)
77
+ const calculatorType = options.config?.calculatorType || "scientific";
78
+ const availableTypes = options.config?.availableTypes || [
79
+ "basic",
80
+ "scientific",
81
+ "graphing",
82
+ ];
83
+ // Configure calculator
84
+ calculator.visible = true;
85
+ calculator.calculatorType = calculatorType;
86
+ calculator.availableTypes = availableTypes;
87
+ // Pass toolkit coordinator if available from context
88
+ if (options.config?.toolkitCoordinator) {
89
+ calculator.toolkitCoordinator = options.config.toolkitCoordinator;
90
+ }
91
+ // Handle close callback
92
+ if (options.onClose) {
93
+ calculator.addEventListener("close", options.onClose);
94
+ }
95
+ return calculator;
96
+ },
97
+ };
98
+ //# sourceMappingURL=calculator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"calculator.js","sourceRoot":"","sources":["../../../src/tools/registrations/calculator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EACN,iBAAiB,GAEjB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAqB;IAC3D,MAAM,EAAE,YAAY;IACpB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,qDAAqD;IAClE,IAAI,EAAE,YAAY;IAElB,wDAAwD;IACxD,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,CAAC;IAEpE,wCAAwC;IACxC,oEAAoE;IACpE,aAAa,EAAE;QACd,YAAY,EAAE,0CAA0C;QACxD,oBAAoB,EAAE,mDAAmD;QACzE,iBAAiB,EAAE,iBAAiB;QACpC,sBAAsB,EAAE,iBAAiB;KACzC;IAED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AO;YACP,YAAY;YACZ,UAAU;SACV,CAAC;QAEF,uBAAuB;QACvB,UAAU,CAAC,OAAO,GAAG,IAAI,CAAC;QAC1B,UAAU,CAAC,cAAc,GAAG,cAAc,CAAC;QAC3C,UAAU,CAAC,cAAc,GAAG,cAAc,CAAC;QAE3C,qDAAqD;QACrD,IAAI,OAAO,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAC;YACxC,UAAU,CAAC,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAAC;QACnE,CAAC;QAED,wBAAwB;QACxB,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACrB,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,UAAU,CAAC;IACnB,CAAC;CACD,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Interaction Tools Registrations
3
+ *
4
+ * Registers tools for interacting with question content:
5
+ * - Answer Eliminator (strike through answer choices)
6
+ * - Highlighter (highlight text passages)
7
+ *
8
+ * Maps to QTI 3.0 standard access features:
9
+ * - answerMasking (assessment tool)
10
+ * - strikethrough (visual transformation)
11
+ * - highlighting (cognitive/reading support)
12
+ */
13
+ import type { ToolRegistration } from "../../services/ToolRegistry";
14
+ /**
15
+ * Answer Eliminator tool registration
16
+ *
17
+ * Allows students to strike through incorrect answer choices.
18
+ * Only appears on multiple-choice style questions.
19
+ */
20
+ export declare const answerEliminatorToolRegistration: ToolRegistration;
21
+ /**
22
+ * Highlighter tool registration
23
+ *
24
+ * Allows students to highlight text in passages and questions.
25
+ * Appears on items with readable text content.
26
+ */
27
+ export declare const highlighterToolRegistration: ToolRegistration;
28
+ //# sourceMappingURL=interaction-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction-tools.d.ts","sourceRoot":"","sources":["../../../src/tools/registrations/interaction-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EACX,gBAAgB,EAIhB,MAAM,6BAA6B,CAAC;AAWrC;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,EAAE,gBAiF9C,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,gBAkEzC,CAAC"}
@@ -0,0 +1,124 @@
1
+ /**
2
+ * Interaction Tools Registrations
3
+ *
4
+ * Registers tools for interacting with question content:
5
+ * - Answer Eliminator (strike through answer choices)
6
+ * - Highlighter (highlight text passages)
7
+ *
8
+ * Maps to QTI 3.0 standard access features:
9
+ * - answerMasking (assessment tool)
10
+ * - strikethrough (visual transformation)
11
+ * - highlighting (cognitive/reading support)
12
+ */
13
+ import { hasChoiceInteraction, hasReadableText, } from "../../services/tool-context";
14
+ import { createToolElement, } from "../tool-tag-map";
15
+ /**
16
+ * Answer Eliminator tool registration
17
+ *
18
+ * Allows students to strike through incorrect answer choices.
19
+ * Only appears on multiple-choice style questions.
20
+ */
21
+ export const answerEliminatorToolRegistration = {
22
+ toolId: "answerEliminator",
23
+ name: "Answer Eliminator",
24
+ description: "Strike through answer choices",
25
+ icon: "strikethrough",
26
+ // Answer eliminator appears at item and element level
27
+ supportedLevels: ["item", "element"],
28
+ // PNP support IDs
29
+ // Maps to QTI 3.0 standard feature: answerMasking
30
+ pnpSupportIds: [
31
+ "answerMasking", // QTI 3.0 standard (assessment.answerMasking)
32
+ "answerEliminator", // QTI 3.0 standard (assessment.answerEliminator)
33
+ "strikethrough", // Common variant
34
+ "choiceMasking", // Common variant
35
+ ],
36
+ /**
37
+ * Pass 2: Answer eliminator is relevant only for choice-based questions
38
+ */
39
+ isVisibleInContext(context) {
40
+ return hasChoiceInteraction(context);
41
+ },
42
+ createButton(context, options) {
43
+ return {
44
+ toolId: this.toolId,
45
+ label: this.name,
46
+ icon: typeof this.icon === "function" ? this.icon(context) : this.icon,
47
+ disabled: options.disabled || false,
48
+ ariaLabel: options.ariaLabel || "Answer eliminator - Strike through choices",
49
+ tooltip: options.tooltip || "Strike Through",
50
+ onClick: options.onClick || (() => { }),
51
+ className: options.className,
52
+ };
53
+ },
54
+ createToolInstance(context, options) {
55
+ const componentOverrides = options.config ?? {};
56
+ const answerEliminator = createToolElement(this.toolId, context, options, componentOverrides);
57
+ answerEliminator.visible = true;
58
+ answerEliminator.toolId = this.toolId;
59
+ if (options.config?.toolkitCoordinator) {
60
+ answerEliminator.coordinator = options.config.toolkitCoordinator;
61
+ }
62
+ if (options.config?.elementToolStateStore) {
63
+ answerEliminator.elementToolStateStore =
64
+ options.config.elementToolStateStore;
65
+ }
66
+ if (typeof options.config?.globalElementId === "string") {
67
+ answerEliminator.globalElementId = options.config.globalElementId;
68
+ }
69
+ if (options.onClose) {
70
+ answerEliminator.addEventListener("close", options.onClose);
71
+ }
72
+ return answerEliminator;
73
+ },
74
+ };
75
+ /**
76
+ * Highlighter tool registration
77
+ *
78
+ * Allows students to highlight text in passages and questions.
79
+ * Appears on items with readable text content.
80
+ */
81
+ export const highlighterToolRegistration = {
82
+ toolId: "highlighter",
83
+ name: "Highlighter",
84
+ description: "Highlight text",
85
+ icon: "highlighter",
86
+ // Highlighter appears at passage, rubric, item, and element levels
87
+ supportedLevels: ["passage", "rubric", "item", "element"],
88
+ // PNP support IDs
89
+ pnpSupportIds: ["highlighter", "textHighlight", "annotation"],
90
+ /**
91
+ * Pass 2: Highlighter is relevant when readable text is available
92
+ */
93
+ isVisibleInContext(context) {
94
+ return hasReadableText(context);
95
+ },
96
+ createButton(context, options) {
97
+ return {
98
+ toolId: this.toolId,
99
+ label: this.name,
100
+ icon: typeof this.icon === "function" ? this.icon(context) : this.icon,
101
+ disabled: options.disabled || false,
102
+ ariaLabel: options.ariaLabel || "Highlighter - Highlight text",
103
+ tooltip: options.tooltip || "Highlight",
104
+ onClick: options.onClick || (() => { }),
105
+ className: options.className,
106
+ };
107
+ },
108
+ createToolInstance(context, options) {
109
+ const componentOverrides = options.config ?? {};
110
+ const highlighter = createToolElement(this.toolId, context, options, componentOverrides);
111
+ highlighter.enabled = true;
112
+ if (options.config?.highlightCoordinator) {
113
+ highlighter.highlightCoordinator = options.config.highlightCoordinator;
114
+ }
115
+ if (options.config?.ttsService) {
116
+ highlighter.ttsService = options.config.ttsService;
117
+ }
118
+ if (options.onClose) {
119
+ highlighter.addEventListener("close", options.onClose);
120
+ }
121
+ return highlighter;
122
+ },
123
+ };
124
+ //# sourceMappingURL=interaction-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interaction-tools.js","sourceRoot":"","sources":["../../../src/tools/registrations/interaction-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,OAAO,EACN,oBAAoB,EACpB,eAAe,GACf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACN,iBAAiB,GAEjB,MAAM,iBAAiB,CAAC;AAEzB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAqB;IACjE,MAAM,EAAE,kBAAkB;IAC1B,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,+BAA+B;IAC5C,IAAI,EAAE,eAAe;IAErB,sDAAsD;IACtD,eAAe,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;IAEpC,kBAAkB;IAClB,kDAAkD;IAClD,aAAa,EAAE;QACd,eAAe,EAAE,8CAA8C;QAC/D,kBAAkB,EAAE,iDAAiD;QACrE,eAAe,EAAE,iBAAiB;QAClC,eAAe,EAAE,iBAAiB;KAClC;IAED;;OAEG;IACH,kBAAkB,CAAC,OAAoB;QACtC,OAAO,oBAAoB,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAED,YAAY,CACX,OAAoB,EACpB,OAA0B;QAE1B,OAAO;YACN,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,KAAK,EAAE,IAAI,CAAC,IAAI;YAChB,IAAI,EAAE,OAAO,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,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C;QAC3B,IAAI,OAAO,CAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC;YAC1C,WAAW,CAAC,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC;QACxE,CAAC;QACD,IAAI,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC;YAChC,WAAW,CAAC,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC;QACpD,CAAC;QAED,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACrB,WAAW,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;QACxD,CAAC;QAED,OAAO,WAAW,CAAC;IACpB,CAAC;CACD,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Measurement Tools Registrations
3
+ *
4
+ * Registers ruler and protractor tools for on-screen measurements.
5
+ *
6
+ * Maps to QTI 3.0 standard access features:
7
+ * - ruler (assessment tool)
8
+ * - protractor (assessment tool)
9
+ */
10
+ import type { ToolRegistration } from "../../services/ToolRegistry";
11
+ /**
12
+ * Ruler tool registration
13
+ *
14
+ * Provides an on-screen ruler for measuring lengths.
15
+ * Typically appears on geometry or measurement problems.
16
+ */
17
+ export declare const rulerToolRegistration: ToolRegistration;
18
+ /**
19
+ * Protractor tool registration
20
+ *
21
+ * Provides an on-screen protractor for measuring angles.
22
+ * Typically appears on geometry problems.
23
+ */
24
+ export declare const protractorToolRegistration: ToolRegistration;
25
+ //# sourceMappingURL=measurement-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"measurement-tools.d.ts","sourceRoot":"","sources":["../../../src/tools/registrations/measurement-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACX,gBAAgB,EAIhB,MAAM,6BAA6B,CAAC;AAQrC;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,gBAmEnC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,EAAE,gBAmExC,CAAC"}