@pie-players/pie-players-shared 1.0.0-beta.0 → 1.0.0-beta.10
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/LICENSE +21 -0
- package/README.md +18 -17
- package/dist/THIRD-PARTY-LICENSES.txt +51 -0
- package/dist/components/vendor/nds/README.md +43 -5
- package/dist/components/vendor/nds/nds-icon-button.d.ts +2 -2
- package/dist/components/vendor/nds/nds-icon-button.js +2 -2
- package/dist/i18n/catalogs.d.ts +25 -13
- package/dist/i18n/catalogs.js +30 -22
- package/dist/i18n/content-language.d.ts +77 -0
- package/dist/i18n/content-language.js +129 -0
- package/dist/i18n/index.d.ts +7 -2
- package/dist/i18n/index.js +5 -2
- package/dist/i18n/language-tags.d.ts +3 -55
- package/dist/i18n/language-tags.js +3 -90
- package/dist/i18n/locale-load-error.d.ts +35 -0
- package/dist/i18n/locale-load-error.js +30 -0
- package/dist/i18n/messages/en-US.d.ts +151 -7
- package/dist/i18n/messages/en-US.js +168 -7
- package/dist/i18n/provider.d.ts +122 -18
- package/dist/i18n/provider.js +315 -133
- package/dist/i18n/pseudo.d.ts +34 -0
- package/dist/i18n/pseudo.js +106 -0
- package/dist/i18n/types.d.ts +19 -3
- package/dist/index.d.ts +16 -20
- package/dist/index.js +19 -19
- package/dist/instrumentation/providers/CompositeInstrumentationProvider.js +2 -1
- package/dist/item-session-control/index.d.ts +16 -0
- package/dist/item-session-control/index.js +5 -0
- package/dist/{formative → item-session-control}/mastery.d.ts +5 -5
- package/dist/{formative → item-session-control}/mastery.js +3 -3
- package/dist/{formative → item-session-control}/outcome.d.ts +3 -3
- package/dist/{formative → item-session-control}/outcome.js +2 -2
- package/dist/{formative → item-session-control}/policy.d.ts +11 -11
- package/dist/{formative → item-session-control}/policy.js +12 -12
- package/dist/item-session-control/session.d.ts +19 -0
- package/dist/{formative → item-session-control}/session.js +12 -12
- package/dist/{formative → item-session-control}/state.d.ts +26 -26
- package/dist/{formative → item-session-control}/state.js +13 -13
- package/dist/{formative → item-session-control}/types.d.ts +38 -40
- package/dist/{formative → item-session-control}/types.js +2 -2
- package/dist/loaders/ElementLoader.d.ts +1 -1
- package/dist/loaders/element-loader.d.ts +4 -1
- package/dist/loaders/element-loader.js +74 -21
- package/dist/loaders/element-package-spec.d.ts +16 -0
- package/dist/loaders/element-package-spec.js +30 -0
- package/dist/loaders/esm-adapter.d.ts +12 -1
- package/dist/loaders/esm-adapter.js +113 -19
- package/dist/loaders/iife-adapter.d.ts +7 -0
- package/dist/loaders/iife-adapter.js +1 -1
- package/dist/loaders/index.d.ts +2 -1
- package/dist/loaders/index.js +2 -1
- package/dist/loaders/preloaded-registration.d.ts +18 -6
- package/dist/loaders/preloaded-registration.js +44 -9
- package/dist/object/index.d.ts +4 -1
- package/dist/object/index.js +8 -1
- package/dist/pie/config.d.ts +8 -0
- package/dist/pie/config.js +32 -1
- package/dist/pie/index.d.ts +2 -0
- package/dist/pie/index.js +1 -0
- package/dist/pie/math-rendering.d.ts +13 -1
- package/dist/pie/math-rendering.js +54 -1
- package/dist/pie/updates.d.ts +4 -1
- package/dist/pie/updates.js +21 -5
- package/dist/pie/versioned-tag.d.ts +10 -0
- package/dist/pie/versioned-tag.js +27 -0
- package/dist/promise/index.d.ts +10 -0
- package/dist/promise/index.js +16 -0
- package/dist/security/overwide-regions.js +65 -0
- package/dist/security/private-hosts.d.ts +27 -0
- package/dist/security/private-hosts.js +85 -0
- package/dist/security/validate-style-url.js +2 -2
- package/dist/security/wrap-overwide-images.d.ts +6 -2
- package/dist/security/wrap-overwide-images.js +5 -2
- package/dist/security/wrap-overwide-tables.d.ts +6 -2
- package/dist/security/wrap-overwide-tables.js +5 -2
- package/dist/security/wrap-overwide.d.ts +13 -0
- package/dist/security/wrap-overwide.js +68 -3
- package/dist/timed-media/index.d.ts +1 -1
- package/dist/timed-media/index.js +1 -1
- package/dist/timed-media/policy.d.ts +2 -2
- package/dist/timed-media/policy.js +2 -2
- package/dist/timed-media/session.d.ts +1 -1
- package/dist/timed-media/session.js +1 -1
- package/dist/timed-media/types.d.ts +11 -11
- package/dist/tools/term-lookup.d.ts +15 -0
- package/dist/tools/term-lookup.js +16 -0
- package/dist/types/index.d.ts +127 -47
- package/dist/types/interchange.d.ts +116 -0
- package/dist/types/interchange.js +1 -0
- package/dist/ui/content-styles-entry.d.ts +1 -0
- package/dist/ui/content-styles-entry.js +2 -0
- package/dist/ui/content-styles.d.ts +24 -3
- package/dist/ui/content-styles.js +114 -3
- package/dist/ui/focus-trap.d.ts +12 -0
- package/dist/ui/focus-trap.js +41 -1
- package/dist/ui/fontawesome.d.ts +51 -0
- package/dist/ui/fontawesome.js +122 -0
- package/dist/ui/ime.d.ts +6 -0
- package/dist/ui/ime.js +10 -0
- package/dist/ui/overlay-containment.d.ts +13 -0
- package/dist/ui/overlay-containment.js +23 -0
- package/dist/ui/overlay-placement.d.ts +28 -0
- package/dist/ui/overlay-placement.js +17 -2
- package/package.json +72 -36
- package/dist/formative/index.d.ts +0 -16
- package/dist/formative/index.js +0 -5
- package/dist/formative/session.d.ts +0 -19
- package/dist/i18n/messages/nl-NL.d.ts +0 -529
- package/dist/i18n/messages/nl-NL.js +0 -529
- package/dist/instrumentation/new-relic-agent.d.ts +0 -20
- package/dist/loaders/module-shim.d.ts +0 -12
- package/dist/pie/authoring-tag.d.ts +0 -6
- package/dist/pie/configure-initialization.d.ts +0 -21
- package/dist/pie/correct-response-env.d.ts +0 -3
- package/dist/pie/element-announcements.d.ts +0 -39
- package/dist/pie/elements-rendered.d.ts +0 -23
- package/dist/pie/initialize-element.d.ts +0 -26
- package/dist/pie/markup-math.d.ts +0 -20
- package/dist/pie/resource-monitor.d.ts +0 -217
- package/dist/security/sanitize-forbidden-lists.d.ts +0 -8
- package/dist/ui/pointer-rotate.d.ts +0 -29
- package/dist/ui/safe-storage.d.ts +0 -2
package/dist/i18n/index.d.ts
CHANGED
|
@@ -28,6 +28,11 @@ import type { I18nConfig, I18nServiceApi } from "./types.js";
|
|
|
28
28
|
*/
|
|
29
29
|
export declare function createPieI18n(config?: I18nConfig): I18nServiceApi;
|
|
30
30
|
export { BUNDLED_LOCALES, loadBundledCatalog } from "./catalogs.js";
|
|
31
|
-
export { findBestLanguageMatch, languageTagLookupSequence, languageTagsEqual, normalizeLanguageTag, toLanguageTag, } from "./language-tags.js";
|
|
32
|
-
export {
|
|
31
|
+
export { canonicalLanguageTag, findBestLanguageMatch, findClosestLanguageMatch, languageTagLookupSequence, languageTagScriptLookupSequence, languageTagsEqual, negotiateContentLanguage, normalizeLanguageTag, toLanguageTag, } from "./language-tags.js";
|
|
32
|
+
export type { ContentLanguageMatch } from "./language-tags.js";
|
|
33
|
+
export { DEFAULT_LOCALE, detectBrowserLocale, dynamicMessageKey, getDefaultI18n, hostChoseInterfaceLocale, isLocaleRequested, localeDirection, requestedInterfaceLocale, resolveInterfaceI18n, SimpleI18n, stampInterfaceLocale, } from "./provider.js";
|
|
34
|
+
export { type ContentLanguageAttributes, contentLanguageAttributes, defaultContentLanguage, firstStrongDirection, stampContentLanguage, UNDECLARED_CONTENT_LANGUAGE, undeclaredDirectionMismatch, } from "./content-language.js";
|
|
35
|
+
export { type InterfaceLocaleLoadErrorModel, reportInterfaceLocaleLoadError, } from "./locale-load-error.js";
|
|
36
|
+
export { PSEUDO_LOCALE_EXPANDED, PSEUDO_LOCALE_RTL, pseudoLocalize, } from "./pseudo.js";
|
|
37
|
+
export type { PseudoLocalizeOptions } from "./pseudo.js";
|
|
33
38
|
export type { BundledLocaleCode, DynamicMessageKey, I18nConfig, I18nProvider, I18nServiceApi, InterpolationValues, LocaleCode, MessageCatalog, MessageKey, MessageKeyInput, MessageNode, PluralOptions, PluralTranslation, TextDirection, TranslationBundle, } from "./types.js";
|
package/dist/i18n/index.js
CHANGED
|
@@ -35,5 +35,8 @@ export function createPieI18n(config = {}) {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
export { BUNDLED_LOCALES, loadBundledCatalog } from "./catalogs.js";
|
|
38
|
-
export { findBestLanguageMatch, languageTagLookupSequence, languageTagsEqual, normalizeLanguageTag, toLanguageTag, } from "./language-tags.js";
|
|
39
|
-
export { DEFAULT_LOCALE, detectBrowserLocale, dynamicMessageKey, getDefaultI18n, localeDirection, resolveInterfaceI18n, SimpleI18n, } from "./provider.js";
|
|
38
|
+
export { canonicalLanguageTag, findBestLanguageMatch, findClosestLanguageMatch, languageTagLookupSequence, languageTagScriptLookupSequence, languageTagsEqual, negotiateContentLanguage, normalizeLanguageTag, toLanguageTag, } from "./language-tags.js";
|
|
39
|
+
export { DEFAULT_LOCALE, detectBrowserLocale, dynamicMessageKey, getDefaultI18n, hostChoseInterfaceLocale, isLocaleRequested, localeDirection, requestedInterfaceLocale, resolveInterfaceI18n, SimpleI18n, stampInterfaceLocale, } from "./provider.js";
|
|
40
|
+
export { contentLanguageAttributes, defaultContentLanguage, firstStrongDirection, stampContentLanguage, UNDECLARED_CONTENT_LANGUAGE, undeclaredDirectionMismatch, } from "./content-language.js";
|
|
41
|
+
export { reportInterfaceLocaleLoadError, } from "./locale-load-error.js";
|
|
42
|
+
export { PSEUDO_LOCALE_EXPANDED, PSEUDO_LOCALE_RTL, pseudoLocalize, } from "./pseudo.js";
|
|
@@ -1,59 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* BCP-47 language tag comparison
|
|
3
|
-
*
|
|
4
|
-
* Deliberately carries no locale data and no DOM access: this module is the one
|
|
5
|
-
* piece of language machinery that everything else needs, including the
|
|
6
|
-
* accessibility catalog resolver and TTS voice selection, neither of which wants
|
|
7
|
-
* a message catalog. Importing `../i18n/index.js` would pull the eagerly-bundled
|
|
8
|
-
* English translations, so this stays a separate entry point.
|
|
9
|
-
*
|
|
10
|
-
* Content producers do not agree on tag syntax. The Learnosity transform emits
|
|
11
|
-
* POSIX `es_ES`, QTI catalog cards carry BCP-47 `xml:lang`, and pie-elements-ng
|
|
12
|
-
* carries a hand-written POSIX-to-BCP-47 mapping table of its own. Comparing
|
|
13
|
-
* with `===`, as the catalog resolver did, means an `es_ES` card matches no
|
|
14
|
-
* request for `es-ES` and surfaces only through a no-language-constraint
|
|
15
|
-
* fallback — resolution by accident.
|
|
2
|
+
* BCP-47 language tag comparison, from `@pie-players/pie-language-tags`, which
|
|
3
|
+
* pie-elements-ng's i18n engine imports too.
|
|
16
4
|
*
|
|
17
5
|
* @module @pie-players/pie-players-shared/i18n/language-tags
|
|
18
6
|
*/
|
|
19
|
-
|
|
20
|
-
* Canonicalize a language tag for comparison.
|
|
21
|
-
*
|
|
22
|
-
* Converts POSIX underscores to hyphens, strips a POSIX charset or modifier
|
|
23
|
-
* suffix (`es_ES.UTF-8`, `es_ES@euro`), and lowercases. Lowercasing rather than
|
|
24
|
-
* applying BCP-47 display casing is intentional — this output is a comparison
|
|
25
|
-
* key, not something to render. `toLanguageTag` is the form to render.
|
|
26
|
-
*
|
|
27
|
-
* Returns an empty string for nullish or blank input, which callers read as
|
|
28
|
-
* "this card declares no language".
|
|
29
|
-
*/
|
|
30
|
-
export declare function normalizeLanguageTag(tag: string | null | undefined): string;
|
|
31
|
-
/**
|
|
32
|
-
* A tag in BCP-47 syntax with its authored casing kept: POSIX underscores become
|
|
33
|
-
* hyphens, so `es_ES` renders as `es-ES`. The form for a `lang` attribute or a
|
|
34
|
-
* platform locale API.
|
|
35
|
-
*
|
|
36
|
-
* Returns an empty string for nullish or blank input.
|
|
37
|
-
*/
|
|
38
|
-
export declare function toLanguageTag(tag: string | null | undefined): string;
|
|
39
|
-
/**
|
|
40
|
-
* Whether two language tags denote the same locale, ignoring separator style and
|
|
41
|
-
* case. Two tags that both declare no language are not a match.
|
|
42
|
-
*/
|
|
43
|
-
export declare function languageTagsEqual(a: string | null | undefined, b: string | null | undefined): boolean;
|
|
44
|
-
/**
|
|
45
|
-
* The RFC 4647 lookup sequence for a tag, most specific first.
|
|
46
|
-
*
|
|
47
|
-
* `es-MX` yields `["es-mx", "es"]`, so a request for Mexican Spanish reaches a
|
|
48
|
-
* card tagged plain `es` without also reaching one tagged `es-ES`. Truncation
|
|
49
|
-
* never stops on a singleton subtag (`x`, `u`), per RFC 4647 §3.4, and never
|
|
50
|
-
* produces a bare region or script.
|
|
51
|
-
*/
|
|
52
|
-
export declare function languageTagLookupSequence(tag: string | null | undefined): string[];
|
|
53
|
-
/**
|
|
54
|
-
* Best available tag for a request, by RFC 4647 lookup, or `undefined` when
|
|
55
|
-
* nothing matches. Ranking is by the request's specificity rather than the
|
|
56
|
-
* candidates' order, so `es-MX` prefers an `es-MX` candidate over an `es` one
|
|
57
|
-
* however they were authored.
|
|
58
|
-
*/
|
|
59
|
-
export declare function findBestLanguageMatch(requested: string | null | undefined, available: readonly (string | null | undefined)[]): string | undefined;
|
|
7
|
+
export * from "@pie-players/pie-language-tags";
|
|
@@ -1,94 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* BCP-47 language tag comparison
|
|
3
|
-
*
|
|
4
|
-
* Deliberately carries no locale data and no DOM access: this module is the one
|
|
5
|
-
* piece of language machinery that everything else needs, including the
|
|
6
|
-
* accessibility catalog resolver and TTS voice selection, neither of which wants
|
|
7
|
-
* a message catalog. Importing `../i18n/index.js` would pull the eagerly-bundled
|
|
8
|
-
* English translations, so this stays a separate entry point.
|
|
9
|
-
*
|
|
10
|
-
* Content producers do not agree on tag syntax. The Learnosity transform emits
|
|
11
|
-
* POSIX `es_ES`, QTI catalog cards carry BCP-47 `xml:lang`, and pie-elements-ng
|
|
12
|
-
* carries a hand-written POSIX-to-BCP-47 mapping table of its own. Comparing
|
|
13
|
-
* with `===`, as the catalog resolver did, means an `es_ES` card matches no
|
|
14
|
-
* request for `es-ES` and surfaces only through a no-language-constraint
|
|
15
|
-
* fallback — resolution by accident.
|
|
2
|
+
* BCP-47 language tag comparison, from `@pie-players/pie-language-tags`, which
|
|
3
|
+
* pie-elements-ng's i18n engine imports too.
|
|
16
4
|
*
|
|
17
5
|
* @module @pie-players/pie-players-shared/i18n/language-tags
|
|
18
6
|
*/
|
|
19
|
-
|
|
20
|
-
* Canonicalize a language tag for comparison.
|
|
21
|
-
*
|
|
22
|
-
* Converts POSIX underscores to hyphens, strips a POSIX charset or modifier
|
|
23
|
-
* suffix (`es_ES.UTF-8`, `es_ES@euro`), and lowercases. Lowercasing rather than
|
|
24
|
-
* applying BCP-47 display casing is intentional — this output is a comparison
|
|
25
|
-
* key, not something to render. `toLanguageTag` is the form to render.
|
|
26
|
-
*
|
|
27
|
-
* Returns an empty string for nullish or blank input, which callers read as
|
|
28
|
-
* "this card declares no language".
|
|
29
|
-
*/
|
|
30
|
-
export function normalizeLanguageTag(tag) {
|
|
31
|
-
if (!tag)
|
|
32
|
-
return "";
|
|
33
|
-
const separatorsUnified = tag.trim().replace(/_/g, "-");
|
|
34
|
-
const withoutPosixSuffix = separatorsUnified.split(/[.@]/)[0];
|
|
35
|
-
return withoutPosixSuffix.toLowerCase();
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* A tag in BCP-47 syntax with its authored casing kept: POSIX underscores become
|
|
39
|
-
* hyphens, so `es_ES` renders as `es-ES`. The form for a `lang` attribute or a
|
|
40
|
-
* platform locale API.
|
|
41
|
-
*
|
|
42
|
-
* Returns an empty string for nullish or blank input.
|
|
43
|
-
*/
|
|
44
|
-
export function toLanguageTag(tag) {
|
|
45
|
-
return tag ? tag.trim().replace(/_/g, "-") : "";
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Whether two language tags denote the same locale, ignoring separator style and
|
|
49
|
-
* case. Two tags that both declare no language are not a match.
|
|
50
|
-
*/
|
|
51
|
-
export function languageTagsEqual(a, b) {
|
|
52
|
-
const left = normalizeLanguageTag(a);
|
|
53
|
-
if (!left)
|
|
54
|
-
return false;
|
|
55
|
-
return left === normalizeLanguageTag(b);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* The RFC 4647 lookup sequence for a tag, most specific first.
|
|
59
|
-
*
|
|
60
|
-
* `es-MX` yields `["es-mx", "es"]`, so a request for Mexican Spanish reaches a
|
|
61
|
-
* card tagged plain `es` without also reaching one tagged `es-ES`. Truncation
|
|
62
|
-
* never stops on a singleton subtag (`x`, `u`), per RFC 4647 §3.4, and never
|
|
63
|
-
* produces a bare region or script.
|
|
64
|
-
*/
|
|
65
|
-
export function languageTagLookupSequence(tag) {
|
|
66
|
-
const normalized = normalizeLanguageTag(tag);
|
|
67
|
-
if (!normalized)
|
|
68
|
-
return [];
|
|
69
|
-
const subtags = normalized.split("-");
|
|
70
|
-
const sequence = [];
|
|
71
|
-
for (let length = subtags.length; length > 0; length--) {
|
|
72
|
-
const candidate = subtags.slice(0, length);
|
|
73
|
-
// A trailing singleton introduces an extension with nothing left in it.
|
|
74
|
-
if (candidate.length > 1 && candidate[candidate.length - 1].length === 1) {
|
|
75
|
-
continue;
|
|
76
|
-
}
|
|
77
|
-
sequence.push(candidate.join("-"));
|
|
78
|
-
}
|
|
79
|
-
return sequence;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Best available tag for a request, by RFC 4647 lookup, or `undefined` when
|
|
83
|
-
* nothing matches. Ranking is by the request's specificity rather than the
|
|
84
|
-
* candidates' order, so `es-MX` prefers an `es-MX` candidate over an `es` one
|
|
85
|
-
* however they were authored.
|
|
86
|
-
*/
|
|
87
|
-
export function findBestLanguageMatch(requested, available) {
|
|
88
|
-
for (const step of languageTagLookupSequence(requested)) {
|
|
89
|
-
const hit = available.find((candidate) => normalizeLanguageTag(candidate) === step);
|
|
90
|
-
if (hit != null)
|
|
91
|
-
return hit;
|
|
92
|
-
}
|
|
93
|
-
return undefined;
|
|
94
|
-
}
|
|
7
|
+
export * from "@pie-players/pie-language-tags";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `framework-error` report for a failed interface-locale catalog load.
|
|
3
|
+
*
|
|
4
|
+
* Every locale driver — the toolkit through its error bus, the standalone item
|
|
5
|
+
* player and the reference assembly through this helper — reports the same
|
|
6
|
+
* failure the same way: a `framework-error` DOM event whose detail carries the
|
|
7
|
+
* `i18n-locale-load` kind with `recoverable: true`, because every key still
|
|
8
|
+
* resolves through the English fallback chain and the player renders — in the
|
|
9
|
+
* wrong language, which a host wants to know about.
|
|
10
|
+
*
|
|
11
|
+
* The shape mirrors the toolkit's `FrameworkErrorModel` field for field. It is
|
|
12
|
+
* declared here, narrowly, because the standalone item player does not depend
|
|
13
|
+
* on the toolkit and a type-only import would still drag it into the published
|
|
14
|
+
* declarations; what this module commits to is the fields below, which is what
|
|
15
|
+
* a host reading `.kind` and `.recoverable` consumes.
|
|
16
|
+
*/
|
|
17
|
+
export interface InterfaceLocaleLoadErrorModel {
|
|
18
|
+
kind: "i18n-locale-load";
|
|
19
|
+
source: string;
|
|
20
|
+
message: string;
|
|
21
|
+
details: string[];
|
|
22
|
+
recoverable: true;
|
|
23
|
+
scope: "runtime";
|
|
24
|
+
cause?: unknown;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Dispatches the recoverable load-failure report on `target` as a
|
|
28
|
+
* `bubbles`/`composed` `framework-error` event. No-op without a target, so a
|
|
29
|
+
* caller mounted as a plain component rather than an element stays silent.
|
|
30
|
+
*
|
|
31
|
+
* Failed loads are not cached: a later change of the `locale` attribute back
|
|
32
|
+
* to that locale, or recomposing the `i18n` provider, drives `setLocale` again
|
|
33
|
+
* and so retries.
|
|
34
|
+
*/
|
|
35
|
+
export declare function reportInterfaceLocaleLoadError(target: Element | null | undefined, source: string, cause: unknown): void;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dispatches the recoverable load-failure report on `target` as a
|
|
3
|
+
* `bubbles`/`composed` `framework-error` event. No-op without a target, so a
|
|
4
|
+
* caller mounted as a plain component rather than an element stays silent.
|
|
5
|
+
*
|
|
6
|
+
* Failed loads are not cached: a later change of the `locale` attribute back
|
|
7
|
+
* to that locale, or recomposing the `i18n` provider, drives `setLocale` again
|
|
8
|
+
* and so retries.
|
|
9
|
+
*/
|
|
10
|
+
export function reportInterfaceLocaleLoadError(target, source, cause) {
|
|
11
|
+
if (!target)
|
|
12
|
+
return;
|
|
13
|
+
const message = cause instanceof Error && cause.message.trim().length > 0
|
|
14
|
+
? cause.message
|
|
15
|
+
: String(cause ?? "Unknown catalog load failure");
|
|
16
|
+
const detail = {
|
|
17
|
+
kind: "i18n-locale-load",
|
|
18
|
+
source,
|
|
19
|
+
message,
|
|
20
|
+
details: [],
|
|
21
|
+
recoverable: true,
|
|
22
|
+
scope: "runtime",
|
|
23
|
+
cause,
|
|
24
|
+
};
|
|
25
|
+
target.dispatchEvent(new CustomEvent("framework-error", {
|
|
26
|
+
detail,
|
|
27
|
+
bubbles: true,
|
|
28
|
+
composed: true,
|
|
29
|
+
}));
|
|
30
|
+
}
|
|
@@ -57,6 +57,8 @@ declare const enUS: {
|
|
|
57
57
|
apply: string;
|
|
58
58
|
enabled: string;
|
|
59
59
|
disabled: string;
|
|
60
|
+
lookUp: string;
|
|
61
|
+
wordOrPhrase: string;
|
|
60
62
|
closeA11y: string;
|
|
61
63
|
settingsA11y: string;
|
|
62
64
|
};
|
|
@@ -89,6 +91,14 @@ declare const enUS: {
|
|
|
89
91
|
resizeMediaRegion: string;
|
|
90
92
|
resizeQuestionAndMediaA11y: string;
|
|
91
93
|
resizePassageAndMediaA11y: string;
|
|
94
|
+
resizePassageAndQuestionA11y: string;
|
|
95
|
+
passageWidthA11y: string;
|
|
96
|
+
/**
|
|
97
|
+
* The section player's navigation live region, announced when the active
|
|
98
|
+
* item changes; `{label}` is the item's own label when it has one.
|
|
99
|
+
*/
|
|
100
|
+
questionPositionA11y: string;
|
|
101
|
+
questionPositionLabeledA11y: string;
|
|
92
102
|
/**
|
|
93
103
|
* The assessment player's own section-to-section navigation. Its Back and
|
|
94
104
|
* Next controls take `common.back` / `common.next`.
|
|
@@ -99,16 +109,16 @@ declare const enUS: {
|
|
|
99
109
|
loadFailed: string;
|
|
100
110
|
restoreFailed: string;
|
|
101
111
|
};
|
|
102
|
-
/**
|
|
103
|
-
|
|
104
|
-
|
|
112
|
+
/** Item session control: check-answer control and its outcome announcements. */
|
|
113
|
+
check: {
|
|
114
|
+
answer: string;
|
|
105
115
|
tryAgain: string;
|
|
106
116
|
answerRecorded: string;
|
|
107
117
|
correct: string;
|
|
108
118
|
partlyCorrect: string;
|
|
109
119
|
notCorrect: string;
|
|
110
120
|
notAutoScored: string;
|
|
111
|
-
|
|
121
|
+
failed: string;
|
|
112
122
|
/**
|
|
113
123
|
* Appended after the outcome, so the announcement reads
|
|
114
124
|
* "Not correct. 2 tries left." Kept a separate plural group rather than
|
|
@@ -139,6 +149,29 @@ declare const enUS: {
|
|
|
139
149
|
playbackAdvisory: string;
|
|
140
150
|
playbackReleased: string;
|
|
141
151
|
};
|
|
152
|
+
/**
|
|
153
|
+
* `<pie-item-summary>`: an item described as a list row, without loading its
|
|
154
|
+
* elements. The correct marker's glyph is hidden from assistive technology,
|
|
155
|
+
* which reads `correctA11y` instead.
|
|
156
|
+
*/
|
|
157
|
+
summary: {
|
|
158
|
+
correctA11y: string;
|
|
159
|
+
answer: string;
|
|
160
|
+
manualScoring: string;
|
|
161
|
+
audio: string;
|
|
162
|
+
video: string;
|
|
163
|
+
};
|
|
164
|
+
/** `<pie-item-list>`. */
|
|
165
|
+
list: {
|
|
166
|
+
/** The row toggle, a disclosure button whose `aria-expanded` carries the state, so its label stays the same either way. */
|
|
167
|
+
expandA11y: string;
|
|
168
|
+
/** Names the block of an entry's search matches below its summary. */
|
|
169
|
+
highlights: string;
|
|
170
|
+
/** The row toggle's tooltip while the row is expanded: collapsing returns it to the summary. */
|
|
171
|
+
collapse: string;
|
|
172
|
+
/** Shown in an expanded row whose player failed to load; the summary keeps showing above it. */
|
|
173
|
+
playerError: string;
|
|
174
|
+
};
|
|
142
175
|
};
|
|
143
176
|
/** Toolbar and tool-shell chrome owned by the assessment toolkit. */
|
|
144
177
|
toolkit: {
|
|
@@ -159,17 +192,20 @@ declare const enUS: {
|
|
|
159
192
|
moveRightA11y: string;
|
|
160
193
|
moveUpA11y: string;
|
|
161
194
|
moveDownA11y: string;
|
|
162
|
-
|
|
163
|
-
|
|
195
|
+
narrowerA11y: string;
|
|
196
|
+
widerA11y: string;
|
|
197
|
+
shorterA11y: string;
|
|
198
|
+
tallerA11y: string;
|
|
164
199
|
centerA11y: string;
|
|
165
200
|
closeA11y: string;
|
|
166
201
|
};
|
|
167
202
|
/**
|
|
168
|
-
* The tap controls that move and
|
|
203
|
+
* The tap controls that move, turn and resize a placed tool without a
|
|
169
204
|
* drag. The move buttons reuse the `window` labels above.
|
|
170
205
|
*/
|
|
171
206
|
placement: {
|
|
172
207
|
controlsA11y: string;
|
|
208
|
+
moveAndResizeA11y: string;
|
|
173
209
|
rotateClockwiseA11y: string;
|
|
174
210
|
rotateCounterclockwiseA11y: string;
|
|
175
211
|
};
|
|
@@ -209,6 +245,7 @@ declare const enUS: {
|
|
|
209
245
|
toolA11y: string;
|
|
210
246
|
loading: string;
|
|
211
247
|
providerUnavailable: string;
|
|
248
|
+
initFailed: string;
|
|
212
249
|
};
|
|
213
250
|
graph: {
|
|
214
251
|
name: string;
|
|
@@ -264,6 +301,12 @@ declare const enUS: {
|
|
|
264
301
|
lanthanide: string;
|
|
265
302
|
actinide: string;
|
|
266
303
|
};
|
|
304
|
+
/** Standard-state phase, keyed by the data file's lowercased `phase` value. */
|
|
305
|
+
phaseValue: {
|
|
306
|
+
solid: string;
|
|
307
|
+
liquid: string;
|
|
308
|
+
gas: string;
|
|
309
|
+
};
|
|
267
310
|
};
|
|
268
311
|
ruler: {
|
|
269
312
|
name: string;
|
|
@@ -302,6 +345,15 @@ declare const enUS: {
|
|
|
302
345
|
buttonA11y: string;
|
|
303
346
|
tooltip: string;
|
|
304
347
|
toolA11y: string;
|
|
348
|
+
notConfigured: string;
|
|
349
|
+
idleHint: string;
|
|
350
|
+
lookingUp: string;
|
|
351
|
+
noEntryFor: string;
|
|
352
|
+
entriesCount: {
|
|
353
|
+
one: string;
|
|
354
|
+
other: string;
|
|
355
|
+
};
|
|
356
|
+
noEntryStatusFor: string;
|
|
305
357
|
};
|
|
306
358
|
pictureDictionary: {
|
|
307
359
|
name: string;
|
|
@@ -309,6 +361,15 @@ declare const enUS: {
|
|
|
309
361
|
buttonA11y: string;
|
|
310
362
|
tooltip: string;
|
|
311
363
|
toolA11y: string;
|
|
364
|
+
notConfigured: string;
|
|
365
|
+
idleHint: string;
|
|
366
|
+
lookingUp: string;
|
|
367
|
+
noEntryFor: string;
|
|
368
|
+
entriesCount: {
|
|
369
|
+
one: string;
|
|
370
|
+
other: string;
|
|
371
|
+
};
|
|
372
|
+
noEntryStatusFor: string;
|
|
312
373
|
};
|
|
313
374
|
/**
|
|
314
375
|
* The Spanish variants. Named in the interface locale like every other tool label —
|
|
@@ -341,15 +402,47 @@ declare const enUS: {
|
|
|
341
402
|
windowHeightAnnounce: string;
|
|
342
403
|
frameHeightAnnounce: string;
|
|
343
404
|
widthAnnounce: string;
|
|
405
|
+
shorterWindowA11y: string;
|
|
406
|
+
tallerWindowA11y: string;
|
|
407
|
+
shorterFrameA11y: string;
|
|
408
|
+
tallerFrameA11y: string;
|
|
409
|
+
narrowerA11y: string;
|
|
410
|
+
widerA11y: string;
|
|
344
411
|
applicationA11y: string;
|
|
345
412
|
resizeWindowFullA11y: string;
|
|
346
413
|
resizeFrameFullA11y: string;
|
|
347
414
|
};
|
|
415
|
+
magnification: {
|
|
416
|
+
name: string;
|
|
417
|
+
description: string;
|
|
418
|
+
buttonA11y: string;
|
|
419
|
+
tooltip: string;
|
|
420
|
+
roleA11y: string;
|
|
421
|
+
applicationA11y: string;
|
|
422
|
+
zoomIn: string;
|
|
423
|
+
zoomOut: string;
|
|
424
|
+
zoomLevel: string;
|
|
425
|
+
zoomAnnounce: string;
|
|
426
|
+
close: string;
|
|
427
|
+
resizeA11y: string;
|
|
428
|
+
resizeFullA11y: string;
|
|
429
|
+
sizeAnnounce: string;
|
|
430
|
+
narrowerA11y: string;
|
|
431
|
+
widerA11y: string;
|
|
432
|
+
shorterA11y: string;
|
|
433
|
+
tallerA11y: string;
|
|
434
|
+
};
|
|
348
435
|
answerEliminator: {
|
|
349
436
|
name: string;
|
|
350
437
|
description: string;
|
|
351
438
|
buttonA11y: string;
|
|
352
439
|
tooltip: string;
|
|
440
|
+
/** A choice's toggle; `{choice}` is the choice's own accessible name. */
|
|
441
|
+
toggleA11y: string;
|
|
442
|
+
/** Appended to an eliminated choice's label for assistive technology. */
|
|
443
|
+
eliminatedA11y: string;
|
|
444
|
+
/** Stands in for `{choice}` when a choice has no text of its own. */
|
|
445
|
+
unlabeledChoice: string;
|
|
353
446
|
};
|
|
354
447
|
highlighter: {
|
|
355
448
|
name: string;
|
|
@@ -375,6 +468,17 @@ declare const enUS: {
|
|
|
375
468
|
highlightPinkA11y: string;
|
|
376
469
|
highlightBlueA11y: string;
|
|
377
470
|
highlightGreenA11y: string;
|
|
471
|
+
selectionAvailableA11y: string;
|
|
472
|
+
highlightedYellowA11y: string;
|
|
473
|
+
highlightedPinkA11y: string;
|
|
474
|
+
highlightedBlueA11y: string;
|
|
475
|
+
highlightedGreenA11y: string;
|
|
476
|
+
underlinedA11y: string;
|
|
477
|
+
removedA11y: string;
|
|
478
|
+
clearedA11y: {
|
|
479
|
+
one: string;
|
|
480
|
+
other: string;
|
|
481
|
+
};
|
|
378
482
|
};
|
|
379
483
|
theme: {
|
|
380
484
|
name: string;
|
|
@@ -498,6 +602,30 @@ declare const enUS: {
|
|
|
498
602
|
toggleEventPanelA11y: string;
|
|
499
603
|
toggleDatabasePanelA11y: string;
|
|
500
604
|
toggleInstrumentationPanelA11y: string;
|
|
605
|
+
clear: string;
|
|
606
|
+
pause: string;
|
|
607
|
+
resume: string;
|
|
608
|
+
controllerUnavailable: string;
|
|
609
|
+
noMatchingEvents: string;
|
|
610
|
+
noSectionSessionYet: string;
|
|
611
|
+
eventLevelItem: string;
|
|
612
|
+
eventLevelSection: string;
|
|
613
|
+
instrumentationKindAll: string;
|
|
614
|
+
instrumentationKindEvent: string;
|
|
615
|
+
instrumentationKindError: string;
|
|
616
|
+
instrumentationKindMetric: string;
|
|
617
|
+
instrumentationKindUserContext: string;
|
|
618
|
+
instrumentationKindGlobalAttributes: string;
|
|
619
|
+
instrumentationFieldName: string;
|
|
620
|
+
instrumentationFieldKind: string;
|
|
621
|
+
instrumentationFieldProvider: string;
|
|
622
|
+
instrumentationFieldTimestamp: string;
|
|
623
|
+
instrumentationFieldValue: string;
|
|
624
|
+
instrumentationFieldError: string;
|
|
625
|
+
sessionDbAssessmentId: string;
|
|
626
|
+
sessionDbSectionId: string;
|
|
627
|
+
sessionDbAttemptId: string;
|
|
628
|
+
sessionDbMode: string;
|
|
501
629
|
/** PNP debugger. */
|
|
502
630
|
pnp: {
|
|
503
631
|
title: string;
|
|
@@ -517,6 +645,12 @@ declare const enUS: {
|
|
|
517
645
|
perToolDecisions: string;
|
|
518
646
|
policyDiagnostics: string;
|
|
519
647
|
profileReadOnly: string;
|
|
648
|
+
on: string;
|
|
649
|
+
effective: string;
|
|
650
|
+
needs: string;
|
|
651
|
+
hostSurfaceNotPlaced: string;
|
|
652
|
+
support: string;
|
|
653
|
+
prohibit: string;
|
|
520
654
|
};
|
|
521
655
|
/** TTS settings panel. */
|
|
522
656
|
tts: {
|
|
@@ -612,6 +746,16 @@ declare const enUS: {
|
|
|
612
746
|
previewHintGoogleSsml: string;
|
|
613
747
|
previewHintCustom: string;
|
|
614
748
|
previewHintTracking: string;
|
|
749
|
+
formatMp3: string;
|
|
750
|
+
formatOgg: string;
|
|
751
|
+
formatPcm: string;
|
|
752
|
+
sampleRate8000: string;
|
|
753
|
+
sampleRate16000: string;
|
|
754
|
+
sampleRate22050: string;
|
|
755
|
+
sampleRate24000: string;
|
|
756
|
+
apiEndpointPlaceholder: string;
|
|
757
|
+
languagePlaceholder: string;
|
|
758
|
+
ssml: string;
|
|
615
759
|
};
|
|
616
760
|
};
|
|
617
761
|
};
|