@pie-players/pie-assessment-toolkit 0.2.0
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 +520 -0
- package/dist/attempt/TestSession.d.ts +90 -0
- package/dist/attempt/TestSession.d.ts.map +1 -0
- package/dist/attempt/TestSession.js +174 -0
- package/dist/attempt/TestSession.js.map +1 -0
- package/dist/core/TypedEventBus.d.ts +48 -0
- package/dist/core/TypedEventBus.d.ts.map +1 -0
- package/dist/core/TypedEventBus.js +63 -0
- package/dist/core/TypedEventBus.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/item-loader.d.ts +45 -0
- package/dist/item-loader.d.ts.map +1 -0
- package/dist/item-loader.js +62 -0
- package/dist/item-loader.js.map +1 -0
- package/dist/player/AssessmentPlayer.d.ts +388 -0
- package/dist/player/AssessmentPlayer.d.ts.map +1 -0
- package/dist/player/AssessmentPlayer.js +965 -0
- package/dist/player/AssessmentPlayer.js.map +1 -0
- package/dist/player/index.d.ts +17 -0
- package/dist/player/index.d.ts.map +1 -0
- package/dist/player/index.js +15 -0
- package/dist/player/index.js.map +1 -0
- package/dist/player/navigation-types.d.ts +63 -0
- package/dist/player/navigation-types.d.ts.map +1 -0
- package/dist/player/navigation-types.js +7 -0
- package/dist/player/navigation-types.js.map +1 -0
- package/dist/player/qti-navigation.d.ts +29 -0
- package/dist/player/qti-navigation.d.ts.map +1 -0
- package/dist/player/qti-navigation.js +160 -0
- package/dist/player/qti-navigation.js.map +1 -0
- package/dist/reference-layout/index.d.ts +19 -0
- package/dist/reference-layout/index.d.ts.map +1 -0
- package/dist/reference-layout/index.js +20 -0
- package/dist/reference-layout/index.js.map +1 -0
- package/dist/services/AccessibilityCatalogResolver.d.ts +141 -0
- package/dist/services/AccessibilityCatalogResolver.d.ts.map +1 -0
- package/dist/services/AccessibilityCatalogResolver.js +249 -0
- package/dist/services/AccessibilityCatalogResolver.js.map +1 -0
- package/dist/services/AssessmentAuthoringService.d.ts +60 -0
- package/dist/services/AssessmentAuthoringService.d.ts.map +1 -0
- package/dist/services/AssessmentAuthoringService.js +183 -0
- package/dist/services/AssessmentAuthoringService.js.map +1 -0
- package/dist/services/ContextVariableStore.d.ts +114 -0
- package/dist/services/ContextVariableStore.d.ts.map +1 -0
- package/dist/services/ContextVariableStore.js +207 -0
- package/dist/services/ContextVariableStore.js.map +1 -0
- package/dist/services/ElementToolStateStore.d.ts +125 -0
- package/dist/services/ElementToolStateStore.d.ts.map +1 -0
- package/dist/services/ElementToolStateStore.js +200 -0
- package/dist/services/ElementToolStateStore.js.map +1 -0
- package/dist/services/HighlightCoordinator.d.ts +179 -0
- package/dist/services/HighlightCoordinator.d.ts.map +1 -0
- package/dist/services/HighlightCoordinator.js +446 -0
- package/dist/services/HighlightCoordinator.js.map +1 -0
- package/dist/services/I18nService.d.ts +121 -0
- package/dist/services/I18nService.d.ts.map +1 -0
- package/dist/services/I18nService.js +276 -0
- package/dist/services/I18nService.js.map +1 -0
- package/dist/services/PNPMapper.d.ts +71 -0
- package/dist/services/PNPMapper.d.ts.map +1 -0
- package/dist/services/PNPMapper.js +98 -0
- package/dist/services/PNPMapper.js.map +1 -0
- package/dist/services/PNPToolResolver.d.ts +127 -0
- package/dist/services/PNPToolResolver.d.ts.map +1 -0
- package/dist/services/PNPToolResolver.js +222 -0
- package/dist/services/PNPToolResolver.js.map +1 -0
- package/dist/services/SSMLExtractor.d.ts +61 -0
- package/dist/services/SSMLExtractor.d.ts.map +1 -0
- package/dist/services/SSMLExtractor.js +181 -0
- package/dist/services/SSMLExtractor.js.map +1 -0
- package/dist/services/TTSService.d.ts +162 -0
- package/dist/services/TTSService.d.ts.map +1 -0
- package/dist/services/TTSService.js +465 -0
- package/dist/services/TTSService.js.map +1 -0
- package/dist/services/ThemeProvider.d.ts +95 -0
- package/dist/services/ThemeProvider.d.ts.map +1 -0
- package/dist/services/ThemeProvider.js +299 -0
- package/dist/services/ThemeProvider.js.map +1 -0
- package/dist/services/ToolConfigResolver.d.ts +162 -0
- package/dist/services/ToolConfigResolver.d.ts.map +1 -0
- package/dist/services/ToolConfigResolver.js +230 -0
- package/dist/services/ToolConfigResolver.js.map +1 -0
- package/dist/services/ToolCoordinator.d.ts +137 -0
- package/dist/services/ToolCoordinator.d.ts.map +1 -0
- package/dist/services/ToolCoordinator.js +318 -0
- package/dist/services/ToolCoordinator.js.map +1 -0
- package/dist/services/ToolkitCoordinator.d.ts +188 -0
- package/dist/services/ToolkitCoordinator.d.ts.map +1 -0
- package/dist/services/ToolkitCoordinator.js +252 -0
- package/dist/services/ToolkitCoordinator.js.map +1 -0
- package/dist/services/interfaces.d.ts +391 -0
- package/dist/services/interfaces.d.ts.map +1 -0
- package/dist/services/interfaces.js +12 -0
- package/dist/services/interfaces.js.map +1 -0
- package/dist/services/tool-providers/DesmosToolProvider.d.ts +103 -0
- package/dist/services/tool-providers/DesmosToolProvider.d.ts.map +1 -0
- package/dist/services/tool-providers/DesmosToolProvider.js +127 -0
- package/dist/services/tool-providers/DesmosToolProvider.js.map +1 -0
- package/dist/services/tool-providers/IToolProvider.d.ts +137 -0
- package/dist/services/tool-providers/IToolProvider.d.ts.map +1 -0
- package/dist/services/tool-providers/IToolProvider.js +13 -0
- package/dist/services/tool-providers/IToolProvider.js.map +1 -0
- package/dist/services/tool-providers/TIToolProvider.d.ts +107 -0
- package/dist/services/tool-providers/TIToolProvider.d.ts.map +1 -0
- package/dist/services/tool-providers/TIToolProvider.js +123 -0
- package/dist/services/tool-providers/TIToolProvider.js.map +1 -0
- package/dist/services/tool-providers/TTSToolProvider.d.ts +143 -0
- package/dist/services/tool-providers/TTSToolProvider.d.ts.map +1 -0
- package/dist/services/tool-providers/TTSToolProvider.js +168 -0
- package/dist/services/tool-providers/TTSToolProvider.js.map +1 -0
- package/dist/services/tool-providers/ToolProviderRegistry.d.ts +165 -0
- package/dist/services/tool-providers/ToolProviderRegistry.d.ts.map +1 -0
- package/dist/services/tool-providers/ToolProviderRegistry.js +240 -0
- package/dist/services/tool-providers/ToolProviderRegistry.js.map +1 -0
- package/dist/services/tool-providers/index.d.ts +18 -0
- package/dist/services/tool-providers/index.d.ts.map +1 -0
- package/dist/services/tool-providers/index.js +15 -0
- package/dist/services/tool-providers/index.js.map +1 -0
- package/dist/services/tts/browser-provider.d.ts +24 -0
- package/dist/services/tts/browser-provider.d.ts.map +1 -0
- package/dist/services/tts/browser-provider.js +177 -0
- package/dist/services/tts/browser-provider.js.map +1 -0
- package/dist/services/tts/provider-interface.d.ts +131 -0
- package/dist/services/tts/provider-interface.d.ts.map +1 -0
- package/dist/services/tts/provider-interface.js +10 -0
- package/dist/services/tts/provider-interface.js.map +1 -0
- package/dist/tools/calculators/desmos-provider.d.ts +54 -0
- package/dist/tools/calculators/desmos-provider.d.ts.map +1 -0
- package/dist/tools/calculators/desmos-provider.js +384 -0
- package/dist/tools/calculators/desmos-provider.js.map +1 -0
- package/dist/tools/calculators/mathjs-provider.d.ts +50 -0
- package/dist/tools/calculators/mathjs-provider.d.ts.map +1 -0
- package/dist/tools/calculators/mathjs-provider.js +660 -0
- package/dist/tools/calculators/mathjs-provider.js.map +1 -0
- package/dist/tools/calculators/ti-provider.d.ts +122 -0
- package/dist/tools/calculators/ti-provider.d.ts.map +1 -0
- package/dist/tools/calculators/ti-provider.js +587 -0
- package/dist/tools/calculators/ti-provider.js.map +1 -0
- package/dist/tools/client.d.ts +17 -0
- package/dist/tools/client.d.ts.map +1 -0
- package/dist/tools/client.js +26 -0
- package/dist/tools/client.js.map +1 -0
- package/dist/tools/index.d.ts +8 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +10 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/library-loader.d.ts +63 -0
- package/dist/tools/library-loader.d.ts.map +1 -0
- package/dist/tools/library-loader.js +292 -0
- package/dist/tools/library-loader.js.map +1 -0
- package/dist/tools/response-discovery.d.ts +72 -0
- package/dist/tools/response-discovery.d.ts.map +1 -0
- package/dist/tools/response-discovery.js +183 -0
- package/dist/tools/response-discovery.js.map +1 -0
- package/dist/tools/tool-coordinator.d.ts +76 -0
- package/dist/tools/tool-coordinator.d.ts.map +1 -0
- package/dist/tools/tool-coordinator.js +197 -0
- package/dist/tools/tool-coordinator.js.map +1 -0
- package/dist/tools/types.d.ts +427 -0
- package/dist/tools/types.d.ts.map +1 -0
- package/dist/tools/types.js +13 -0
- package/dist/tools/types.js.map +1 -0
- package/dist/tools/variant-resolver.d.ts +48 -0
- package/dist/tools/variant-resolver.d.ts.map +1 -0
- package/dist/tools/variant-resolver.js +214 -0
- package/dist/tools/variant-resolver.js.map +1 -0
- package/dist/types/events.d.ts +157 -0
- package/dist/types/events.d.ts.map +1 -0
- package/dist/types/events.js +11 -0
- package/dist/types/events.js.map +1 -0
- package/dist/utils/logger.d.ts +7 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +11 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +71 -0
- package/src/README.md +626 -0
- package/src/components/QuestionToolBar.svelte +406 -0
- package/src/player/AssessmentLayout.svelte +68 -0
- package/src/player/README.md +154 -0
- package/src/reference-layout/README.md +135 -0
- package/src/reference-layout/ReferenceLayout.svelte +209 -0
- package/src/reference-layout/components/AssessmentContent.svelte +259 -0
- package/src/reference-layout/components/AssessmentFooter.svelte +89 -0
- package/src/reference-layout/components/AssessmentHeader.svelte +250 -0
- package/src/reference-layout/components/AssessmentNavigation.svelte +134 -0
- package/src/reference-layout/components/AssessmentToolsBar.svelte +176 -0
- package/src/reference-layout/components/ItemPanel.svelte +200 -0
- package/src/reference-layout/components/NotesPanel.svelte +179 -0
- package/src/reference-layout/components/PassagePanel.svelte +76 -0
- package/src/tools/README.md +616 -0
- package/src/tools/calculators/README.md +395 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HighlightCoordinator
|
|
3
|
+
*
|
|
4
|
+
* Manages separate highlight layers for TTS (temporary) and annotations (persistent).
|
|
5
|
+
* Uses CSS Custom Highlight API - zero DOM mutation, preserves accessibility.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Separate layers prevent TTS clearing from removing student annotations
|
|
9
|
+
* - CSS Custom Highlight API (no DOM mutation)
|
|
10
|
+
* - Full accessibility support (screen readers see original text)
|
|
11
|
+
* - Configurable colors and styles
|
|
12
|
+
*
|
|
13
|
+
* Part of PIE Assessment Toolkit.
|
|
14
|
+
*
|
|
15
|
+
* Browser Support:
|
|
16
|
+
* - Chrome/Edge 105+
|
|
17
|
+
* - Safari 17.2+
|
|
18
|
+
* - Firefox: Behind flag (not recommended for production)
|
|
19
|
+
*
|
|
20
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API
|
|
21
|
+
*/
|
|
22
|
+
import type { IHighlightCoordinator } from "./interfaces";
|
|
23
|
+
/**
|
|
24
|
+
* Highlight types
|
|
25
|
+
*/
|
|
26
|
+
export declare enum HighlightType {
|
|
27
|
+
TTS_WORD = "tts-word",
|
|
28
|
+
TTS_SENTENCE = "tts-sentence",
|
|
29
|
+
ANNOTATION = "annotation"
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Highlight colors for annotations
|
|
33
|
+
*/
|
|
34
|
+
export declare enum HighlightColor {
|
|
35
|
+
YELLOW = "yellow",
|
|
36
|
+
GREEN = "green",
|
|
37
|
+
BLUE = "blue",
|
|
38
|
+
PINK = "pink",
|
|
39
|
+
ORANGE = "orange"
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Annotation data
|
|
43
|
+
*/
|
|
44
|
+
export interface Annotation {
|
|
45
|
+
id: string;
|
|
46
|
+
range: Range;
|
|
47
|
+
type: HighlightType.ANNOTATION;
|
|
48
|
+
color: HighlightColor;
|
|
49
|
+
timestamp: number;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Configuration for HighlightCoordinator
|
|
53
|
+
* Currently empty but allows future extension without breaking changes
|
|
54
|
+
*/
|
|
55
|
+
export type HighlightCoordinatorConfig = Record<string, never>;
|
|
56
|
+
export declare class HighlightCoordinator implements IHighlightCoordinator {
|
|
57
|
+
private config;
|
|
58
|
+
private ttsWordHighlight;
|
|
59
|
+
private ttsSentenceHighlight;
|
|
60
|
+
private annotations;
|
|
61
|
+
private annotationHighlights;
|
|
62
|
+
private nextAnnotationId;
|
|
63
|
+
private supported;
|
|
64
|
+
constructor(config?: HighlightCoordinatorConfig);
|
|
65
|
+
/**
|
|
66
|
+
* Initialize CSS Custom Highlights
|
|
67
|
+
*/
|
|
68
|
+
private initializeHighlights;
|
|
69
|
+
/**
|
|
70
|
+
* Register CSS styles for highlights
|
|
71
|
+
*/
|
|
72
|
+
private registerStyles;
|
|
73
|
+
/**
|
|
74
|
+
* Highlight a word for TTS (temporary)
|
|
75
|
+
*
|
|
76
|
+
* @param textNode Text node containing the word
|
|
77
|
+
* @param startOffset Start position in text node
|
|
78
|
+
* @param endOffset End position in text node
|
|
79
|
+
*/
|
|
80
|
+
highlightTTSWord(textNode: Text, startOffset: number, endOffset: number): void;
|
|
81
|
+
/**
|
|
82
|
+
* Highlight a sentence for TTS (temporary)
|
|
83
|
+
*
|
|
84
|
+
* @param ranges Array of ranges that make up the sentence
|
|
85
|
+
*/
|
|
86
|
+
highlightTTSSentence(ranges: Range[]): void;
|
|
87
|
+
/**
|
|
88
|
+
* Clear TTS word highlight
|
|
89
|
+
*/
|
|
90
|
+
clearTTSWord(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Clear TTS sentence highlight
|
|
93
|
+
*/
|
|
94
|
+
clearTTSSentence(): void;
|
|
95
|
+
/**
|
|
96
|
+
* Clear all TTS highlights
|
|
97
|
+
*/
|
|
98
|
+
clearTTS(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Add an annotation highlight (persistent)
|
|
101
|
+
*
|
|
102
|
+
* @param range Text range to annotate
|
|
103
|
+
* @param color Highlight color
|
|
104
|
+
* @returns Annotation ID for later removal
|
|
105
|
+
*/
|
|
106
|
+
addAnnotation(range: Range, color?: HighlightColor): string;
|
|
107
|
+
/**
|
|
108
|
+
* Remove an annotation
|
|
109
|
+
*
|
|
110
|
+
* @param id Annotation ID
|
|
111
|
+
*/
|
|
112
|
+
removeAnnotation(id: string): void;
|
|
113
|
+
/**
|
|
114
|
+
* Remove all annotations
|
|
115
|
+
*/
|
|
116
|
+
clearAnnotations(): void;
|
|
117
|
+
/**
|
|
118
|
+
* Get all annotations
|
|
119
|
+
*/
|
|
120
|
+
getAnnotations(): Annotation[];
|
|
121
|
+
/**
|
|
122
|
+
* Get annotation by ID
|
|
123
|
+
*/
|
|
124
|
+
getAnnotation(id: string): Annotation | null;
|
|
125
|
+
/**
|
|
126
|
+
* Change annotation color
|
|
127
|
+
*
|
|
128
|
+
* @param id Annotation ID
|
|
129
|
+
* @param newColor New color
|
|
130
|
+
*/
|
|
131
|
+
changeAnnotationColor(id: string, newColor: HighlightColor): void;
|
|
132
|
+
/**
|
|
133
|
+
* Export annotations as serializable data
|
|
134
|
+
*/
|
|
135
|
+
exportAnnotations(): Array<{
|
|
136
|
+
id: string;
|
|
137
|
+
startContainer: string;
|
|
138
|
+
startOffset: number;
|
|
139
|
+
endContainer: string;
|
|
140
|
+
endOffset: number;
|
|
141
|
+
color: HighlightColor;
|
|
142
|
+
timestamp: number;
|
|
143
|
+
}>;
|
|
144
|
+
/**
|
|
145
|
+
* Get XPath-like path for a node (simplified)
|
|
146
|
+
*/
|
|
147
|
+
private getNodePath;
|
|
148
|
+
/**
|
|
149
|
+
* Highlight a text range (interface method)
|
|
150
|
+
*
|
|
151
|
+
* Generic method that adapts to the specific highlight type.
|
|
152
|
+
* For more control, use the specific methods like highlightTTSWord().
|
|
153
|
+
*/
|
|
154
|
+
highlightRange(range: Range, type: HighlightType, color?: HighlightColor): void;
|
|
155
|
+
/**
|
|
156
|
+
* Clear highlights of a specific type (interface method)
|
|
157
|
+
*/
|
|
158
|
+
clearHighlights(type: HighlightType): void;
|
|
159
|
+
/**
|
|
160
|
+
* Clear all highlights (interface method)
|
|
161
|
+
*/
|
|
162
|
+
clearAll(): void;
|
|
163
|
+
/**
|
|
164
|
+
* Check if CSS Highlight API is supported (interface method)
|
|
165
|
+
*/
|
|
166
|
+
isSupported(): boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Update TTS highlight style dynamically
|
|
169
|
+
*
|
|
170
|
+
* @param color CSS color value (e.g., '#ffeb3b')
|
|
171
|
+
* @param opacity Opacity value (0.0 to 1.0)
|
|
172
|
+
*/
|
|
173
|
+
updateTTSHighlightStyle(color: string, opacity: number): void;
|
|
174
|
+
/**
|
|
175
|
+
* Cleanup - remove all highlights
|
|
176
|
+
*/
|
|
177
|
+
destroy(): void;
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=HighlightCoordinator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HighlightCoordinator.d.ts","sourceRoot":"","sources":["../../src/services/HighlightCoordinator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D;;GAEG;AACH,oBAAY,aAAa;IACxB,QAAQ,aAAa;IACrB,YAAY,iBAAiB;IAC7B,UAAU,eAAe;CACzB;AAED;;GAEG;AACH,oBAAY,cAAc;IACzB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,IAAI,SAAS;IACb,MAAM,WAAW;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,aAAa,CAAC,UAAU,CAAC;IAC/B,KAAK,EAAE,cAAc,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AAC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X,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,cAAc,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;KAClB,CAAC;IAcF;;OAEG;IACH,OAAO,CAAC,WAAW;IAoBnB;;;;;OAKG;IACH,cAAc,CACb,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,aAAa,EACnB,KAAK,GAAE,cAAsC,GAC3C,IAAI;IAwBP;;OAEG;IACH,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI;IAgB1C;;OAEG;IACH,QAAQ,IAAI,IAAI;IAMhB;;OAEG;IACH,WAAW,IAAI,OAAO;IAItB;;;;;OAKG;IACH,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAiE7D;;OAEG;IACH,OAAO,IAAI,IAAI;CAcf"}
|
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HighlightCoordinator
|
|
3
|
+
*
|
|
4
|
+
* Manages separate highlight layers for TTS (temporary) and annotations (persistent).
|
|
5
|
+
* Uses CSS Custom Highlight API - zero DOM mutation, preserves accessibility.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Separate layers prevent TTS clearing from removing student annotations
|
|
9
|
+
* - CSS Custom Highlight API (no DOM mutation)
|
|
10
|
+
* - Full accessibility support (screen readers see original text)
|
|
11
|
+
* - Configurable colors and styles
|
|
12
|
+
*
|
|
13
|
+
* Part of PIE Assessment Toolkit.
|
|
14
|
+
*
|
|
15
|
+
* Browser Support:
|
|
16
|
+
* - Chrome/Edge 105+
|
|
17
|
+
* - Safari 17.2+
|
|
18
|
+
* - Firefox: Behind flag (not recommended for production)
|
|
19
|
+
*
|
|
20
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Highlight types
|
|
24
|
+
*/
|
|
25
|
+
export var HighlightType;
|
|
26
|
+
(function (HighlightType) {
|
|
27
|
+
HighlightType["TTS_WORD"] = "tts-word";
|
|
28
|
+
HighlightType["TTS_SENTENCE"] = "tts-sentence";
|
|
29
|
+
HighlightType["ANNOTATION"] = "annotation";
|
|
30
|
+
})(HighlightType || (HighlightType = {}));
|
|
31
|
+
/**
|
|
32
|
+
* Highlight colors for annotations
|
|
33
|
+
*/
|
|
34
|
+
export var HighlightColor;
|
|
35
|
+
(function (HighlightColor) {
|
|
36
|
+
HighlightColor["YELLOW"] = "yellow";
|
|
37
|
+
HighlightColor["GREEN"] = "green";
|
|
38
|
+
HighlightColor["BLUE"] = "blue";
|
|
39
|
+
HighlightColor["PINK"] = "pink";
|
|
40
|
+
HighlightColor["ORANGE"] = "orange";
|
|
41
|
+
})(HighlightColor || (HighlightColor = {}));
|
|
42
|
+
export class HighlightCoordinator {
|
|
43
|
+
config;
|
|
44
|
+
ttsWordHighlight = null;
|
|
45
|
+
ttsSentenceHighlight = null;
|
|
46
|
+
annotations = new Map();
|
|
47
|
+
annotationHighlights = new Map();
|
|
48
|
+
nextAnnotationId = 1;
|
|
49
|
+
supported = false;
|
|
50
|
+
constructor(config = {}) {
|
|
51
|
+
this.config = config;
|
|
52
|
+
// SSR guard
|
|
53
|
+
if (typeof CSS === "undefined" || !("highlights" in CSS)) {
|
|
54
|
+
console.warn("CSS Custom Highlight API not supported (SSR or unsupported browser)");
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
this.supported = true;
|
|
58
|
+
this.initializeHighlights();
|
|
59
|
+
this.registerStyles();
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Initialize CSS Custom Highlights
|
|
63
|
+
*/
|
|
64
|
+
initializeHighlights() {
|
|
65
|
+
if (!this.supported)
|
|
66
|
+
return;
|
|
67
|
+
// Create highlight registries
|
|
68
|
+
this.ttsWordHighlight = new Highlight();
|
|
69
|
+
this.ttsSentenceHighlight = new Highlight();
|
|
70
|
+
// Register with CSS
|
|
71
|
+
CSS.highlights.set("tts-word", this.ttsWordHighlight);
|
|
72
|
+
CSS.highlights.set("tts-sentence", this.ttsSentenceHighlight);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Register CSS styles for highlights
|
|
76
|
+
*/
|
|
77
|
+
registerStyles() {
|
|
78
|
+
if (!this.supported)
|
|
79
|
+
return;
|
|
80
|
+
if (typeof document === "undefined")
|
|
81
|
+
return; // SSR guard
|
|
82
|
+
// Check if styles already exist
|
|
83
|
+
if (document.getElementById("pie-highlight-styles"))
|
|
84
|
+
return;
|
|
85
|
+
const style = document.createElement("style");
|
|
86
|
+
style.id = "pie-highlight-styles";
|
|
87
|
+
style.textContent = `
|
|
88
|
+
/* TTS highlights - temporary */
|
|
89
|
+
::highlight(tts-word) {
|
|
90
|
+
background-color: rgba(255, 235, 59, 0.4);
|
|
91
|
+
color: inherit;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
::highlight(tts-sentence) {
|
|
95
|
+
background-color: rgba(173, 216, 230, 0.3);
|
|
96
|
+
color: inherit;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Annotation highlights - persistent */
|
|
100
|
+
::highlight(annotation-yellow) {
|
|
101
|
+
background-color: rgba(255, 255, 0, 0.3);
|
|
102
|
+
color: inherit;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
::highlight(annotation-green) {
|
|
106
|
+
background-color: rgba(144, 238, 144, 0.3);
|
|
107
|
+
color: inherit;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
::highlight(annotation-blue) {
|
|
111
|
+
background-color: rgba(173, 216, 230, 0.3);
|
|
112
|
+
color: inherit;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
::highlight(annotation-pink) {
|
|
116
|
+
background-color: rgba(255, 182, 193, 0.3);
|
|
117
|
+
color: inherit;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
::highlight(annotation-orange) {
|
|
121
|
+
background-color: rgba(255, 165, 0, 0.3);
|
|
122
|
+
color: inherit;
|
|
123
|
+
}
|
|
124
|
+
`;
|
|
125
|
+
document.head.appendChild(style);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Highlight a word for TTS (temporary)
|
|
129
|
+
*
|
|
130
|
+
* @param textNode Text node containing the word
|
|
131
|
+
* @param startOffset Start position in text node
|
|
132
|
+
* @param endOffset End position in text node
|
|
133
|
+
*/
|
|
134
|
+
highlightTTSWord(textNode, startOffset, endOffset) {
|
|
135
|
+
if (!this.ttsWordHighlight)
|
|
136
|
+
return;
|
|
137
|
+
// Clear previous word highlight
|
|
138
|
+
this.clearTTSWord();
|
|
139
|
+
// Create range for word
|
|
140
|
+
const range = document.createRange();
|
|
141
|
+
range.setStart(textNode, startOffset);
|
|
142
|
+
range.setEnd(textNode, endOffset);
|
|
143
|
+
// Add to highlight
|
|
144
|
+
this.ttsWordHighlight.add(range);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Highlight a sentence for TTS (temporary)
|
|
148
|
+
*
|
|
149
|
+
* @param ranges Array of ranges that make up the sentence
|
|
150
|
+
*/
|
|
151
|
+
highlightTTSSentence(ranges) {
|
|
152
|
+
if (!this.ttsSentenceHighlight)
|
|
153
|
+
return;
|
|
154
|
+
// Clear previous sentence highlight
|
|
155
|
+
this.clearTTSSentence();
|
|
156
|
+
// Add all ranges
|
|
157
|
+
for (const range of ranges) {
|
|
158
|
+
this.ttsSentenceHighlight.add(range);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Clear TTS word highlight
|
|
163
|
+
*/
|
|
164
|
+
clearTTSWord() {
|
|
165
|
+
if (!this.ttsWordHighlight)
|
|
166
|
+
return;
|
|
167
|
+
this.ttsWordHighlight.clear();
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Clear TTS sentence highlight
|
|
171
|
+
*/
|
|
172
|
+
clearTTSSentence() {
|
|
173
|
+
if (!this.ttsSentenceHighlight)
|
|
174
|
+
return;
|
|
175
|
+
this.ttsSentenceHighlight.clear();
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Clear all TTS highlights
|
|
179
|
+
*/
|
|
180
|
+
clearTTS() {
|
|
181
|
+
this.clearTTSWord();
|
|
182
|
+
this.clearTTSSentence();
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Add an annotation highlight (persistent)
|
|
186
|
+
*
|
|
187
|
+
* @param range Text range to annotate
|
|
188
|
+
* @param color Highlight color
|
|
189
|
+
* @returns Annotation ID for later removal
|
|
190
|
+
*/
|
|
191
|
+
addAnnotation(range, color = HighlightColor.YELLOW) {
|
|
192
|
+
const id = `annotation-${this.nextAnnotationId++}`;
|
|
193
|
+
// Store annotation data
|
|
194
|
+
const annotation = {
|
|
195
|
+
id,
|
|
196
|
+
range: range.cloneRange(),
|
|
197
|
+
type: HighlightType.ANNOTATION,
|
|
198
|
+
color,
|
|
199
|
+
timestamp: Date.now(),
|
|
200
|
+
};
|
|
201
|
+
this.annotations.set(id, annotation);
|
|
202
|
+
// Create highlight for this annotation
|
|
203
|
+
const highlight = new Highlight(range);
|
|
204
|
+
this.annotationHighlights.set(id, highlight);
|
|
205
|
+
// Register with CSS
|
|
206
|
+
CSS.highlights.set(`annotation-${color}-${id}`, highlight);
|
|
207
|
+
return id;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Remove an annotation
|
|
211
|
+
*
|
|
212
|
+
* @param id Annotation ID
|
|
213
|
+
*/
|
|
214
|
+
removeAnnotation(id) {
|
|
215
|
+
const annotation = this.annotations.get(id);
|
|
216
|
+
if (!annotation)
|
|
217
|
+
return;
|
|
218
|
+
// Remove from CSS highlights
|
|
219
|
+
CSS.highlights.delete(`annotation-${annotation.color}-${id}`);
|
|
220
|
+
// Clean up
|
|
221
|
+
this.annotationHighlights.delete(id);
|
|
222
|
+
this.annotations.delete(id);
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Remove all annotations
|
|
226
|
+
*/
|
|
227
|
+
clearAnnotations() {
|
|
228
|
+
for (const id of this.annotations.keys()) {
|
|
229
|
+
this.removeAnnotation(id);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Get all annotations
|
|
234
|
+
*/
|
|
235
|
+
getAnnotations() {
|
|
236
|
+
return Array.from(this.annotations.values());
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Get annotation by ID
|
|
240
|
+
*/
|
|
241
|
+
getAnnotation(id) {
|
|
242
|
+
return this.annotations.get(id) ?? null;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Change annotation color
|
|
246
|
+
*
|
|
247
|
+
* @param id Annotation ID
|
|
248
|
+
* @param newColor New color
|
|
249
|
+
*/
|
|
250
|
+
changeAnnotationColor(id, newColor) {
|
|
251
|
+
const annotation = this.annotations.get(id);
|
|
252
|
+
if (!annotation)
|
|
253
|
+
return;
|
|
254
|
+
// Remove old highlight
|
|
255
|
+
CSS.highlights.delete(`annotation-${annotation.color}-${id}`);
|
|
256
|
+
// Update color
|
|
257
|
+
annotation.color = newColor;
|
|
258
|
+
// Re-register with new color
|
|
259
|
+
const highlight = this.annotationHighlights.get(id);
|
|
260
|
+
if (highlight) {
|
|
261
|
+
CSS.highlights.set(`annotation-${newColor}-${id}`, highlight);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Export annotations as serializable data
|
|
266
|
+
*/
|
|
267
|
+
exportAnnotations() {
|
|
268
|
+
// Note: This is a simplified export. Production implementation
|
|
269
|
+
// would need a robust way to serialize DOM ranges.
|
|
270
|
+
return this.getAnnotations().map((annotation) => ({
|
|
271
|
+
id: annotation.id,
|
|
272
|
+
startContainer: this.getNodePath(annotation.range.startContainer),
|
|
273
|
+
startOffset: annotation.range.startOffset,
|
|
274
|
+
endContainer: this.getNodePath(annotation.range.endContainer),
|
|
275
|
+
endOffset: annotation.range.endOffset,
|
|
276
|
+
color: annotation.color,
|
|
277
|
+
timestamp: annotation.timestamp,
|
|
278
|
+
}));
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Get XPath-like path for a node (simplified)
|
|
282
|
+
*/
|
|
283
|
+
getNodePath(node) {
|
|
284
|
+
const path = [];
|
|
285
|
+
let current = node;
|
|
286
|
+
while (current && current !== document.body) {
|
|
287
|
+
if (current.parentNode) {
|
|
288
|
+
const siblings = Array.from(current.parentNode.childNodes);
|
|
289
|
+
const index = siblings.indexOf(current);
|
|
290
|
+
path.unshift(`${current.nodeName}[${index}]`);
|
|
291
|
+
}
|
|
292
|
+
current = current.parentNode;
|
|
293
|
+
}
|
|
294
|
+
return "/" + path.join("/");
|
|
295
|
+
}
|
|
296
|
+
// ============================================================================
|
|
297
|
+
// IHighlightCoordinator Interface Implementation
|
|
298
|
+
// ============================================================================
|
|
299
|
+
/**
|
|
300
|
+
* Highlight a text range (interface method)
|
|
301
|
+
*
|
|
302
|
+
* Generic method that adapts to the specific highlight type.
|
|
303
|
+
* For more control, use the specific methods like highlightTTSWord().
|
|
304
|
+
*/
|
|
305
|
+
highlightRange(range, type, color = HighlightColor.YELLOW) {
|
|
306
|
+
if (!this.supported)
|
|
307
|
+
return;
|
|
308
|
+
switch (type) {
|
|
309
|
+
case HighlightType.TTS_WORD:
|
|
310
|
+
case HighlightType.TTS_SENTENCE: {
|
|
311
|
+
// For TTS, add to appropriate highlight
|
|
312
|
+
const highlight = type === HighlightType.TTS_WORD
|
|
313
|
+
? this.ttsWordHighlight
|
|
314
|
+
: this.ttsSentenceHighlight;
|
|
315
|
+
if (highlight) {
|
|
316
|
+
highlight.clear();
|
|
317
|
+
highlight.add(range);
|
|
318
|
+
}
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
case HighlightType.ANNOTATION:
|
|
322
|
+
// For annotations, use the existing method
|
|
323
|
+
this.addAnnotation(range, color);
|
|
324
|
+
break;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Clear highlights of a specific type (interface method)
|
|
329
|
+
*/
|
|
330
|
+
clearHighlights(type) {
|
|
331
|
+
if (!this.supported)
|
|
332
|
+
return;
|
|
333
|
+
switch (type) {
|
|
334
|
+
case HighlightType.TTS_WORD:
|
|
335
|
+
this.clearTTSWord();
|
|
336
|
+
break;
|
|
337
|
+
case HighlightType.TTS_SENTENCE:
|
|
338
|
+
this.clearTTSSentence();
|
|
339
|
+
break;
|
|
340
|
+
case HighlightType.ANNOTATION:
|
|
341
|
+
this.clearAnnotations();
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Clear all highlights (interface method)
|
|
347
|
+
*/
|
|
348
|
+
clearAll() {
|
|
349
|
+
if (!this.supported)
|
|
350
|
+
return;
|
|
351
|
+
this.clearTTS();
|
|
352
|
+
this.clearAnnotations();
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Check if CSS Highlight API is supported (interface method)
|
|
356
|
+
*/
|
|
357
|
+
isSupported() {
|
|
358
|
+
return this.supported;
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Update TTS highlight style dynamically
|
|
362
|
+
*
|
|
363
|
+
* @param color CSS color value (e.g., '#ffeb3b')
|
|
364
|
+
* @param opacity Opacity value (0.0 to 1.0)
|
|
365
|
+
*/
|
|
366
|
+
updateTTSHighlightStyle(color, opacity) {
|
|
367
|
+
if (!this.supported)
|
|
368
|
+
return;
|
|
369
|
+
if (typeof document === "undefined")
|
|
370
|
+
return;
|
|
371
|
+
const styleEl = document.getElementById("pie-highlight-styles");
|
|
372
|
+
if (!styleEl)
|
|
373
|
+
return;
|
|
374
|
+
// Convert hex to rgba
|
|
375
|
+
const hexToRgb = (hex) => {
|
|
376
|
+
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
377
|
+
return result
|
|
378
|
+
? {
|
|
379
|
+
r: parseInt(result[1], 16),
|
|
380
|
+
g: parseInt(result[2], 16),
|
|
381
|
+
b: parseInt(result[3], 16),
|
|
382
|
+
}
|
|
383
|
+
: null;
|
|
384
|
+
};
|
|
385
|
+
const rgb = hexToRgb(color);
|
|
386
|
+
if (!rgb)
|
|
387
|
+
return;
|
|
388
|
+
const rgbaColor = `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${opacity})`;
|
|
389
|
+
// Update the style element
|
|
390
|
+
styleEl.textContent = `
|
|
391
|
+
/* TTS highlights - temporary */
|
|
392
|
+
::highlight(tts-word) {
|
|
393
|
+
background-color: ${rgbaColor};
|
|
394
|
+
color: inherit;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
::highlight(tts-sentence) {
|
|
398
|
+
background-color: rgba(173, 216, 230, 0.3);
|
|
399
|
+
color: inherit;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/* Annotation highlights - persistent */
|
|
403
|
+
::highlight(annotation-yellow) {
|
|
404
|
+
background-color: rgba(255, 255, 0, 0.3);
|
|
405
|
+
color: inherit;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
::highlight(annotation-green) {
|
|
409
|
+
background-color: rgba(144, 238, 144, 0.3);
|
|
410
|
+
color: inherit;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
::highlight(annotation-blue) {
|
|
414
|
+
background-color: rgba(173, 216, 230, 0.3);
|
|
415
|
+
color: inherit;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
::highlight(annotation-pink) {
|
|
419
|
+
background-color: rgba(255, 182, 193, 0.3);
|
|
420
|
+
color: inherit;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
::highlight(annotation-orange) {
|
|
424
|
+
background-color: rgba(255, 165, 0, 0.3);
|
|
425
|
+
color: inherit;
|
|
426
|
+
}
|
|
427
|
+
`;
|
|
428
|
+
}
|
|
429
|
+
/**
|
|
430
|
+
* Cleanup - remove all highlights
|
|
431
|
+
*/
|
|
432
|
+
destroy() {
|
|
433
|
+
if (!this.supported)
|
|
434
|
+
return;
|
|
435
|
+
this.clearTTS();
|
|
436
|
+
this.clearAnnotations();
|
|
437
|
+
// Remove style element
|
|
438
|
+
if (typeof document !== "undefined") {
|
|
439
|
+
const styleEl = document.getElementById("pie-highlight-styles");
|
|
440
|
+
if (styleEl) {
|
|
441
|
+
styleEl.remove();
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
//# sourceMappingURL=HighlightCoordinator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HighlightCoordinator.js","sourceRoot":"","sources":["../../src/services/HighlightCoordinator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH;;GAEG;AACH,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACxB,sCAAqB,CAAA;IACrB,8CAA6B,CAAA;IAC7B,0CAAyB,CAAA;AAC1B,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,cAMX;AAND,WAAY,cAAc;IACzB,mCAAiB,CAAA;IACjB,iCAAe,CAAA;IACf,+BAAa,CAAA;IACb,+BAAa,CAAA;IACb,mCAAiB,CAAA;AAClB,CAAC,EANW,cAAc,KAAd,cAAc,QAMzB;AAmBD,MAAM,OAAO,oBAAoB;IACxB,MAAM,CAA6B;IACnC,gBAAgB,GAAqB,IAAI,CAAC;IAC1C,oBAAoB,GAAqB,IAAI,CAAC;IAC9C,WAAW,GAAG,IAAI,GAAG,EAAsB,CAAC;IAC5C,oBAAoB,GAAG,IAAI,GAAG,EAAqB,CAAC;IACpD,gBAAgB,GAAG,CAAC,CAAC;IACrB,SAAS,GAAG,KAAK,CAAC;IAE1B,YAAY,SAAqC,E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