@pie-players/pie-default-tool-loaders 0.3.74 → 0.3.75
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 +47 -57
- package/dist/calculator-providers/CortexToolProvider.d.ts +1 -2
- package/dist/calculator-providers/CortexToolProvider.js +0 -1
- package/dist/calculator-providers/DesmosToolProvider.d.ts +1 -2
- package/dist/calculator-providers/DesmosToolProvider.js +0 -1
- package/dist/calculator-providers/GeoGebraToolProvider.d.ts +1 -2
- package/dist/calculator-providers/GeoGebraToolProvider.js +0 -1
- package/dist/calculator-providers/LazyCalculatorToolProvider.d.ts +2 -3
- package/dist/content-alternates.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/packaged-capability-composition.d.ts +17 -49
- package/dist/packaged-capability-composition.js +60 -261
- package/dist/registrations/accessibility-tools.d.ts +1 -5
- package/dist/registrations/accessibility-tools.js +6 -40
- package/dist/registrations/audio-transcript.d.ts +1 -1
- package/dist/registrations/audio-transcript.js +0 -1
- package/dist/registrations/calculator.d.ts +2 -6
- package/dist/registrations/calculator.js +9 -31
- package/dist/registrations/dictionary-tools.d.ts +6 -5
- package/dist/registrations/dictionary-tools.js +21 -26
- package/dist/registrations/interaction-tools.d.ts +1 -7
- package/dist/registrations/interaction-tools.js +22 -27
- package/dist/registrations/measurement-tools.d.ts +1 -5
- package/dist/registrations/measurement-tools.js +1 -17
- package/dist/registrations/overlay-element-cache.d.ts +3 -1
- package/dist/registrations/overlay-element-cache.js +2 -1
- package/dist/registrations/overlay-toolbar-render.d.ts +3 -10
- package/dist/registrations/overlay-toolbar-render.js +3 -7
- package/dist/registrations/selection-actions.d.ts +1 -1
- package/dist/registrations/selection-actions.js +1 -1
- package/dist/registrations/subject-specific-tools.d.ts +1 -5
- package/dist/registrations/subject-specific-tools.js +1 -15
- package/dist/registrations/tts.d.ts +1 -6
- package/dist/registrations/tts.js +36 -89
- package/package.json +22 -23
package/README.md
CHANGED
|
@@ -14,30 +14,29 @@ and how does the program tier them":
|
|
|
14
14
|
|
|
15
15
|
| Export | What it decides |
|
|
16
16
|
| --- | --- |
|
|
17
|
-
| `PACKAGED_TOOL_REGISTRATIONS`, `createPackagedToolRegistry
|
|
17
|
+
| `PACKAGED_TOOL_REGISTRATIONS`, `createPackagedToolRegistry` | Which capabilities exist, and their toolbar and surface contracts |
|
|
18
18
|
| `PACKAGED_TOOL_TAG_MAP` | Which custom element each one renders as |
|
|
19
|
-
| `
|
|
20
|
-
| `
|
|
21
|
-
| `DEFAULT_TOOL_MODULE_LOADERS
|
|
19
|
+
| `SECTION_PLAYER_PREFERRED_TOOL_PLACEMENT` | Where they appear and in what order |
|
|
20
|
+
| `createUniversalPersonalNeedsProfile`, `createEmptyPersonalNeedsProfile` | Which of them the program grants to everyone, or to no one |
|
|
21
|
+
| `DEFAULT_TOOL_MODULE_LOADERS` | When each one's bundle loads |
|
|
22
22
|
|
|
23
23
|
The individual registrations are exported too, so a host can compose its own set
|
|
24
24
|
rather than take the packaged one whole.
|
|
25
25
|
|
|
26
26
|
These exports are projections of one internal **Packaged Capability
|
|
27
27
|
Composition**. Each packaged capability is authored once with its registration,
|
|
28
|
-
element delivery, loader
|
|
28
|
+
element delivery, module loader, preferred placement and explicit
|
|
29
29
|
universal-support policy. The package build rejects contradictory PIE-owned data
|
|
30
|
-
— for example, a region capability with a toolbar tag, or a
|
|
31
|
-
|
|
30
|
+
— for example, a region capability with a toolbar tag, or a content-dependent
|
|
31
|
+
capability marked universal — so release tests find a missing facet
|
|
32
32
|
instead of a learner finding a dead affordance. The browser does not repeat that
|
|
33
33
|
strict gate at import time: a PIE authoring defect must block publication, not an
|
|
34
34
|
otherwise usable assessment.
|
|
35
35
|
|
|
36
|
-
That invariant boundary does not make host input stricter
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
known ids continue to register.
|
|
36
|
+
That invariant boundary does not make host input stricter: lazy module loading
|
|
37
|
+
is opt-in, registration/tag/factory overrides take precedence, an empty
|
|
38
|
+
`toolIds` array selects the full packaged set, and unknown selected ids are
|
|
39
|
+
ignored while known ids register.
|
|
41
40
|
|
|
42
41
|
## Usage
|
|
43
42
|
|
|
@@ -53,35 +52,27 @@ const registry = createPackagedToolRegistry({
|
|
|
53
52
|
});
|
|
54
53
|
```
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
module loader; hosts do not hand-maintain a second vendor map.
|
|
55
|
+
One loader set serves every host shape. `DEFAULT_TOOL_MODULE_LOADERS` holds a
|
|
56
|
+
loader per packaged capability, and a registry loads a module only when a tool
|
|
57
|
+
first renders, so an item player, a section player and an assessment player
|
|
58
|
+
pass the same set and load only the tools they place.
|
|
61
59
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
} from "@pie-players/pie-default-tool-loaders";
|
|
67
|
-
|
|
68
|
-
const calculatorProviderConfig = {
|
|
69
|
-
provider: {
|
|
70
|
-
id: "calculator-geogebra",
|
|
71
|
-
init: { appletTimeoutMs: 20_000 },
|
|
72
|
-
},
|
|
73
|
-
settings: { showResetIcon: true },
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
const registry = createPackagedToolRegistry({
|
|
77
|
-
calculatorProviderConfig,
|
|
78
|
-
toolModuleLoaders: createDefaultToolModuleLoaders({
|
|
79
|
-
calculatorProviderConfig,
|
|
80
|
-
}),
|
|
81
|
-
});
|
|
60
|
+
The calculator is one element, `<pie-tool-calculator>`, for every provider.
|
|
61
|
+
Desmos is the provider when none is configured; the toolkit picks another from
|
|
62
|
+
`tools.providers.calculator` when the element mounts, and an open calculator
|
|
63
|
+
remounts on the new provider when a tool-config update replaces it.
|
|
82
64
|
|
|
65
|
+
```ts
|
|
83
66
|
const tools = {
|
|
84
|
-
providers: {
|
|
67
|
+
providers: {
|
|
68
|
+
calculator: {
|
|
69
|
+
provider: {
|
|
70
|
+
id: "calculator-geogebra",
|
|
71
|
+
init: { appletTimeoutMs: 20_000 },
|
|
72
|
+
},
|
|
73
|
+
settings: { showResetIcon: true },
|
|
74
|
+
},
|
|
75
|
+
},
|
|
85
76
|
};
|
|
86
77
|
```
|
|
87
78
|
|
|
@@ -90,16 +81,16 @@ For an offline-capable calculator with no API key or runtime CDN, use
|
|
|
90
81
|
history, evaluation limit, allowed functions, clipboard policy, and graph
|
|
91
82
|
viewport options documented by `@pie-players/pie-calculator-cortex`.
|
|
92
83
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
A host composing its own set starts from the toolkit's empty `ToolRegistry`,
|
|
85
|
+
registers into it, and installs the tag map its registrations create elements
|
|
86
|
+
from.
|
|
96
87
|
|
|
97
88
|
```ts
|
|
98
89
|
import { ToolRegistry } from "@pie-players/pie-assessment-toolkit";
|
|
99
90
|
import {
|
|
100
91
|
calculatorToolRegistration,
|
|
92
|
+
DEFAULT_TOOL_MODULE_LOADERS,
|
|
101
93
|
PACKAGED_TOOL_TAG_MAP,
|
|
102
|
-
registerDefaultToolModuleLoaders,
|
|
103
94
|
ttsToolRegistration,
|
|
104
95
|
} from "@pie-players/pie-default-tool-loaders";
|
|
105
96
|
|
|
@@ -107,22 +98,21 @@ const registry = new ToolRegistry();
|
|
|
107
98
|
registry.register(calculatorToolRegistration);
|
|
108
99
|
registry.register(ttsToolRegistration);
|
|
109
100
|
registry.setComponentOverrides({ toolTagMap: PACKAGED_TOOL_TAG_MAP });
|
|
110
|
-
|
|
101
|
+
registry.setToolModuleLoaders(DEFAULT_TOOL_MODULE_LOADERS);
|
|
111
102
|
```
|
|
112
103
|
|
|
113
|
-
`
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
speech needs the full set.
|
|
104
|
+
A later `setToolModuleLoaders` call adds or replaces entries. A replacement
|
|
105
|
+
registered after a tool's module has loaded is ignored with a warning, since the
|
|
106
|
+
elements it defines are already in place.
|
|
117
107
|
|
|
118
108
|
## Content-dependent capabilities require an explicit packaging decision
|
|
119
109
|
|
|
120
|
-
A content-dependent capability is never
|
|
121
|
-
`
|
|
110
|
+
A content-dependent capability is never granted by
|
|
111
|
+
`createUniversalPersonalNeedsProfile()`. It may ship in `PACKAGED_TOOL_REGISTRATIONS` only
|
|
122
112
|
when it has a useful presentation path without a grant and declares
|
|
123
113
|
`resolvesWithoutGrant`. Audio transcript is the shipped example: an authored
|
|
124
114
|
`visibility: "always"` transcript reaches every player, while its accommodation
|
|
125
|
-
path remains policy-gated and `transcript` stays out of the universal
|
|
115
|
+
path remains policy-gated and `transcript` stays out of the universal profile.
|
|
126
116
|
|
|
127
117
|
A content-dependent capability with no presentation path remains an explicit
|
|
128
118
|
deployment choice. Signing is the shipped example: install
|
|
@@ -135,11 +125,11 @@ import { signLanguageRegistration } from "@pie-players/pie-tool-sign-language";
|
|
|
135
125
|
registry.register(signLanguageRegistration);
|
|
136
126
|
```
|
|
137
127
|
|
|
138
|
-
## Universal
|
|
128
|
+
## Universal and empty profiles
|
|
139
129
|
|
|
140
|
-
`createUniversalPersonalNeedsProfile()` builds a `PersonalNeedsProfile`
|
|
141
|
-
|
|
142
|
-
|
|
130
|
+
`createUniversalPersonalNeedsProfile()` builds a fresh `PersonalNeedsProfile`
|
|
131
|
+
granting the tool ids of the capabilities the packaged set treats as universal
|
|
132
|
+
features. A support id is the tool id it grants.
|
|
143
133
|
|
|
144
134
|
```ts
|
|
145
135
|
import { createUniversalPersonalNeedsProfile } from "@pie-players/pie-default-tool-loaders";
|
|
@@ -150,11 +140,11 @@ const section = {
|
|
|
150
140
|
};
|
|
151
141
|
```
|
|
152
142
|
|
|
153
|
-
The
|
|
154
|
-
|
|
143
|
+
The toolkit ships no populated default, and `createEmptyPersonalNeedsProfile()`
|
|
144
|
+
builds a profile granting nothing. Which capabilities a
|
|
155
145
|
deployment grants by default is a property of the program, not of a capability:
|
|
156
146
|
TTS is a universal feature in one program and a documented accommodation in
|
|
157
|
-
another. So the
|
|
147
|
+
another. So the universal profile is data to adopt, extend or replace alongside the district
|
|
158
148
|
and test-administration configuration, and it deliberately excludes any
|
|
159
149
|
capability that declares a content dependency.
|
|
160
150
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/** Fully bundled open-source calculator adapter for the tool-provider registry. */
|
|
2
2
|
import type { CalculatorToolProviderInitConfig, LazyCalculatorProviderDefinition } from "./LazyCalculatorToolProvider.js";
|
|
3
3
|
import { LazyCalculatorToolProvider } from "./LazyCalculatorToolProvider.js";
|
|
4
|
-
import type { ToolProviderCapabilities } from "@pie-players/pie-assessment-toolkit/tools/
|
|
4
|
+
import type { ToolProviderCapabilities } from "@pie-players/pie-assessment-toolkit/tools/registration";
|
|
5
5
|
export type CortexToolProviderConfig = CalculatorToolProviderInitConfig;
|
|
6
6
|
export declare class CortexToolProvider extends LazyCalculatorToolProvider<CortexToolProviderConfig> {
|
|
7
|
-
readonly providerId = "cortex-calculator";
|
|
8
7
|
readonly providerName = "PIE Open-Source Calculator";
|
|
9
8
|
readonly version = "1";
|
|
10
9
|
readonly requiresAuth = false;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** Fully bundled open-source calculator adapter for the tool-provider registry. */
|
|
2
2
|
import { LazyCalculatorToolProvider } from "./LazyCalculatorToolProvider.js";
|
|
3
3
|
export class CortexToolProvider extends LazyCalculatorToolProvider {
|
|
4
|
-
providerId = "cortex-calculator";
|
|
5
4
|
providerName = "PIE Open-Source Calculator";
|
|
6
5
|
version = "1";
|
|
7
6
|
requiresAuth = false;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/** Desmos calculator adapter for the generic tool-provider registry. */
|
|
2
2
|
import type { CalculatorProviderInit } from "@pie-players/pie-calculator";
|
|
3
3
|
import { LazyCalculatorToolProvider, type LazyCalculatorProviderDefinition } from "./LazyCalculatorToolProvider.js";
|
|
4
|
-
import type { ToolProviderCapabilities } from "@pie-players/pie-assessment-toolkit/tools/
|
|
4
|
+
import type { ToolProviderCapabilities } from "@pie-players/pie-assessment-toolkit/tools/registration";
|
|
5
5
|
/** Provider initialization is the provider-neutral calculator contract. */
|
|
6
6
|
export type DesmosToolProviderConfig = CalculatorProviderInit;
|
|
7
7
|
export declare class DesmosToolProvider extends LazyCalculatorToolProvider<DesmosToolProviderConfig> {
|
|
8
|
-
readonly providerId = "desmos-calculator";
|
|
9
8
|
readonly providerName = "Desmos Calculator";
|
|
10
9
|
readonly version = "1.12";
|
|
11
10
|
readonly requiresAuth = true;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** Desmos calculator adapter for the generic tool-provider registry. */
|
|
2
2
|
import { LazyCalculatorToolProvider, } from "./LazyCalculatorToolProvider.js";
|
|
3
3
|
export class DesmosToolProvider extends LazyCalculatorToolProvider {
|
|
4
|
-
providerId = "desmos-calculator";
|
|
5
4
|
providerName = "Desmos Calculator";
|
|
6
5
|
version = "1.12";
|
|
7
6
|
requiresAuth = true;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/** GeoGebra calculator adapter for the generic tool-provider registry. */
|
|
2
2
|
import type { CalculatorToolProviderInitConfig, LazyCalculatorProviderDefinition } from "./LazyCalculatorToolProvider.js";
|
|
3
3
|
import { LazyCalculatorToolProvider } from "./LazyCalculatorToolProvider.js";
|
|
4
|
-
import type { ToolProviderCapabilities } from "@pie-players/pie-assessment-toolkit/tools/
|
|
4
|
+
import type { ToolProviderCapabilities } from "@pie-players/pie-assessment-toolkit/tools/registration";
|
|
5
5
|
export interface GeoGebraToolProviderConfig extends CalculatorToolProviderInitConfig {
|
|
6
6
|
scriptUrl?: string;
|
|
7
7
|
appletTimeoutMs?: number;
|
|
8
8
|
}
|
|
9
9
|
export declare class GeoGebraToolProvider extends LazyCalculatorToolProvider<GeoGebraToolProviderConfig> {
|
|
10
|
-
readonly providerId = "geogebra-calculator";
|
|
11
10
|
readonly providerName = "GeoGebra Calculator";
|
|
12
11
|
readonly version = "6";
|
|
13
12
|
readonly requiresAuth = false;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/** GeoGebra calculator adapter for the generic tool-provider registry. */
|
|
2
2
|
import { LazyCalculatorToolProvider } from "./LazyCalculatorToolProvider.js";
|
|
3
3
|
export class GeoGebraToolProvider extends LazyCalculatorToolProvider {
|
|
4
|
-
providerId = "geogebra-calculator";
|
|
5
4
|
providerName = "GeoGebra Calculator";
|
|
6
5
|
version = "6";
|
|
7
6
|
requiresAuth = false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CalculatorProvider, CalculatorProviderInit } from "@pie-players/pie-calculator";
|
|
2
|
-
import type { ToolProviderApi, ToolProviderCapabilities } from "@pie-players/pie-assessment-toolkit/tools/
|
|
2
|
+
import type { ToolProviderApi, ToolProviderCapabilities } from "@pie-players/pie-assessment-toolkit/tools/registration";
|
|
3
3
|
export type CalculatorToolProviderInitConfig = Pick<CalculatorProviderInit, "onTelemetry">;
|
|
4
4
|
type InitializableCalculatorProvider<TConfig> = CalculatorProvider & {
|
|
5
5
|
initialize(config: TConfig): Promise<void>;
|
|
@@ -14,8 +14,7 @@ export interface LazyCalculatorProviderDefinition<TConfig> {
|
|
|
14
14
|
* Shared lazy-module and lifecycle implementation for calculator tool adapters.
|
|
15
15
|
* Concrete adapters own only their metadata, capabilities and provider import.
|
|
16
16
|
*/
|
|
17
|
-
export declare abstract class LazyCalculatorToolProvider<TConfig extends CalculatorToolProviderInitConfig> implements ToolProviderApi<
|
|
18
|
-
abstract readonly providerId: string;
|
|
17
|
+
export declare abstract class LazyCalculatorToolProvider<TConfig extends CalculatorToolProviderInitConfig> implements ToolProviderApi<CalculatorProvider> {
|
|
19
18
|
abstract readonly providerName: string;
|
|
20
19
|
readonly category: "calculator";
|
|
21
20
|
abstract readonly version: string;
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
* `tests/content-alternates.test.ts` pins this against the composition set in both
|
|
17
17
|
* directions, so a capability added there cannot quietly fail to reach print.
|
|
18
18
|
*/
|
|
19
|
-
import type { ToolRegistration } from "@pie-players/pie-assessment-toolkit/tools/
|
|
19
|
+
import type { ToolRegistration } from "@pie-players/pie-assessment-toolkit/tools/registration";
|
|
20
20
|
export declare const CONTENT_ALTERNATE_REGISTRATIONS: readonly ToolRegistration[];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export type {
|
|
2
|
-
export {
|
|
1
|
+
export type { PackagedToolRegistryOptions } from "./packaged-capability-composition.js";
|
|
2
|
+
export { createEmptyPersonalNeedsProfile, createPackagedToolRegistry, createUniversalPersonalNeedsProfile, DEFAULT_TOOL_MODULE_LOADERS, PACKAGED_TOOL_REGISTRATIONS, PACKAGED_TOOL_TAG_MAP, SECTION_PLAYER_PREFERRED_TOOL_PLACEMENT, } from "./packaged-capability-composition.js";
|
|
3
3
|
export { CONTENT_ALTERNATE_REGISTRATIONS } from "./content-alternates.js";
|
|
4
4
|
export { annotationToolbarRegistration, lineReaderToolRegistration, themeToolRegistration, } from "./registrations/accessibility-tools.js";
|
|
5
5
|
export { AUDIO_TRANSCRIPT_FEATURE_ID, AUDIO_TRANSCRIPT_REGION_CLASS, AUDIO_TRANSCRIPT_REGION_LABEL, audioTranscriptRegistration, resolveAudioTranscript, type ResolvedAudioTranscript, } from "./registrations/audio-transcript.js";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { createEmptyPersonalNeedsProfile, createPackagedToolRegistry, createUniversalPersonalNeedsProfile, DEFAULT_TOOL_MODULE_LOADERS, PACKAGED_TOOL_REGISTRATIONS, PACKAGED_TOOL_TAG_MAP, SECTION_PLAYER_PREFERRED_TOOL_PLACEMENT, } from "./packaged-capability-composition.js";
|
|
2
2
|
// The authored-alternate subset, for a renderer that shows alternates and no
|
|
3
3
|
// toolbar — importable without the packaged composition's tool loaders.
|
|
4
4
|
export { CONTENT_ALTERNATE_REGISTRATIONS } from "./content-alternates.js";
|
|
@@ -2,45 +2,25 @@
|
|
|
2
2
|
* The one authored description of PIE's packaged capability composition.
|
|
3
3
|
*
|
|
4
4
|
* Registrations describe what a capability can do. This module owns the
|
|
5
|
-
* deployment decisions around them: element tags, lazy module
|
|
6
|
-
* placement
|
|
5
|
+
* deployment decisions around them: element tags, lazy module loaders, the
|
|
6
|
+
* section-player placement preset and the explicit universal-support policy.
|
|
7
7
|
* Public constants are projections of this composition so adding a capability
|
|
8
8
|
* cannot leave a second hand-maintained catalogue silently behind.
|
|
9
9
|
*/
|
|
10
|
-
import { ToolRegistry, type
|
|
10
|
+
import { ToolRegistry, type ToolComponentFactoryMap, type ToolModuleLoader, type ToolRegistration, type ToolTagMap } from "@pie-players/pie-assessment-toolkit/tools/registration";
|
|
11
11
|
import type { PersonalNeedsProfile } from "@pie-players/pie-players-shared/types";
|
|
12
|
-
export
|
|
13
|
-
export interface ToolRegistryLike {
|
|
14
|
-
setToolModuleLoaders(loaders: Partial<Record<string, ToolModuleLoader>>): void;
|
|
15
|
-
}
|
|
16
|
-
export interface PackagedCalculatorCompositionOptions {
|
|
17
|
-
/**
|
|
18
|
-
* The same calculator config supplied at `tools.providers.calculator`.
|
|
19
|
-
* Selects the matching packaged element and default loader. Omit it to retain
|
|
20
|
-
* the existing Desmos delivery.
|
|
21
|
-
*/
|
|
22
|
-
calculatorProviderConfig?: CalculatorToolProviderConfig;
|
|
23
|
-
}
|
|
24
|
-
export interface PackagedToolRegistryOptions extends PackagedCalculatorCompositionOptions {
|
|
12
|
+
export interface PackagedToolRegistryOptions {
|
|
25
13
|
/** Override packaged registrations by toolId. */
|
|
26
14
|
overrides?: Partial<Record<string, ToolRegistration>>;
|
|
27
15
|
/** Override or extend the packaged element tag mapping. */
|
|
28
16
|
toolTagMap?: Partial<ToolTagMap>;
|
|
29
|
-
/** Override the component factory
|
|
30
|
-
toolComponentFactory?: ToolComponentFactory;
|
|
17
|
+
/** Override the component factory per tool. */
|
|
31
18
|
toolComponentFactories?: Partial<ToolComponentFactoryMap>;
|
|
32
19
|
/** Lazy module loaders keyed by toolId. */
|
|
33
20
|
toolModuleLoaders?: Partial<Record<string, ToolModuleLoader>>;
|
|
34
21
|
/** Restrict registration to specific packaged tool ids. */
|
|
35
22
|
toolIds?: string[];
|
|
36
23
|
}
|
|
37
|
-
export interface RegisterPackagedToolsOptions {
|
|
38
|
-
toolIds?: string[];
|
|
39
|
-
applyOverrides?: (registration: ToolRegistration) => ToolRegistration;
|
|
40
|
-
}
|
|
41
|
-
export interface RegisterDefaultToolModuleLoadersOptions extends PackagedCalculatorCompositionOptions {
|
|
42
|
-
loaders?: Partial<Record<string, ToolModuleLoader>>;
|
|
43
|
-
}
|
|
44
24
|
/**
|
|
45
25
|
* Release/build gate for PIE-authored composition data.
|
|
46
26
|
*
|
|
@@ -49,37 +29,25 @@ export interface RegisterDefaultToolModuleLoadersOptions extends PackagedCalcula
|
|
|
49
29
|
* that prevents an otherwise usable assessment from rendering.
|
|
50
30
|
*/
|
|
51
31
|
export declare function assertPackagedCapabilityComposition(): void;
|
|
52
|
-
export declare const PACKAGED_TOOL_REGISTRATIONS: readonly [
|
|
32
|
+
export declare const PACKAGED_TOOL_REGISTRATIONS: readonly ToolRegistration[];
|
|
53
33
|
export declare const PACKAGED_TOOL_TAG_MAP: ToolTagMap;
|
|
54
|
-
export declare const ITEM_TOOL_MODULE_LOADERS: Record<string, ToolModuleLoader>;
|
|
55
|
-
export declare const SECTION_TOOL_MODULE_LOADERS: Record<string, ToolModuleLoader>;
|
|
56
34
|
export declare const DEFAULT_TOOL_MODULE_LOADERS: Record<string, ToolModuleLoader>;
|
|
57
|
-
/** Build the packaged loader map for a selected calculator provider. */
|
|
58
|
-
export declare function createDefaultToolModuleLoaders(options?: PackagedCalculatorCompositionOptions): Record<string, ToolModuleLoader>;
|
|
59
|
-
/** Build the section-bootstrap loader subset for a selected calculator provider. */
|
|
60
|
-
export declare function createSectionToolModuleLoaders(options?: PackagedCalculatorCompositionOptions): Record<string, ToolModuleLoader>;
|
|
61
|
-
export declare const PACKAGED_TOOL_PLACEMENT: {
|
|
62
|
-
readonly assessment: readonly ["theme"];
|
|
63
|
-
readonly section: readonly ["theme"];
|
|
64
|
-
readonly item: readonly ["textToSpeech", "annotationToolbar", "graph", "periodicTable", "dictionary", "pictureDictionary", "dictionarySpanish", "pictureDictionarySpanish"];
|
|
65
|
-
readonly passage: readonly ["textToSpeech", "annotationToolbar", "lineReader"];
|
|
66
|
-
readonly rubric: readonly ["textToSpeech", "annotationToolbar", "lineReader"];
|
|
67
|
-
readonly element: readonly ["calculator", "answerEliminator", "textToSpeech", "ruler", "protractor", "annotationToolbar", "graph", "periodicTable", "dictionary", "pictureDictionary", "dictionarySpanish", "pictureDictionarySpanish"];
|
|
68
|
-
};
|
|
69
35
|
export declare const SECTION_PLAYER_PREFERRED_TOOL_PLACEMENT: {
|
|
70
36
|
section: string[];
|
|
71
37
|
item: string[];
|
|
72
38
|
passage: string[];
|
|
73
39
|
};
|
|
74
|
-
export declare const PACKAGED_TOOL_ORDER: readonly ["theme", "calculator", "textToSpeech", "lineReader", "annotationToolbar", "answerEliminator", "ruler", "protractor", "graph", "periodicTable", "dictionary", "pictureDictionary", "dictionarySpanish", "pictureDictionarySpanish"];
|
|
75
|
-
export declare const UNIVERSAL_SUPPORTS_PRESET: readonly string[];
|
|
76
|
-
/** Register packaged PIE capabilities onto an existing registry. */
|
|
77
|
-
export declare function registerPackagedTools(registry: ToolRegistry, options?: RegisterPackagedToolsOptions): void;
|
|
78
40
|
/** Create a registry holding the packaged PIE capabilities. */
|
|
79
41
|
export declare function createPackagedToolRegistry(options?: PackagedToolRegistryOptions): ToolRegistry;
|
|
80
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* A fresh profile granting the packaged set's universal capabilities, sorted by
|
|
44
|
+
* tool id. Which capabilities are universal is program policy declared on each
|
|
45
|
+
* definition; registry membership never implies it.
|
|
46
|
+
*/
|
|
81
47
|
export declare function createUniversalPersonalNeedsProfile(): PersonalNeedsProfile;
|
|
82
|
-
/**
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
48
|
+
/**
|
|
49
|
+
* A fresh profile granting and prohibiting nothing. The toolkit ships no
|
|
50
|
+
* populated default: a deployment's universal set is program policy, which
|
|
51
|
+
* `createUniversalPersonalNeedsProfile` carries as data for hosts that adopt it.
|
|
52
|
+
*/
|
|
53
|
+
export declare function createEmptyPersonalNeedsProfile(): PersonalNeedsProfile;
|