@pie-players/pie-section-player 0.2.12 → 0.2.13
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 +28 -568
- package/dist/component-definitions.d.ts +0 -3
- package/dist/component-definitions.d.ts.map +1 -1
- package/dist/components/section-player-vertical-element.d.ts +2 -0
- package/dist/components/section-player-vertical-element.d.ts.map +1 -0
- package/dist/components/shared/composition.d.ts +9 -0
- package/dist/components/shared/composition.d.ts.map +1 -0
- package/dist/components/shared/player-action.d.ts +18 -0
- package/dist/components/shared/player-action.d.ts.map +1 -0
- package/dist/components/shared/player-preload.d.ts +37 -0
- package/dist/components/shared/player-preload.d.ts.map +1 -0
- package/dist/components/shared/section-player-runtime.d.ts +104 -0
- package/dist/components/shared/section-player-runtime.d.ts.map +1 -0
- package/dist/components/shared/section-player-view-state.d.ts +24 -0
- package/dist/components/shared/section-player-view-state.d.ts.map +1 -0
- package/dist/controllers/SectionContentService.d.ts.map +1 -1
- package/dist/controllers/SectionController.d.ts +5 -1
- package/dist/controllers/SectionController.d.ts.map +1 -1
- package/dist/controllers/SectionSessionService.d.ts +0 -1
- package/dist/controllers/SectionSessionService.d.ts.map +1 -1
- package/dist/controllers/toolkit-section-contracts.d.ts +2 -28
- package/dist/controllers/toolkit-section-contracts.d.ts.map +1 -1
- package/dist/controllers/types.d.ts +28 -1
- package/dist/controllers/types.d.ts.map +1 -1
- package/dist/pie-item-player-B1iGN63e.js +6189 -0
- package/dist/pie-section-player.d.ts +0 -8
- package/dist/pie-section-player.d.ts.map +1 -1
- package/dist/pie-section-player.js +56558 -11
- package/dist/player-preload-CQVG0Bih.js +705 -0
- package/dist/utils/player-preload.d.ts +2 -0
- package/dist/utils/player-preload.d.ts.map +1 -0
- package/dist/utils/player-preload.js +8 -0
- package/package.json +23 -32
- package/src/components/ItemShellElement.svelte +10 -1
- package/src/components/PieSectionPlayerBaseElement.svelte +21 -78
- package/src/components/PieSectionPlayerSplitPaneElement.svelte +236 -295
- package/src/components/PieSectionPlayerVerticalElement.svelte +424 -0
- package/src/components/shared/SectionItemCard.svelte +92 -0
- package/src/components/shared/SectionPassageCard.svelte +88 -0
- package/dist/ItemRenderer-MsjF_Beu.js +0 -467
- package/dist/PieItemModeLayoutElement-D7oTzA9T.js +0 -316
- package/dist/PieSplitPanelLayoutElement-GUtJ_NlF.js +0 -246
- package/dist/PieVerticalLayoutElement-BoA3FO5g.js +0 -194
- package/dist/controllers/SectionToolkitService.d.ts +0 -24
- package/dist/controllers/SectionToolkitService.d.ts.map +0 -1
- package/dist/controllers/SessionPersistenceStrategy.d.ts +0 -15
- package/dist/controllers/SessionPersistenceStrategy.d.ts.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/pie-section-player-DJ5NcwdT.js +0 -17078
- package/dist/runtime/runtime-event-guards.d.ts +0 -4
- package/dist/runtime/runtime-event-guards.d.ts.map +0 -1
- package/src/PieSectionPlayer.svelte +0 -826
- package/src/components/ItemModeLayout.svelte +0 -172
- package/src/components/ItemNavigation.svelte +0 -96
- package/src/components/ItemPlayerBridge.svelte +0 -110
- package/src/components/ItemRenderer.svelte +0 -248
- package/src/components/ItemShell.svelte +0 -86
- package/src/components/layout-elements/PieItemModeLayoutElement.svelte +0 -47
- package/src/components/layout-elements/PieSplitPanelLayoutElement.svelte +0 -62
- package/src/components/layout-elements/PieVerticalLayoutElement.svelte +0 -41
- package/src/components/layouts/SplitPanelLayout.svelte +0 -385
- package/src/components/layouts/VerticalLayout.svelte +0 -193
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
import { p as q, a as Y, b as n, f as _, i as S, c as I, d as x, e as R, t as k, j as Z, k as d, l as z, n as p, g as t, o as y, r as u, q as $, v as L, s as ee, y as F, m as N, z as O } from "./pie-section-player-DJ5NcwdT.js";
|
|
2
|
-
import { I as V } from "./ItemRenderer-MsjF_Beu.js";
|
|
3
|
-
var oe = _("<pie-section-tools-toolbar></pie-section-tools-toolbar>", 2), te = _('<div class="pie-section-player__passage-wrapper svelte-5opynw"><!></div>'), re = _('<div class="pie-section-player__passages-section svelte-5opynw"></div>'), ie = _('<div class="pie-section-player__item-wrapper svelte-5opynw"><!></div>'), se = _("<pie-section-tools-toolbar></pie-section-tools-toolbar>", 2), le = _('<div><!> <div><!> <div class="pie-section-player__items-section svelte-5opynw"></div></div> <!></div>');
|
|
4
|
-
const ae = {
|
|
5
|
-
hash: "svelte-5opynw",
|
|
6
|
-
code: `.pie-section-player__layout-shell.svelte-5opynw {display:flex;width:100%;height:100%;min-height:0;overflow:hidden;}.pie-section-player__layout-shell--top.svelte-5opynw,
|
|
7
|
-
.pie-section-player__layout-shell--bottom.svelte-5opynw,
|
|
8
|
-
.pie-section-player__layout-shell--none.svelte-5opynw {flex-direction:column;}.pie-section-player__layout-shell--left.svelte-5opynw,
|
|
9
|
-
.pie-section-player__layout-shell--right.svelte-5opynw {flex-direction:row;}.pie-section-player__vertical-layout.svelte-5opynw {display:flex;flex-direction:column;gap:1.5rem;padding:1rem;height:100%;flex:1;overflow-y:auto;overflow-x:hidden;
|
|
10
|
-
/* Firefox auto-hide scrollbar */scrollbar-width:auto;scrollbar-color:transparent transparent;}.pie-section-player__vertical-layout--scrolling.svelte-5opynw {scrollbar-color:var(--pie-blue-grey-300, #c1c1c1) var(--pie-secondary-background, #f1f1f1);}.pie-section-player__passages-section.svelte-5opynw {display:flex;flex-direction:column;gap:1.5rem;}.pie-section-player__items-section.svelte-5opynw {display:flex;flex-direction:column;gap:1.5rem;}.pie-section-player__item-wrapper.svelte-5opynw {flex-shrink:0;}.pie-section-player__passage-wrapper.svelte-5opynw {flex-shrink:0;}.pie-section-player__item-wrapper.svelte-5opynw,
|
|
11
|
-
.pie-section-player__passage-wrapper.svelte-5opynw {padding:0.25rem;background:var(--pie-white, white);border:1px solid var(--pie-border-light, #e5e7eb);border-radius:6px;}
|
|
12
|
-
|
|
13
|
-
/* Responsive */
|
|
14
|
-
@media (max-width: 768px) {.pie-section-player__vertical-layout.svelte-5opynw {padding:0.5rem;gap:1rem;}.pie-section-player__items-section.svelte-5opynw {gap:1rem;}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/* Hide scrollbar by default - WebKit (Chrome, Safari, Edge) */.pie-section-player__vertical-layout.svelte-5opynw::-webkit-scrollbar {width:0px;background:transparent;}
|
|
18
|
-
|
|
19
|
-
/* Show scrollbar while scrolling */.pie-section-player__vertical-layout--scrolling.svelte-5opynw::-webkit-scrollbar {width:8px;}.pie-section-player__vertical-layout--scrolling.svelte-5opynw::-webkit-scrollbar-track {background:var(--pie-secondary-background, #f1f1f1);border-radius:4px;}.pie-section-player__vertical-layout--scrolling.svelte-5opynw::-webkit-scrollbar-thumb {background:var(--pie-blue-grey-300, #c1c1c1);border-radius:4px;}.pie-section-player__vertical-layout--scrolling.svelte-5opynw::-webkit-scrollbar-thumb:hover {background:var(--pie-blue-grey-600, #a1a1a1);}`
|
|
20
|
-
};
|
|
21
|
-
function H(w, i) {
|
|
22
|
-
q(i, !0), Y(w, ae);
|
|
23
|
-
let s = n(i, "composition", 7), a = n(i, "env", 23, () => ({ mode: "gather", role: "student" })), r = n(i, "toolbarPosition", 7, "right"), c = n(i, "showToolbar", 7, !0), h = y(() => s()?.passages || []), l = y(() => s()?.items || []), W = y(() => s()?.itemSessionsByItemId || {}), B = y(() => c() && r() !== "none"), C = y(() => r() === "top" || r() === "left"), T = ee(!1), P = null;
|
|
24
|
-
function A() {
|
|
25
|
-
N(T, !0), P && clearTimeout(P), P = setTimeout(
|
|
26
|
-
() => {
|
|
27
|
-
N(T, !1);
|
|
28
|
-
},
|
|
29
|
-
700
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
var D = {
|
|
33
|
-
get composition() {
|
|
34
|
-
return s();
|
|
35
|
-
},
|
|
36
|
-
set composition(e) {
|
|
37
|
-
s(e), p();
|
|
38
|
-
},
|
|
39
|
-
get env() {
|
|
40
|
-
return a();
|
|
41
|
-
},
|
|
42
|
-
set env(e = { mode: "gather", role: "student" }) {
|
|
43
|
-
a(e), p();
|
|
44
|
-
},
|
|
45
|
-
get toolbarPosition() {
|
|
46
|
-
return r();
|
|
47
|
-
},
|
|
48
|
-
set toolbarPosition(e = "right") {
|
|
49
|
-
r(e), p();
|
|
50
|
-
},
|
|
51
|
-
get showToolbar() {
|
|
52
|
-
return c();
|
|
53
|
-
},
|
|
54
|
-
set showToolbar(e = !0) {
|
|
55
|
-
c(e), p();
|
|
56
|
-
}
|
|
57
|
-
}, f = le(), j = x(f);
|
|
58
|
-
{
|
|
59
|
-
var G = (e) => {
|
|
60
|
-
var o = oe();
|
|
61
|
-
k(() => O(o, "position", r())), d(e, o);
|
|
62
|
-
};
|
|
63
|
-
S(j, (e) => {
|
|
64
|
-
t(B) && t(C) && e(G);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
var m = I(j, 2), E = x(m);
|
|
68
|
-
{
|
|
69
|
-
var J = (e) => {
|
|
70
|
-
var o = re();
|
|
71
|
-
R(o, 21, () => t(h), (b) => b.id, (b, v) => {
|
|
72
|
-
var g = te(), U = x(g);
|
|
73
|
-
{
|
|
74
|
-
let X = y(() => ({ mode: "view", role: a().role }));
|
|
75
|
-
V(U, {
|
|
76
|
-
get item() {
|
|
77
|
-
return t(v);
|
|
78
|
-
},
|
|
79
|
-
contentKind: "rubric-block-stimulus",
|
|
80
|
-
get env() {
|
|
81
|
-
return t(X);
|
|
82
|
-
},
|
|
83
|
-
customClassName: "pie-section-player__passage-item"
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
u(g), d(b, g);
|
|
87
|
-
}), u(o), d(e, o);
|
|
88
|
-
};
|
|
89
|
-
S(E, (e) => {
|
|
90
|
-
t(h).length > 0 && e(J);
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
var K = I(E, 2);
|
|
94
|
-
R(K, 23, () => t(l), (e, o) => e.id || o, (e, o, b) => {
|
|
95
|
-
var v = ie(), g = x(v);
|
|
96
|
-
V(g, {
|
|
97
|
-
get item() {
|
|
98
|
-
return t(o);
|
|
99
|
-
},
|
|
100
|
-
contentKind: "assessment-item",
|
|
101
|
-
get env() {
|
|
102
|
-
return a();
|
|
103
|
-
},
|
|
104
|
-
get session() {
|
|
105
|
-
return t(W)[t(o).id || ""];
|
|
106
|
-
},
|
|
107
|
-
customClassName: "pie-section-player__item-content"
|
|
108
|
-
}), u(v), k(() => $(v, "data-item-index", t(b))), d(e, v);
|
|
109
|
-
}), u(K), u(m);
|
|
110
|
-
var M = I(m, 2);
|
|
111
|
-
{
|
|
112
|
-
var Q = (e) => {
|
|
113
|
-
var o = se();
|
|
114
|
-
k(() => O(o, "position", r())), d(e, o);
|
|
115
|
-
};
|
|
116
|
-
S(M, (e) => {
|
|
117
|
-
t(B) && !t(C) && e(Q);
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
return u(f), k(() => {
|
|
121
|
-
L(f, 1, `pie-section-player__layout-shell pie-section-player__layout-shell--${r()}`, "svelte-5opynw"), L(m, 1, `pie-section-player__vertical-layout ${t(T) ? "pie-section-player__vertical-layout--scrolling" : ""}`, "svelte-5opynw");
|
|
122
|
-
}), Z("scroll", m, A), d(w, f), z(D);
|
|
123
|
-
}
|
|
124
|
-
F(
|
|
125
|
-
H,
|
|
126
|
-
{
|
|
127
|
-
composition: {},
|
|
128
|
-
env: {},
|
|
129
|
-
toolbarPosition: {},
|
|
130
|
-
showToolbar: {}
|
|
131
|
-
},
|
|
132
|
-
[],
|
|
133
|
-
[],
|
|
134
|
-
{ mode: "open" }
|
|
135
|
-
);
|
|
136
|
-
function ne(w, i) {
|
|
137
|
-
q(i, !0);
|
|
138
|
-
let s = n(i, "composition", 7), a = n(i, "env", 23, () => ({ mode: "gather", role: "student" })), r = n(i, "toolbarPosition", 7, "right"), c = n(i, "showToolbar", 7, !0);
|
|
139
|
-
var h = {
|
|
140
|
-
get composition() {
|
|
141
|
-
return s();
|
|
142
|
-
},
|
|
143
|
-
set composition(l) {
|
|
144
|
-
s(l), p();
|
|
145
|
-
},
|
|
146
|
-
get env() {
|
|
147
|
-
return a();
|
|
148
|
-
},
|
|
149
|
-
set env(l = { mode: "gather", role: "student" }) {
|
|
150
|
-
a(l), p();
|
|
151
|
-
},
|
|
152
|
-
get toolbarPosition() {
|
|
153
|
-
return r();
|
|
154
|
-
},
|
|
155
|
-
set toolbarPosition(l = "right") {
|
|
156
|
-
r(l), p();
|
|
157
|
-
},
|
|
158
|
-
get showToolbar() {
|
|
159
|
-
return c();
|
|
160
|
-
},
|
|
161
|
-
set showToolbar(l = !0) {
|
|
162
|
-
c(l), p();
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
return H(w, {
|
|
166
|
-
get composition() {
|
|
167
|
-
return s();
|
|
168
|
-
},
|
|
169
|
-
get env() {
|
|
170
|
-
return a();
|
|
171
|
-
},
|
|
172
|
-
get toolbarPosition() {
|
|
173
|
-
return r();
|
|
174
|
-
},
|
|
175
|
-
get showToolbar() {
|
|
176
|
-
return c();
|
|
177
|
-
}
|
|
178
|
-
}), z(h);
|
|
179
|
-
}
|
|
180
|
-
customElements.define("pie-vertical-layout", F(
|
|
181
|
-
ne,
|
|
182
|
-
{
|
|
183
|
-
composition: { type: "Object" },
|
|
184
|
-
env: { type: "Object" },
|
|
185
|
-
toolbarPosition: { attribute: "toolbar-position", type: "String" },
|
|
186
|
-
showToolbar: { attribute: "show-toolbar", type: "Boolean" }
|
|
187
|
-
},
|
|
188
|
-
[],
|
|
189
|
-
[],
|
|
190
|
-
{ mode: "open" }
|
|
191
|
-
));
|
|
192
|
-
export {
|
|
193
|
-
ne as default
|
|
194
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ToolkitCoordinator } from '@pie-players/pie-assessment-toolkit';
|
|
2
|
-
import { SectionControllerHandle } from './toolkit-section-contracts.js';
|
|
3
|
-
export declare class SectionToolkitService {
|
|
4
|
-
private asCoordinatorWithSectionControllers;
|
|
5
|
-
resolveCoordinator(args: {
|
|
6
|
-
providedCoordinator: ToolkitCoordinator | null;
|
|
7
|
-
preferredAssessmentId: string | null;
|
|
8
|
-
getFallbackAssessmentId: () => string;
|
|
9
|
-
createOwnedCoordinator: (assessmentId: string) => ToolkitCoordinator;
|
|
10
|
-
}): ToolkitCoordinator;
|
|
11
|
-
resolveSectionController<TController extends SectionControllerHandle>(args: {
|
|
12
|
-
coordinator: ToolkitCoordinator;
|
|
13
|
-
sectionId: string;
|
|
14
|
-
attemptId?: string;
|
|
15
|
-
input?: unknown;
|
|
16
|
-
createDefaultController: () => TController | Promise<TController>;
|
|
17
|
-
}): Promise<TController>;
|
|
18
|
-
disposeSectionController(args: {
|
|
19
|
-
coordinator: ToolkitCoordinator;
|
|
20
|
-
sectionId: string;
|
|
21
|
-
attemptId?: string;
|
|
22
|
-
}): Promise<void>;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=SectionToolkitService.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SectionToolkitService.d.ts","sourceRoot":"","sources":["../../src/controllers/SectionToolkitService.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,kBAAkB,EAClB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EAEX,uBAAuB,EACvB,MAAM,gCAAgC,CAAC;AAExC,qBAAa,qBAAqB;IACjC,OAAO,CAAC,mCAAmC;IAMpC,kBAAkB,CAAC,IAAI,EAAE;QAC/B,mBAAmB,EAAE,kBAAkB,GAAG,IAAI,CAAC;QAC/C,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;QACrC,uBAAuB,EAAE,MAAM,MAAM,CAAC;QACtC,sBAAsB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,kBAAkB,CAAC;KACrE,GAAG,kBAAkB;IAOT,wBAAwB,CAAC,WAAW,SAAS,uBAAuB,EAChF,IAAI,EAAE;QACL,WAAW,EAAE,kBAAkB,CAAC;QAChC,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,uBAAuB,EAAE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;KAClE,GACC,OAAO,CAAC,WAAW,CAAC;IAaV,wBAAwB,CAAC,IAAI,EAAE;QAC3C,WAAW,EAAE,kBAAkB,CAAC;QAChC,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;KACnB,GAAG,OAAO,CAAC,IAAI,CAAC;CAQjB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SectionControllerContext, SectionControllerPersistenceStrategy } from './toolkit-section-contracts.js';
|
|
2
|
-
export interface SectionControllerSnapshot {
|
|
3
|
-
testAttemptSession: unknown;
|
|
4
|
-
currentItemIndex: number;
|
|
5
|
-
}
|
|
6
|
-
export declare class SessionPersistenceStrategy implements SectionControllerPersistenceStrategy {
|
|
7
|
-
private readonly storage;
|
|
8
|
-
constructor();
|
|
9
|
-
private getStorage;
|
|
10
|
-
private getKey;
|
|
11
|
-
load(context: SectionControllerContext): Promise<SectionControllerSnapshot | null>;
|
|
12
|
-
save(context: SectionControllerContext, snapshot: unknown): Promise<void>;
|
|
13
|
-
clear(context: SectionControllerContext): Promise<void>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=SessionPersistenceStrategy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SessionPersistenceStrategy.d.ts","sourceRoot":"","sources":["../../src/controllers/SessionPersistenceStrategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,wBAAwB,EACxB,oCAAoC,EACpC,MAAM,gCAAgC,CAAC;AAExC,MAAM,WAAW,yBAAyB;IACzC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,MAAM,CAAC;CACzB;AAED,qBAAa,0BACZ,YAAW,oCAAoC;IAE/C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;;IAMzC,OAAO,CAAC,UAAU;IASlB,OAAO,CAAC,MAAM;IAKD,IAAI,CAChB,OAAO,EAAE,wBAAwB,GAC/B,OAAO,CAAC,yBAAyB,GAAG,IAAI,CAAC;IAW/B,IAAI,CAChB,OAAO,EAAE,wBAAwB,EACjC,QAAQ,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC;IAKH,KAAK,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC;CAIpE"}
|
package/dist/index.d.ts
DELETED