@pie-players/pie-assessment-toolkit 0.3.64 → 0.3.65

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 (47) hide show
  1. package/README.md +45 -17
  2. package/dist/components/ItemToolBar.custom-element.js +1 -1
  3. package/dist/components/PieAssessmentToolkit.custom-element.js +6 -6
  4. package/dist/components/SectionToolBar.custom-element.js +1 -1
  5. package/dist/components/chunks/ItemToolBar-cckwpz6c.js +51 -0
  6. package/dist/components/chunks/ItemToolBar-pryf0rtz.js +22 -0
  7. package/dist/index.d.ts +5 -6
  8. package/dist/index.js +9 -4
  9. package/dist/runtime/composition-emit-scheduler.d.ts +78 -0
  10. package/dist/runtime/composition-emit-scheduler.js +154 -0
  11. package/dist/runtime/core/engine-resolver.d.ts +1 -1
  12. package/dist/services/ToolRegistry.d.ts +218 -8
  13. package/dist/services/ToolRegistry.js +124 -8
  14. package/dist/services/ToolkitCoordinator.d.ts +2 -1
  15. package/dist/services/ToolkitCoordinator.js +23 -6
  16. package/dist/services/createDefaultToolRegistry.d.ts +25 -58
  17. package/dist/services/createDefaultToolRegistry.js +24 -104
  18. package/dist/services/defaultPersonalNeedsProfile.d.ts +16 -14
  19. package/dist/services/defaultPersonalNeedsProfile.js +17 -38
  20. package/dist/services/pnp-standard-features.d.ts +1 -1
  21. package/dist/services/tool-config-defaults.d.ts +7 -23
  22. package/dist/services/tool-config-defaults.js +7 -46
  23. package/dist/services/tool-config-validation.d.ts +1 -1
  24. package/dist/services/tool-config-validation.js +44 -4
  25. package/dist/services/tts/browser-provider.js +2 -1
  26. package/dist/services/tts-runtime-config.js +7 -2
  27. package/dist/tools/internal.d.ts +34 -0
  28. package/dist/tools/internal.js +33 -0
  29. package/dist/tools/tool-tag-map.d.ts +15 -3
  30. package/dist/tools/tool-tag-map.js +21 -18
  31. package/package.json +14 -10
  32. package/dist/components/chunks/ItemToolBar-3cppre9r.js +0 -51
  33. package/dist/components/chunks/ItemToolBar-7rq2gj8b.js +0 -22
  34. package/dist/services/sign-language-cards.d.ts +0 -82
  35. package/dist/services/sign-language-cards.js +0 -133
  36. package/dist/tools/registrations/accessibility-tools.d.ts +0 -34
  37. package/dist/tools/registrations/accessibility-tools.js +0 -217
  38. package/dist/tools/registrations/calculator.d.ts +0 -20
  39. package/dist/tools/registrations/calculator.js +0 -228
  40. package/dist/tools/registrations/interaction-tools.d.ts +0 -27
  41. package/dist/tools/registrations/interaction-tools.js +0 -143
  42. package/dist/tools/registrations/measurement-tools.d.ts +0 -24
  43. package/dist/tools/registrations/measurement-tools.js +0 -130
  44. package/dist/tools/registrations/subject-specific-tools.d.ts +0 -27
  45. package/dist/tools/registrations/subject-specific-tools.js +0 -158
  46. package/dist/tools/registrations/tts.d.ts +0 -21
  47. package/dist/tools/registrations/tts.js +0 -184
package/README.md CHANGED
@@ -1097,20 +1097,20 @@ item.config.extractedCatalogs = result.catalogs;
1097
1097
  catalogResolver.addItemCatalogs(result.catalogs);
