@pie-players/pie-assessment-toolkit 0.3.26 → 0.3.28
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 +13 -2
- package/dist/components/ItemToolBar.custom-element.js +92 -5
- package/dist/components/PieAssessmentToolkit.custom-element.js +278 -7
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/services/HighlightCoordinator.d.ts +3 -2
- package/dist/services/HighlightCoordinator.d.ts.map +1 -1
- package/dist/services/HighlightCoordinator.js +6 -3
- package/dist/services/HighlightCoordinator.js.map +1 -1
- package/dist/services/TTSService.d.ts +3 -0
- package/dist/services/TTSService.d.ts.map +1 -1
- package/dist/services/TTSService.js +66 -5
- package/dist/services/TTSService.js.map +1 -1
- package/dist/services/ToolRegistry.d.ts +7 -1
- package/dist/services/ToolRegistry.d.ts.map +1 -1
- package/dist/services/ToolRegistry.js.map +1 -1
- package/dist/services/ToolkitCoordinator.d.ts +11 -0
- package/dist/services/ToolkitCoordinator.d.ts.map +1 -1
- package/dist/services/ToolkitCoordinator.js +46 -6
- package/dist/services/ToolkitCoordinator.js.map +1 -1
- package/dist/services/framework-error.d.ts +34 -0
- package/dist/services/framework-error.d.ts.map +1 -0
- package/dist/services/framework-error.js +43 -0
- package/dist/services/framework-error.js.map +1 -0
- package/dist/services/tool-config-validation.d.ts +7 -0
- package/dist/services/tool-config-validation.d.ts.map +1 -1
- package/dist/services/tool-config-validation.js +22 -1
- package/dist/services/tool-config-validation.js.map +1 -1
- package/dist/services/tts/visual-line-ranges.d.ts +19 -0
- package/dist/services/tts/visual-line-ranges.d.ts.map +1 -0
- package/dist/services/tts/visual-line-ranges.js +227 -0
- package/dist/services/tts/visual-line-ranges.js.map +1 -0
- package/dist/services/tts-runtime-config.d.ts +29 -0
- package/dist/services/tts-runtime-config.d.ts.map +1 -1
- package/dist/services/tts-runtime-config.js +101 -9
- package/dist/services/tts-runtime-config.js.map +1 -1
- package/dist/tools/default-tool-module-loaders.d.ts.map +1 -1
- package/dist/tools/default-tool-module-loaders.js +1 -4
- package/dist/tools/default-tool-module-loaders.js.map +1 -1
- package/dist/tools/registrations/accessibility-tools.js +1 -1
- package/dist/tools/registrations/accessibility-tools.js.map +1 -1
- package/dist/tools/registrations/measurement-tools.js +4 -4
- package/dist/tools/registrations/measurement-tools.js.map +1 -1
- package/dist/tools/registrations/tts.d.ts +1 -0
- package/dist/tools/registrations/tts.d.ts.map +1 -1
- package/dist/tools/registrations/tts.js +54 -23
- package/dist/tools/registrations/tts.js.map +1 -1
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -438,7 +438,7 @@ tools: {
|
|
|
438
438
|
|
|
439
439
|
`speedOptions` semantics:
|
|
440
440
|
|
|
441
|
-
- Omitted or non-array: default speed buttons are shown (`
|
|
441
|
+
- Omitted or non-array: default speed buttons are shown (`0.8x`, `1.25x`).
|
|
442
442
|
- Explicit empty array (`[]`): hide all speed buttons.
|
|
443
443
|
- Invalid-only arrays (for example `["fast", -1, 1]`): fall back to defaults.
|
|
444
444
|
- Valid numeric values are deduplicated and keep first-seen order.
|
|
@@ -942,7 +942,14 @@ player.section = mySection;
|
|
|
942
942
|
|
|
943
943
|
### Safe Custom Tool Configuration
|
|
944
944
|
|
|
945
|
-
|
|
945
|
+
Default behavior is now framework-owned: invalid tools/runtime initialization is handled in `pie-assessment-toolkit` without host try/catch.
|
|
946
|
+
|
|
947
|
+
- Framework logs a deterministic console error prefix: `[pie-framework:<kind>:<source>]`
|
|
948
|
+
- Framework emits a canonical `framework-error` event (and still emits `runtime-error` for compatibility)
|
|
949
|
+
- Framework renders a fallback error panel instead of a blank player
|
|
950
|
+
- Startup tool-config validation can surface as `kind: "coordinator-init"` when the owned coordinator construction path throws.
|
|
951
|
+
|
|
952
|
+
Use `createToolsConfig()` when you want to pre-validate and inspect diagnostics before mounting:
|
|
946
953
|
|
|
947
954
|
```typescript
|
|
948
955
|
import {
|
|
@@ -980,6 +987,8 @@ Notes:
|
|
|
980
987
|
- `providers.textToSpeech` is the canonical TTS provider key.
|
|
981
988
|
- `providers.tts` is rejected by the validation contract.
|
|
982
989
|
- Custom tools can provide provider-level `sanitizeConfig` and `validateConfig` hooks.
|
|
990
|
+
- Hosts can react to framework errors via `onframework-error` listeners or `onFrameworkError` callback prop.
|
|
991
|
+
- See `docs/tools-and-accomodations/framework-owned-error-handling.md` for event payload and error-kind mapping details.
|
|
983
992
|
|
|
984
993
|
## State Separation: Tool State vs Session Data
|
|
985
994
|
|
|
@@ -1055,6 +1064,8 @@ import type {
|
|
|
1055
1064
|
- **[PNP Configuration Guide](docs/PNP_CONFIGURATION.md)** - ⭐ NEW - How to configure student profiles, district policies, and governance rules
|
|
1056
1065
|
- [ToolkitCoordinator Architecture](../../docs/architecture/TOOLKIT_COORDINATOR.md) - Design decisions and patterns
|
|
1057
1066
|
- [Section Player README](../section-player/README.md) - Section player integration
|
|
1067
|
+
- [Framework-Owned Error Handling](../../docs/tools-and-accomodations/framework-owned-error-handling.md) - Canonical framework error model/events and fallback behavior
|
|
1068
|
+
- [Safe Custom Tool Configuration](../../docs/tools-and-accomodations/safe-custom-tool-config.md) - Host-side config patterns and validation guidance
|
|
1058
1069
|
- [Architecture Overview](../../docs/architecture/architecture.md) - Complete system architecture
|
|
1059
1070
|
|
|
1060
1071
|
## License
|
|
@@ -44,11 +44,14 @@ var root_19 = $.from_html(`<i aria-hidden="true"></i>`);
|
|
|
44
44
|
var root_13 = $.from_html(`<button type="button"><!></button>`);
|
|
45
45
|
var root_21 = $.from_html(`<span class="item-toolbar__element-host svelte-rnx3ie"></span>`);
|
|
46
46
|
var root_22 = $.from_html(`<span class="item-toolbar__element-host svelte-rnx3ie"></span>`);
|
|
47
|
-
var
|
|
47
|
+
var root_25 = $.from_html(`<span class="item-toolbar__controls-host svelte-rnx3ie"></span>`);
|
|
48
|
+
var root_26 = $.from_html(`<span class="item-toolbar__controls-host svelte-rnx3ie"></span>`);
|
|
49
|
+
var root_23 = $.from_html(`<div></div>`);
|
|
50
|
+
var root_1 = $.from_html(`<div><div class="item-toolbar__tools-row svelte-rnx3ie"><!> <!> <!></div> <!></div>`);
|
|
48
51
|
|
|
49
52
|
const $$css = {
|
|
50
53
|
hash: 'svelte-rnx3ie',
|
|
51
|
-
code: '.item-toolbar.svelte-rnx3ie {display:flex;flex-direction:column;align-items:flex-end;gap:0;--pie-toolbar-tools-row-height: 2rem;--pie-tts-controls-row-height: 2.875rem;}.item-toolbar__tools-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:0.5rem;min-height:var(--pie-toolbar-tools-row-height);}.item-toolbar__controls-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;width:100%;min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-host.svelte-rnx3ie {display:inline-flex;align-items:center;justify-content:flex-end;width:100%;}.item-toolbar--top.svelte-rnx3ie,\n .item-toolbar--bottom.svelte-rnx3ie {align-items:flex-end;}.item-toolbar--left.svelte-rnx3ie,\n .item-toolbar--right.svelte-rnx3ie {align-items:stretch;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie),\n .item-toolbar--right.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie) {flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie),\n .item-toolbar--right.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie) {justify-content:flex-start;width:auto;min-height:0;height:auto;}.item-toolbar__button.svelte-rnx3ie {display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0.25rem;border:1px solid var(--pie-button-border, var(--pie-border, #ccc));border-radius:0.25rem;background-color:var(--pie-button-bg, var(--pie-background, white));color:var(--pie-button-color, var(--pie-text, #333));cursor:pointer;transition:all 0.15s ease;text-decoration:none;}.item-toolbar__element-host.svelte-rnx3ie {display:contents;}.item-toolbar--sm.svelte-rnx3ie .item-toolbar__button:where(.svelte-rnx3ie) {width:2.75rem;height:2.75rem;}.item-toolbar--sm.svelte-rnx3ie {--pie-toolbar-tools-row-height: 2.75rem;--pie-tts-controls-row-height: 3.625rem;}.item-toolbar--lg.svelte-rnx3ie .item-toolbar__button:where(.svelte-rnx3ie) {width:2.5rem;height:2.5rem;}.item-toolbar--lg.svelte-rnx3ie {--pie-toolbar-tools-row-height: 2.5rem;--pie-tts-controls-row-height: 3.375rem;}.item-toolbar__button.svelte-rnx3ie:hover:not(:disabled) {background-color:var(--pie-button-hover-bg, var(--pie-secondary-background, #f5f5f5));border-color:var(--pie-button-hover-border, var(--pie-button-border, var(--pie-border, #ccc)));color:var(--pie-button-hover-color, var(--pie-button-color, var(--pie-text, #333)));transform:translateY(-1px);box-shadow:0 2px 4px color-mix(in srgb, var(--pie-black, #000) 10%, transparent);}.item-toolbar__button.svelte-rnx3ie:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.item-toolbar__button--active.svelte-rnx3ie {background-color:var(--pie-primary, #1976d2);color:var(--pie-white, #fff);border-color:var(--pie-primary, #1976d2);}.item-toolbar__button--active.svelte-rnx3ie:hover:not(:disabled) {background-color:var(--pie-primary-dark, #1565c0);}.item-toolbar__button.svelte-rnx3ie:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #1976d2));outline-offset:2px;}.item-toolbar__button.svelte-rnx3ie:disabled {opacity:0.5;cursor:not-allowed;}.item-toolbar__button.svelte-rnx3ie svg {width:100%;height:100%;}.item-toolbar__icon-image.svelte-rnx3ie {width:100%;height:100%;object-fit:contain;}'
|
|
54
|
+
code: '.item-toolbar.svelte-rnx3ie {display:flex;flex-direction:column;align-items:flex-end;gap:0;--pie-toolbar-tools-row-height: 2rem;--pie-tts-controls-row-height: 2.875rem;}.item-toolbar__tools-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;flex-wrap:nowrap;gap:0.5rem;min-height:var(--pie-toolbar-tools-row-height);}.item-toolbar__controls-row.svelte-rnx3ie {display:flex;align-items:center;justify-content:flex-end;width:100%;min-height:0;height:auto;}.item-toolbar__controls-row--reserve.svelte-rnx3ie {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--active.svelte-rnx3ie {min-height:var(--pie-tts-controls-row-height);height:var(--pie-tts-controls-row-height);}.item-toolbar__controls-row--align-start.svelte-rnx3ie {justify-content:flex-start;}.item-toolbar__controls-host.svelte-rnx3ie {display:inline-flex;align-items:center;justify-content:flex-end;width:100%;}.item-toolbar--top.svelte-rnx3ie,\n .item-toolbar--bottom.svelte-rnx3ie {align-items:flex-end;}.item-toolbar--left.svelte-rnx3ie,\n .item-toolbar--right.svelte-rnx3ie {align-items:stretch;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie),\n .item-toolbar--right.svelte-rnx3ie .item-toolbar__tools-row:where(.svelte-rnx3ie) {flex-direction:column;align-items:center;justify-content:flex-start;flex-wrap:nowrap;}.item-toolbar--left.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie),\n .item-toolbar--right.svelte-rnx3ie .item-toolbar__controls-row:where(.svelte-rnx3ie) {justify-content:flex-start;width:auto;min-height:0;height:auto;}.item-toolbar__button.svelte-rnx3ie {display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;padding:0.25rem;border:1px solid var(--pie-button-border, var(--pie-border, #ccc));border-radius:0.25rem;background-color:var(--pie-button-bg, var(--pie-background, white));color:var(--pie-button-color, var(--pie-text, #333));cursor:pointer;transition:all 0.15s ease;text-decoration:none;}.item-toolbar__element-host.svelte-rnx3ie {display:contents;}.item-toolbar--sm.svelte-rnx3ie .item-toolbar__button:where(.svelte-rnx3ie) {width:2.75rem;height:2.75rem;}.item-toolbar--sm.svelte-rnx3ie {--pie-toolbar-tools-row-height: 2.75rem;--pie-tts-controls-row-height: 3.625rem;}.item-toolbar--lg.svelte-rnx3ie .item-toolbar__button:where(.svelte-rnx3ie) {width:2.5rem;height:2.5rem;}.item-toolbar--lg.svelte-rnx3ie {--pie-toolbar-tools-row-height: 2.5rem;--pie-tts-controls-row-height: 3.375rem;}.item-toolbar__button.svelte-rnx3ie:hover:not(:disabled) {background-color:var(--pie-button-hover-bg, var(--pie-secondary-background, #f5f5f5));border-color:var(--pie-button-hover-border, var(--pie-button-border, var(--pie-border, #ccc)));color:var(--pie-button-hover-color, var(--pie-button-color, var(--pie-text, #333)));transform:translateY(-1px);box-shadow:0 2px 4px color-mix(in srgb, var(--pie-black, #000) 10%, transparent);}.item-toolbar__button.svelte-rnx3ie:active:not(:disabled) {transform:translateY(0);box-shadow:none;}.item-toolbar__button--active.svelte-rnx3ie {background-color:var(--pie-primary, #1976d2);color:var(--pie-white, #fff);border-color:var(--pie-primary, #1976d2);}.item-toolbar__button--active.svelte-rnx3ie:hover:not(:disabled) {background-color:var(--pie-primary-dark, #1565c0);}.item-toolbar__button.svelte-rnx3ie:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #1976d2));outline-offset:2px;}.item-toolbar__button.svelte-rnx3ie:disabled {opacity:0.5;cursor:not-allowed;}.item-toolbar__button.svelte-rnx3ie svg {width:100%;height:100%;}.item-toolbar__icon-image.svelte-rnx3ie {width:100%;height:100%;object-fit:contain;}'
|
|
52
55
|
};
|
|
53
56
|
|
|
54
57
|
export default function ItemToolBar($$anchor, $$props) {
|
|
@@ -470,6 +473,22 @@ export default function ItemToolBar($$anchor, $$props) {
|
|
|
470
473
|
entry
|
|
471
474
|
}))));
|
|
472
475
|
|
|
476
|
+
const mountedElementsControlsRow = $.derived(() => $.get(renderedTools).flatMap((renderedTool) => (renderedTool.elements || []).filter((entry) => entry.mount === 'controls-row').filter((entry) => Boolean(entry.element)).map((entry, index) => ({
|
|
477
|
+
key: `controls-row-${renderedTool.toolId}-${index}`,
|
|
478
|
+
toolId: renderedTool.toolId,
|
|
479
|
+
entry
|
|
480
|
+
}))));
|
|
481
|
+
|
|
482
|
+
const controlsRowHints = $.derived(() => $.get(renderedTools).flatMap((renderedTool) => (renderedTool.elements || []).map((entry) => ({
|
|
483
|
+
toolId: renderedTool.toolId,
|
|
484
|
+
hint: entry.layoutHints?.controlsRow
|
|
485
|
+
})).filter((entry) => Boolean(entry.hint))));
|
|
486
|
+
|
|
487
|
+
const controlsRowShouldReserveSpace = $.derived(() => $.get(controlsRowHints).some((entry) => entry.hint?.reserveSpace === true));
|
|
488
|
+
const controlsRowShouldExpandForActiveTool = $.derived(() => $.get(controlsRowHints).some((entry) => entry.hint?.showWhenToolActive === true && ($.get(renderedToolActiveById)[entry.toolId] ?? false)));
|
|
489
|
+
const controlsRowAlignStart = $.derived(() => position() === 'left' || position() === 'right');
|
|
490
|
+
const shouldRenderControlsRow = $.derived(() => $.get(mountedElementsControlsRow).length > 0 || $.get(controlsRowShouldReserveSpace) || $.get(controlsRowShouldExpandForActiveTool));
|
|
491
|
+
|
|
473
492
|
function isToolbarItemActive(item) {
|
|
474
493
|
if (item.id in $.get(activeToolState)) {
|
|
475
494
|
return $.get(activeToolState)[item.id] === true;
|
|
@@ -536,6 +555,20 @@ export default function ItemToolBar($$anchor, $$props) {
|
|
|
536
555
|
});
|
|
537
556
|
});
|
|
538
557
|
|
|
558
|
+
$.user_effect(() => {
|
|
559
|
+
const toolkitCoordinator = $.get(toolbarContext).toolkitCoordinator;
|
|
560
|
+
|
|
561
|
+
if (typeof toolkitCoordinator?.subscribeTelemetry !== 'function') return;
|
|
562
|
+
|
|
563
|
+
return toolkitCoordinator.subscribeTelemetry(({ eventName, payload }) => {
|
|
564
|
+
if (eventName !== 'tool-config-updated') return;
|
|
565
|
+
if (payload?.toolId && !$.get(toolbarVisibleToolIds).includes(payload.toolId)) return;
|
|
566
|
+
|
|
567
|
+
$.set(moduleLoadVersion, $.get(moduleLoadVersion) + 1);
|
|
568
|
+
syncRenderedToolsState();
|
|
569
|
+
});
|
|
570
|
+
});
|
|
571
|
+
|
|
539
572
|
function mountElement(node, element) {
|
|
540
573
|
let mountedElement = null;
|
|
541
574
|
|
|
@@ -1265,7 +1298,7 @@ export default function ItemToolBar($$anchor, $$props) {
|
|
|
1265
1298
|
var node_1 = $.first_child(fragment);
|
|
1266
1299
|
|
|
1267
1300
|
{
|
|
1268
|
-
var
|
|
1301
|
+
var consequent_13 = ($$anchor) => {
|
|
1269
1302
|
var div = root_1();
|
|
1270
1303
|
let classes;
|
|
1271
1304
|
var div_1 = $.child(div);
|
|
@@ -1550,7 +1583,61 @@ export default function ItemToolBar($$anchor, $$props) {
|
|
|
1550
1583
|
});
|
|
1551
1584
|
|
|
1552
1585
|
$.reset(div_1);
|
|
1553
|
-
|
|
1586
|
+
|
|
1587
|
+
var node_18 = $.sibling(div_1, 2);
|
|
1588
|
+
|
|
1589
|
+
{
|
|
1590
|
+
var consequent_12 = ($$anchor) => {
|
|
1591
|
+
var div_2 = root_23();
|
|
1592
|
+
let classes_3;
|
|
1593
|
+
|
|
1594
|
+
$.each(div_2, 21, () => $.get(mountedElementsControlsRow), (mounted) => mounted.key, ($$anchor, mounted) => {
|
|
1595
|
+
var fragment_12 = $.comment();
|
|
1596
|
+
var node_19 = $.first_child(fragment_12);
|
|
1597
|
+
|
|
1598
|
+
{
|
|
1599
|
+
var consequent_11 = ($$anchor) => {
|
|
1600
|
+
var span_4 = root_25();
|
|
1601
|
+
|
|
1602
|
+
$.action(span_4, ($$node, $$action_arg) => mountElementWithShell?.($$node, $$action_arg), () => ({
|
|
1603
|
+
mounted: $.get(mounted),
|
|
1604
|
+
active: $.get(renderedToolActiveById)[$.get(mounted).toolId] ?? false
|
|
1605
|
+
}));
|
|
1606
|
+
|
|
1607
|
+
$.append($$anchor, span_4);
|
|
1608
|
+
};
|
|
1609
|
+
|
|
1610
|
+
var alternate_7 = ($$anchor) => {
|
|
1611
|
+
var span_5 = root_26();
|
|
1612
|
+
|
|
1613
|
+
$.action(span_5, ($$node, $$action_arg) => mountElement?.($$node, $$action_arg), () => $.get(mounted).entry.element);
|
|
1614
|
+
$.append($$anchor, span_5);
|
|
1615
|
+
};
|
|
1616
|
+
|
|
1617
|
+
$.if(node_19, ($$render) => {
|
|
1618
|
+
if ($.get(mounted).entry.shell) $$render(consequent_11); else $$render(alternate_7, -1);
|
|
1619
|
+
});
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
$.append($$anchor, fragment_12);
|
|
1623
|
+
});
|
|
1624
|
+
|
|
1625
|
+
$.reset(div_2);
|
|
1626
|
+
|
|
1627
|
+
$.template_effect(() => classes_3 = $.set_class(div_2, 1, 'item-toolbar__controls-row svelte-rnx3ie', null, classes_3, {
|
|
1628
|
+
'item-toolbar__controls-row--reserve': $.get(controlsRowShouldReserveSpace),
|
|
1629
|
+
'item-toolbar__controls-row--active': $.get(controlsRowShouldExpandForActiveTool),
|
|
1630
|
+
'item-toolbar__controls-row--align-start': $.get(controlsRowAlignStart)
|
|
1631
|
+
}));
|
|
1632
|
+
|
|
1633
|
+
$.append($$anchor, div_2);
|
|
1634
|
+
};
|
|
1635
|
+
|
|
1636
|
+
$.if(node_18, ($$render) => {
|
|
1637
|
+
if ($.get(shouldRenderControlsRow)) $$render(consequent_12);
|
|
1638
|
+
});
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1554
1641
|
$.reset(div);
|
|
1555
1642
|
$.bind_this(div, ($$value) => $.set(toolbarRootElement, $$value), () => $.get(toolbarRootElement));
|
|
1556
1643
|
|
|
@@ -1570,7 +1657,7 @@ export default function ItemToolBar($$anchor, $$props) {
|
|
|
1570
1657
|
};
|
|
1571
1658
|
|
|
1572
1659
|
$.if(node_1, ($$render) => {
|
|
1573
|
-
if (isBrowser) $$render(
|
|
1660
|
+
if (isBrowser) $$render(consequent_13);
|
|
1574
1661
|
});
|
|
1575
1662
|
}
|
|
1576
1663
|
|
|
@@ -33,6 +33,8 @@ import {
|
|
|
33
33
|
|
|
34
34
|
import { connectAssessmentToolkitHostRuntimeContext } from "../context/runtime-context-consumer.js";
|
|
35
35
|
import { ToolkitCoordinator } from "../services/ToolkitCoordinator.js";
|
|
36
|
+
import { formatFrameworkErrorForConsole, frameworkErrorFromUnknown } from "../services/framework-error.js";
|
|
37
|
+
import { normalizeAndValidateToolsConfig } from "../services/tool-config-validation.js";
|
|
36
38
|
|
|
37
39
|
import {
|
|
38
40
|
PIE_INTERNAL_CONTENT_LOADED_EVENT,
|
|
@@ -52,11 +54,12 @@ import {
|
|
|
52
54
|
shouldEmitCanonicalSessionEvent
|
|
53
55
|
} from "../runtime/session-event-emitter-policy.js";
|
|
54
56
|
|
|
57
|
+
var root_1 = $.from_html(`<div class="pie-assessment-toolkit-error svelte-vpe4u2" role="alert" aria-live="assertive"><div class="pie-assessment-toolkit-error-title svelte-vpe4u2"> </div> <div class="pie-assessment-toolkit-error-message svelte-vpe4u2"> </div> <pre class="pie-assessment-toolkit-error-details svelte-vpe4u2"> </pre></div>`);
|
|
55
58
|
var root = $.from_html(`<div class="pie-assessment-toolkit-anchor svelte-vpe4u2" aria-hidden="true"></div> <!>`, 1);
|
|
56
59
|
|
|
57
60
|
const $$css = {
|
|
58
61
|
hash: 'svelte-vpe4u2',
|
|
59
|
-
code: '.pie-assessment-toolkit-anchor.svelte-vpe4u2 {display:none;}'
|
|
62
|
+
code: '.pie-assessment-toolkit-anchor.svelte-vpe4u2 {display:none;}.pie-assessment-toolkit-error.svelte-vpe4u2 {margin:0.75rem;padding:0.75rem 1rem;border-radius:0.5rem;border:1px solid color-mix(in srgb, #dc2626 40%, transparent);background:color-mix(in srgb, #dc2626 12%, transparent);color:#7f1d1d;font-size:0.9rem;}.pie-assessment-toolkit-error-title.svelte-vpe4u2 {font-weight:600;margin-bottom:0.25rem;}.pie-assessment-toolkit-error-message.svelte-vpe4u2 {margin-bottom:0.5rem;}.pie-assessment-toolkit-error-details.svelte-vpe4u2 {margin:0;white-space:pre-wrap;word-break:break-word;}'
|
|
60
63
|
};
|
|
61
64
|
|
|
62
65
|
export default function PieAssessmentToolkit($$anchor, $$props) {
|
|
@@ -89,6 +92,10 @@ export default function PieAssessmentToolkit($$anchor, $$props) {
|
|
|
89
92
|
playerType = $.prop($$props, 'playerType', 7, ""),
|
|
90
93
|
coordinator = $.prop($$props, 'coordinator', 7, null),
|
|
91
94
|
createSectionController = $.prop($$props, 'createSectionController', 7, null),
|
|
95
|
+
frameworkErrorCallback = $.prop($$props, 'frameworkErrorHook', 7, null),
|
|
96
|
+
onFrameworkError = $.prop($$props, 'onFrameworkError', 7, null),
|
|
97
|
+
onframeworkerror = $.prop($$props, 'onframeworkerror', 7, null),
|
|
98
|
+
errorRenderer = $.prop($$props, 'errorRenderer', 7, null),
|
|
92
99
|
isolation = $.prop($$props, 'isolation', 7, "inherit");
|
|
93
100
|
|
|
94
101
|
let anchor = $.state(null);
|
|
@@ -102,10 +109,16 @@ export default function PieAssessmentToolkit($$anchor, $$props) {
|
|
|
102
109
|
let compositionVersion = $.state(0);
|
|
103
110
|
let compositionModel = $.state(null);
|
|
104
111
|
let runtimeError = $.state(null);
|
|
112
|
+
let frameworkErrorModel = $.state(null);
|
|
113
|
+
let frameworkErrorTitle = $.state("Unable to initialize assessment toolkit.");
|
|
114
|
+
let frameworkErrorDetails = $.state($.proxy([]));
|
|
115
|
+
let deliveredFrameworkErrorKey = $.state("");
|
|
116
|
+
let lastOwnedBootstrapFailureKey = $.state("");
|
|
105
117
|
let lastCompositionRevisionKey = $.state("");
|
|
106
118
|
let pendingCompositionModel = null;
|
|
107
119
|
let pendingCompositionEmit = false;
|
|
108
120
|
let compositionEmitRaf = null;
|
|
121
|
+
let pendingCrossBoundaryEvents = [];
|
|
109
122
|
const sessionEmitPolicyState = createSessionEmitPolicyState();
|
|
110
123
|
|
|
111
124
|
function getHostElement() {
|
|
@@ -123,11 +136,123 @@ export default function PieAssessmentToolkit($$anchor, $$props) {
|
|
|
123
136
|
const host = $.derived(() => getHostElement());
|
|
124
137
|
|
|
125
138
|
function emit(name, detail) {
|
|
126
|
-
if (!$.get(host))
|
|
139
|
+
if (!$.get(host)) {
|
|
140
|
+
pendingCrossBoundaryEvents = [...pendingCrossBoundaryEvents, { name, detail }];
|
|
141
|
+
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
127
144
|
|
|
128
145
|
dispatchCrossBoundaryEvent($.get(host), name, detail);
|
|
129
146
|
}
|
|
130
147
|
|
|
148
|
+
$.user_effect(() => {
|
|
149
|
+
if (!$.get(host)) return;
|
|
150
|
+
if (pendingCrossBoundaryEvents.length === 0) return;
|
|
151
|
+
|
|
152
|
+
const queued = pendingCrossBoundaryEvents;
|
|
153
|
+
|
|
154
|
+
pendingCrossBoundaryEvents = [];
|
|
155
|
+
|
|
156
|
+
queueMicrotask(() => {
|
|
157
|
+
const resolvedHost = $.get(host);
|
|
158
|
+
|
|
159
|
+
if (!resolvedHost) {
|
|
160
|
+
pendingCrossBoundaryEvents = [...queued, ...pendingCrossBoundaryEvents];
|
|
161
|
+
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
for (const event of queued) {
|
|
166
|
+
dispatchCrossBoundaryEvent(resolvedHost, event.name, event.detail);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
function applyErrorRenderer(model) {
|
|
172
|
+
if (!errorRenderer()) {
|
|
173
|
+
return {
|
|
174
|
+
title: "Unable to initialize assessment toolkit.",
|
|
175
|
+
details: model.details.length > 0 ? model.details : [model.message]
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
try {
|
|
180
|
+
const rendered = errorRenderer()(model) || {};
|
|
181
|
+
|
|
182
|
+
return {
|
|
183
|
+
title: typeof rendered.title === "string" && rendered.title.trim().length > 0
|
|
184
|
+
? rendered.title
|
|
185
|
+
: "Unable to initialize assessment toolkit.",
|
|
186
|
+
|
|
187
|
+
details: Array.isArray(rendered.details) && rendered.details.length > 0
|
|
188
|
+
? rendered.details.map((detail) => String(detail))
|
|
189
|
+
: model.details.length > 0 ? model.details : [model.message]
|
|
190
|
+
};
|
|
191
|
+
} catch(rendererError) {
|
|
192
|
+
const message = rendererError instanceof Error && rendererError.message.trim().length > 0
|
|
193
|
+
? rendererError.message
|
|
194
|
+
: String(rendererError || "Unknown renderer error");
|
|
195
|
+
|
|
196
|
+
return {
|
|
197
|
+
title: "Unable to initialize assessment toolkit.",
|
|
198
|
+
details: [...model.details, `Error renderer failed: ${message}`]
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function reportFrameworkError(args) {
|
|
204
|
+
const model = frameworkErrorFromUnknown({
|
|
205
|
+
kind: args.kind,
|
|
206
|
+
source: args.source,
|
|
207
|
+
error: args.error,
|
|
208
|
+
recoverable: args.recoverable
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
console.error(formatFrameworkErrorForConsole(model), model.cause);
|
|
212
|
+
|
|
213
|
+
const rendered = applyErrorRenderer(model);
|
|
214
|
+
|
|
215
|
+
$.set(frameworkErrorModel, model, true);
|
|
216
|
+
$.set(frameworkErrorTitle, rendered.title, true);
|
|
217
|
+
$.set(frameworkErrorDetails, rendered.details, true);
|
|
218
|
+
emit("framework-error", model);
|
|
219
|
+
emit("runtime-error", { runtimeId, error: args.error, frameworkError: model });
|
|
220
|
+
|
|
221
|
+
const frameworkErrorHook = frameworkErrorCallback() ?? onFrameworkError() ?? onframeworkerror();
|
|
222
|
+
|
|
223
|
+
if (frameworkErrorHook) {
|
|
224
|
+
try {
|
|
225
|
+
frameworkErrorHook(model);
|
|
226
|
+
$.set(deliveredFrameworkErrorKey, `${model.kind}|${model.source}|${model.message}`);
|
|
227
|
+
} catch(hookError) {
|
|
228
|
+
console.error(`[pie-framework:runtime-init:pie-assessment-toolkit] framework error hook failed`, hookError);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return model;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
$.user_effect(() => {
|
|
236
|
+
if (!$.get(frameworkErrorModel)) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const frameworkErrorKey = `${$.get(frameworkErrorModel).kind}|${$.get(frameworkErrorModel).source}|${$.get(frameworkErrorModel).message}`;
|
|
241
|
+
|
|
242
|
+
if ($.get(deliveredFrameworkErrorKey) === frameworkErrorKey) return;
|
|
243
|
+
|
|
244
|
+
const frameworkErrorHook = frameworkErrorCallback() ?? onFrameworkError() ?? onframeworkerror();
|
|
245
|
+
|
|
246
|
+
if (!frameworkErrorHook) return;
|
|
247
|
+
|
|
248
|
+
try {
|
|
249
|
+
frameworkErrorHook($.get(frameworkErrorModel));
|
|
250
|
+
$.set(deliveredFrameworkErrorKey, frameworkErrorKey);
|
|
251
|
+
} catch(hookError) {
|
|
252
|
+
console.error(`[pie-framework:runtime-init:pie-assessment-toolkit] framework error hook failed`, hookError);
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
|
|
131
256
|
function hashString(input) {
|
|
132
257
|
let hash = 5381;
|
|
133
258
|
|
|
@@ -267,14 +392,39 @@ export default function PieAssessmentToolkit($$anchor, $$props) {
|
|
|
267
392
|
throw new Error("pie-assessment-toolkit requires createSectionController when no coordinator hook provides one");
|
|
268
393
|
}
|
|
269
394
|
|
|
270
|
-
function
|
|
395
|
+
function validateToolsConfigForBootstrap() {
|
|
396
|
+
return normalizeAndValidateToolsConfig(tools(), {
|
|
397
|
+
strictness: toolConfigStrictness(),
|
|
398
|
+
source: "pie-assessment-toolkit.bootstrap",
|
|
399
|
+
toolRegistry: toolRegistry()
|
|
400
|
+
}).config;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
function getOwnedBootstrapFailureKey() {
|
|
404
|
+
let toolsSignature = "";
|
|
405
|
+
|
|
406
|
+
try {
|
|
407
|
+
toolsSignature = JSON.stringify(tools() || {});
|
|
408
|
+
} catch {
|
|
409
|
+
toolsSignature = "[unserializable-tools]";
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
return [
|
|
413
|
+
assessmentId() || "",
|
|
414
|
+
String(toolConfigStrictness() || "error"),
|
|
415
|
+
toolsSignature
|
|
416
|
+
].join("|");
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
function buildOwnedCoordinator(validatedTools) {
|
|
271
420
|
const fallbackAssessmentId = assessmentId() || section()?.identifier || `assessment-${Math.random().toString(16).slice(2)}`;
|
|
272
421
|
|
|
273
422
|
return new ToolkitCoordinator({
|
|
274
423
|
assessmentId: fallbackAssessmentId,
|
|
275
424
|
lazyInit: lazyInit(),
|
|
276
425
|
toolConfigStrictness: toolConfigStrictness(),
|
|
277
|
-
|
|
426
|
+
deferToolConfigValidation: true,
|
|
427
|
+
tools: validatedTools,
|
|
278
428
|
toolRegistry: toolRegistry(),
|
|
279
429
|
accessibility: accessibility()
|
|
280
430
|
});
|
|
@@ -289,6 +439,8 @@ export default function PieAssessmentToolkit($$anchor, $$props) {
|
|
|
289
439
|
});
|
|
290
440
|
|
|
291
441
|
$.user_effect(() => {
|
|
442
|
+
if (!$.get(host)) return;
|
|
443
|
+
|
|
292
444
|
if (coordinator()) {
|
|
293
445
|
if ($.get(ownedCoordinator)) {
|
|
294
446
|
$.set(ownedCoordinator, null);
|
|
@@ -306,7 +458,31 @@ export default function PieAssessmentToolkit($$anchor, $$props) {
|
|
|
306
458
|
}
|
|
307
459
|
|
|
308
460
|
if (!$.get(ownedCoordinator)) {
|
|
309
|
-
|
|
461
|
+
const failureKey = getOwnedBootstrapFailureKey();
|
|
462
|
+
|
|
463
|
+
if ($.get(lastOwnedBootstrapFailureKey) === failureKey) {
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
try {
|
|
468
|
+
const validatedTools = validateToolsConfigForBootstrap();
|
|
469
|
+
|
|
470
|
+
$.set(ownedCoordinator, buildOwnedCoordinator(validatedTools), true);
|
|
471
|
+
$.set(lastOwnedBootstrapFailureKey, "");
|
|
472
|
+
$.set(frameworkErrorModel, null);
|
|
473
|
+
$.set(frameworkErrorTitle, "Unable to initialize assessment toolkit.");
|
|
474
|
+
$.set(frameworkErrorDetails, [], true);
|
|
475
|
+
} catch(error) {
|
|
476
|
+
$.set(runtimeError, error, true);
|
|
477
|
+
$.set(ownedCoordinator, null);
|
|
478
|
+
$.set(lastOwnedBootstrapFailureKey, failureKey, true);
|
|
479
|
+
|
|
480
|
+
reportFrameworkError({
|
|
481
|
+
kind: "coordinator-init",
|
|
482
|
+
source: "pie-assessment-toolkit",
|
|
483
|
+
error
|
|
484
|
+
});
|
|
485
|
+
}
|
|
310
486
|
}
|
|
311
487
|
});
|
|
312
488
|
|
|
@@ -619,7 +795,12 @@ export default function PieAssessmentToolkit($$anchor, $$props) {
|
|
|
619
795
|
}).catch((error) => {
|
|
620
796
|
$.set(runtimeError, error, true);
|
|
621
797
|
sectionEngine.reportSectionError({ source: "section-runtime", error, timestamp: Date.now() });
|
|
622
|
-
|
|
798
|
+
|
|
799
|
+
reportFrameworkError({
|
|
800
|
+
kind: "runtime-init",
|
|
801
|
+
source: "pie-assessment-toolkit",
|
|
802
|
+
error
|
|
803
|
+
});
|
|
623
804
|
});
|
|
624
805
|
|
|
625
806
|
return () => {
|
|
@@ -785,6 +966,13 @@ export default function PieAssessmentToolkit($$anchor, $$props) {
|
|
|
785
966
|
|
|
786
967
|
void sectionEngine.dispose().catch((error) => {
|
|
787
968
|
$.set(runtimeError, error, true);
|
|
969
|
+
|
|
970
|
+
reportFrameworkError({
|
|
971
|
+
kind: "runtime-dispose",
|
|
972
|
+
source: "pie-assessment-toolkit",
|
|
973
|
+
error,
|
|
974
|
+
recoverable: true
|
|
975
|
+
});
|
|
788
976
|
});
|
|
789
977
|
};
|
|
790
978
|
});
|
|
@@ -933,6 +1121,42 @@ export default function PieAssessmentToolkit($$anchor, $$props) {
|
|
|
933
1121
|
$.flush();
|
|
934
1122
|
},
|
|
935
1123
|
|
|
1124
|
+
get frameworkErrorHook() {
|
|
1125
|
+
return frameworkErrorCallback();
|
|
1126
|
+
},
|
|
1127
|
+
|
|
1128
|
+
set frameworkErrorHook($$value) {
|
|
1129
|
+
frameworkErrorCallback($$value);
|
|
1130
|
+
$.flush();
|
|
1131
|
+
},
|
|
1132
|
+
|
|
1133
|
+
get onFrameworkError() {
|
|
1134
|
+
return onFrameworkError();
|
|
1135
|
+
},
|
|
1136
|
+
|
|
1137
|
+
set onFrameworkError($$value) {
|
|
1138
|
+
onFrameworkError($$value);
|
|
1139
|
+
$.flush();
|
|
1140
|
+
},
|
|
1141
|
+
|
|
1142
|
+
get onframeworkerror() {
|
|
1143
|
+
return onframeworkerror();
|
|
1144
|
+
},
|
|
1145
|
+
|
|
1146
|
+
set onframeworkerror($$value) {
|
|
1147
|
+
onframeworkerror($$value);
|
|
1148
|
+
$.flush();
|
|
1149
|
+
},
|
|
1150
|
+
|
|
1151
|
+
get errorRenderer() {
|
|
1152
|
+
return errorRenderer();
|
|
1153
|
+
},
|
|
1154
|
+
|
|
1155
|
+
set errorRenderer($$value) {
|
|
1156
|
+
errorRenderer($$value);
|
|
1157
|
+
$.flush();
|
|
1158
|
+
},
|
|
1159
|
+
|
|
936
1160
|
get isolation() {
|
|
937
1161
|
return isolation();
|
|
938
1162
|
},
|
|
@@ -950,7 +1174,50 @@ export default function PieAssessmentToolkit($$anchor, $$props) {
|
|
|
950
1174
|
|
|
951
1175
|
var node = $.sibling(div, 2);
|
|
952
1176
|
|
|
953
|
-
|
|
1177
|
+
{
|
|
1178
|
+
var consequent = ($$anchor) => {
|
|
1179
|
+
var div_1 = root_1();
|
|
1180
|
+
var div_2 = $.child(div_1);
|
|
1181
|
+
var text = $.child(div_2, true);
|
|
1182
|
+
|
|
1183
|
+
$.reset(div_2);
|
|
1184
|
+
|
|
1185
|
+
var div_3 = $.sibling(div_2, 2);
|
|
1186
|
+
var text_1 = $.child(div_3, true);
|
|
1187
|
+
|
|
1188
|
+
$.reset(div_3);
|
|
1189
|
+
|
|
1190
|
+
var pre = $.sibling(div_3, 2);
|
|
1191
|
+
var text_2 = $.child(pre, true);
|
|
1192
|
+
|
|
1193
|
+
$.reset(pre);
|
|
1194
|
+
$.reset(div_1);
|
|
1195
|
+
|
|
1196
|
+
$.template_effect(
|
|
1197
|
+
($0) => {
|
|
1198
|
+
$.set_text(text, $.get(frameworkErrorTitle));
|
|
1199
|
+
$.set_text(text_1, $.get(frameworkErrorModel).message);
|
|
1200
|
+
$.set_text(text_2, $0);
|
|
1201
|
+
},
|
|
1202
|
+
[() => $.get(frameworkErrorDetails).join("\n")]
|
|
1203
|
+
);
|
|
1204
|
+
|
|
1205
|
+
$.append($$anchor, div_1);
|
|
1206
|
+
};
|
|
1207
|
+
|
|
1208
|
+
var alternate = ($$anchor) => {
|
|
1209
|
+
var fragment_1 = $.comment();
|
|
1210
|
+
var node_1 = $.first_child(fragment_1);
|
|
1211
|
+
|
|
1212
|
+
$.slot(node_1, $$props, 'default', {}, null);
|
|
1213
|
+
$.append($$anchor, fragment_1);
|
|
1214
|
+
};
|
|
1215
|
+
|
|
1216
|
+
$.if(node, ($$render) => {
|
|
1217
|
+
if ($.get(frameworkErrorModel) && !$.get(frameworkErrorModel).recoverable) $$render(consequent); else $$render(alternate, -1);
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
|
|
954
1221
|
$.append($$anchor, fragment);
|
|
955
1222
|
|
|
956
1223
|
return $.pop($$exports);
|
|
@@ -974,6 +1241,10 @@ __pieDefineSafely('pie-assessment-toolkit', $.create_custom_element(
|
|
|
974
1241
|
playerType: { attribute: 'player-type', type: 'String' },
|
|
975
1242
|
coordinator: { type: 'Object' },
|
|
976
1243
|
createSectionController: { type: 'Object' },
|
|
1244
|
+
frameworkErrorHook: { type: 'Object' },
|
|
1245
|
+
onFrameworkError: { type: 'Object' },
|
|
1246
|
+
onframeworkerror: { type: 'Object' },
|
|
1247
|
+
errorRenderer: { type: 'Object' },
|
|
977
1248
|
isolation: { attribute: 'isolation', type: 'String' }
|
|
978
1249
|
},
|
|
979
1250
|
['default'],
|
package/dist/index.d.ts
CHANGED
|
@@ -46,16 +46,20 @@ export { ToolCoordinator, ZIndexLayer } from "./services/ToolCoordinator.js";
|
|
|
46
46
|
export type { AnswerEliminatorToolConfig, ProviderLifecycleContext, SectionControllerContext, SectionControllerEvent, SectionControllerEventType, SectionItemEvent, SectionItemEventType, SectionControllerFactoryDefaults, SectionControllerHandle, SectionControllerKey, SectionScopedEvent, SectionScopedEventType, SectionSessionPersistenceConfig, SectionItemEventSubscriptionArgs, SectionScopedEventSubscriptionArgs, SectionEventSubscriptionArgs, SectionSessionPersistenceStrategy, SectionControllerRuntimeState, SectionControllerSessionState, SectionPersistenceFactoryDefaults, ToolConfig, ToolkitCoordinatorConfig, ToolkitCoordinatorHooks, ToolkitErrorContext, ToolkitInitStatus, ToolkitServiceBundle, ToolkitToolsConfig, TTSToolConfig, } from "./services/ToolkitCoordinator.js";
|
|
47
47
|
export { ToolkitCoordinator } from "./services/ToolkitCoordinator.js";
|
|
48
48
|
export type { CanonicalToolsConfig, ToolPlacementConfig, ToolPlacementLevel, ToolPolicyConfig, ToolProvidersConfig, } from "./services/tools-config-normalizer.js";
|
|
49
|
+
export type { FrameworkErrorKind, FrameworkErrorModel, FrameworkErrorSeverity, } from "./services/framework-error.js";
|
|
50
|
+
export { formatFrameworkErrorForConsole, frameworkErrorFromToolConfigDiagnostics, frameworkErrorFromUnknown, toFrameworkErrorModel, } from "./services/framework-error.js";
|
|
49
51
|
export type { ToolConfigDiagnostic, ToolConfigDiagnosticSeverity, ToolConfigStrictness, ToolConfigValidationOptions, ToolConfigValidationResult, } from "./services/tool-config-validation.js";
|
|
50
52
|
export type { ToolbarButtonItem, ToolbarItem, ToolbarItemBase, ToolbarLinkItem, } from "./services/toolbar-items.js";
|
|
51
53
|
export { isExternalIconUrl, isInlineSvgIcon, isToolbarLinkItem, isValidToolbarItemShape, } from "./services/toolbar-items.js";
|
|
52
54
|
export { normalizeToolsConfig, normalizeToolAlias, normalizeToolList, parseToolList, resolveToolsForLevel, } from "./services/tools-config-normalizer.js";
|
|
53
|
-
export { normalizeAndValidateToolsConfig } from "./services/tool-config-validation.js";
|
|
55
|
+
export { frameworkErrorFromToolConfigValidation, normalizeAndValidateToolsConfig, } from "./services/tool-config-validation.js";
|
|
54
56
|
export type { ParsedToolInstanceId, ToolScopeLevel, } from "./services/tool-instance-id.js";
|
|
55
57
|
export { createScopedToolId, parseScopedToolId, toOverlayToolId, } from "./services/tool-instance-id.js";
|
|
56
58
|
export type { TTSConfig } from "./services/TTSService.js";
|
|
57
59
|
export { PlaybackState, TTSService } from "./services/TTSService.js";
|
|
58
60
|
export { BrowserTTSProvider } from "./services/tts/browser-provider.js";
|
|
61
|
+
export type { TTSHostToolbarLayout, TTSLayoutMode, TTSRuntimeSettings, } from "./services/tts-runtime-config.js";
|
|
62
|
+
export { DEFAULT_TTS_SPEED_OPTIONS, formatTTSSpeedOptionsAsText, normalizeTTSLayoutMode, normalizeTTSSpeedOptions, parseTTSSpeedOptionsFromText, resolveTTSHostToolbarLayout, resolveTTSLayoutMode, resolveTTSRuntimeSettings, } from "./services/tts-runtime-config.js";
|
|
59
63
|
export type { ITTSProvider, ITTSProviderImplementation, TTSSpeechSegment, TTSFeature, TTSProviderCapabilities, } from "@pie-players/pie-tts";
|
|
60
64
|
export type { CreateLoadItemOptions, LoadItem, LoadItemOptions, } from "./item-loader.js";
|
|
61
65
|
export { createFetchItemLoader, createLoadItem, ItemLoadError, } from "./item-loader.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,YAAY,EACX,mCAAmC,EACnC,mCAAmC,EACnC,+BAA+B,EAC/B,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B,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,GACpB,MAAM,gCAAgC,CAAC;AACxC,YAAY,EACX,2BAA2B,EAC3B,mCAAmC,EACnC,4BAA4B,EAC5B,yBAAyB,EACzB,yBAAyB,GACzB,MAAM,wDAAwD,CAAC;AAChE,OAAO,EACN,8BAA8B,EAC9B,+CAA+C,EAC/C,+BAA+B,EAC/B,oBAAoB,GACpB,MAAM,wDAAwD,CAAC;AAMhE,YAAY,EACX,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EAEtB,uBAAuB,EACvB,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,0BAA0B,EAC1B,uBAAuB,EACvB,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAEhB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,GACrB,MAAM,mBAAmB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -37,12 +37,14 @@ export { ThemeProvider } from "./services/ThemeProvider.js";
|
|
|
37
37
|
// Tool Coordinator
|
|
38
38
|
export { ToolCoordinator, ZIndexLayer } from "./services/ToolCoordinator.js";
|
|
39
39
|
export { ToolkitCoordinator } from "./services/ToolkitCoordinator.js";
|
|
40
|
+
export { formatFrameworkErrorForConsole, frameworkErrorFromToolConfigDiagnostics, frameworkErrorFromUnknown, toFrameworkErrorModel, } from "./services/framework-error.js";
|
|
40
41
|
export { isExternalIconUrl, isInlineSvgIcon, isToolbarLinkItem, isValidToolbarItemShape, } from "./services/toolbar-items.js";
|
|
41
42
|
export { normalizeToolsConfig, normalizeToolAlias, normalizeToolList, parseToolList, resolveToolsForLevel, } from "./services/tools-config-normalizer.js";
|
|
42
|
-
export { normalizeAndValidateToolsConfig } from "./services/tool-config-validation.js";
|
|
43
|
+
export { frameworkErrorFromToolConfigValidation, normalizeAndValidateToolsConfig, } from "./services/tool-config-validation.js";
|
|
43
44
|
export { createScopedToolId, parseScopedToolId, toOverlayToolId, } from "./services/tool-instance-id.js";
|
|
44
45
|
export { PlaybackState, TTSService } from "./services/TTSService.js";
|
|
45
46
|
export { BrowserTTSProvider } from "./services/tts/browser-provider.js";
|
|
47
|
+
export { DEFAULT_TTS_SPEED_OPTIONS, formatTTSSpeedOptionsAsText, normalizeTTSLayoutMode, normalizeTTSSpeedOptions, parseTTSSpeedOptionsFromText, resolveTTSHostToolbarLayout, resolveTTSLayoutMode, resolveTTSRuntimeSettings, } from "./services/tts-runtime-config.js";
|
|
46
48
|
export { createFetchItemLoader, createLoadItem, ItemLoadError, } from "./item-loader.js";
|
|
47
49
|
export { createMemoryStorage, createTestAttemptSessionIdentifier, createNewTestAttemptSession, getBrowserLocalStorage, getOrCreateAnonymousDeviceId, getTestAttemptSessionStorageKey, loadTestAttemptSession, saveTestAttemptSession, setCurrentPosition, upsertItemSessionFromPieSessionChange, upsertVisitedItem, } from "./attempt/TestSession.js";
|
|
48
50
|
export { createNewAssessmentSession, getAssessmentSessionStorageKey, loadAssessmentSession, saveAssessmentSession, setCurrentSectionPosition, upsertSectionSession, } from "./attempt/AssessmentSession.js";
|