@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.
Files changed (36) hide show
  1. package/README.md +47 -57
  2. package/dist/calculator-providers/CortexToolProvider.d.ts +1 -2
  3. package/dist/calculator-providers/CortexToolProvider.js +0 -1
  4. package/dist/calculator-providers/DesmosToolProvider.d.ts +1 -2
  5. package/dist/calculator-providers/DesmosToolProvider.js +0 -1
  6. package/dist/calculator-providers/GeoGebraToolProvider.d.ts +1 -2
  7. package/dist/calculator-providers/GeoGebraToolProvider.js +0 -1
  8. package/dist/calculator-providers/LazyCalculatorToolProvider.d.ts +2 -3
  9. package/dist/content-alternates.d.ts +1 -1
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +1 -1
  12. package/dist/packaged-capability-composition.d.ts +17 -49
  13. package/dist/packaged-capability-composition.js +60 -261
  14. package/dist/registrations/accessibility-tools.d.ts +1 -5
  15. package/dist/registrations/accessibility-tools.js +6 -40
  16. package/dist/registrations/audio-transcript.d.ts +1 -1
  17. package/dist/registrations/audio-transcript.js +0 -1
  18. package/dist/registrations/calculator.d.ts +2 -6
  19. package/dist/registrations/calculator.js +9 -31
  20. package/dist/registrations/dictionary-tools.d.ts +6 -5
  21. package/dist/registrations/dictionary-tools.js +21 -26
  22. package/dist/registrations/interaction-tools.d.ts +1 -7
  23. package/dist/registrations/interaction-tools.js +22 -27
  24. package/dist/registrations/measurement-tools.d.ts +1 -5
  25. package/dist/registrations/measurement-tools.js +1 -17
  26. package/dist/registrations/overlay-element-cache.d.ts +3 -1
  27. package/dist/registrations/overlay-element-cache.js +2 -1
  28. package/dist/registrations/overlay-toolbar-render.d.ts +3 -10
  29. package/dist/registrations/overlay-toolbar-render.js +3 -7
  30. package/dist/registrations/selection-actions.d.ts +1 -1
  31. package/dist/registrations/selection-actions.js +1 -1
  32. package/dist/registrations/subject-specific-tools.d.ts +1 -5
  33. package/dist/registrations/subject-specific-tools.js +1 -15
  34. package/dist/registrations/tts.d.ts +1 -6
  35. package/dist/registrations/tts.js +36 -89
  36. 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`, `registerPackagedTools` | Which capabilities exist, and their toolbar and surface contracts |
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
- | `PACKAGED_TOOL_PLACEMENT`, `SECTION_PLAYER_PREFERRED_TOOL_PLACEMENT`, `PACKAGED_TOOL_ORDER` | Where they appear and in what order |
20
- | `UNIVERSAL_SUPPORTS_PRESET`, `createUniversalPersonalNeedsProfile` | Which of their support ids the program grants to everyone |
21
- | `DEFAULT_TOOL_MODULE_LOADERS`, `createDefaultToolModuleLoaders`, `registerSectionToolModuleLoaders` | When each one's bundle loads |
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 bootstrap sets, placement/order membership and explicit
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 universal support
31
- id its registration does not declare — so release tests find a missing facet
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. The existing public
37
- factory and constants are unchanged: lazy module loading remains opt-in,
38
- registration/tag/factory overrides retain precedence, an empty `toolIds` array
39
- still selects the full packaged set, and unknown selected ids are ignored while
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
- Desmos remains the calculator delivery when no provider is configured. To use
57
- GeoGebra or the fully bundled open-source Cortex implementation, pass the same
58
- calculator configuration to both the toolkit and the
59
- packaged composition. The composition then owns the matching element tag and
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
- ```ts
63
- import {
64
- createDefaultToolModuleLoaders,
65
- createPackagedToolRegistry,
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: { calculator: calculatorProviderConfig },
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
- The toolkit's `ToolRegistry` is the other end of that choice: it starts empty,
94
- and a host composing its own set registers into it and installs the tag map its
95
- registrations create elements from.
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
- registerDefaultToolModuleLoaders(registry);
101
+ registry.setToolModuleLoaders(DEFAULT_TOOL_MODULE_LOADERS);
111
102
  ```
112
103
 
113
- `registerDefaultToolModuleLoaders` installs a loader for every packaged tool.
114
- `registerSectionToolModuleLoaders` installs only the section-bootstrap subset,
115
- which has no text-to-speech loader, so a registry that places item-level text to
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 inferred into
121
- `UNIVERSAL_SUPPORTS_PRESET`. It may ship in `PACKAGED_TOOL_REGISTRATIONS` only
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 preset.
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 supports preset
128
+ ## Universal and empty profiles
139
129
 
140
- `createUniversalPersonalNeedsProfile()` builds a `PersonalNeedsProfile` granting
141
- `UNIVERSAL_SUPPORTS_PRESET` — the support ids the packaged tool set treats as
142
- universal features.
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 core ships no populated default — `createEmptyPersonalNeedsProfile()` in
154
- `@pie-players/pie-assessment-toolkit` grants nothing. Which capabilities a
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 preset is data to adopt, extend or replace alongside the district
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/internal";
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/internal";
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/internal";
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/internal";
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<TConfig, CalculatorProvider> {
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/internal";
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 { PackagedCalculatorCompositionOptions, PackagedToolRegistryOptions, RegisterDefaultToolModuleLoadersOptions, RegisterPackagedToolsOptions, ToolModuleLoader, ToolRegistryLike, } from "./packaged-capability-composition.js";
2
- export { createPackagedToolRegistry, createDefaultToolModuleLoaders, createSectionToolModuleLoaders, createUniversalPersonalNeedsProfile, DEFAULT_TOOL_MODULE_LOADERS, ITEM_TOOL_MODULE_LOADERS, PACKAGED_TOOL_ORDER, PACKAGED_TOOL_PLACEMENT, PACKAGED_TOOL_REGISTRATIONS, PACKAGED_TOOL_TAG_MAP, registerDefaultToolModuleLoaders, registerPackagedTools, registerSectionToolModuleLoaders, SECTION_PLAYER_PREFERRED_TOOL_PLACEMENT, SECTION_TOOL_MODULE_LOADERS, UNIVERSAL_SUPPORTS_PRESET, } from "./packaged-capability-composition.js";
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 { createPackagedToolRegistry, createDefaultToolModuleLoaders, createSectionToolModuleLoaders, createUniversalPersonalNeedsProfile, DEFAULT_TOOL_MODULE_LOADERS, ITEM_TOOL_MODULE_LOADERS, PACKAGED_TOOL_ORDER, PACKAGED_TOOL_PLACEMENT, PACKAGED_TOOL_REGISTRATIONS, PACKAGED_TOOL_TAG_MAP, registerDefaultToolModuleLoaders, registerPackagedTools, registerSectionToolModuleLoaders, SECTION_PLAYER_PREFERRED_TOOL_PLACEMENT, SECTION_TOOL_MODULE_LOADERS, UNIVERSAL_SUPPORTS_PRESET, } from "./packaged-capability-composition.js";
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 bootstrap sets,
6
- * placement presets, toolbar order and the explicit universal-support policy.
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 CalculatorToolProviderConfig, type ToolComponentFactory, type ToolComponentFactoryMap, type ToolRegistration, type ToolTagMap } from "@pie-players/pie-assessment-toolkit/tools/internal";
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 type ToolModuleLoader = () => Promise<unknown>;
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 globally or per tool. */
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 [ToolRegistration, ToolRegistration, ToolRegistration, ToolRegistration, ToolRegistration, ToolRegistration, ToolRegistration, ToolRegistration, ToolRegistration, ToolRegistration, ToolRegistration, ToolRegistration, ToolRegistration, ToolRegistration];
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
- /** Build a fresh profile granting the explicit universal-support preset. */
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
- /** Register packaged lazy module loaders, followed by host overrides. */
83
- export declare function registerDefaultToolModuleLoaders(registry: ToolRegistryLike, options?: RegisterDefaultToolModuleLoadersOptions): void;
84
- /** Register only the section-bootstrap loader subset, then host overrides. */
85
- export declare function registerSectionToolModuleLoaders(registry: ToolRegistryLike, options?: RegisterDefaultToolModuleLoadersOptions): void;
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;