1098
1098
  ```
1099
1099
 
1100
- ### Sign-language cards
1100
+ ### Cards without an extractor
1101
1101
 
1102
- Signed alternates have no extractor and deliberately so: a `sign-language` card is
1103
- authored or written by an importer, never lifted out of item markup at render
1104
- time. One such lift existed and was removed nothing produced the inline form,
1105
- and a runtime that could not parse the markup left the video in the visible
1106
- content, showing the accommodation to every learner regardless of eligibility.
1102
+ Not every catalog card is lifted out of item markup. A signed alternate is
1103
+ authored or written by an importer and has no extractor at all; one such lift
1104
+ existed and was removed, because nothing produced the inline form and a runtime
1105
+ that could not parse the markup left the video in the visible content, showing the
1106
+ accommodation to every learner regardless of eligibility.
1107
1107
 
1108
- Whether a card describes a playable signed alternate is decided in one place,
1109
- `resolveSignLanguageMedia` a payload with no usable source resolves to `null`
1110
- rather than rendering an empty player, and source URLs are restricted to schemes
1111
- a media element can actually fetch. `matchesRequestedSignLanguage` holds the
1112
- deliberate strictness: there is no cross-sign-language substitution, since
1113
- handing an ASL learner a BSL recording is worse than handing them nothing.
1108
+ This package resolves and registers those cards through
1109
+ `AccessibilityCatalogResolver` and the generic media helpers in
1110
+ `catalog-media.ts`. Which card types mean what belongs to the capability that
1111
+ needs them signing's card validators and its resolution rules live in
1112
+ `@pie-players/pie-tool-sign-language`, behind that capability's
1113
+ `requiresAuthoredContent`.
1114
1114
 
1115
1115
  ### Feature policy without a placement
1116
1116
 
@@ -1121,10 +1121,18 @@ placement. Use it for capabilities that are not toolbar surfaces — signing is
1121
1121
  first — where a placement-scoped `decide(...)` would answer the wrong question:
1122
1122
  absent because it was never placed, rather than absent because policy said no.
1123
1123
 
1124
- `computeDefaultSupports()` excludes `ACCOMMODATION_ONLY_SUPPORT_IDS`, which lists
1125
- `signLanguage`. The computed default profile derives from every registered tool's
1126
- `pnpSupportIds`, which is right for universal features and wrong for an
1127
- accommodation requiring a documented need.
1124
+ `createEmptyPersonalNeedsProfile()` is the only profile this package ships, and it
1125
+ grants nothing. Which capabilities a deployment grants by default is a property
1126
+ of the program rather than of a capability TTS is a universal feature in one
1127
+ program and a documented accommodation in another — so it belongs in policy
1128
+ configuration alongside the district and test-administration levels. Hosts that
1129
+ want today's universal set take `createUniversalPersonalNeedsProfile()` from
1130
+ `@pie-players/pie-default-tool-loaders`, which ships it as data.
1131
+
1132
+ Nothing derives a profile from the registry any more. Doing so read registry
1133
+ membership as eligibility tier — registration means "policy-addressable", not
1134
+ "universal, on by default" — and had to be corrected with a compile-time list of
1135
+ ids to exclude that a host could not extend for its own accommodation.
1128
1136
 
1129
1137
  ## Integration with Section Player
1130
1138
 
@@ -1227,10 +1235,10 @@ Use `createToolsConfig()` when you want to pre-validate and inspect diagnostics
1227
1235
 
1228
1236
  ```typescript
1229
1237
  import {
1230
- createPackagedToolRegistry,
1231
1238
  createToolsConfig,
1232
1239
  ToolkitCoordinator
1233
1240
  } from "@pie-players/pie-assessment-toolkit";
1241
+ import { createPackagedToolRegistry } from "@pie-players/pie-default-tool-loaders";
1234
1242
 
1235
1243
  const toolRegistry = createPackagedToolRegistry();
1236
1244
  const { config, diagnostics } = createToolsConfig({
@@ -1303,6 +1311,26 @@ pick the stability surface that matches their use case:
1303
1311
  `resolveSectionEngineRuntimeState` helpers. Symbols here may change
1304
1312
  between minor versions with a changeset note.
1305
1313
 
1314
+ ## Writing a capability package
1315
+
1316
+ `@pie-players/pie-assessment-toolkit/tools/internal` is what a capability
1317
+ package imports: the `ToolRegistration` contract, the surface and content
1318
+ dependency types, `resolveToolTag` and the toolbar registration helpers. Same
1319
+ stability contract as the other `*/internal` entry points — symbols may change
1320
+ between minor versions with a changeset note.
1321
+
1322
+ Import it rather than the package root: the root pulls in `ToolkitCoordinator`,
1323
+ `TTSService` and the components, none of which a registration needs, and a
1324
+ capability bundle that inlines them ends up with a second `ToolRegistry` class
1325
+ that fails every `instanceof` across the host boundary. Mark the toolkit external
1326
+ in the package's build with a pattern that covers subpaths, not a bare specifier.
1327
+
1328
+ `@pie-players/pie-tool-sign-language` is the worked example end to end: a
1329
+ registration, a content resolver, its own custom element, and no edit to any
1330
+ generic package. `packages/default-tool-loaders/README.md` covers how a
1331
+ deployment then composes it in, and `docs/TOOL_REGISTRY.md` the registration and
1332
+ host-surface contracts.
1333
+
1306
1334
  ### Lifecycle emit coordination
1307
1335
 
1308
1336
  When `<pie-assessment-toolkit>` is nested inside a section-player layout,
@@ -1 +1 @@
1
- import{a}from"./chunks/ItemToolBar-7rq2gj8b.js";import"./chunks/ItemToolBar-3cppre9r.js";export{a as default};
1
+ import{a}from"./chunks/ItemToolBar-pryf0rtz.js";import"./chunks/ItemToolBar-cckwpz6c.js";export{a as default};