@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.
- package/README.md +159 -1
- package/dist/index.d.ts +16 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/player/AssessmentPlayer.d.ts +9 -0
- package/dist/player/AssessmentPlayer.d.ts.map +1 -1
- package/dist/player/AssessmentPlayer.js +13 -4
- package/dist/player/AssessmentPlayer.js.map +1 -1
- package/dist/services/AnnotationToolbarConfig.d.ts +134 -0
- package/dist/services/AnnotationToolbarConfig.d.ts.map +1 -0
- package/dist/services/AnnotationToolbarConfig.js +100 -0
- package/dist/services/AnnotationToolbarConfig.js.map +1 -0
- package/dist/services/HighlightCoordinator.d.ts +23 -10
- package/dist/services/HighlightCoordinator.d.ts.map +1 -1
- package/dist/services/HighlightCoordinator.js +87 -40
- package/dist/services/HighlightCoordinator.js.map +1 -1
- package/dist/services/PNPToolResolver.d.ts +171 -15
- package/dist/services/PNPToolResolver.d.ts.map +1 -1
- package/dist/services/PNPToolResolver.js +324 -32
- package/dist/services/PNPToolResolver.js.map +1 -1
- package/dist/services/RangeSerializer.d.ts +119 -0
- package/dist/services/RangeSerializer.d.ts.map +1 -0
- package/dist/services/RangeSerializer.js +199 -0
- package/dist/services/RangeSerializer.js.map +1 -0
- package/dist/services/TTSService.d.ts +4 -1
- package/dist/services/TTSService.d.ts.map +1 -1
- package/dist/services/TTSService.js +58 -3
- package/dist/services/TTSService.js.map +1 -1
- package/dist/services/ToolRegistry.d.ts +225 -0
- package/dist/services/ToolRegistry.d.ts.map +1 -0
- package/dist/services/ToolRegistry.js +248 -0
- package/dist/services/ToolRegistry.js.map +1 -0
- package/dist/services/ToolkitCoordinator.d.ts +22 -0
- package/dist/services/ToolkitCoordinator.d.ts.map +1 -1
- package/dist/services/ToolkitCoordinator.js +44 -0
- package/dist/services/ToolkitCoordinator.js.map +1 -1
- package/dist/services/createDefaultToolRegistry.d.ts +72 -0
- package/dist/services/createDefaultToolRegistry.d.ts.map +1 -0
- package/dist/services/createDefaultToolRegistry.js +147 -0
- package/dist/services/createDefaultToolRegistry.js.map +1 -0
- package/dist/services/interfaces.d.ts +8 -0
- package/dist/services/interfaces.d.ts.map +1 -1
- package/dist/services/interfaces.js.map +1 -1
- package/dist/services/pnp-provenance.d.ts +167 -0
- package/dist/services/pnp-provenance.d.ts.map +1 -0
- package/dist/services/pnp-provenance.js +230 -0
- package/dist/services/pnp-provenance.js.map +1 -0
- package/dist/services/pnp-standard-features.d.ts +240 -0
- package/dist/services/pnp-standard-features.d.ts.map +1 -0
- package/dist/services/pnp-standard-features.js +342 -0
- package/dist/services/pnp-standard-features.js.map +1 -0
- package/dist/services/tool-context.d.ts +150 -0
- package/dist/services/tool-context.d.ts.map +1 -0
- package/dist/services/tool-context.js +157 -0
- package/dist/services/tool-context.js.map +1 -0
- package/dist/services/tool-providers/ToolProviderRegistry.d.ts.map +1 -1
- package/dist/services/tool-providers/ToolProviderRegistry.js +7 -7
- package/dist/services/tool-providers/ToolProviderRegistry.js.map +1 -1
- package/dist/tools/registrations/accessibility-tools.d.ts +43 -0
- package/dist/tools/registrations/accessibility-tools.d.ts.map +1 -0
- package/dist/tools/registrations/accessibility-tools.js +230 -0
- package/dist/tools/registrations/accessibility-tools.js.map +1 -0
- package/dist/tools/registrations/calculator.d.ts +21 -0
- package/dist/tools/registrations/calculator.d.ts.map +1 -0
- package/dist/tools/registrations/calculator.js +98 -0
- package/dist/tools/registrations/calculator.js.map +1 -0
- package/dist/tools/registrations/interaction-tools.d.ts +28 -0
- package/dist/tools/registrations/interaction-tools.d.ts.map +1 -0
- package/dist/tools/registrations/interaction-tools.js +124 -0
- package/dist/tools/registrations/interaction-tools.js.map +1 -0
- package/dist/tools/registrations/measurement-tools.d.ts +25 -0
- package/dist/tools/registrations/measurement-tools.d.ts.map +1 -0
- package/dist/tools/registrations/measurement-tools.js +112 -0
- package/dist/tools/registrations/measurement-tools.js.map +1 -0
- package/dist/tools/registrations/subject-specific-tools.d.ts +28 -0
- package/dist/tools/registrations/subject-specific-tools.d.ts.map +1 -0
- package/dist/tools/registrations/subject-specific-tools.js +118 -0
- package/dist/tools/registrations/subject-specific-tools.js.map +1 -0
- package/dist/tools/registrations/tts.d.ts +20 -0
- package/dist/tools/registrations/tts.d.ts.map +1 -0
- package/dist/tools/registrations/tts.js +86 -0
- package/dist/tools/registrations/tts.js.map +1 -0
- package/dist/tools/tool-tag-map.d.ts +24 -0
- package/dist/tools/tool-tag-map.d.ts.map +1 -0
- package/dist/tools/tool-tag-map.js +38 -0
- package/dist/tools/tool-tag-map.js.map +1 -0
- package/package.json +15 -7
- package/src/README.md +25 -11
- package/src/components/PNPProfileTester.example.svelte +188 -0
- package/src/components/PNPProfileTester.svelte +397 -0
- package/src/components/PNPProvenanceViewer.svelte +260 -0
- package/src/components/QuestionToolBar.svelte +160 -83
- package/src/components/ToolButton.svelte +146 -0
- package/src/components/ToolButtonGroup.svelte +109 -0
- package/src/reference-layout/ReferenceLayout.svelte +5 -13
- package/dist/services/PNPMapper.d.ts +0 -71
- package/dist/services/PNPMapper.d.ts.map +0 -1
- package/dist/services/PNPMapper.js +0 -98
- package/dist/services/PNPMapper.js.map +0 -1
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool Registry
|
|
3
|
+
*
|
|
4
|
+
* Central registry for all assessment tools. Manages tool metadata, visibility logic,
|
|
5
|
+
* and button/instance creation. Supports dynamic registration and override by integrators.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Tool Registry
|
|
9
|
+
*
|
|
10
|
+
* Manages tool registrations and provides query/lookup functionality
|
|
11
|
+
*/
|
|
12
|
+
export class ToolRegistry {
|
|
13
|
+
tools = new Map();
|
|
14
|
+
pnpIndex = new Map(); // pnpSupportId → Set<toolId>
|
|
15
|
+
componentOverrides = {};
|
|
16
|
+
/**
|
|
17
|
+
* Register a tool
|
|
18
|
+
*
|
|
19
|
+
* @param registration - Tool registration
|
|
20
|
+
* @throws Error if toolId is already registered
|
|
21
|
+
*/
|
|
22
|
+
register(registration) {
|
|
23
|
+
if (this.tools.has(registration.toolId)) {
|
|
24
|
+
throw new Error(`Tool '${registration.toolId}' is already registered`);
|
|
25
|
+
}
|
|
26
|
+
this.tools.set(registration.toolId, registration);
|
|
27
|
+
// Index PNP support IDs
|
|
28
|
+
if (registration.pnpSupportIds) {
|
|
29
|
+
for (const pnpId of registration.pnpSupportIds) {
|
|
30
|
+
if (!this.pnpIndex.has(pnpId)) {
|
|
31
|
+
this.pnpIndex.set(pnpId, new Set());
|
|
32
|
+
}
|
|
33
|
+
this.pnpIndex.get(pnpId).add(registration.toolId);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Override an existing tool registration
|
|
39
|
+
*
|
|
40
|
+
* @param registration - New tool registration (must have existing toolId)
|
|
41
|
+
*/
|
|
42
|
+
override(registration) {
|
|
43
|
+
if (!this.tools.has(registration.toolId)) {
|
|
44
|
+
throw new Error(`Cannot override non-existent tool '${registration.toolId}'`);
|
|
45
|
+
}
|
|
46
|
+
// Remove old PNP index entries
|
|
47
|
+
const oldReg = this.tools.get(registration.toolId);
|
|
48
|
+
if (oldReg.pnpSupportIds) {
|
|
49
|
+
for (const pnpId of oldReg.pnpSupportIds) {
|
|
50
|
+
this.pnpIndex.get(pnpId)?.delete(registration.toolId);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// Add new registration
|
|
54
|
+
this.tools.set(registration.toolId, registration);
|
|
55
|
+
// Re-index PNP support IDs
|
|
56
|
+
if (registration.pnpSupportIds) {
|
|
57
|
+
for (const pnpId of registration.pnpSupportIds) {
|
|
58
|
+
if (!this.pnpIndex.has(pnpId)) {
|
|
59
|
+
this.pnpIndex.set(pnpId, new Set());
|
|
60
|
+
}
|
|
61
|
+
this.pnpIndex.get(pnpId).add(registration.toolId);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Unregister a tool
|
|
67
|
+
*
|
|
68
|
+
* @param toolId - Tool ID to remove
|
|
69
|
+
*/
|
|
70
|
+
unregister(toolId) {
|
|
71
|
+
const reg = this.tools.get(toolId);
|
|
72
|
+
if (!reg)
|
|
73
|
+
return;
|
|
74
|
+
// Remove PNP index entries
|
|
75
|
+
if (reg.pnpSupportIds) {
|
|
76
|
+
for (const pnpId of reg.pnpSupportIds) {
|
|
77
|
+
this.pnpIndex.get(pnpId)?.delete(toolId);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
this.tools.delete(toolId);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get a tool registration by ID
|
|
84
|
+
*
|
|
85
|
+
* @param toolId - Tool ID
|
|
86
|
+
* @returns Tool registration or undefined
|
|
87
|
+
*/
|
|
88
|
+
get(toolId) {
|
|
89
|
+
return this.tools.get(toolId);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Check if a tool is registered
|
|
93
|
+
*
|
|
94
|
+
* @param toolId - Tool ID
|
|
95
|
+
* @returns true if registered
|
|
96
|
+
*/
|
|
97
|
+
has(toolId) {
|
|
98
|
+
return this.tools.has(toolId);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Get all registered tool IDs
|
|
102
|
+
*
|
|
103
|
+
* @returns Array of tool IDs
|
|
104
|
+
*/
|
|
105
|
+
getAllToolIds() {
|
|
106
|
+
return Array.from(this.tools.keys());
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* Get all tool registrations
|
|
110
|
+
*
|
|
111
|
+
* @returns Array of tool registrations
|
|
112
|
+
*/
|
|
113
|
+
getAllTools() {
|
|
114
|
+
return Array.from(this.tools.values());
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Find tool IDs that support a given PNP support ID
|
|
118
|
+
*
|
|
119
|
+
* @param pnpSupportId - PNP support ID (e.g., 'calculator')
|
|
120
|
+
* @returns Set of tool IDs that support this PNP ID
|
|
121
|
+
*/
|
|
122
|
+
getToolsByPNPSupport(pnpSupportId) {
|
|
123
|
+
return this.pnpIndex.get(pnpSupportId) || new Set();
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Get tools that support a specific level
|
|
127
|
+
*
|
|
128
|
+
* @param level - Tool level (assessment, section, item, passage, element)
|
|
129
|
+
* @returns Array of tool registrations that support this level
|
|
130
|
+
*/
|
|
131
|
+
getToolsByLevel(level) {
|
|
132
|
+
return this.getAllTools().filter((tool) => tool.supportedLevels.includes(level));
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Filter tools by visibility in a given context
|
|
136
|
+
*
|
|
137
|
+
* Pass 2 of the two-pass model: Given a list of allowed tool IDs (from Pass 1),
|
|
138
|
+
* ask each tool if it's relevant in this context.
|
|
139
|
+
*
|
|
140
|
+
* @param allowedToolIds - Tool IDs that passed Pass 1 (orchestrator approval)
|
|
141
|
+
* @param context - Context to evaluate
|
|
142
|
+
* @returns Array of visible tool registrations
|
|
143
|
+
*/
|
|
144
|
+
filterVisibleInContext(allowedToolIds, context) {
|
|
145
|
+
const visible = [];
|
|
146
|
+
for (const toolId of allowedToolIds) {
|
|
147
|
+
const tool = this.get(toolId);
|
|
148
|
+
if (!tool) {
|
|
149
|
+
console.warn(`Tool '${toolId}' is allowed but not registered`);
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
// Check if tool supports this level
|
|
153
|
+
if (!tool.supportedLevels.includes(context.level)) {
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
// Pass 2: Ask tool if it's relevant
|
|
157
|
+
try {
|
|
158
|
+
if (tool.isVisibleInContext(context)) {
|
|
159
|
+
visible.push(tool);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
catch (error) {
|
|
163
|
+
console.error(`Error evaluating visibility for tool '${toolId}':`, error);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return visible;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Create button definitions for visible tools
|
|
170
|
+
*
|
|
171
|
+
* @param allowedToolIds - Tool IDs that passed Pass 1
|
|
172
|
+
* @param context - Context to evaluate
|
|
173
|
+
* @param buttonOptions - Options for button creation
|
|
174
|
+
* @returns Array of button definitions ready for rendering
|
|
175
|
+
*/
|
|
176
|
+
createButtons(allowedToolIds, context, buttonOptions) {
|
|
177
|
+
const visibleTools = this.filterVisibleInContext(allowedToolIds, context);
|
|
178
|
+
return visibleTools.map((tool) => {
|
|
179
|
+
const options = buttonOptions(tool.toolId);
|
|
180
|
+
return tool.createButton(context, options);
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Get tool metadata for building UIs
|
|
185
|
+
* Useful for building PNP configuration interfaces
|
|
186
|
+
*
|
|
187
|
+
* @returns Array of tool metadata (id, name, description, pnpSupportIds)
|
|
188
|
+
*/
|
|
189
|
+
getToolMetadata() {
|
|
190
|
+
return this.getAllTools().map((tool) => ({
|
|
191
|
+
toolId: tool.toolId,
|
|
192
|
+
name: tool.name,
|
|
193
|
+
description: tool.description,
|
|
194
|
+
pnpSupportIds: tool.pnpSupportIds || [],
|
|
195
|
+
supportedLevels: tool.supportedLevels,
|
|
196
|
+
}));
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Generate PNP support IDs from enabled tools
|
|
200
|
+
* Useful for creating PNP profiles
|
|
201
|
+
*
|
|
202
|
+
* @param enabledToolIds - Tool IDs to enable
|
|
203
|
+
* @returns Array of unique PNP support IDs
|
|
204
|
+
*/
|
|
205
|
+
generatePNPSupportsFromTools(enabledToolIds) {
|
|
206
|
+
const pnpSupports = new Set();
|
|
207
|
+
for (const toolId of enabledToolIds) {
|
|
208
|
+
const tool = this.get(toolId);
|
|
209
|
+
if (tool?.pnpSupportIds) {
|
|
210
|
+
for (const pnpId of tool.pnpSupportIds) {
|
|
211
|
+
pnpSupports.add(pnpId);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return Array.from(pnpSupports);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Clear all registrations (useful for testing)
|
|
219
|
+
*/
|
|
220
|
+
clear() {
|
|
221
|
+
this.tools.clear();
|
|
222
|
+
this.pnpIndex.clear();
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Configure global component overrides used by tool instance creation.
|
|
226
|
+
*/
|
|
227
|
+
setComponentOverrides(overrides) {
|
|
228
|
+
this.componentOverrides = overrides;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Create a tool instance by tool ID using registered tool definition.
|
|
232
|
+
*/
|
|
233
|
+
createToolInstance(toolId, context, options = {}) {
|
|
234
|
+
const tool = this.get(toolId);
|
|
235
|
+
if (!tool) {
|
|
236
|
+
throw new Error(`Tool '${toolId}' is not registered`);
|
|
237
|
+
}
|
|
238
|
+
const mergedOptions = {
|
|
239
|
+
...options,
|
|
240
|
+
config: {
|
|
241
|
+
...(this.componentOverrides || {}),
|
|
242
|
+
...(options.config || {}),
|
|
243
|
+
},
|
|
244
|
+
};
|
|
245
|
+
return tool.createToolInstance(context, mergedOptions);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
//# sourceMappingURL=ToolRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToolRegistry.js","sourceRoot":"","sources":["../../src/services/ToolRegistry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAmIH;;;;GAIG;AACH,MAAM,OAAO,YAAY;IAChB,KAAK,GAAG,IAAI,GAAG,EAA4B,CAAC;IAC5C,QAAQ,GAAG,IAAI,GAAG,EAAuB,CAAC,CAAC,6BAA6B;IACxE,kBAAkB,GAA2B,EAAE,CAAC;IAExD;;;;;OAKG;IACH,QA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,GAAG,CAAC,KAAK,CAAC,CAAC;gBACxB,CAAC;YACF,CAAC;QACF,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAChC,CAAC;IAED;;OAEG;IACH,KAAK;QACJ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;QACnB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;IAED;;OAEG;IACH,qBAAqB,CAAC,SAAiC;QACtD,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,kBAAkB,CACjB,MAAc,EACd,OAAoB,EACpB,UAA+B,EAAE;QAEjC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAC9B,IAAI,CAAC,IAAI,EAAE,CAAC;YACX,MAAM,IAAI,KAAK,CAAC,SAAS,MAAM,qBAAqB,CAAC,CAAC;QACvD,CAAC;QAED,MAAM,aAAa,GAAwB;YAC1C,GAAG,OAAO;YACV,MAAM,EAAE;gBACP,GAAG,CAAC,IAAI,CAAC,kBAAkB,IAAI,EAAE,CAAC;gBAClC,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC;aACzB;SACD,CAAC;QAEF,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACxD,CAAC;CACD"}
|
|
@@ -135,6 +135,8 @@ export declare class ToolkitCoordinator {
|
|
|
135
135
|
readonly toolProviderRegistry: ToolProviderRegistry;
|
|
136
136
|
/** Track TTS initialization state */
|
|
137
137
|
private ttsInitialized;
|
|
138
|
+
/** Callback for floating tools changes */
|
|
139
|
+
private floatingToolsChangeCallback;
|
|
138
140
|
constructor(config: ToolkitCoordinatorConfig);
|
|
139
141
|
/**
|
|
140
142
|
* Register tool providers in the registry
|
|
@@ -179,6 +181,26 @@ export declare class ToolkitCoordinator {
|
|
|
179
181
|
* @param updates Partial configuration updates
|
|
180
182
|
*/
|
|
181
183
|
updateToolConfig(toolId: string, updates: Partial<ToolConfig>): void;
|
|
184
|
+
/**
|
|
185
|
+
* Update the enabled tools list for floating tools (calculator, graph, etc.).
|
|
186
|
+
* Used for PNP profile changes or dynamic tool configuration.
|
|
187
|
+
*
|
|
188
|
+
* @param toolIds Array of tool IDs to enable
|
|
189
|
+
*/
|
|
190
|
+
updateFloatingTools(toolIds: string[]): void;
|
|
191
|
+
/**
|
|
192
|
+
* Get currently enabled floating tools.
|
|
193
|
+
*
|
|
194
|
+
* @returns Array of enabled tool IDs
|
|
195
|
+
*/
|
|
196
|
+
getFloatingTools(): string[];
|
|
197
|
+
/**
|
|
198
|
+
* Set a callback to be notified when floating tools change.
|
|
199
|
+
*
|
|
200
|
+
* @param callback Function to call when floating tools are updated
|
|
201
|
+
* @returns Unsubscribe function
|
|
202
|
+
*/
|
|
203
|
+
onFloatingToolsChange(callback: (toolIds: string[]) => void): () => void;
|
|
182
204
|
/**
|
|
183
205
|
* Apply tool configuration changes to underlying services.
|
|
184
206
|
* Called after updateToolConfig().
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolkitCoordinator.d.ts","sourceRoot":"","sources":["../../src/services/ToolkitCoordinator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,EACN,oBAAoB,EAIpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACX,wBAAwB,EACxB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OAAO,CAAC,cAAc,CAAS;IAE/B,0CAA0C;IAC1C,OAAO,CAAC,2BAA2B,CAC7B;gBAEM,MAAM,EAAE,wBAAwB;IAgC5C;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA+D9B;;OAEG;YACW,cAAc;IAqC5B;;;OAGG;IACH,gBAAgB,IAAI,oBAAoB;IAWxC;;;;;OAKG;IACG,eAAe,CAAC,UAAU,EAAE,MAAM;IAIxC;;;;;;OAMG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;IAMtC;;;;;OAKG;IACH,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI;IAIhD;;;;;;OAMG;IACH,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,IAAI;IAYpE;;;;;OAKG;IACH,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;IAe5C;;;;OAIG;IACH,gBAAgB,IAAI,MAAM,EAAE;IAI5B;;;;;OAKG;IACH,qBAAqB,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,GAAG,MAAM,IAAI;IAUxE;;;OAGG;IACH,OAAO,CAAC,sBAAsB;CAkB9B"}
|
|
@@ -56,6 +56,8 @@ export class ToolkitCoordinator {
|
|
|
56
56
|
toolProviderRegistry;
|
|
57
57
|
/** Track TTS initialization state */
|
|
58
58
|
ttsInitialized = false;
|
|
59
|
+
/** Callback for floating tools changes */
|
|
60
|
+
floatingToolsChangeCallback = null;
|
|
59
61
|
constructor(config) {
|
|
60
62
|
if (!config.assessmentId) {
|
|
61
63
|
throw new Error("ToolkitCoordinator requires assessmentId in config");
|
|
@@ -231,6 +233,48 @@ export class ToolkitCoordinator {
|
|
|
231
233
|
// Apply configuration changes to services
|
|
232
234
|
this._applyToolConfigChange(toolId, updates);
|
|
233
235
|
}
|
|
236
|
+
/**
|
|
237
|
+
* Update the enabled tools list for floating tools (calculator, graph, etc.).
|
|
238
|
+
* Used for PNP profile changes or dynamic tool configuration.
|
|
239
|
+
*
|
|
240
|
+
* @param toolIds Array of tool IDs to enable
|
|
241
|
+
*/
|
|
242
|
+
updateFloatingTools(toolIds) {
|
|
243
|
+
if (!this.config.tools) {
|
|
244
|
+
this.config.tools = {};
|
|
245
|
+
}
|
|
246
|
+
if (!this.config.tools.floatingTools) {
|
|
247
|
+
this.config.tools.floatingTools = {};
|
|
248
|
+
}
|
|
249
|
+
this.config.tools.floatingTools.enabledTools = toolIds;
|
|
250
|
+
// Notify listener of change
|
|
251
|
+
if (this.floatingToolsChangeCallback) {
|
|
252
|
+
this.floatingToolsChangeCallback(toolIds);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Get currently enabled floating tools.
|
|
257
|
+
*
|
|
258
|
+
* @returns Array of enabled tool IDs
|
|
259
|
+
*/
|
|
260
|
+
getFloatingTools() {
|
|
261
|
+
return this.config.tools?.floatingTools?.enabledTools || [];
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Set a callback to be notified when floating tools change.
|
|
265
|
+
*
|
|
266
|
+
* @param callback Function to call when floating tools are updated
|
|
267
|
+
* @returns Unsubscribe function
|
|
268
|
+
*/
|
|
269
|
+
onFloatingToolsChange(callback) {
|
|
270
|
+
this.floatingToolsChangeCallback = callback;
|
|
271
|
+
// Call immediately with current value
|
|
272
|
+
callback(this.getFloatingTools());
|
|
273
|
+
// Return unsubscribe function
|
|
274
|
+
return () => {
|
|
275
|
+
this.floatingToolsChangeCallback = null;
|
|
276
|
+
};
|
|
277
|
+
}
|
|
234
278
|
/**
|
|
235
279
|
* Apply tool configuration changes to underlying services.
|
|
236
280
|
* Called after updateToolConfig().
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolkitCoordinator.js","sourceRoot":"","sources":["../../src/services/ToolkitCoordinator.ts"],"names":[],"mappings":"AAAA;;;;;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4
|
+
* Creates a ToolRegistry pre-populated with all PIE framework tools.
|
|
5
|
+
* Integrators can use this as a starting point and customize as needed.
|
|
6
|
+
*/
|
|
7
|
+
import { ToolRegistry } from "./ToolRegistry";
|
|
8
|
+
import type { ToolRegistration } from "./ToolRegistry";
|
|
9
|
+
import { type ToolComponentFactory, type ToolComponentFactoryMap, type ToolTagMap } from "../tools/tool-tag-map";
|
|
10
|
+
export interface DefaultToolRegistryOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Override default tool registrations by toolId.
|
|
13
|
+
* This is the highest-precedence extension point.
|
|
14
|
+
*/
|
|
15
|
+
overrides?: Partial<Record<string, ToolRegistration>>;
|
|
16
|
+
/**
|
|
17
|
+
* Override default component tag mapping used by built-in registrations.
|
|
18
|
+
*/
|
|
19
|
+
toolTagMap?: Partial<ToolTagMap>;
|
|
20
|
+
/**
|
|
21
|
+
* Override component factory globally (all tools) or per tool.
|
|
22
|
+
*/
|
|
23
|
+
toolComponentFactory?: ToolComponentFactory;
|
|
24
|
+
toolComponentFactories?: Partial<ToolComponentFactoryMap>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Create a tool registry with all default PIE tools registered
|
|
28
|
+
*
|
|
29
|
+
* Default tools include:
|
|
30
|
+
* - Calculator (basic, scientific, graphing)
|
|
31
|
+
* - Text-to-Speech (TTS)
|
|
32
|
+
* - Ruler
|
|
33
|
+
* - Protractor
|
|
34
|
+
* - Answer Eliminator
|
|
35
|
+
* - Highlighter
|
|
36
|
+
* - Magnifier
|
|
37
|
+
* - Line Reader
|
|
38
|
+
* - Color Scheme
|
|
39
|
+
* - Annotation Toolbar
|
|
40
|
+
* - Graph
|
|
41
|
+
* - Periodic Table
|
|
42
|
+
*
|
|
43
|
+
* @returns ToolRegistry with all default tools
|
|
44
|
+
*/
|
|
45
|
+
export declare function createDefaultToolRegistry(options?: DefaultToolRegistryOptions): ToolRegistry;
|
|
46
|
+
/**
|
|
47
|
+
* Default tool placement configuration
|
|
48
|
+
*
|
|
49
|
+
* Defines which tools appear at which levels by default.
|
|
50
|
+
* Integrators can override this configuration.
|
|
51
|
+
*
|
|
52
|
+
* Categories:
|
|
53
|
+
* - Global tools: magnifier, colorScheme (assessment/section level)
|
|
54
|
+
* - Context-smart: calculator, graph, periodicTable (item/element, auto-detect)
|
|
55
|
+
* - Reading aids: textToSpeech, lineReader, annotationToolbar (where text exists)
|
|
56
|
+
* - Interaction-specific: answerEliminator (choice questions), highlighter (text)
|
|
57
|
+
* - Measurement: ruler, protractor (element level, diagram/geometry)
|
|
58
|
+
*/
|
|
59
|
+
export declare const DEFAULT_TOOL_PLACEMENT: {
|
|
60
|
+
readonly assessment: readonly ["magnifier", "colorScheme"];
|
|
61
|
+
readonly section: readonly ["magnifier", "colorScheme", "calculator", "textToSpeech"];
|
|
62
|
+
readonly item: readonly ["calculator", "textToSpeech", "answerEliminator", "highlighter", "annotationToolbar", "graph", "periodicTable"];
|
|
63
|
+
readonly passage: readonly ["textToSpeech", "highlighter", "annotationToolbar", "lineReader"];
|
|
64
|
+
readonly rubric: readonly ["textToSpeech", "highlighter", "annotationToolbar", "lineReader"];
|
|
65
|
+
readonly element: readonly ["calculator", "textToSpeech", "ruler", "protractor", "highlighter", "annotationToolbar", "graph", "periodicTable"];
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Tool priority order for rendering
|
|
69
|
+
* Tools will be rendered in this order when multiple tools are visible
|
|
70
|
+
*/
|
|
71
|
+
export declare const DEFAULT_TOOL_ORDER: readonly ["magnifier", "colorScheme", "calculator", "textToSpeech", "lineReader", "annotationToolbar", "highlighter", "answerEliminator", "ruler", "protractor", "graph", "periodicTable"];
|
|
72
|
+
//# sourceMappingURL=createDefaultToolRegistry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDefaultToolRegistry.d.ts","sourceRoot":"","sources":["../../src/services/createDefaultToolRegistry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAqBvD,OAAO,EAEN,KAAK,oBAAoB,EACzB,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EACf,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,0BAA0B;IAC1C;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAAC;IACtD;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACjC;;OAEG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,sBAAsB,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;CAC1D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CACxC,OAAO,GAAE,0BAA+B,GACtC,YAAY,CA+Bd;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB;;;;;;;CAgDzB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,kBAAkB,4LAmBrB,CAAC"}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default Tool Registry Factory
|
|
3
|
+
*
|
|
4
|
+
* Creates a ToolRegistry pre-populated with all PIE framework tools.
|
|
5
|
+
* Integrators can use this as a starting point and customize as needed.
|
|
6
|
+
*/
|
|
7
|
+
import { ToolRegistry } from "./ToolRegistry";
|
|
8
|
+
import { calculatorToolRegistration } from "../tools/registrations/calculator";
|
|
9
|
+
import { ttsToolRegistration } from "../tools/registrations/tts";
|
|
10
|
+
import { rulerToolRegistration, protractorToolRegistration, } from "../tools/registrations/measurement-tools";
|
|
11
|
+
import { answerEliminatorToolRegistration, highlighterToolRegistration, } from "../tools/registrations/interaction-tools";
|
|
12
|
+
import { magnifierToolRegistration, lineReaderToolRegistration, colorSchemeToolRegistration, annotationToolbarRegistration, } from "../tools/registrations/accessibility-tools";
|
|
13
|
+
import { graphToolRegistration, periodicTableToolRegistration, } from "../tools/registrations/subject-specific-tools";
|
|
14
|
+
import { DEFAULT_TOOL_TAG_MAP, } from "../tools/tool-tag-map";
|
|
15
|
+
/**
|
|
16
|
+
* Create a tool registry with all default PIE tools registered
|
|
17
|
+
*
|
|
18
|
+
* Default tools include:
|
|
19
|
+
* - Calculator (basic, scientific, graphing)
|
|
20
|
+
* - Text-to-Speech (TTS)
|
|
21
|
+
* - Ruler
|
|
22
|
+
* - Protractor
|
|
23
|
+
* - Answer Eliminator
|
|
24
|
+
* - Highlighter
|
|
25
|
+
* - Magnifier
|
|
26
|
+
* - Line Reader
|
|
27
|
+
* - Color Scheme
|
|
28
|
+
* - Annotation Toolbar
|
|
29
|
+
* - Graph
|
|
30
|
+
* - Periodic Table
|
|
31
|
+
*
|
|
32
|
+
* @returns ToolRegistry with all default tools
|
|
33
|
+
*/
|
|
34
|
+
export function createDefaultToolRegistry(options = {}) {
|
|
35
|
+
const registry = new ToolRegistry();
|
|
36
|
+
const componentConfig = {
|
|
37
|
+
toolTagMap: {
|
|
38
|
+
...DEFAULT_TOOL_TAG_MAP,
|
|
39
|
+
...(options.toolTagMap || {}),
|
|
40
|
+
},
|
|
41
|
+
toolComponentFactory: options.toolComponentFactory,
|
|
42
|
+
toolComponentFactories: options.toolComponentFactories,
|
|
43
|
+
};
|
|
44
|
+
const applyOverrides = (registration) => options.overrides?.[registration.toolId] || registration;
|
|
45
|
+
// Register all default PIE tools
|
|
46
|
+
registry.register(applyOverrides(calculatorToolRegistration));
|
|
47
|
+
registry.register(applyOverrides(ttsToolRegistration));
|
|
48
|
+
registry.register(applyOverrides(rulerToolRegistration));
|
|
49
|
+
registry.register(applyOverrides(protractorToolRegistration));
|
|
50
|
+
registry.register(applyOverrides(answerEliminatorToolRegistration));
|
|
51
|
+
registry.register(applyOverrides(highlighterToolRegistration));
|
|
52
|
+
registry.register(applyOverrides(magnifierToolRegistration));
|
|
53
|
+
registry.register(applyOverrides(lineReaderToolRegistration));
|
|
54
|
+
registry.register(applyOverrides(colorSchemeToolRegistration));
|
|
55
|
+
registry.register(applyOverrides(annotationToolbarRegistration));
|
|
56
|
+
registry.register(applyOverrides(graphToolRegistration));
|
|
57
|
+
registry.register(applyOverrides(periodicTableToolRegistration));
|
|
58
|
+
registry.setComponentOverrides(componentConfig);
|
|
59
|
+
return registry;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Default tool placement configuration
|
|
63
|
+
*
|
|
64
|
+
* Defines which tools appear at which levels by default.
|
|
65
|
+
* Integrators can override this configuration.
|
|
66
|
+
*
|
|
67
|
+
* Categories:
|
|
68
|
+
* - Global tools: magnifier, colorScheme (assessment/section level)
|
|
69
|
+
* - Context-smart: calculator, graph, periodicTable (item/element, auto-detect)
|
|
70
|
+
* - Reading aids: textToSpeech, lineReader, annotationToolbar (where text exists)
|
|
71
|
+
* - Interaction-specific: answerEliminator (choice questions), highlighter (text)
|
|
72
|
+
* - Measurement: ruler, protractor (element level, diagram/geometry)
|
|
73
|
+
*/
|
|
74
|
+
export const DEFAULT_TOOL_PLACEMENT = {
|
|
75
|
+
assessment: [
|
|
76
|
+
// Global accessibility tools
|
|
77
|
+
"magnifier",
|
|
78
|
+
"colorScheme",
|
|
79
|
+
],
|
|
80
|
+
section: [
|
|
81
|
+
// Global accessibility + common tools
|
|
82
|
+
"magnifier",
|
|
83
|
+
"colorScheme",
|
|
84
|
+
"calculator",
|
|
85
|
+
"textToSpeech",
|
|
86
|
+
],
|
|
87
|
+
item: [
|
|
88
|
+
// Most common item-level tools
|
|
89
|
+
"calculator",
|
|
90
|
+
"textToSpeech",
|
|
91
|
+
"answerEliminator",
|
|
92
|
+
"highlighter",
|
|
93
|
+
"annotationToolbar",
|
|
94
|
+
"graph",
|
|
95
|
+
"periodicTable",
|
|
96
|
+
],
|
|
97
|
+
passage: [
|
|
98
|
+
// Reading-focused tools
|
|
99
|
+
"textToSpeech",
|
|
100
|
+
"highlighter",
|
|
101
|
+
"annotationToolbar",
|
|
102
|
+
"lineReader",
|
|
103
|
+
],
|
|
104
|
+
rubric: [
|
|
105
|
+
// Similar to passage
|
|
106
|
+
"textToSpeech",
|
|
107
|
+
"highlighter",
|
|
108
|
+
"annotationToolbar",
|
|
109
|
+
"lineReader",
|
|
110
|
+
],
|
|
111
|
+
element: [
|
|
112
|
+
// Element-specific tools
|
|
113
|
+
"calculator",
|
|
114
|
+
"textToSpeech",
|
|
115
|
+
"ruler",
|
|
116
|
+
"protractor",
|
|
117
|
+
"highlighter",
|
|
118
|
+
"annotationToolbar",
|
|
119
|
+
"graph",
|
|
120
|
+
"periodicTable",
|
|
121
|
+
],
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Tool priority order for rendering
|
|
125
|
+
* Tools will be rendered in this order when multiple tools are visible
|
|
126
|
+
*/
|
|
127
|
+
export const DEFAULT_TOOL_ORDER = [
|
|
128
|
+
// Global accessibility first
|
|
129
|
+
"magnifier",
|
|
130
|
+
"colorScheme",
|
|
131
|
+
// Common tools
|
|
132
|
+
"calculator",
|
|
133
|
+
"textToSpeech",
|
|
134
|
+
// Reading aids
|
|
135
|
+
"lineReader",
|
|
136
|
+
"annotationToolbar",
|
|
137
|
+
"highlighter",
|
|
138
|
+
// Interaction tools
|
|
139
|
+
"answerEliminator",
|
|
140
|
+
// Measurement tools
|
|
141
|
+
"ruler",
|
|
142
|
+
"protractor",
|
|
143
|
+
// Subject-specific
|
|
144
|
+
"graph",
|
|
145
|
+
"periodicTable",
|
|
146
|
+
];
|
|
147
|
+
//# sourceMappingURL=createDefaultToolRegistry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDefaultToolRegistry.js","sourceRoot":"","sources":["../../src/services/createDefaultToolRegistry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAA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OAAO;QACP,YAAY;QACZ,aAAa;QACb,mBAAmB;QACnB,OAAO;QACP,eAAe;KACf;CACQ,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC,6BAA6B;IAC7B,WAAW;IACX,aAAa;IACb,eAAe;IACf,YAAY;IACZ,cAAc;IACd,eAAe;IACf,YAAY;IACZ,mBAAmB;IACnB,aAAa;IACb,oBAAoB;IACpB,kBAAkB;IAClB,oBAAoB;IACpB,OAAO;IACP,YAAY;IACZ,mBAAmB;IACnB,OAAO;IACP,eAAe;CACN,CAAC"}
|
|
@@ -109,6 +109,14 @@ export interface IToolCoordinator {
|
|
|
109
109
|
* Hide a tool
|
|
110
110
|
*/
|
|
111
111
|
hideTool(id: string): void;
|
|
112
|
+
/**
|
|
113
|
+
* Toggle tool visibility
|
|
114
|
+
*/
|
|
115
|
+
toggleTool(id: string): void;
|
|
116
|
+
/**
|
|
117
|
+
* Check if tool is visible
|
|
118
|
+
*/
|
|
119
|
+
isToolVisible(id: string): boolean;
|
|
112
120
|
/**
|
|
113
121
|
* Bring an element to the front of its layer
|
|
114
122
|
*/
|