@pie-players/pie-section-player 0.3.0 → 0.3.2
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/dist/component-definitions.d.ts.map +1 -1
- package/dist/index-CGEKDUBQ.js +228 -0
- package/dist/index-DF-Dk87f.js +192 -0
- package/dist/pie-section-player.js +12178 -55907
- package/dist/tool-annotation-toolbar-m4Mv2j0H.js +4305 -0
- package/package.json +12 -17
- package/src/components/PieSectionPlayerBaseElement.svelte +23 -2
- package/src/components/PieSectionPlayerSplitPaneElement.svelte +1 -8
- package/src/components/PieSectionPlayerVerticalElement.svelte +1 -8
- package/dist/pie-item-player-DDIEaTcw.js +0 -6196
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-players/pie-section-player",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Web component for rendering QTI 3.0 assessment sections with passages and items",
|
|
6
6
|
"license": "MIT",
|
|
@@ -46,25 +46,20 @@
|
|
|
46
46
|
"lint": "biome check ."
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
+
"@pie-players/pie-tool-annotation-toolbar": "0.3.2",
|
|
49
50
|
"svelte": "^5.51.0"
|
|
50
51
|
},
|
|
52
|
+
"peerDependenciesMeta": {
|
|
53
|
+
"@pie-players/pie-tool-annotation-toolbar": {
|
|
54
|
+
"optional": true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
51
57
|
"dependencies": {
|
|
52
|
-
"@pie-players/pie-assessment-toolkit": "0.3.
|
|
53
|
-
"@pie-players/pie-item-player": "0.3.
|
|
54
|
-
"@pie-players/pie-context": "0.3.
|
|
55
|
-
"@pie-players/pie-players-shared": "0.3.
|
|
56
|
-
"@pie-players/pie-toolbars": "0.3.
|
|
57
|
-
"@pie-players/pie-tool-answer-eliminator": "0.3.0",
|
|
58
|
-
"@pie-players/pie-tool-annotation-toolbar": "0.3.0",
|
|
59
|
-
"@pie-players/pie-tool-calculator": "0.3.0",
|
|
60
|
-
"@pie-players/pie-tool-theme": "0.3.0",
|
|
61
|
-
"@pie-players/pie-tool-graph": "0.3.0",
|
|
62
|
-
"@pie-players/pie-tool-line-reader": "0.3.0",
|
|
63
|
-
"@pie-players/pie-tool-periodic-table": "0.3.0",
|
|
64
|
-
"@pie-players/pie-tool-protractor": "0.3.0",
|
|
65
|
-
"@pie-players/pie-tool-ruler": "0.3.0",
|
|
66
|
-
"@pie-players/pie-tool-text-to-speech": "0.3.0",
|
|
67
|
-
"@pie-players/tts-client-server": "0.3.0",
|
|
58
|
+
"@pie-players/pie-assessment-toolkit": "0.3.2",
|
|
59
|
+
"@pie-players/pie-item-player": "0.3.2",
|
|
60
|
+
"@pie-players/pie-context": "0.3.2",
|
|
61
|
+
"@pie-players/pie-players-shared": "0.3.2",
|
|
62
|
+
"@pie-players/pie-toolbars": "0.3.2",
|
|
68
63
|
"daisyui": "^5.5.18"
|
|
69
64
|
},
|
|
70
65
|
"devDependencies": {
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
|
|
24
24
|
<script lang="ts">
|
|
25
25
|
import "@pie-players/pie-assessment-toolkit/components/pie-assessment-toolkit-element";
|
|
26
|
-
import "@pie-players/pie-tool-annotation-toolbar";
|
|
27
26
|
import {
|
|
28
27
|
createDefaultPersonalNeedsProfile,
|
|
29
28
|
} from "@pie-players/pie-assessment-toolkit";
|
|
@@ -163,6 +162,28 @@
|
|
|
163
162
|
annotationToolbarProviderEnabled,
|
|
164
163
|
),
|
|
165
164
|
);
|
|
165
|
+
let annotationToolbarModuleLoaded = $state(false);
|
|
166
|
+
|
|
167
|
+
$effect(() => {
|
|
168
|
+
if (!shouldRenderAnnotationToolbar) return;
|
|
169
|
+
if (annotationToolbarModuleLoaded) return;
|
|
170
|
+
let cancelled = false;
|
|
171
|
+
void import("@pie-players/pie-tool-annotation-toolbar")
|
|
172
|
+
.then(() => {
|
|
173
|
+
if (!cancelled) {
|
|
174
|
+
annotationToolbarModuleLoaded = true;
|
|
175
|
+
}
|
|
176
|
+
})
|
|
177
|
+
.catch(() => {
|
|
178
|
+
// Keep rendering gated if the optional module is not installed.
|
|
179
|
+
if (!cancelled) {
|
|
180
|
+
annotationToolbarModuleLoaded = false;
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
return () => {
|
|
184
|
+
cancelled = true;
|
|
185
|
+
};
|
|
186
|
+
});
|
|
166
187
|
|
|
167
188
|
$effect(() => {
|
|
168
189
|
if (!toolkitElement) return;
|
|
@@ -194,7 +215,7 @@
|
|
|
194
215
|
onruntime-owned={(event: Event) => handleToolkitEvent(event, "runtime-owned")}
|
|
195
216
|
onruntime-inherited={(event: Event) => handleToolkitEvent(event, "runtime-inherited")}
|
|
196
217
|
>
|
|
197
|
-
{#if shouldRenderAnnotationToolbar}
|
|
218
|
+
{#if shouldRenderAnnotationToolbar && annotationToolbarModuleLoaded}
|
|
198
219
|
<pie-tool-annotation-toolbar
|
|
199
220
|
enabled={true}
|
|
200
221
|
ttsService={activeToolkitCoordinator.ttsService}
|
|
@@ -34,13 +34,6 @@
|
|
|
34
34
|
import * as SectionItemCardModule from "./shared/SectionItemCard.svelte";
|
|
35
35
|
import * as SectionPassageCardModule from "./shared/SectionPassageCard.svelte";
|
|
36
36
|
import "@pie-players/pie-toolbars/components/section-toolbar-element";
|
|
37
|
-
import "@pie-players/pie-tool-calculator";
|
|
38
|
-
import "@pie-players/pie-tool-graph";
|
|
39
|
-
import "@pie-players/pie-tool-periodic-table";
|
|
40
|
-
import "@pie-players/pie-tool-protractor";
|
|
41
|
-
import "@pie-players/pie-tool-line-reader";
|
|
42
|
-
import "@pie-players/pie-tool-ruler";
|
|
43
|
-
import "@pie-players/pie-tool-theme";
|
|
44
37
|
import type { Component } from "svelte";
|
|
45
38
|
import type { SectionCompositionModel } from "../controllers/types.js";
|
|
46
39
|
import type { AssessmentSection } from "@pie-players/pie-players-shared/types";
|
|
@@ -92,7 +85,7 @@
|
|
|
92
85
|
isolation,
|
|
93
86
|
env,
|
|
94
87
|
iifeBundleHost,
|
|
95
|
-
showToolbar = "
|
|
88
|
+
showToolbar = "false" as boolean | string | null | undefined,
|
|
96
89
|
toolbarPosition = "right",
|
|
97
90
|
enabledTools = "",
|
|
98
91
|
itemToolbarTools = "",
|
|
@@ -33,13 +33,6 @@
|
|
|
33
33
|
import * as SectionItemCardModule from "./shared/SectionItemCard.svelte";
|
|
34
34
|
import * as SectionPassageCardModule from "./shared/SectionPassageCard.svelte";
|
|
35
35
|
import "@pie-players/pie-toolbars/components/section-toolbar-element";
|
|
36
|
-
import "@pie-players/pie-tool-calculator";
|
|
37
|
-
import "@pie-players/pie-tool-graph";
|
|
38
|
-
import "@pie-players/pie-tool-periodic-table";
|
|
39
|
-
import "@pie-players/pie-tool-protractor";
|
|
40
|
-
import "@pie-players/pie-tool-line-reader";
|
|
41
|
-
import "@pie-players/pie-tool-ruler";
|
|
42
|
-
import "@pie-players/pie-tool-theme";
|
|
43
36
|
import type { Component } from "svelte";
|
|
44
37
|
import type { SectionCompositionModel } from "../controllers/types.js";
|
|
45
38
|
import type { AssessmentSection } from "@pie-players/pie-players-shared/types";
|
|
@@ -89,7 +82,7 @@
|
|
|
89
82
|
isolation,
|
|
90
83
|
env,
|
|
91
84
|
iifeBundleHost,
|
|
92
|
-
showToolbar = "
|
|
85
|
+
showToolbar = "false" as boolean | string | null | undefined,
|
|
93
86
|
toolbarPosition = "right",
|
|
94
87
|
enabledTools = "",
|
|
95
88
|
itemToolbarTools = "",
|