@pie-players/pie-tool-sign-language 0.3.50 → 0.3.66
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 +11 -9
- package/dist/index.d.ts +2 -2
- package/dist/src/sign-language-content.d.ts +9 -41
- package/dist/tool-sign-language.js +585 -616
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -37,12 +37,15 @@ placement: `activation: "region"` means there is no button to press, so a
|
|
|
37
37
|
`tools.placement` entry naming this capability is reported as unplaceable rather
|
|
38
38
|
than silently doing nothing.
|
|
39
39
|
|
|
40
|
-
**Content** — the item carries a matching `sign-language` catalog card. QTI
|
|
40
|
+
**Content** — the item or passage carries a matching `sign-language` catalog card. QTI
|
|
41
41
|
approximates AfA's DRD in-band: the presence of the card *is* the resource
|
|
42
42
|
declaration. This half is `requiresAuthoredContent.resolve`, and it is why a
|
|
43
|
-
learner with the accommodation still sees nothing on
|
|
43
|
+
learner with the accommodation still sees nothing on content that has no signed
|
|
44
|
+
alternate. The catalog resolver supplies an immutable owner snapshot after it
|
|
45
|
+
has applied entity/extracted/model traversal and registration precedence; this
|
|
46
|
+
package owns only card validation and sign-language matching.
|
|
44
47
|
|
|
45
|
-
A signed alternate reaches
|
|
48
|
+
A signed alternate reaches content one way only: as a catalog card, authored or
|
|
46
49
|
written by an importer. There is no path that lifts a signing video out of item
|
|
47
50
|
markup at render time — one was implemented and removed, because it had no
|
|
48
51
|
producer and failed in the wrong direction, leaving the video in visible content
|
|
@@ -50,12 +53,11 @@ for every learner when the markup could not be parsed.
|
|
|
50
53
|
|
|
51
54
|
## No cross-sign-language substitution
|
|
52
55
|
|
|
53
|
-
ASL, BSL and LSF are not interchangeable.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
asserts no language at all.
|
|
56
|
+
ASL, BSL and LSF are not interchangeable. Handing an ASL learner a BSL recording
|
|
57
|
+
is worse than handing them nothing. `resolveSignLanguageAlternate` scans the
|
|
58
|
+
owner snapshot for an exact requested-language match first, then permits an
|
|
59
|
+
unlabelled card as the only fallback. A card labelled with another sign language
|
|
60
|
+
is never substituted.
|
|
59
61
|
|
|
60
62
|
## The element
|
|
61
63
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CONTENT_MEDIA_SURFACE, SIGN_LANGUAGE_ELEMENT_TAG, signLanguageRegistration, } from './src/sign-language-registration.js';
|
|
2
2
|
export type { SignLanguageMedia } from './src/sign-language-cards.js';
|
|
3
3
|
export { AMERICAN_SIGN_LANGUAGE, describeSignLanguage, isSignLanguageCard, matchesRequestedSignLanguage, resolveSignLanguageMedia, SIGN_LANGUAGE_CATALOG_TYPE, } from './src/sign-language-cards.js';
|
|
4
|
-
export type { ResolvedSignLanguageAlternate,
|
|
5
|
-
export {
|
|
4
|
+
export type { ResolvedSignLanguageAlternate, SignLanguageLookupArgs, } from './src/sign-language-content.js';
|
|
5
|
+
export { resolveRequestedSignLanguage, resolveSignLanguageAlternate, resolveSignLanguageContent, SIGN_LANGUAGE_FEATURE_ID, } from './src/sign-language-content.js';
|
|
@@ -1,54 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ItemEntity } from '@pie-players/pie-players-shared/types';
|
|
1
|
+
import { CatalogOwnerSnapshot, ToolContentDependencyContext } from '@pie-players/pie-assessment-toolkit/tools/internal';
|
|
3
2
|
import { SignLanguageMedia } from './sign-language-cards.js';
|
|
4
3
|
/** QTI 3.0 / AfA support id gating signed alternates. */
|
|
5
4
|
export declare const SIGN_LANGUAGE_FEATURE_ID = "signLanguage";
|
|
6
|
-
/** A catalog on this item that carries at least one sign-language card. */
|
|
7
|
-
export interface SignLanguageCatalogRef {
|
|
8
|
-
catalogId: string;
|
|
9
|
-
/** Set when the catalog is owned by one model rather than the item root. */
|
|
10
|
-
modelId?: string;
|
|
11
|
-
}
|
|
12
5
|
export interface ResolvedSignLanguageAlternate extends SignLanguageMedia {
|
|
13
6
|
catalogId: string;
|
|
14
7
|
}
|
|
15
|
-
/**
|
|
16
|
-
* Collect the catalog identifiers on an item that carry signing cards.
|
|
17
|
-
*
|
|
18
|
-
* The region resolves through the catalog resolver, but the resolver is keyed by
|
|
19
|
-
* identifier within an owner scope — something has to say *which* identifiers
|
|
20
|
-
* this item put in play, and whether each belongs to the item or to one model.
|
|
21
|
-
* That is the same walk the runtime does when it registers an item's catalogs,
|
|
22
|
-
* so it is borrowed rather than repeated: a ref can only name a scope
|
|
23
|
-
* registration actually files under. Only the "does this catalog carry signing"
|
|
24
|
-
* filter is ours.
|
|
25
|
-
*
|
|
26
|
-
* The owner identity here is a placeholder: the assessment and section ids are
|
|
27
|
-
* not known at extraction time and are supplied by the caller at lookup time
|
|
28
|
-
* (see `resolveSignLanguageAlternate`). Nothing but `modelId` is read from the
|
|
29
|
-
* walk's contexts.
|
|
30
|
-
*/
|
|
31
|
-
export declare function collectSignLanguageCatalogRefs(item: ItemEntity | null | undefined): SignLanguageCatalogRef[];
|
|
32
8
|
export interface SignLanguageLookupArgs {
|
|
33
|
-
|
|
34
|
-
refs: SignLanguageCatalogRef[];
|
|
35
|
-
/** Owner context for the item, without `modelId` — added per ref. */
|
|
36
|
-
ownerContext: CatalogOwnerContext;
|
|
9
|
+
catalogs: CatalogOwnerSnapshot;
|
|
37
10
|
/** Sign language the learner is entitled to, ISO 639-3. */
|
|
38
11
|
requestedSignLang?: string;
|
|
39
12
|
}
|
|
40
13
|
/**
|
|
41
14
|
* Resolve the signed alternate to show for an item, or `null`.
|
|
42
15
|
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* requested type regardless of language, which for spoken content is helpful
|
|
48
|
-
* and for signing is not — handing an ASL learner a BSL recording is worse than
|
|
49
|
-
* handing them nothing. So a card the resolver returns by that rung is accepted
|
|
50
|
-
* only if its language actually matches, or if the card asserts no language at
|
|
51
|
-
* all.
|
|
16
|
+
* Owner scope, item/passage/model traversal and registration order are already
|
|
17
|
+
* represented by the snapshot. What remains capability-specific is the strict
|
|
18
|
+
* **no cross-sign-language substitution** rule: handing an ASL learner a BSL
|
|
19
|
+
* recording is worse than handing them nothing.
|
|
52
20
|
*
|
|
53
21
|
* MVP takes the first resolvable card: sample content is one recording per item.
|
|
54
22
|
* The refs stay per-node capable for when choice-level docking lands.
|
|
@@ -66,8 +34,8 @@ export declare function resolveRequestedSignLanguage(parameters: unknown): strin
|
|
|
66
34
|
* The registration's `requiresAuthoredContent` implementation: the whole
|
|
67
35
|
* content half behind the one call the host makes.
|
|
68
36
|
*
|
|
69
|
-
* The host supplies
|
|
70
|
-
*
|
|
71
|
-
*
|
|
37
|
+
* The host supplies one owner snapshot and learns only whether there is
|
|
38
|
+
* something to render. It never sees a catalog type, card shape, entity walk or
|
|
39
|
+
* sign-language code.
|
|
72
40
|
*/
|
|
73
41
|
export declare function resolveSignLanguageContent(context: ToolContentDependencyContext): ResolvedSignLanguageAlternate | null;
|