@pie-qti/item-player 0.1.6 → 0.1.7
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/dist/catalog/applyGlossaryTriggers.d.ts +2 -1
- package/dist/catalog/applyGlossaryTriggers.d.ts.map +1 -1
- package/dist/catalog/applyGlossaryTriggers.js +145 -30
- package/dist/catalog/glossaryAction.d.ts.map +1 -1
- package/dist/catalog/glossaryAction.js +14 -4
- package/dist/components/utils/stimulusRender.d.ts +17 -0
- package/dist/components/utils/stimulusRender.d.ts.map +1 -0
- package/dist/components/utils/stimulusRender.js +70 -0
- package/dist/components/utils/stylesheetRender.d.ts +4 -0
- package/dist/components/utils/stylesheetRender.d.ts.map +1 -0
- package/dist/components/utils/stylesheetRender.js +57 -0
- package/dist/core/Player.d.ts +37 -2
- package/dist/core/Player.d.ts.map +1 -1
- package/dist/core/Player.js +320 -48
- package/dist/element.js +1288 -924
- package/dist/element.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/pnp/applyPnp.d.ts.map +1 -1
- package/dist/pnp/applyPnp.js +9 -2
- package/dist/pnp/parsePnpXml.d.ts.map +1 -1
- package/dist/pnp/parsePnpXml.js +91 -3
- package/dist/pnp/types.d.ts +24 -1
- package/dist/pnp/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +47 -0
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/catalog/applyGlossaryTriggers.ts +174 -34
- package/src/catalog/glossaryAction.ts +14 -4
- package/src/components/ItemBody.svelte +36 -27
- package/src/components/utils/stimulusRender.ts +93 -0
- package/src/components/utils/stylesheetRender.ts +58 -0
- package/src/core/Player.ts +355 -48
- package/src/index.ts +1 -0
- package/src/pnp/applyPnp.ts +8 -2
- package/src/pnp/parsePnpXml.ts +102 -5
- package/src/pnp/types.ts +43 -1
- package/src/types/index.ts +53 -0
- package/src/__tests__/glossaryTriggers.test.ts +0 -411
- package/src/__tests__/pnp.test.ts +0 -250
|
@@ -11,5 +11,6 @@ import type { Player } from '../core/Player.js';
|
|
|
11
11
|
* audio-description) the player fires a `qti-catalog-lookup` CustomEvent instead of
|
|
12
12
|
* mounting a popup — the host application handles those usages.
|
|
13
13
|
*/
|
|
14
|
-
export declare function applyGlossaryTriggers(container: HTMLElement, player: Player): void;
|
|
14
|
+
export declare function applyGlossaryTriggers(container: HTMLElement, player: Player): () => void;
|
|
15
|
+
export declare function cleanupGlossaryTriggers(container: HTMLElement): void;
|
|
15
16
|
//# sourceMappingURL=applyGlossaryTriggers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"applyGlossaryTriggers.d.ts","sourceRoot":"","sources":["../../src/catalog/applyGlossaryTriggers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"applyGlossaryTriggers.d.ts","sourceRoot":"","sources":["../../src/catalog/applyGlossaryTriggers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AA2BhD;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,IAAI,CA8GxF;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,CAUpE"}
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
const PLATFORM_USAGES =
|
|
1
|
+
const PLATFORM_USAGES = [
|
|
2
|
+
{ usage: 'tts-pronunciation', flag: 'ttsPronunciation', label: 'Request pronunciation', text: 'P' },
|
|
3
|
+
{ usage: 'signing-definition', flag: 'signingDefinition', label: 'Request signing definition', text: 'S' },
|
|
4
|
+
{ usage: 'braille-text', flag: 'brailleText', label: 'Request braille text', text: 'B' },
|
|
5
|
+
{ usage: 'audio-description', flag: 'audioDescription', label: 'Request audio description', text: 'A' },
|
|
6
|
+
{ usage: 'extended-description', flag: 'extendedDescription', label: 'Request extended description', text: 'D' },
|
|
7
|
+
];
|
|
8
|
+
const ILLUSTRATED_GLOSSARY_USAGE = 'illustrated-glossary';
|
|
9
|
+
const BUILT_IN_POPUP_USAGES = new Set([
|
|
10
|
+
'glossary-on-screen',
|
|
11
|
+
'keyword-translation',
|
|
12
|
+
ILLUSTRATED_GLOSSARY_USAGE,
|
|
13
|
+
]);
|
|
14
|
+
const RESERVED_PLATFORM_FLAGS = new Set(PLATFORM_USAGES.map((support) => support.flag));
|
|
15
|
+
const RESERVED_PLATFORM_USAGES = new Set(PLATFORM_USAGES.map((support) => support.usage));
|
|
16
|
+
const SAFE_CATALOG_USAGE = /^[a-z][a-z0-9._-]*$/;
|
|
2
17
|
/**
|
|
3
18
|
* Inject glossary/keyword-translation trigger buttons into a rendered item container.
|
|
4
19
|
*
|
|
@@ -12,23 +27,29 @@ const PLATFORM_USAGES = new Set(['tts-pronunciation', 'signing-definition', 'bra
|
|
|
12
27
|
* mounting a popup — the host application handles those usages.
|
|
13
28
|
*/
|
|
14
29
|
export function applyGlossaryTriggers(container, player) {
|
|
30
|
+
cleanupGlossaryTriggers(container);
|
|
15
31
|
const pnp = player.getPnp();
|
|
16
32
|
if (!pnp)
|
|
17
|
-
return;
|
|
33
|
+
return () => cleanupGlossaryTriggers(container);
|
|
18
34
|
const glossaryOn = pnp.content?.glossaryOnScreen === true;
|
|
19
35
|
const kwTranslation = pnp.content?.keywordTranslation;
|
|
20
36
|
const kwOn = kwTranslation?.active === true && !!kwTranslation.languageCode;
|
|
21
|
-
|
|
22
|
-
|
|
37
|
+
const illustratedOn = pnp.content?.illustratedGlossary === true;
|
|
38
|
+
const platformSupports = pnp.content?.catalogSupports ?? {};
|
|
39
|
+
const hostSupports = getHostCatalogSupports(platformSupports);
|
|
40
|
+
const anyPlatformOn = PLATFORM_USAGES.some((support) => isSupportActive(getPlatformSupportPreference(platformSupports, support)));
|
|
41
|
+
if (!glossaryOn && !kwOn && !illustratedOn && !anyPlatformOn && hostSupports.length === 0)
|
|
42
|
+
return () => cleanupGlossaryTriggers(container);
|
|
23
43
|
const terms = container.querySelectorAll('[data-catalog-idref]');
|
|
24
44
|
if (terms.length === 0)
|
|
25
|
-
return;
|
|
45
|
+
return () => cleanupGlossaryTriggers(container);
|
|
26
46
|
// Track open popup so only one is open at a time
|
|
27
47
|
let currentCleanup = null;
|
|
28
48
|
for (const termEl of Array.from(terms)) {
|
|
29
49
|
const idref = termEl.getAttribute('data-catalog-idref');
|
|
30
50
|
if (!idref)
|
|
31
51
|
continue;
|
|
52
|
+
const stimulusIdentifier = getStimulusIdentifier(termEl);
|
|
32
53
|
// Wrap term in a relative-positioned span so we can position popup against it
|
|
33
54
|
const wrapper = document.createElement('span');
|
|
34
55
|
wrapper.className = 'qti-catalog-term';
|
|
@@ -36,7 +57,7 @@ export function applyGlossaryTriggers(container, player) {
|
|
|
36
57
|
termEl.parentNode?.insertBefore(wrapper, termEl);
|
|
37
58
|
wrapper.appendChild(termEl);
|
|
38
59
|
if (glossaryOn) {
|
|
39
|
-
const btn = createTriggerButton(termEl.textContent ?? idref, 'glossary-on-screen');
|
|
60
|
+
const btn = createTriggerButton(termEl.textContent ?? idref, 'glossary-on-screen', 'Show definition');
|
|
40
61
|
wrapper.appendChild(btn);
|
|
41
62
|
btn.addEventListener('click', () => {
|
|
42
63
|
if (currentCleanup) {
|
|
@@ -44,7 +65,7 @@ export function applyGlossaryTriggers(container, player) {
|
|
|
44
65
|
currentCleanup = null;
|
|
45
66
|
return;
|
|
46
67
|
}
|
|
47
|
-
const html = player.getCatalogEntry(idref, 'glossary-on-screen');
|
|
68
|
+
const html = player.getCatalogEntry(idref, 'glossary-on-screen', undefined, { stimulusIdentifier });
|
|
48
69
|
if (html !== null) {
|
|
49
70
|
currentCleanup = mountPopup(wrapper, termEl.textContent ?? idref, html, btn, player, () => {
|
|
50
71
|
currentCleanup = null;
|
|
@@ -54,7 +75,7 @@ export function applyGlossaryTriggers(container, player) {
|
|
|
54
75
|
}
|
|
55
76
|
if (kwOn) {
|
|
56
77
|
const lang = kwTranslation.languageCode;
|
|
57
|
-
const btn = createTriggerButton(termEl.textContent ?? idref, 'keyword-translation');
|
|
78
|
+
const btn = createTriggerButton(termEl.textContent ?? idref, 'keyword-translation', 'Show translation');
|
|
58
79
|
wrapper.appendChild(btn);
|
|
59
80
|
btn.addEventListener('click', () => {
|
|
60
81
|
if (currentCleanup) {
|
|
@@ -62,7 +83,7 @@ export function applyGlossaryTriggers(container, player) {
|
|
|
62
83
|
currentCleanup = null;
|
|
63
84
|
return;
|
|
64
85
|
}
|
|
65
|
-
const html = player.getCatalogEntry(idref, 'keyword-translation', lang);
|
|
86
|
+
const html = player.getCatalogEntry(idref, 'keyword-translation', lang, { stimulusIdentifier });
|
|
66
87
|
if (html !== null) {
|
|
67
88
|
currentCleanup = mountPopup(wrapper, termEl.textContent ?? idref, html, btn, player, () => {
|
|
68
89
|
currentCleanup = null;
|
|
@@ -70,28 +91,118 @@ export function applyGlossaryTriggers(container, player) {
|
|
|
70
91
|
}
|
|
71
92
|
});
|
|
72
93
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
94
|
+
if (illustratedOn) {
|
|
95
|
+
const btn = createTriggerButton(termEl.textContent ?? idref, ILLUSTRATED_GLOSSARY_USAGE, 'Show illustrated glossary');
|
|
96
|
+
wrapper.appendChild(btn);
|
|
97
|
+
btn.addEventListener('click', () => {
|
|
98
|
+
if (currentCleanup) {
|
|
99
|
+
currentCleanup();
|
|
100
|
+
currentCleanup = null;
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const html = player.getCatalogEntry(idref, ILLUSTRATED_GLOSSARY_USAGE, undefined, { stimulusIdentifier });
|
|
104
|
+
if (html !== null) {
|
|
105
|
+
currentCleanup = mountPopup(wrapper, termEl.textContent ?? idref, html, btn, player, () => {
|
|
106
|
+
currentCleanup = null;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
for (const support of PLATFORM_USAGES) {
|
|
112
|
+
const preference = getPlatformSupportPreference(platformSupports, support);
|
|
113
|
+
if (!isSupportActive(preference))
|
|
114
|
+
continue;
|
|
115
|
+
addHostCatalogSupportButton(wrapper, termEl, idref, {
|
|
116
|
+
...support,
|
|
117
|
+
languageCode: getSupportLanguageCode(preference),
|
|
118
|
+
}, player, stimulusIdentifier);
|
|
119
|
+
}
|
|
120
|
+
for (const support of hostSupports) {
|
|
121
|
+
addHostCatalogSupportButton(wrapper, termEl, idref, support, player, stimulusIdentifier);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return () => {
|
|
125
|
+
currentCleanup?.();
|
|
126
|
+
cleanupGlossaryTriggers(container);
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
export function cleanupGlossaryTriggers(container) {
|
|
130
|
+
for (const wrapper of Array.from(container.querySelectorAll('.qti-catalog-term'))) {
|
|
131
|
+
const term = Array.from(wrapper.children).find((child) => child.getAttribute?.('data-catalog-idref') !== null);
|
|
132
|
+
if (term && wrapper.parentNode) {
|
|
133
|
+
wrapper.parentNode.insertBefore(term, wrapper);
|
|
83
134
|
}
|
|
135
|
+
wrapper.remove();
|
|
84
136
|
}
|
|
85
137
|
}
|
|
86
|
-
function createTriggerButton(termText, usage) {
|
|
138
|
+
function createTriggerButton(termText, usage, labelPrefix, text) {
|
|
87
139
|
const btn = document.createElement('button');
|
|
88
140
|
btn.type = 'button';
|
|
89
141
|
btn.className = 'qti-catalog-trigger';
|
|
90
|
-
btn.
|
|
142
|
+
btn.style.cssText =
|
|
143
|
+
'display:inline-flex;align-items:center;justify-content:center;min-width:1.75rem;min-height:1.75rem;margin-inline:0.25rem;line-height:1;';
|
|
144
|
+
btn.setAttribute('aria-label', `${labelPrefix}: ${termText}`);
|
|
91
145
|
btn.setAttribute('data-catalog-usage', usage);
|
|
92
|
-
btn.textContent = usage === 'keyword-translation' ? 'T' : '?';
|
|
146
|
+
btn.textContent = text ?? (usage === 'keyword-translation' ? 'T' : usage === ILLUSTRATED_GLOSSARY_USAGE ? 'I' : '?');
|
|
93
147
|
return btn;
|
|
94
148
|
}
|
|
149
|
+
function addHostCatalogSupportButton(wrapper, termEl, idref, support, player, stimulusIdentifier) {
|
|
150
|
+
const html = player.getCatalogEntry(idref, support.usage, support.languageCode, { stimulusIdentifier });
|
|
151
|
+
if (html === null)
|
|
152
|
+
return;
|
|
153
|
+
const btn = createTriggerButton(termEl.textContent ?? idref, support.usage, support.label, support.text);
|
|
154
|
+
wrapper.appendChild(btn);
|
|
155
|
+
btn.addEventListener('click', () => {
|
|
156
|
+
btn.dispatchEvent(new CustomEvent('qti-catalog-lookup', {
|
|
157
|
+
bubbles: true,
|
|
158
|
+
composed: true,
|
|
159
|
+
detail: { idref, usage: support.usage, html, content: html, languageCode: support.languageCode },
|
|
160
|
+
}));
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
function getStimulusIdentifier(termEl) {
|
|
164
|
+
const scopeEl = termEl.closest?.('[data-stimulus-idref]');
|
|
165
|
+
const identifier = scopeEl?.getAttribute?.('data-stimulus-idref')?.trim();
|
|
166
|
+
return identifier || undefined;
|
|
167
|
+
}
|
|
168
|
+
function getHostCatalogSupports(platformSupports) {
|
|
169
|
+
return Object.entries(platformSupports)
|
|
170
|
+
.map(([usage, preference]) => ({ usage: normalizeCatalogUsage(usage), preference }))
|
|
171
|
+
.filter(({ usage, preference }) => usage !== null && isSupportActive(preference) && !isReservedCatalogUsage(usage))
|
|
172
|
+
.map(({ usage, preference }) => ({
|
|
173
|
+
usage: usage,
|
|
174
|
+
label: `Request ${usage.replace(/[-_]+/g, ' ')}`,
|
|
175
|
+
text: usage.slice(0, 1).toUpperCase(),
|
|
176
|
+
languageCode: getSupportLanguageCode(preference),
|
|
177
|
+
}));
|
|
178
|
+
}
|
|
179
|
+
function getPlatformSupportPreference(platformSupports, support) {
|
|
180
|
+
return platformSupports[support.flag] ?? platformSupports[support.usage];
|
|
181
|
+
}
|
|
182
|
+
function isSupportActive(preference) {
|
|
183
|
+
if (preference === undefined)
|
|
184
|
+
return false;
|
|
185
|
+
if (typeof preference === 'boolean')
|
|
186
|
+
return preference;
|
|
187
|
+
return preference.active !== false;
|
|
188
|
+
}
|
|
189
|
+
function getSupportLanguageCode(preference) {
|
|
190
|
+
if (!preference || typeof preference === 'boolean')
|
|
191
|
+
return undefined;
|
|
192
|
+
const languageCode = preference.languageCode?.trim();
|
|
193
|
+
if (!languageCode || !/^[a-zA-Z]{2,8}(?:-[a-zA-Z0-9]{1,8})*$/.test(languageCode))
|
|
194
|
+
return undefined;
|
|
195
|
+
return languageCode;
|
|
196
|
+
}
|
|
197
|
+
function normalizeCatalogUsage(value) {
|
|
198
|
+
const usage = value.trim().toLowerCase();
|
|
199
|
+
if (!SAFE_CATALOG_USAGE.test(usage))
|
|
200
|
+
return null;
|
|
201
|
+
return usage;
|
|
202
|
+
}
|
|
203
|
+
function isReservedCatalogUsage(usage) {
|
|
204
|
+
return RESERVED_PLATFORM_FLAGS.has(usage) || RESERVED_PLATFORM_USAGES.has(usage) || BUILT_IN_POPUP_USAGES.has(usage);
|
|
205
|
+
}
|
|
95
206
|
/**
|
|
96
207
|
* Mount a catalog popup via the component registry. Falls back to a minimal
|
|
97
208
|
* vanilla-JS popup if no 'catalogPopup' component is registered (e.g. in tests
|
|
@@ -100,6 +211,15 @@ function createTriggerButton(termText, usage) {
|
|
|
100
211
|
function mountPopup(anchor, label, html, triggerBtn, player, onClose) {
|
|
101
212
|
const registry = player.getComponentRegistry();
|
|
102
213
|
let popupEl;
|
|
214
|
+
let closed = false;
|
|
215
|
+
function cleanup() {
|
|
216
|
+
if (closed)
|
|
217
|
+
return;
|
|
218
|
+
closed = true;
|
|
219
|
+
popupEl.remove();
|
|
220
|
+
triggerBtn.focus();
|
|
221
|
+
onClose();
|
|
222
|
+
}
|
|
103
223
|
const catalogPopupTag = registry.getTagNameForType('catalogPopup');
|
|
104
224
|
if (catalogPopupTag !== null) {
|
|
105
225
|
const el = document.createElement(catalogPopupTag);
|
|
@@ -111,21 +231,16 @@ function mountPopup(anchor, label, html, triggerBtn, player, onClose) {
|
|
|
111
231
|
}
|
|
112
232
|
else {
|
|
113
233
|
// Minimal fallback for environments without default-components
|
|
114
|
-
popupEl = buildFallbackPopup(label, html);
|
|
234
|
+
popupEl = buildFallbackPopup(label, html, cleanup);
|
|
115
235
|
anchor.appendChild(popupEl);
|
|
116
236
|
}
|
|
117
|
-
function cleanup() {
|
|
118
|
-
popupEl.remove();
|
|
119
|
-
triggerBtn.focus();
|
|
120
|
-
onClose();
|
|
121
|
-
}
|
|
122
237
|
return cleanup;
|
|
123
238
|
}
|
|
124
239
|
/**
|
|
125
240
|
* Minimal accessible fallback popup used when no catalogPopup component is registered.
|
|
126
241
|
* Uses DaisyUI card classes where available; degrades gracefully without them.
|
|
127
242
|
*/
|
|
128
|
-
function buildFallbackPopup(label, html) {
|
|
243
|
+
function buildFallbackPopup(label, html, close) {
|
|
129
244
|
const popup = document.createElement('div');
|
|
130
245
|
popup.className = 'card card-bordered bg-base-100 shadow-lg qti-catalog-popup';
|
|
131
246
|
popup.setAttribute('role', 'dialog');
|
|
@@ -186,7 +301,7 @@ function buildFallbackPopup(label, html) {
|
|
|
186
301
|
}
|
|
187
302
|
}
|
|
188
303
|
popup.addEventListener('keydown', handleKeyDown);
|
|
189
|
-
closeBtn.addEventListener('click', () =>
|
|
304
|
+
closeBtn.addEventListener('click', () => close());
|
|
190
305
|
// Move focus in on next tick
|
|
191
306
|
setTimeout(() => closeBtn.focus(), 0);
|
|
192
307
|
return popup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glossaryAction.d.ts","sourceRoot":"","sources":["../../src/catalog/glossaryAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,WAAW,oBAAoB;IACpC,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,oBAAoB;
|
|
1
|
+
{"version":3,"file":"glossaryAction.d.ts","sourceRoot":"","sources":["../../src/catalog/glossaryAction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,WAAW,oBAAoB;IACpC,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,oBAAoB;sBAQ1D,oBAAoB;;EAcvC"}
|
|
@@ -8,14 +8,24 @@ import { applyGlossaryTriggers } from './applyGlossaryTriggers.js';
|
|
|
8
8
|
* so the walk always runs on fresh markup.
|
|
9
9
|
*/
|
|
10
10
|
export function glossaryAction(node, params) {
|
|
11
|
-
applyGlossaryTriggers(node, params.player);
|
|
11
|
+
let cleanup = applyGlossaryTriggers(node, params.player);
|
|
12
|
+
let unsubscribePnp = params.player.onPnpChange?.(() => {
|
|
13
|
+
cleanup();
|
|
14
|
+
cleanup = applyGlossaryTriggers(node, params.player);
|
|
15
|
+
}) ?? (() => { });
|
|
12
16
|
return {
|
|
13
17
|
update(newParams) {
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
cleanup();
|
|
19
|
+
unsubscribePnp();
|
|
20
|
+
cleanup = applyGlossaryTriggers(node, newParams.player);
|
|
21
|
+
unsubscribePnp = newParams.player.onPnpChange?.(() => {
|
|
22
|
+
cleanup();
|
|
23
|
+
cleanup = applyGlossaryTriggers(node, newParams.player);
|
|
24
|
+
}) ?? (() => { });
|
|
16
25
|
},
|
|
17
26
|
destroy() {
|
|
18
|
-
|
|
27
|
+
unsubscribePnp();
|
|
28
|
+
cleanup();
|
|
19
29
|
},
|
|
20
30
|
};
|
|
21
31
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ResolvedItemDeliveryContext } from '@pie-qti/ims-cp-core';
|
|
2
|
+
export type StimulusSanitizer = (html: string) => string;
|
|
3
|
+
/**
|
|
4
|
+
* Build the effective stimulus content map for an item render.
|
|
5
|
+
*
|
|
6
|
+
* Resolved delivery-context content is the package/assessment source of truth.
|
|
7
|
+
* Explicit content remains as a compatibility override for older host wiring.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildEffectiveStimulusContent(deliveryContext: ResolvedItemDeliveryContext | undefined, explicitStimulusContent: Record<string, string>, sanitize: StimulusSanitizer): Record<string, string>;
|
|
10
|
+
/**
|
|
11
|
+
* Inject shared stimulus bodies at QTI refs or host-authored docking points.
|
|
12
|
+
*
|
|
13
|
+
* Any resolved stimulus that has no matching docking point is prepended in
|
|
14
|
+
* delivery-context order so undocked package content is still visible.
|
|
15
|
+
*/
|
|
16
|
+
export declare function injectStimulusContent(itemBodyHtml: string, stimulusContent: Record<string, string>): string;
|
|
17
|
+
//# sourceMappingURL=stimulusRender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stimulusRender.d.ts","sourceRoot":"","sources":["../../../src/components/utils/stimulusRender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;AAEzD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAC5C,eAAe,EAAE,2BAA2B,GAAG,SAAS,EACxD,uBAAuB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/C,QAAQ,EAAE,iBAAiB,GACzB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAWxB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAoC3G"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Build the effective stimulus content map for an item render.
|
|
3
|
+
*
|
|
4
|
+
* Resolved delivery-context content is the package/assessment source of truth.
|
|
5
|
+
* Explicit content remains as a compatibility override for older host wiring.
|
|
6
|
+
*/
|
|
7
|
+
export function buildEffectiveStimulusContent(deliveryContext, explicitStimulusContent, sanitize) {
|
|
8
|
+
const resolved = Object.fromEntries(Object.entries(deliveryContext?.stimuli ?? {}).map(([identifier, stimulus]) => [
|
|
9
|
+
identifier,
|
|
10
|
+
sanitize(stimulus.bodyHtml),
|
|
11
|
+
]));
|
|
12
|
+
const explicit = Object.fromEntries(Object.entries(explicitStimulusContent).map(([identifier, content]) => [identifier, sanitize(content)]));
|
|
13
|
+
return { ...resolved, ...explicit };
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Inject shared stimulus bodies at QTI refs or host-authored docking points.
|
|
17
|
+
*
|
|
18
|
+
* Any resolved stimulus that has no matching docking point is prepended in
|
|
19
|
+
* delivery-context order so undocked package content is still visible.
|
|
20
|
+
*/
|
|
21
|
+
export function injectStimulusContent(itemBodyHtml, stimulusContent) {
|
|
22
|
+
if (Object.keys(stimulusContent).length === 0)
|
|
23
|
+
return itemBodyHtml;
|
|
24
|
+
const docked = new Set();
|
|
25
|
+
let html = itemBodyHtml.replace(/<([a-z][\w:-]*)([^>]*\bdata-stimulus-idref=(["'])([^"']+)\3[^>]*)>\s*<\/\1>/gi, (match, tagName, attrs, _quote, identifier) => {
|
|
26
|
+
const content = stimulusContent[identifier];
|
|
27
|
+
if (!content)
|
|
28
|
+
return match;
|
|
29
|
+
docked.add(identifier);
|
|
30
|
+
return `<${tagName}${mergeClassAttribute(attrs, 'qti-stimulus-dock')}>${content}</${tagName}>`;
|
|
31
|
+
});
|
|
32
|
+
html = html.replace(/<qti-assessment-stimulus-ref\b([^>]*)\/?>\s*(?:<\/qti-assessment-stimulus-ref>)?/gi, (match, attrs) => {
|
|
33
|
+
const identifier = extractAttribute(attrs, 'identifier');
|
|
34
|
+
if (!identifier)
|
|
35
|
+
return match;
|
|
36
|
+
if (docked.has(identifier))
|
|
37
|
+
return '';
|
|
38
|
+
const content = stimulusContent[identifier];
|
|
39
|
+
if (!content)
|
|
40
|
+
return match;
|
|
41
|
+
docked.add(identifier);
|
|
42
|
+
return `<div data-stimulus-idref="${escapeHtmlAttribute(identifier)}" class="qti-stimulus-dock">${content}</div>`;
|
|
43
|
+
});
|
|
44
|
+
const undocked = Object.entries(stimulusContent)
|
|
45
|
+
.filter(([identifier]) => !docked.has(identifier))
|
|
46
|
+
.map(([identifier, content]) => `<div data-stimulus-idref="${escapeHtmlAttribute(identifier)}" class="qti-stimulus-block">${content}</div>`)
|
|
47
|
+
.join('');
|
|
48
|
+
return undocked ? undocked + html : html;
|
|
49
|
+
}
|
|
50
|
+
function extractAttribute(attrs, name) {
|
|
51
|
+
const match = attrs.match(new RegExp(`\\b${name}\\s*=\\s*["']([^"']+)["']`, 'i'));
|
|
52
|
+
return match?.[1] ?? null;
|
|
53
|
+
}
|
|
54
|
+
function mergeClassAttribute(attrs, className) {
|
|
55
|
+
const classMatch = attrs.match(/\bclass\s*=\s*(["'])([^"']*)\1/i);
|
|
56
|
+
if (!classMatch)
|
|
57
|
+
return `${attrs} class="${className}"`;
|
|
58
|
+
const quote = classMatch[1];
|
|
59
|
+
const existing = classMatch[2] ?? '';
|
|
60
|
+
const classes = new Set(existing.split(/\s+/).filter(Boolean));
|
|
61
|
+
classes.add(className);
|
|
62
|
+
return attrs.replace(classMatch[0], `class=${quote}${Array.from(classes).join(' ')}${quote}`);
|
|
63
|
+
}
|
|
64
|
+
function escapeHtmlAttribute(value) {
|
|
65
|
+
return value
|
|
66
|
+
.replace(/&/g, '&')
|
|
67
|
+
.replace(/"/g, '"')
|
|
68
|
+
.replace(/</g, '<')
|
|
69
|
+
.replace(/>/g, '>');
|
|
70
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ResolvedItemDeliveryContext } from '@pie-qti/ims-cp-core';
|
|
2
|
+
export declare function buildScopedStylesheetCss(deliveryContext: ResolvedItemDeliveryContext | undefined, scopeSelector?: string): string;
|
|
3
|
+
export declare function scopeCssRules(css: string, scopeSelector?: string): string;
|
|
4
|
+
//# sourceMappingURL=stylesheetRender.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stylesheetRender.d.ts","sourceRoot":"","sources":["../../../src/components/utils/stylesheetRender.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAA4B,MAAM,sBAAsB,CAAC;AAIlG,wBAAgB,wBAAwB,CACvC,eAAe,EAAE,2BAA2B,GAAG,SAAS,EACxD,aAAa,SAA+B,GAC1C,MAAM,CAMR;AAWD,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,SAA+B,GAAG,MAAM,CAgB/F"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
const BLOCKED_CSS = /@import\b|url\s*\(|<\/style|expression\s*\(|javascript\s*:|vbscript\s*:|data\s*:/i;
|
|
2
|
+
export function buildScopedStylesheetCss(deliveryContext, scopeSelector = '[data-qti-item-body-scope]') {
|
|
3
|
+
if (!deliveryContext)
|
|
4
|
+
return '';
|
|
5
|
+
return deliveryContext.stylesheets
|
|
6
|
+
.map((stylesheet) => stylesheetToScopedCss(stylesheet, scopeSelector))
|
|
7
|
+
.filter(Boolean)
|
|
8
|
+
.join('\n');
|
|
9
|
+
}
|
|
10
|
+
function stylesheetToScopedCss(stylesheet, scopeSelector) {
|
|
11
|
+
const css = stylesheet.cssText?.trim();
|
|
12
|
+
if (!css || BLOCKED_CSS.test(css))
|
|
13
|
+
return '';
|
|
14
|
+
const stylesheetScope = getStylesheetScopeSelector(stylesheet, scopeSelector);
|
|
15
|
+
const scoped = scopeCssRules(css, stylesheetScope);
|
|
16
|
+
if (!scoped)
|
|
17
|
+
return '';
|
|
18
|
+
return scoped;
|
|
19
|
+
}
|
|
20
|
+
export function scopeCssRules(css, scopeSelector = '[data-qti-item-body-scope]') {
|
|
21
|
+
const withoutComments = css.replace(/\/\*[\s\S]*?\*\//g, '');
|
|
22
|
+
let scoped = '';
|
|
23
|
+
const rulePattern = /([^{}@]+)\{([^{}]*)\}/g;
|
|
24
|
+
for (const match of withoutComments.matchAll(rulePattern)) {
|
|
25
|
+
const selectorList = match[1]?.trim();
|
|
26
|
+
const declarations = match[2]?.trim();
|
|
27
|
+
if (!selectorList || !declarations)
|
|
28
|
+
continue;
|
|
29
|
+
const selectors = selectorList
|
|
30
|
+
.split(',')
|
|
31
|
+
.map((selector) => scopeSelectorText(selector.trim(), scopeSelector))
|
|
32
|
+
.filter(Boolean);
|
|
33
|
+
if (selectors.length === 0)
|
|
34
|
+
continue;
|
|
35
|
+
scoped += `${selectors.join(', ')} { ${declarations} }\n`;
|
|
36
|
+
}
|
|
37
|
+
return scoped.trim();
|
|
38
|
+
}
|
|
39
|
+
function getStylesheetScopeSelector(stylesheet, scopeSelector) {
|
|
40
|
+
if (stylesheet.source !== 'stimulus' || !stylesheet.stimulusIdentifier)
|
|
41
|
+
return scopeSelector;
|
|
42
|
+
return `${scopeSelector} [data-stimulus-idref="${escapeCssString(stylesheet.stimulusIdentifier)}"]`;
|
|
43
|
+
}
|
|
44
|
+
function scopeSelectorText(selector, scopeSelector) {
|
|
45
|
+
if (!selector)
|
|
46
|
+
return '';
|
|
47
|
+
if (selector.startsWith(scopeSelector))
|
|
48
|
+
return selector;
|
|
49
|
+
if (selector === ':root' || selector === 'html' || selector === 'body')
|
|
50
|
+
return scopeSelector;
|
|
51
|
+
if (selector.startsWith(':'))
|
|
52
|
+
return `${scopeSelector}${selector}`;
|
|
53
|
+
return `${scopeSelector} ${selector}`;
|
|
54
|
+
}
|
|
55
|
+
function escapeCssString(value) {
|
|
56
|
+
return value.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n|\r|\f/g, ' ');
|
|
57
|
+
}
|
package/dist/core/Player.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type DeclarationMap } from '@pie-qti/qti-processing';
|
|
2
|
+
import type { ResolvedItemDeliveryContext } from '@pie-qti/ims-cp-core';
|
|
2
3
|
import type { ExtractionRegistry } from '../extraction/ExtractionRegistry.js';
|
|
3
|
-
import type { AdaptiveAttemptResult, CompletionStatus, HtmlContent, ItemSessionState, PlayerConfig, PlayerSecurityConfig, RubricBlock, ScoringResult } from '../types/index.js';
|
|
4
|
+
import type { AdaptiveAttemptResult, CompletionStatus, HtmlContent, ItemSessionActionResult, ItemSessionState, PlayerConfig, PlayerSecurityConfig, RubricBlock, ScoringResult, SerializedItemSessionState } from '../types/index.js';
|
|
4
5
|
import type { InteractionData } from '../types/interactions.js';
|
|
5
6
|
import type { ResponseValidationResult } from '../types/responseValidation.js';
|
|
6
7
|
import type { ComponentRegistry } from './ComponentRegistry.js';
|
|
@@ -27,7 +28,13 @@ export declare class Player {
|
|
|
27
28
|
private _pnp;
|
|
28
29
|
private _rootEl;
|
|
29
30
|
private _catalogIndex;
|
|
31
|
+
private _stimulusCatalogIndexes;
|
|
30
32
|
private _pciHosts;
|
|
33
|
+
private _pnpChangeListeners;
|
|
34
|
+
private sessionGuid;
|
|
35
|
+
private lifecycleStatus;
|
|
36
|
+
private sessionStartedAt;
|
|
37
|
+
private accumulatedDurationMs;
|
|
31
38
|
constructor(config: PlayerConfig);
|
|
32
39
|
/**
|
|
33
40
|
* Apply the PNP profile to a player root element.
|
|
@@ -42,13 +49,20 @@ export declare class Player {
|
|
|
42
49
|
updatePnp(partial: Partial<PnpProfile>): void;
|
|
43
50
|
/** Return the current resolved PNP profile. */
|
|
44
51
|
getPnp(): PnpProfile | undefined;
|
|
52
|
+
onPnpChange(listener: (pnp: PnpProfile | undefined) => void): () => void;
|
|
53
|
+
/** Return the package/assessment-resolved delivery context, if one was supplied. */
|
|
54
|
+
getDeliveryContext(): ResolvedItemDeliveryContext | undefined;
|
|
45
55
|
/**
|
|
46
56
|
* Look up a catalog entry by card identifier, usage type, and optional language.
|
|
47
57
|
* Returns the HTML string for the matched entry, or null if not found.
|
|
48
58
|
*
|
|
49
59
|
* Language fallback: exact match → prefix match → no-lang entry → null.
|
|
50
60
|
*/
|
|
51
|
-
getCatalogEntry(idref: string, usage: string, lang?: string
|
|
61
|
+
getCatalogEntry(idref: string, usage: string, lang?: string, options?: {
|
|
62
|
+
stimulusIdentifier?: string;
|
|
63
|
+
}): string | null;
|
|
64
|
+
/** Sanitize externally resolved item-adjacent HTML before it reaches a rendering sink. */
|
|
65
|
+
sanitizeHtmlContent(html: string): string;
|
|
52
66
|
/**
|
|
53
67
|
* Create a PciHost for an extracted PCI and register it for response tracking.
|
|
54
68
|
* The caller is responsible for calling host.load() and
|
|
@@ -78,6 +92,17 @@ export declare class Player {
|
|
|
78
92
|
*/
|
|
79
93
|
destroy(): void;
|
|
80
94
|
processResponses(): ScoringResult;
|
|
95
|
+
saveItemSession(): SerializedItemSessionState;
|
|
96
|
+
restoreItemSession(state: SerializedItemSessionState): void;
|
|
97
|
+
suspendAttempt(): ItemSessionActionResult;
|
|
98
|
+
endAttempt(options?: {
|
|
99
|
+
countAttempt?: boolean;
|
|
100
|
+
validateResponses?: boolean;
|
|
101
|
+
}): ItemSessionActionResult;
|
|
102
|
+
scoreAttempt(): ItemSessionActionResult;
|
|
103
|
+
newTemplate(options?: {
|
|
104
|
+
resetResponses?: boolean;
|
|
105
|
+
}): ItemSessionActionResult;
|
|
81
106
|
getSecurityConfig(): PlayerSecurityConfig | undefined;
|
|
82
107
|
getTrustedTypesPolicyName(): string | undefined;
|
|
83
108
|
/**
|
|
@@ -111,6 +136,9 @@ export declare class Player {
|
|
|
111
136
|
*/
|
|
112
137
|
private validateStrictCompliance;
|
|
113
138
|
private resetOutcomesToDefault;
|
|
139
|
+
private resetResponsesToDefault;
|
|
140
|
+
private resetTemplatesToDefault;
|
|
141
|
+
private runResponseProcessing;
|
|
114
142
|
getItemBodyHtml(): HtmlContent;
|
|
115
143
|
/**
|
|
116
144
|
* Extract rubric blocks for the current role.
|
|
@@ -183,6 +211,13 @@ export declare class Player {
|
|
|
183
211
|
private parseInterpolationTable;
|
|
184
212
|
private ensureBuiltinDeclarations;
|
|
185
213
|
private applySessionState;
|
|
214
|
+
private applySerializedVariables;
|
|
215
|
+
private serializeItemSession;
|
|
216
|
+
private serializeVariable;
|
|
217
|
+
private qtiValueToSerializable;
|
|
218
|
+
private updateDuration;
|
|
219
|
+
private freezeDuration;
|
|
220
|
+
private getDuration;
|
|
186
221
|
private parseDefaultValue;
|
|
187
222
|
private parseCorrectResponse;
|
|
188
223
|
private parseMapping;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Player.d.ts","sourceRoot":"","sources":["../../src/core/Player.ts"],"names":[],"mappings":"AAAA,OAAO,EAWN,KAAK,cAAc,EAcnB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"Player.d.ts","sourceRoot":"","sources":["../../src/core/Player.ts"],"names":[],"mappings":"AAAA,OAAO,EAWN,KAAK,cAAc,EAcnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAUxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAI9E,OAAO,KAAK,EACX,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EAEX,uBAAuB,EACvB,gBAAgB,EAEhB,YAAY,EACZ,oBAAoB,EAEpB,WAAW,EACX,aAAa,EACb,0BAA0B,EAE1B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,wBAA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