@pie-players/pie-tool-sign-language 0.3.74 → 1.0.0-beta.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 +12 -10
- package/custom-elements.json +65 -0
- package/dist/index.d.ts +1 -1
- package/dist/src/sign-language-content.d.ts +2 -2
- package/dist/src/sign-language-registration.d.ts +7 -1
- package/dist/src/sign-language-warnings.d.ts +2 -0
- package/dist/tool-sign-language.js +1080 -1071
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -5,11 +5,10 @@ of an item, docked beside its content.
|
|
|
5
5
|
|
|
6
6
|
This package is also the worked example of a capability contributed entirely from
|
|
7
7
|
outside the player. It is authored against
|
|
8
|
-
`@pie-players/pie-assessment-toolkit/tools/
|
|
8
|
+
`@pie-players/pie-assessment-toolkit/tools/registration` — the same entry point the
|
|
9
9
|
packaged registrations use — and `@pie-players/pie-section-player` reaches it only
|
|
10
|
-
through `ToolRegistry.getToolsBySurface("content-media")`. No package
|
|
11
|
-
|
|
12
|
-
this package.
|
|
10
|
+
through `ToolRegistry.getToolsBySurface("content-media")`. No package renders the
|
|
11
|
+
`sign-language` catalog type except this tool.
|
|
13
12
|
|
|
14
13
|
## Opting in
|
|
15
14
|
|
|
@@ -56,15 +55,15 @@ for every learner when the markup could not be parsed.
|
|
|
56
55
|
ASL, BSL and LSF are not interchangeable. Handing an ASL learner a BSL recording
|
|
57
56
|
is worse than handing them nothing. `resolveSignLanguageAlternate` scans the
|
|
58
57
|
owner snapshot for an exact requested-language match first, then permits an
|
|
59
|
-
|
|
58
|
+
unlabeled card as the only fallback. A card labeled with another sign language
|
|
60
59
|
is never substituted.
|
|
61
60
|
|
|
62
61
|
## The element
|
|
63
62
|
|
|
64
63
|
`<pie-tool-sign-language>` — open shadow root, mounted by the registration's
|
|
65
|
-
`renderSurface`, never authored directly.
|
|
66
|
-
alternate)
|
|
67
|
-
the action the learner just took wins.
|
|
64
|
+
`renderSurface`, never authored directly. Its prop is `media` (a resolved
|
|
65
|
+
alternate); read-aloud comes from the toolkit runtime context. Signing playback and
|
|
66
|
+
read-aloud pause each other, and the action the learner just took wins.
|
|
68
67
|
|
|
69
68
|
Sizing is driven by the recording's own frame shape, because signing needs height
|
|
70
69
|
for hands and face. Host overrides:
|
|
@@ -75,11 +74,14 @@ for hands and face. Host overrides:
|
|
|
75
74
|
| `--pie-section-player-item-media-min-height` | `220px` |
|
|
76
75
|
| `--pie-section-player-item-media-max-height` | `60vh` |
|
|
77
76
|
|
|
77
|
+
All three are registered `component-public` tokens.
|
|
78
|
+
|
|
78
79
|
The region's share of the card width, the drag-to-resize handle and the stacking
|
|
79
80
|
breakpoint belong to the host: that is the card's layout, not the capability's.
|
|
80
81
|
|
|
81
82
|
## Related
|
|
82
83
|
|
|
83
|
-
- [
|
|
84
|
-
- [`docs/TOOL_REGISTRY.md`](../assessment-toolkit/docs/TOOL_REGISTRY.md) — host
|
|
84
|
+
- [Tool registry](../assessment-toolkit/docs/TOOL_REGISTRY.md): host
|
|
85
85
|
surfaces and content dependencies
|
|
86
|
+
- [Sign language support](../../docs/prds/sign-language-asl-support.md): the
|
|
87
|
+
design record
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "2.1.0",
|
|
3
|
+
"modules": [
|
|
4
|
+
{
|
|
5
|
+
"kind": "javascript-module",
|
|
6
|
+
"path": "dist/tool-sign-language.js",
|
|
7
|
+
"declarations": [
|
|
8
|
+
{
|
|
9
|
+
"kind": "class",
|
|
10
|
+
"description": "Signed translation of one item or passage, shown in the host's content-media surface. The sign-language registration's `renderSurface` mounts it and sets `media` to a resolved catalog card; it plays that recording muted with native controls, held to the card's authored time slice, under a caption naming the sign language. Its playback and read-aloud through the toolkit runtime context's TTS service pause each other.",
|
|
11
|
+
"name": "SignLanguageMediaRegion",
|
|
12
|
+
"tagName": "pie-tool-sign-language",
|
|
13
|
+
"customElement": true,
|
|
14
|
+
"members": [
|
|
15
|
+
{
|
|
16
|
+
"kind": "field",
|
|
17
|
+
"name": "media",
|
|
18
|
+
"type": {
|
|
19
|
+
"text": "ResolvedSignLanguageAlternate | null"
|
|
20
|
+
},
|
|
21
|
+
"default": "null",
|
|
22
|
+
"attribute": "media"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"attributes": [
|
|
26
|
+
{
|
|
27
|
+
"name": "media",
|
|
28
|
+
"type": {
|
|
29
|
+
"text": "ResolvedSignLanguageAlternate | null"
|
|
30
|
+
},
|
|
31
|
+
"default": "null",
|
|
32
|
+
"fieldName": "media"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"cssProperties": [
|
|
36
|
+
{
|
|
37
|
+
"name": "--pie-section-player-item-media-aspect-ratio",
|
|
38
|
+
"description": "Public sizing hook for the item card media region; defaults to 3 / 4 because signed content needs height for hands and face. Geometry-only, but hosts must keep signing legible when overriding."
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "--pie-section-player-item-media-max-height",
|
|
42
|
+
"description": "Public ceiling for the item card media region; defaults to 60vh so a tall recording cannot push question content off screen. Geometry-only."
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "--pie-section-player-item-media-min-height",
|
|
46
|
+
"description": "Public legibility floor for the item card media region; defaults to 220px so a narrow content column cannot crush signed content. Geometry-only."
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"x-pie": {
|
|
50
|
+
"shadow": "open"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"exports": [
|
|
55
|
+
{
|
|
56
|
+
"kind": "custom-element-definition",
|
|
57
|
+
"name": "pie-tool-sign-language",
|
|
58
|
+
"declaration": {
|
|
59
|
+
"name": "SignLanguageMediaRegion"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CONTENT_MEDIA_SURFACE, SIGN_LANGUAGE_ELEMENT_TAG, signLanguageRegistration, } from './src/sign-language-registration.js';
|
|
1
|
+
export { CONTENT_MEDIA_SURFACE, SIGN_LANGUAGE_ELEMENT_TAG, SIGN_LANGUAGE_TOOL_TAG_MAP, 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
4
|
export type { ResolvedSignLanguageAlternate, SignLanguageLookupArgs, } from './src/sign-language-content.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CatalogOwnerSnapshot, ToolContentDependencyContext } from '@pie-players/pie-assessment-toolkit/tools/
|
|
1
|
+
import { CatalogOwnerSnapshot, ToolContentDependencyContext } from '@pie-players/pie-assessment-toolkit/tools/registration';
|
|
2
2
|
import { SignLanguageMedia } from './sign-language-cards.js';
|
|
3
3
|
/** QTI 3.0 / AfA support id gating signed alternates. */
|
|
4
4
|
export declare const SIGN_LANGUAGE_FEATURE_ID = "signLanguage";
|
|
@@ -25,7 +25,7 @@ export declare function resolveSignLanguageAlternate(args: SignLanguageLookupArg
|
|
|
25
25
|
/**
|
|
26
26
|
* Which sign language the learner is entitled to.
|
|
27
27
|
*
|
|
28
|
-
* Read from the feature's policy parameters (`toolParameters`
|
|
28
|
+
* Read from the feature's policy parameters (`toolParameters`),
|
|
29
29
|
* never inferred from the item's content language — a Spanish item's signed
|
|
30
30
|
* alternate is LSM, not ASL.
|
|
31
31
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToolRegistration } from '@pie-players/pie-assessment-toolkit/tools/
|
|
1
|
+
import { ToolRegistration } from '@pie-players/pie-assessment-toolkit/tools/registration';
|
|
2
2
|
/**
|
|
3
3
|
* Host surface this capability docks into: media beside a card's content.
|
|
4
4
|
*
|
|
@@ -9,4 +9,10 @@ import { ToolRegistration } from '@pie-players/pie-assessment-toolkit/tools/inte
|
|
|
9
9
|
export declare const CONTENT_MEDIA_SURFACE = "content-media";
|
|
10
10
|
/** Element tag this package registers. A host may substitute its own. */
|
|
11
11
|
export declare const SIGN_LANGUAGE_ELEMENT_TAG = "pie-tool-sign-language";
|
|
12
|
+
/**
|
|
13
|
+
* The tag mapping for this capability, in the shape `setComponentOverrides`
|
|
14
|
+
* takes. The registration falls back to it, so installing it is optional; a
|
|
15
|
+
* host `toolTagMap` entry for the same id wins.
|
|
16
|
+
*/
|
|
17
|
+
export declare const SIGN_LANGUAGE_TOOL_TAG_MAP: Readonly<Record<string, string>>;
|
|
12
18
|
export declare const signLanguageRegistration: ToolRegistration;
|