@pie-players/pie-default-tool-loaders 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 +116 -12
- package/dist/afa-profile.d.ts +65 -0
- package/dist/afa-profile.js +135 -0
- package/dist/calculator-providers/LazyCalculatorToolProvider.d.ts +32 -18
- package/dist/calculator-providers/LazyCalculatorToolProvider.js +24 -12
- package/dist/calculator-providers/packaged-calculator-providers.js +26 -0
- package/dist/index.d.ts +7 -5
- package/dist/index.js +10 -5
- package/dist/packaged-capability-composition.js +11 -1
- package/dist/registrations/accessibility-tools.d.ts +8 -0
- package/dist/registrations/accessibility-tools.js +38 -0
- package/dist/registrations/audio-transcript.d.ts +0 -7
- package/dist/registrations/audio-transcript.js +1 -7
- package/dist/registrations/calculator.d.ts +16 -5
- package/dist/registrations/calculator.js +171 -176
- package/dist/registrations/interaction-tools.d.ts +15 -2
- package/dist/registrations/interaction-tools.js +110 -13
- package/dist/registrations/tts.d.ts +23 -2
- package/dist/registrations/tts.js +121 -93
- package/package.json +27 -25
- package/dist/calculator-providers/CortexToolProvider.d.ts +0 -10
- package/dist/calculator-providers/CortexToolProvider.js +0 -18
- package/dist/calculator-providers/DesmosToolProvider.d.ts +0 -11
- package/dist/calculator-providers/DesmosToolProvider.js +0 -18
- package/dist/calculator-providers/GeoGebraToolProvider.d.ts +0 -13
- package/dist/calculator-providers/GeoGebraToolProvider.js +0 -18
- package/dist/registrations/overlay-element-cache.d.ts +0 -23
- package/dist/registrations/overlay-toolbar-render.d.ts +0 -33
- package/dist/registrations/selection-actions.d.ts +0 -24
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `renderToolbar` shape shared by every packaged capability that puts one
|
|
3
|
-
* overlay behind one toolbar button.
|
|
4
|
-
*
|
|
5
|
-
* What varies between capabilities is the two options below: whether the overlay
|
|
6
|
-
* paints its own chrome or takes a draggable window, and that window's size. The
|
|
7
|
-
* visibility binding, the button, the component-override lookup, the `tool-id`
|
|
8
|
-
* attribute and the sync are shared, so the shell title has one spelling.
|
|
9
|
-
*
|
|
10
|
-
* Catalog keys are derived from `toolId`: `tools.<toolId>.buttonA11y` and
|
|
11
|
-
* `tools.<toolId>.tooltip`. A capability needing a different prefix — the
|
|
12
|
-
* dictionary variants, which compose several capabilities off one element —
|
|
13
|
-
* keeps its own renderer.
|
|
14
|
-
*/
|
|
15
|
-
import { type ToolContext, type ToolRegistration, type ToolToolbarRenderResult, type ToolbarContext } from "@pie-players/pie-assessment-toolkit/tools/registration";
|
|
16
|
-
/** A window's geometry. Absent for overlays that paint their own chrome. */
|
|
17
|
-
export interface OverlayToolShell {
|
|
18
|
-
resizable: boolean;
|
|
19
|
-
initialWidth: number;
|
|
20
|
-
initialHeight: number;
|
|
21
|
-
minWidth: number;
|
|
22
|
-
minHeight: number;
|
|
23
|
-
}
|
|
24
|
-
export interface RenderOverlayToolbarOptions {
|
|
25
|
-
/**
|
|
26
|
-
* `"frameless"` for an overlay that draws its own surface — a ruler or a line
|
|
27
|
-
* reader sits on the content rather than in a panel.
|
|
28
|
-
*/
|
|
29
|
-
surface?: "frameless";
|
|
30
|
-
/** Present when the capability opens in a draggable, closeable window. */
|
|
31
|
-
shell?: OverlayToolShell;
|
|
32
|
-
}
|
|
33
|
-
export declare function renderOverlayToolbar(registration: ToolRegistration, context: ToolContext, toolbarContext: ToolbarContext, options?: RenderOverlayToolbarOptions): ToolToolbarRenderResult;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Which capabilities appear as actions on the learner's current selection.
|
|
3
|
-
*
|
|
4
|
-
* The one place that pairs a selection gateway to the tools it can open. The gateway
|
|
5
|
-
* renders what it is handed and names nothing; the tools know nothing about
|
|
6
|
-
* selections. Composition is the only layer allowed to know both, which is why this
|
|
7
|
-
* list lives here rather than in either of them.
|
|
8
|
-
*
|
|
9
|
-
* A selection is a shortcut, never the only way in. Chromium does not extend a
|
|
10
|
-
* selection with Shift+Arrow in non-editable content unless caret browsing is on —
|
|
11
|
-
* an OS toggle that does not exist on mobile — so a sighted keyboard-only learner
|
|
12
|
-
* cannot originate one at all. Every tool named here also opens from the toolbar and
|
|
13
|
-
* carries its own term field.
|
|
14
|
-
*/
|
|
15
|
-
import type { ToolSelectionAction, ToolSurfaceServices } from "@pie-players/pie-assessment-toolkit/tools/registration";
|
|
16
|
-
/**
|
|
17
|
-
* Actions for the gateway to render, given the services it was handed.
|
|
18
|
-
*
|
|
19
|
-
* Rebuilt on every sync rather than captured once: a host calling
|
|
20
|
-
* `updateAssessment` mid-session swaps the coordinator without remounting the
|
|
21
|
-
* gateway, and an action closing over the previous one would open a tool in a
|
|
22
|
-
* session the learner has left.
|
|
23
|
-
*/
|
|
24
|
-
export declare function buildSelectionActions(services: ToolSurfaceServices): ToolSelectionAction[];
|