@pie-players/pie-section-player 0.3.59 → 0.3.60
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/pie-section-player.js +39 -18
- package/package.json +6 -6
|
@@ -4418,9 +4418,11 @@ function Q3(e) {
|
|
|
4418
4418
|
"pie-multiple-choice",
|
|
4419
4419
|
"pie-inline-choice",
|
|
4420
4420
|
"pie-select-text",
|
|
4421
|
+
"pie-ebsr",
|
|
4421
4422
|
"multiple-choice",
|
|
4422
4423
|
"inline-choice",
|
|
4423
|
-
"select-text"
|
|
4424
|
+
"select-text",
|
|
4425
|
+
"ebsr"
|
|
4424
4426
|
];
|
|
4425
4427
|
if (j5(e)) {
|
|
4426
4428
|
const n = e.item.config;
|
|
@@ -15926,9 +15928,11 @@ function zae(e) {
|
|
|
15926
15928
|
"pie-multiple-choice",
|
|
15927
15929
|
"pie-inline-choice",
|
|
15928
15930
|
"pie-select-text",
|
|
15931
|
+
"pie-ebsr",
|
|
15929
15932
|
"multiple-choice",
|
|
15930
15933
|
"inline-choice",
|
|
15931
|
-
"select-text"
|
|
15934
|
+
"select-text",
|
|
15935
|
+
"ebsr"
|
|
15932
15936
|
];
|
|
15933
15937
|
if (uV(e)) {
|
|
15934
15938
|
const n = e.item.config;
|
|
@@ -51641,9 +51645,11 @@ function Zye(e) {
|
|
|
51641
51645
|
"pie-multiple-choice",
|
|
51642
51646
|
"pie-inline-choice",
|
|
51643
51647
|
"pie-select-text",
|
|
51648
|
+
"pie-ebsr",
|
|
51644
51649
|
"multiple-choice",
|
|
51645
51650
|
"inline-choice",
|
|
51646
|
-
"select-text"
|
|
51651
|
+
"select-text",
|
|
51652
|
+
"ebsr"
|
|
51647
51653
|
];
|
|
51648
51654
|
if (JG(e)) {
|
|
51649
51655
|
const n = e.item.config;
|
|
@@ -54332,7 +54338,7 @@ var eu = qbe("ToolCoordinator"), jf;
|
|
|
54332
54338
|
})(jf || (jf = {}));
|
|
54333
54339
|
var Gbe = class {
|
|
54334
54340
|
constructor(e = {}) {
|
|
54335
|
-
L(this, "config", void 0), L(this, "tools", /* @__PURE__ */ new Map()), L(this, "layerCounters", /* @__PURE__ */ new Map()), L(this, "listeners", /* @__PURE__ */ new Set()), this.config = e, this.layerCounters.set(jf.BASE, 0), this.layerCounters.set(jf.TOOL, 0), this.layerCounters.set(jf.MODAL, 0), this.layerCounters.set(jf.CONTROL, 0), this.layerCounters.set(jf.HIGHLIGHT, 0);
|
|
54341
|
+
L(this, "config", void 0), L(this, "tools", /* @__PURE__ */ new Map()), L(this, "layerCounters", /* @__PURE__ */ new Map()), L(this, "listeners", /* @__PURE__ */ new Set()), L(this, "visibilityState", /* @__PURE__ */ new Map()), this.config = e, this.layerCounters.set(jf.BASE, 0), this.layerCounters.set(jf.TOOL, 0), this.layerCounters.set(jf.MODAL, 0), this.layerCounters.set(jf.CONTROL, 0), this.layerCounters.set(jf.HIGHLIGHT, 0);
|
|
54336
54342
|
}
|
|
54337
54343
|
subscribe(e) {
|
|
54338
54344
|
return this.listeners.add(e), () => {
|
|
@@ -54352,41 +54358,45 @@ var Gbe = class {
|
|
|
54352
54358
|
eu(`Tool ${e} is already registered`);
|
|
54353
54359
|
return;
|
|
54354
54360
|
}
|
|
54361
|
+
const o = this.visibilityState.get(e) ?? !1;
|
|
54355
54362
|
if (!n) {
|
|
54356
54363
|
this.tools.set(e, {
|
|
54357
54364
|
id: e,
|
|
54358
54365
|
name: t,
|
|
54359
54366
|
element: null,
|
|
54360
54367
|
layer: r,
|
|
54361
|
-
isVisible:
|
|
54368
|
+
isVisible: o,
|
|
54362
54369
|
baseZIndex: r
|
|
54363
54370
|
}), eu("Tool registered without element:", e);
|
|
54364
54371
|
return;
|
|
54365
54372
|
}
|
|
54366
|
-
const
|
|
54367
|
-
n.style.zIndex = String(o
|
|
54368
|
-
const
|
|
54369
|
-
n.addEventListener("mousedown",
|
|
54373
|
+
const s = r + this.getNextLayerOffset(r);
|
|
54374
|
+
n.style.zIndex = String(s), n.style.display = o ? "" : "none";
|
|
54375
|
+
const a = () => this.bringToFront(n);
|
|
54376
|
+
n.addEventListener("mousedown", a), this.tools.set(e, {
|
|
54370
54377
|
id: e,
|
|
54371
54378
|
name: t,
|
|
54372
54379
|
element: n,
|
|
54373
54380
|
layer: r,
|
|
54374
|
-
isVisible:
|
|
54375
|
-
baseZIndex:
|
|
54376
|
-
mouseDownHandler:
|
|
54377
|
-
}), eu("Tool registered with element:", e);
|
|
54381
|
+
isVisible: o,
|
|
54382
|
+
baseZIndex: s,
|
|
54383
|
+
mouseDownHandler: a
|
|
54384
|
+
}), o && this.bringToFront(n), eu("Tool registered with element:", e);
|
|
54378
54385
|
}
|
|
54379
54386
|
unregisterTool(e) {
|
|
54380
54387
|
const t = this.tools.get(e);
|
|
54381
54388
|
t && (t.element && t.mouseDownHandler && t.element.removeEventListener("mousedown", t.mouseDownHandler), this.tools.delete(e));
|
|
54382
54389
|
}
|
|
54390
|
+
releaseTool(e) {
|
|
54391
|
+
this.unregisterTool(e), this.visibilityState.delete(e);
|
|
54392
|
+
}
|
|
54383
54393
|
showTool(e) {
|
|
54384
54394
|
const t = this.tools.get(e);
|
|
54385
54395
|
if (!t) {
|
|
54386
54396
|
eu(`Tool ${e} not found`);
|
|
54387
54397
|
return;
|
|
54388
54398
|
}
|
|
54389
|
-
t.element && (t.element.style.display = "", this.bringToFront(t.element)), t.isVisible = !0, this.notifyListeners();
|
|
54399
|
+
t.element && (t.element.style.display = "", this.bringToFront(t.element)), t.isVisible = !0, this.visibilityState.set(e, !0), this.notifyListeners();
|
|
54390
54400
|
}
|
|
54391
54401
|
hideTool(e) {
|
|
54392
54402
|
const t = this.tools.get(e);
|
|
@@ -54394,7 +54404,7 @@ var Gbe = class {
|
|
|
54394
54404
|
eu(`Tool ${e} not found`);
|
|
54395
54405
|
return;
|
|
54396
54406
|
}
|
|
54397
|
-
t.element && (t.element.style.display = "none"), t.isVisible = !1, this.notifyListeners();
|
|
54407
|
+
t.element && (t.element.style.display = "none"), t.isVisible = !1, this.visibilityState.set(e, !1), this.notifyListeners();
|
|
54398
54408
|
}
|
|
54399
54409
|
toggleTool(e) {
|
|
54400
54410
|
eu("toggleTool called for:", e);
|
|
@@ -54406,7 +54416,8 @@ var Gbe = class {
|
|
|
54406
54416
|
eu("Tool found, current visibility:", t.isVisible), t.isVisible ? this.hideTool(e) : this.showTool(e);
|
|
54407
54417
|
}
|
|
54408
54418
|
isToolVisible(e) {
|
|
54409
|
-
|
|
54419
|
+
const t = this.tools.get(e);
|
|
54420
|
+
return t ? t.isVisible : this.visibilityState.get(e) ?? !1;
|
|
54410
54421
|
}
|
|
54411
54422
|
bringToFront(e) {
|
|
54412
54423
|
const t = Array.from(this.tools.values()).find((o) => o.element === e);
|
|
@@ -66745,9 +66756,11 @@ function ICe(e) {
|
|
|
66745
66756
|
"pie-multiple-choice",
|
|
66746
66757
|
"pie-inline-choice",
|
|
66747
66758
|
"pie-select-text",
|
|
66759
|
+
"pie-ebsr",
|
|
66748
66760
|
"multiple-choice",
|
|
66749
66761
|
"inline-choice",
|
|
66750
|
-
"select-text"
|
|
66762
|
+
"select-text",
|
|
66763
|
+
"ebsr"
|
|
66751
66764
|
];
|
|
66752
66765
|
if (lY(e)) {
|
|
66753
66766
|
const n = e.item.config;
|
|
@@ -70565,7 +70578,15 @@ var AAe = /* @__PURE__ */ Lr('<aside class="pie-section-player-passages-pane sve
|
|
|
70565
70578
|
region. Padding lives inside the scroll box, letting any child
|
|
70566
70579
|
that uses position:sticky bleed into it as content scrolls past.
|
|
70567
70580
|
Kept as margin so this pane composes cleanly with arbitrary
|
|
70568
|
-
descendant content (sticky headers, floating toolbars, etc.). */margin:0.5rem;box-sizing:border-box;
|
|
70581
|
+
descendant content (sticky headers, floating toolbars, etc.). */margin:0.5rem;box-sizing:border-box;
|
|
70582
|
+
/* --pie-passage-header-background is owned by the hosted passage-player
|
|
70583
|
+
custom element and is often unset, so the fallback has to be a theme
|
|
70584
|
+
token rather than a literal — otherwise the panes stay light gray
|
|
70585
|
+
under dark themes and color schemes. --pie-background-dark resolves
|
|
70586
|
+
to #ecedf1 in the default light theme, matching the previous fill. */background:var(
|
|
70587
|
+
--pie-passage-header-background,
|
|
70588
|
+
var(--pie-background-dark, #ecedf1)
|
|
70589
|
+
);scrollbar-width:thin;scrollbar-color:var(--pie-scrollbar-thumb, #6b7280) var(--pie-scrollbar-track, #d1d5db);}.pie-section-player-items-pane.svelte-1psecfm .pie-section-player-scroll-hint {bottom:-0.5rem;}.pie-section-player-passages-pane.svelte-1psecfm::-webkit-scrollbar,
|
|
70569
70590
|
.pie-section-player-items-pane.svelte-1psecfm::-webkit-scrollbar {width:0.75rem;height:0.75rem;}.pie-section-player-passages-pane.svelte-1psecfm::-webkit-scrollbar-track,
|
|
70570
70591
|
.pie-section-player-items-pane.svelte-1psecfm::-webkit-scrollbar-track {background:var(--pie-scrollbar-track, #d1d5db);border-radius:999px;}.pie-section-player-passages-pane.svelte-1psecfm::-webkit-scrollbar-thumb,
|
|
70571
70592
|
.pie-section-player-items-pane.svelte-1psecfm::-webkit-scrollbar-thumb {background:var(--pie-scrollbar-thumb, #6b7280);border-radius:999px;border:2px solid var(--pie-scrollbar-track, #d1d5db);}.pie-section-player-passages-pane.svelte-1psecfm::-webkit-scrollbar-thumb:hover,
|
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.60",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Web component for rendering QTI 3.0 assessment sections with passages and items",
|
|
6
6
|
"license": "MIT",
|
|
@@ -94,11 +94,11 @@
|
|
|
94
94
|
"test": "bun test '.test.ts'"
|
|
95
95
|
},
|
|
96
96
|
"dependencies": {
|
|
97
|
-
"@pie-players/pie-assessment-toolkit": "0.3.
|
|
98
|
-
"@pie-players/pie-default-tool-loaders": "0.3.
|
|
99
|
-
"@pie-players/pie-item-player": "0.3.
|
|
100
|
-
"@pie-players/pie-context": "0.3.
|
|
101
|
-
"@pie-players/pie-players-shared": "0.3.
|
|
97
|
+
"@pie-players/pie-assessment-toolkit": "0.3.60",
|
|
98
|
+
"@pie-players/pie-default-tool-loaders": "0.3.60",
|
|
99
|
+
"@pie-players/pie-item-player": "0.3.60",
|
|
100
|
+
"@pie-players/pie-context": "0.3.60",
|
|
101
|
+
"@pie-players/pie-players-shared": "0.3.60"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"@axe-core/playwright": "^4.11.1",
|