@pie-players/pie-section-player 0.3.3 → 0.3.4
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 +122 -5
- package/dist/components/section-player-item-card-element.d.ts +2 -0
- package/dist/components/section-player-item-card-element.d.ts.map +1 -0
- package/dist/components/section-player-items-pane-element.d.ts +2 -0
- package/dist/components/section-player-items-pane-element.d.ts.map +1 -0
- package/dist/components/section-player-kernel-host-element.d.ts +2 -0
- package/dist/components/section-player-kernel-host-element.d.ts.map +1 -0
- package/dist/components/section-player-passage-card-element.d.ts +2 -0
- package/dist/components/section-player-passage-card-element.d.ts.map +1 -0
- package/dist/components/section-player-passages-pane-element.d.ts +2 -0
- package/dist/components/section-player-passages-pane-element.d.ts.map +1 -0
- package/dist/components/section-player-shell-element.d.ts +2 -0
- package/dist/components/section-player-shell-element.d.ts.map +1 -0
- package/dist/components/shared/outer-scrollbars.d.ts +6 -0
- package/dist/components/shared/outer-scrollbars.d.ts.map +1 -0
- package/dist/components/shared/player-action.d.ts +1 -0
- package/dist/components/shared/player-action.d.ts.map +1 -1
- package/dist/components/shared/player-preload.d.ts +5 -0
- package/dist/components/shared/player-preload.d.ts.map +1 -1
- package/dist/components/shared/section-player-card-context.d.ts +15 -0
- package/dist/components/shared/section-player-card-context.d.ts.map +1 -0
- package/dist/components/shared/section-player-props.d.ts +2 -0
- package/dist/components/shared/section-player-props.d.ts.map +1 -0
- package/dist/components/shared/section-player-readiness.d.ts +14 -0
- package/dist/components/shared/section-player-readiness.d.ts.map +1 -0
- package/dist/components/shared/section-player-runtime.d.ts +4 -4
- package/dist/components/shared/section-player-runtime.d.ts.map +1 -1
- package/dist/components/shared/section-player-view-state.d.ts +9 -0
- package/dist/components/shared/section-player-view-state.d.ts.map +1 -1
- package/dist/contracts/layout-contract.d.ts +18 -0
- package/dist/contracts/layout-contract.d.ts.map +1 -0
- package/dist/contracts/layout-parity-metadata.d.ts +4 -0
- package/dist/contracts/layout-parity-metadata.d.ts.map +1 -0
- package/dist/contracts/public-events.d.ts +25 -0
- package/dist/contracts/public-events.d.ts.map +1 -0
- package/dist/contracts/runtime-host-contract.d.ts +29 -0
- package/dist/contracts/runtime-host-contract.d.ts.map +1 -0
- package/dist/controllers/SectionController.d.ts +2 -0
- package/dist/controllers/SectionController.d.ts.map +1 -1
- package/dist/controllers/types.d.ts +21 -12
- package/dist/controllers/types.d.ts.map +1 -1
- package/dist/index-CGEKDUBQ-C-8EFMUk.js +216 -0
- package/dist/index-DF-Dk87f-lxErM8bo.js +178 -0
- package/dist/pie-section-player.d.ts +7 -0
- package/dist/pie-section-player.d.ts.map +1 -1
- package/dist/pie-section-player.js +8074 -7421
- package/dist/{player-preload-9v0AQsMd.js → player-preload-Dj2ELq_u.js} +2179 -2121
- package/dist/policies/guards.d.ts +3 -0
- package/dist/policies/guards.d.ts.map +1 -0
- package/dist/policies/index.d.ts +3 -0
- package/dist/policies/index.d.ts.map +1 -0
- package/dist/policies/types.d.ts +23 -0
- package/dist/policies/types.d.ts.map +1 -0
- package/dist/tool-annotation-toolbar-DJvpXk1K.js +4917 -0
- package/dist/utils/player-preload.js +1 -1
- package/package.json +54 -13
- package/dist/tool-annotation-toolbar-m4Mv2j0H.js +0 -4305
- package/src/components/ItemShellElement.svelte +0 -302
- package/src/components/PassageShellElement.svelte +0 -217
- package/src/components/PieSectionPlayerBaseElement.svelte +0 -245
- package/src/components/PieSectionPlayerSplitPaneElement.svelte +0 -675
- package/src/components/PieSectionPlayerVerticalElement.svelte +0 -439
- package/src/components/shared/SectionItemCard.svelte +0 -92
- package/src/components/shared/SectionPassageCard.svelte +0 -88
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
<svelte:options
|
|
2
|
-
customElement={{
|
|
3
|
-
tag: "pie-section-player-vertical",
|
|
4
|
-
// Use light DOM so item-player/runtime styles can cascade into rendered item content.
|
|
5
|
-
shadow: "none",
|
|
6
|
-
props: {
|
|
7
|
-
assessmentId: { attribute: "assessment-id", type: "String" },
|
|
8
|
-
runtime: { type: "Object", reflect: false },
|
|
9
|
-
section: { type: "Object", reflect: false },
|
|
10
|
-
sectionId: { attribute: "section-id", type: "String" },
|
|
11
|
-
attemptId: { attribute: "attempt-id", type: "String" },
|
|
12
|
-
playerType: { attribute: "player-type", type: "String" },
|
|
13
|
-
player: { type: "Object", reflect: false },
|
|
14
|
-
lazyInit: { attribute: "lazy-init", type: "Boolean" },
|
|
15
|
-
tools: { type: "Object", reflect: false },
|
|
16
|
-
accessibility: { type: "Object", reflect: false },
|
|
17
|
-
coordinator: { type: "Object", reflect: false },
|
|
18
|
-
createSectionController: { type: "Object", reflect: false },
|
|
19
|
-
isolation: { attribute: "isolation", type: "String" },
|
|
20
|
-
env: { type: "Object", reflect: false },
|
|
21
|
-
iifeBundleHost: { attribute: "iife-bundle-host", type: "String" },
|
|
22
|
-
showToolbar: { attribute: "show-toolbar", type: "String" },
|
|
23
|
-
toolbarPosition: { attribute: "toolbar-position", type: "String" },
|
|
24
|
-
enabledTools: { attribute: "enabled-tools", type: "String" },
|
|
25
|
-
itemToolbarTools: { attribute: "item-toolbar-tools", type: "String" },
|
|
26
|
-
passageToolbarTools: { attribute: "passage-toolbar-tools", type: "String" },
|
|
27
|
-
},
|
|
28
|
-
}}
|
|
29
|
-
/>
|
|
30
|
-
|
|
31
|
-
<script lang="ts">
|
|
32
|
-
import "./section-player-base-element.js";
|
|
33
|
-
import * as SectionItemCardModule from "./shared/SectionItemCard.svelte";
|
|
34
|
-
import * as SectionPassageCardModule from "./shared/SectionPassageCard.svelte";
|
|
35
|
-
import "@pie-players/pie-toolbars/components/section-toolbar-element";
|
|
36
|
-
import type { Component } from "svelte";
|
|
37
|
-
import type { SectionCompositionModel } from "../controllers/types.js";
|
|
38
|
-
import type { AssessmentSection } from "@pie-players/pie-players-shared/types";
|
|
39
|
-
import {
|
|
40
|
-
EMPTY_COMPOSITION,
|
|
41
|
-
} from "./shared/composition.js";
|
|
42
|
-
import { createPlayerAction } from "./shared/player-action.js";
|
|
43
|
-
import {
|
|
44
|
-
getRenderablesSignature,
|
|
45
|
-
orchestratePlayerElementPreload,
|
|
46
|
-
type PlayerPreloadState,
|
|
47
|
-
} from "./shared/player-preload.js";
|
|
48
|
-
import {
|
|
49
|
-
getCanonicalItemId,
|
|
50
|
-
getCompositionFromEvent,
|
|
51
|
-
getItemPlayerParams,
|
|
52
|
-
getPassagePlayerParams,
|
|
53
|
-
} from "./shared/section-player-view-state.js";
|
|
54
|
-
import {
|
|
55
|
-
mapRenderablesToItems,
|
|
56
|
-
resolveSectionPlayerRuntimeState,
|
|
57
|
-
type RuntimeConfig,
|
|
58
|
-
} from "./shared/section-player-runtime.js";
|
|
59
|
-
|
|
60
|
-
const SectionItemCard = (
|
|
61
|
-
SectionItemCardModule as unknown as { default: Component<any, any, any> }
|
|
62
|
-
).default;
|
|
63
|
-
const SectionPassageCard = (
|
|
64
|
-
SectionPassageCardModule as unknown as {
|
|
65
|
-
default: Component<any, any, any>;
|
|
66
|
-
}
|
|
67
|
-
).default;
|
|
68
|
-
|
|
69
|
-
let {
|
|
70
|
-
assessmentId,
|
|
71
|
-
runtime = null as RuntimeConfig | null,
|
|
72
|
-
section = null as AssessmentSection | null,
|
|
73
|
-
sectionId = "",
|
|
74
|
-
attemptId = "",
|
|
75
|
-
playerType,
|
|
76
|
-
player,
|
|
77
|
-
lazyInit,
|
|
78
|
-
tools,
|
|
79
|
-
accessibility,
|
|
80
|
-
coordinator,
|
|
81
|
-
createSectionController,
|
|
82
|
-
isolation,
|
|
83
|
-
env,
|
|
84
|
-
iifeBundleHost,
|
|
85
|
-
showToolbar = "false" as boolean | string | null | undefined,
|
|
86
|
-
toolbarPosition = "right",
|
|
87
|
-
enabledTools = "",
|
|
88
|
-
itemToolbarTools = "",
|
|
89
|
-
passageToolbarTools = "",
|
|
90
|
-
} = $props();
|
|
91
|
-
|
|
92
|
-
function resolveToolbarVisibility(value: boolean | string | null | undefined): boolean {
|
|
93
|
-
if (typeof value === "boolean") {
|
|
94
|
-
return value;
|
|
95
|
-
}
|
|
96
|
-
if (value === null || value === undefined) {
|
|
97
|
-
return true;
|
|
98
|
-
}
|
|
99
|
-
const normalizedValue = String(value).trim().toLowerCase();
|
|
100
|
-
if (normalizedValue === "") {
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
if (["false", "0", "off", "no"].includes(normalizedValue)) {
|
|
104
|
-
return false;
|
|
105
|
-
}
|
|
106
|
-
if (["true", "1", "on", "yes"].includes(normalizedValue)) {
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
return Boolean(normalizedValue);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
let compositionModel = $state<SectionCompositionModel>(EMPTY_COMPOSITION);
|
|
113
|
-
let elementsLoaded = $state(false);
|
|
114
|
-
let lastPreloadSignature = $state("");
|
|
115
|
-
let preloadRunToken = $state(0);
|
|
116
|
-
|
|
117
|
-
const passages = $derived(compositionModel.passages || []);
|
|
118
|
-
const items = $derived(compositionModel.items || []);
|
|
119
|
-
const shouldRenderToolbar = $derived(
|
|
120
|
-
resolveToolbarVisibility(showToolbar) && toolbarPosition !== "none",
|
|
121
|
-
);
|
|
122
|
-
const toolbarBeforeContent = $derived(
|
|
123
|
-
toolbarPosition === "top" || toolbarPosition === "left",
|
|
124
|
-
);
|
|
125
|
-
const toolbarInline = $derived(toolbarPosition === "left" || toolbarPosition === "right");
|
|
126
|
-
const preloadedRenderables = $derived.by(() =>
|
|
127
|
-
mapRenderablesToItems(compositionModel.renderables || []),
|
|
128
|
-
);
|
|
129
|
-
const preloadedRenderablesSignature = $derived.by(() =>
|
|
130
|
-
getRenderablesSignature(compositionModel.renderables || []),
|
|
131
|
-
);
|
|
132
|
-
const runtimeState = $derived.by(() =>
|
|
133
|
-
resolveSectionPlayerRuntimeState({
|
|
134
|
-
assessmentId,
|
|
135
|
-
playerType,
|
|
136
|
-
player,
|
|
137
|
-
lazyInit,
|
|
138
|
-
tools,
|
|
139
|
-
accessibility,
|
|
140
|
-
coordinator,
|
|
141
|
-
createSectionController,
|
|
142
|
-
isolation,
|
|
143
|
-
env,
|
|
144
|
-
runtime,
|
|
145
|
-
enabledTools,
|
|
146
|
-
itemToolbarTools,
|
|
147
|
-
passageToolbarTools,
|
|
148
|
-
}),
|
|
149
|
-
);
|
|
150
|
-
const effectiveRuntime = $derived(runtimeState.effectiveRuntime);
|
|
151
|
-
const playerRuntime = $derived(runtimeState.playerRuntime);
|
|
152
|
-
const resolvedPlayerDefinition = $derived(playerRuntime.resolvedPlayerDefinition);
|
|
153
|
-
const resolvedPlayerTag = $derived(playerRuntime.resolvedPlayerTag);
|
|
154
|
-
const resolvedPlayerAttributes = $derived(playerRuntime.resolvedPlayerAttributes);
|
|
155
|
-
const resolvedPlayerProps = $derived(playerRuntime.resolvedPlayerProps);
|
|
156
|
-
const resolvedPlayerEnv = $derived(playerRuntime.resolvedPlayerEnv);
|
|
157
|
-
const playerStrategy = $derived(playerRuntime.strategy);
|
|
158
|
-
const verticalPlayerAction = createPlayerAction({
|
|
159
|
-
stateKey: "__verticalAppliedParams",
|
|
160
|
-
includeSessionRefInState: false,
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
function handleBaseCompositionChanged(event: Event) {
|
|
164
|
-
compositionModel = getCompositionFromEvent(event);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
$effect(() => {
|
|
168
|
-
resolvedPlayerDefinition?.ensureDefined?.().catch((error) => {
|
|
169
|
-
console.error("[pie-section-player-vertical] Failed to load item player component:", error);
|
|
170
|
-
});
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
$effect(() => {
|
|
174
|
-
orchestratePlayerElementPreload({
|
|
175
|
-
componentTag: "pie-section-player-vertical",
|
|
176
|
-
strategy: playerStrategy,
|
|
177
|
-
renderables: preloadedRenderables,
|
|
178
|
-
renderablesSignature: preloadedRenderablesSignature,
|
|
179
|
-
resolvedPlayerProps: resolvedPlayerProps as Record<string, unknown>,
|
|
180
|
-
resolvedPlayerEnv: resolvedPlayerEnv as Record<string, unknown>,
|
|
181
|
-
iifeBundleHost,
|
|
182
|
-
getState: () =>
|
|
183
|
-
({
|
|
184
|
-
lastPreloadSignature,
|
|
185
|
-
preloadRunToken,
|
|
186
|
-
elementsLoaded,
|
|
187
|
-
}) as PlayerPreloadState,
|
|
188
|
-
setState: (next) => {
|
|
189
|
-
if (next.lastPreloadSignature !== undefined) {
|
|
190
|
-
lastPreloadSignature = next.lastPreloadSignature;
|
|
191
|
-
}
|
|
192
|
-
if (next.preloadRunToken !== undefined) {
|
|
193
|
-
preloadRunToken = next.preloadRunToken;
|
|
194
|
-
}
|
|
195
|
-
if (next.elementsLoaded !== undefined) {
|
|
196
|
-
elementsLoaded = next.elementsLoaded;
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
</script>
|
|
203
|
-
|
|
204
|
-
<pie-section-player-base
|
|
205
|
-
runtime={effectiveRuntime}
|
|
206
|
-
{section}
|
|
207
|
-
section-id={sectionId}
|
|
208
|
-
attempt-id={attemptId}
|
|
209
|
-
oncomposition-changed={handleBaseCompositionChanged}
|
|
210
|
-
>
|
|
211
|
-
<div
|
|
212
|
-
class={`pie-section-player-shell pie-section-player-shell--${toolbarPosition}`}
|
|
213
|
-
>
|
|
214
|
-
{#if shouldRenderToolbar && toolbarBeforeContent}
|
|
215
|
-
<pie-section-toolbar
|
|
216
|
-
class={`pie-section-player-toolbar pie-section-player-toolbar--${toolbarPosition}`}
|
|
217
|
-
position={toolbarPosition}
|
|
218
|
-
enabled-tools={enabledTools}
|
|
219
|
-
></pie-section-toolbar>
|
|
220
|
-
{/if}
|
|
221
|
-
|
|
222
|
-
<div
|
|
223
|
-
class={`pie-section-player-layout-body ${shouldRenderToolbar && toolbarInline ? "pie-section-player-layout-body--inline" : ""}`}
|
|
224
|
-
>
|
|
225
|
-
<div class="pie-section-player-vertical-content">
|
|
226
|
-
{#if !elementsLoaded}
|
|
227
|
-
<div class="pie-section-player-content-card">
|
|
228
|
-
<div
|
|
229
|
-
class="pie-section-player-content-card-body pie-section-player-item-content pie-section-player__item-content"
|
|
230
|
-
>
|
|
231
|
-
Loading section content...
|
|
232
|
-
</div>
|
|
233
|
-
</div>
|
|
234
|
-
{:else}
|
|
235
|
-
{#if passages.length > 0}
|
|
236
|
-
<section class="pie-section-player-passages-section" aria-label="Passages">
|
|
237
|
-
{#each passages as passage, passageIndex (passage.id || passageIndex)}
|
|
238
|
-
<SectionPassageCard
|
|
239
|
-
{passage}
|
|
240
|
-
{resolvedPlayerTag}
|
|
241
|
-
playerAction={verticalPlayerAction}
|
|
242
|
-
playerParams={getPassagePlayerParams({
|
|
243
|
-
passage,
|
|
244
|
-
resolvedPlayerEnv,
|
|
245
|
-
resolvedPlayerAttributes,
|
|
246
|
-
resolvedPlayerProps,
|
|
247
|
-
playerStrategy,
|
|
248
|
-
})}
|
|
249
|
-
{passageToolbarTools}
|
|
250
|
-
/>
|
|
251
|
-
{/each}
|
|
252
|
-
</section>
|
|
253
|
-
{/if}
|
|
254
|
-
|
|
255
|
-
<section class="pie-section-player-items-section" aria-label="Items">
|
|
256
|
-
{#each items as item, itemIndex (item.id || itemIndex)}
|
|
257
|
-
<SectionItemCard
|
|
258
|
-
{item}
|
|
259
|
-
canonicalItemId={getCanonicalItemId({ compositionModel, item })}
|
|
260
|
-
{resolvedPlayerTag}
|
|
261
|
-
playerAction={verticalPlayerAction}
|
|
262
|
-
playerParams={getItemPlayerParams({
|
|
263
|
-
item,
|
|
264
|
-
compositionModel,
|
|
265
|
-
resolvedPlayerEnv,
|
|
266
|
-
resolvedPlayerAttributes,
|
|
267
|
-
resolvedPlayerProps,
|
|
268
|
-
playerStrategy,
|
|
269
|
-
})}
|
|
270
|
-
{itemToolbarTools}
|
|
271
|
-
/>
|
|
272
|
-
{/each}
|
|
273
|
-
</section>
|
|
274
|
-
{/if}
|
|
275
|
-
</div>
|
|
276
|
-
|
|
277
|
-
{#if shouldRenderToolbar && toolbarInline && toolbarPosition === "right"}
|
|
278
|
-
<aside
|
|
279
|
-
class="pie-section-player-toolbar-pane pie-section-player-toolbar-pane--right"
|
|
280
|
-
aria-label="Section tools"
|
|
281
|
-
>
|
|
282
|
-
<pie-section-toolbar
|
|
283
|
-
position="right"
|
|
284
|
-
enabled-tools={enabledTools}
|
|
285
|
-
></pie-section-toolbar>
|
|
286
|
-
</aside>
|
|
287
|
-
{/if}
|
|
288
|
-
|
|
289
|
-
{#if shouldRenderToolbar && toolbarInline && toolbarPosition === "left"}
|
|
290
|
-
<aside
|
|
291
|
-
class="pie-section-player-toolbar-pane pie-section-player-toolbar-pane--left"
|
|
292
|
-
aria-label="Section tools"
|
|
293
|
-
>
|
|
294
|
-
<pie-section-toolbar
|
|
295
|
-
position="left"
|
|
296
|
-
enabled-tools={enabledTools}
|
|
297
|
-
></pie-section-toolbar>
|
|
298
|
-
</aside>
|
|
299
|
-
{/if}
|
|
300
|
-
</div>
|
|
301
|
-
|
|
302
|
-
{#if shouldRenderToolbar && !toolbarBeforeContent && !toolbarInline}
|
|
303
|
-
<pie-section-toolbar
|
|
304
|
-
class={`pie-section-player-toolbar pie-section-player-toolbar--${toolbarPosition}`}
|
|
305
|
-
position={toolbarPosition}
|
|
306
|
-
enabled-tools={enabledTools}
|
|
307
|
-
></pie-section-toolbar>
|
|
308
|
-
{/if}
|
|
309
|
-
</div>
|
|
310
|
-
</pie-section-player-base>
|
|
311
|
-
|
|
312
|
-
<style>
|
|
313
|
-
:host {
|
|
314
|
-
display: block;
|
|
315
|
-
width: 100%;
|
|
316
|
-
height: 100%;
|
|
317
|
-
min-height: 0;
|
|
318
|
-
max-height: 100%;
|
|
319
|
-
overflow: hidden;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
.pie-section-player-shell {
|
|
323
|
-
display: flex;
|
|
324
|
-
flex-direction: column;
|
|
325
|
-
height: 100%;
|
|
326
|
-
min-height: 0;
|
|
327
|
-
overflow: hidden;
|
|
328
|
-
background: var(--pie-background-dark, #ecedf1);
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.pie-section-player-shell--left,
|
|
332
|
-
.pie-section-player-shell--right {
|
|
333
|
-
flex-direction: row;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.pie-section-player-shell--left .pie-section-player-layout-body--inline {
|
|
337
|
-
order: 2;
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
.pie-section-player-shell--left .pie-section-player-toolbar-pane--left {
|
|
341
|
-
order: 1;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
.pie-section-player-layout-body {
|
|
345
|
-
display: grid;
|
|
346
|
-
grid-template-columns: minmax(0, 1fr);
|
|
347
|
-
flex: 1;
|
|
348
|
-
min-height: 0;
|
|
349
|
-
overflow: hidden;
|
|
350
|
-
background: var(--pie-background-dark, #ecedf1);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.pie-section-player-layout-body--inline {
|
|
354
|
-
grid-template-columns: minmax(0, 1fr) auto;
|
|
355
|
-
gap: 1rem;
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.pie-section-player-vertical-content {
|
|
359
|
-
height: 100%;
|
|
360
|
-
max-height: 100%;
|
|
361
|
-
min-height: 0;
|
|
362
|
-
min-width: 0;
|
|
363
|
-
overflow-y: auto;
|
|
364
|
-
overflow-x: hidden;
|
|
365
|
-
overscroll-behavior: contain;
|
|
366
|
-
display: flex;
|
|
367
|
-
flex-direction: column;
|
|
368
|
-
gap: 1rem;
|
|
369
|
-
padding: 0.5rem;
|
|
370
|
-
box-sizing: border-box;
|
|
371
|
-
background: var(--pie-background-dark, #ecedf1);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
.pie-section-player-passages-section,
|
|
375
|
-
.pie-section-player-items-section {
|
|
376
|
-
display: flex;
|
|
377
|
-
flex-direction: column;
|
|
378
|
-
gap: 1rem;
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.pie-section-player-toolbar-pane {
|
|
382
|
-
min-height: 0;
|
|
383
|
-
overflow: auto;
|
|
384
|
-
padding: 0.5rem;
|
|
385
|
-
box-sizing: border-box;
|
|
386
|
-
background: var(--pie-background-dark, #ecedf1);
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
.pie-section-player-toolbar-pane--right {
|
|
390
|
-
border-left: 1px solid var(--pie-border-light, #e5e7eb);
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
.pie-section-player-toolbar-pane--left {
|
|
394
|
-
border-right: 1px solid var(--pie-border-light, #e5e7eb);
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
.pie-section-player-toolbar {
|
|
398
|
-
margin: 0.5rem;
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
.pie-section-player-toolbar-pane pie-section-toolbar {
|
|
402
|
-
margin: 0.5rem;
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
.pie-section-player-content-card {
|
|
406
|
-
border: 1px solid var(--pie-border-light, #e5e7eb);
|
|
407
|
-
border-radius: 8px;
|
|
408
|
-
background: var(--pie-background, #fff);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.pie-section-player-content-card-header {
|
|
412
|
-
display: flex;
|
|
413
|
-
align-items: center;
|
|
414
|
-
justify-content: space-between;
|
|
415
|
-
padding: 0.75rem 1rem;
|
|
416
|
-
border-bottom: 1px solid var(--pie-border-light, #e5e7eb);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
.pie-section-player-content-card-body {
|
|
420
|
-
padding: 1rem;
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
@media (max-width: 1100px) {
|
|
424
|
-
.pie-section-player-shell--left,
|
|
425
|
-
.pie-section-player-shell--right {
|
|
426
|
-
flex-direction: column;
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
.pie-section-player-layout-body--inline {
|
|
430
|
-
grid-template-columns: 1fr;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
.pie-section-player-toolbar-pane--left,
|
|
434
|
-
.pie-section-player-toolbar-pane--right {
|
|
435
|
-
border: none;
|
|
436
|
-
padding: 0;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
</style>
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import "../item-shell-element.js";
|
|
3
|
-
import "@pie-players/pie-toolbars/components/item-toolbar-element";
|
|
4
|
-
import type { ItemEntity } from "@pie-players/pie-players-shared/types";
|
|
5
|
-
import { getEntityTitle } from "./composition.js";
|
|
6
|
-
import type { PlayerElementParams } from "./player-action.js";
|
|
7
|
-
|
|
8
|
-
let {
|
|
9
|
-
item,
|
|
10
|
-
canonicalItemId,
|
|
11
|
-
resolvedPlayerTag,
|
|
12
|
-
playerAction,
|
|
13
|
-
playerParams,
|
|
14
|
-
itemToolbarTools,
|
|
15
|
-
} = $props<{
|
|
16
|
-
item: ItemEntity;
|
|
17
|
-
canonicalItemId: string;
|
|
18
|
-
resolvedPlayerTag: string;
|
|
19
|
-
playerAction: (node: HTMLElement, params: PlayerElementParams) => unknown;
|
|
20
|
-
playerParams: PlayerElementParams;
|
|
21
|
-
itemToolbarTools: string;
|
|
22
|
-
}>();
|
|
23
|
-
</script>
|
|
24
|
-
|
|
25
|
-
<pie-item-shell
|
|
26
|
-
item-id={item.id}
|
|
27
|
-
canonical-item-id={canonicalItemId}
|
|
28
|
-
content-kind="assessment-item"
|
|
29
|
-
item={item}
|
|
30
|
-
>
|
|
31
|
-
<div class="pie-section-player-content-card">
|
|
32
|
-
<div
|
|
33
|
-
class="pie-section-player-content-card-header pie-section-player-item-header pie-section-player__item-header"
|
|
34
|
-
data-region="header"
|
|
35
|
-
>
|
|
36
|
-
{#if getEntityTitle(item)}
|
|
37
|
-
<h2>{getEntityTitle(item)}</h2>
|
|
38
|
-
{/if}
|
|
39
|
-
<pie-item-toolbar
|
|
40
|
-
item-id={item.id}
|
|
41
|
-
catalog-id={item.id}
|
|
42
|
-
tools={itemToolbarTools}
|
|
43
|
-
content-kind="assessment-item"
|
|
44
|
-
size="md"
|
|
45
|
-
language="en-US"
|
|
46
|
-
></pie-item-toolbar>
|
|
47
|
-
</div>
|
|
48
|
-
<div
|
|
49
|
-
class="pie-section-player-content-card-body pie-section-player-item-content pie-section-player__item-content"
|
|
50
|
-
data-region="content"
|
|
51
|
-
>
|
|
52
|
-
<svelte:element
|
|
53
|
-
this={resolvedPlayerTag}
|
|
54
|
-
use:playerAction={playerParams}
|
|
55
|
-
></svelte:element>
|
|
56
|
-
</div>
|
|
57
|
-
<div data-region="footer"></div>
|
|
58
|
-
</div>
|
|
59
|
-
</pie-item-shell>
|
|
60
|
-
|
|
61
|
-
<style>
|
|
62
|
-
.pie-section-player-content-card {
|
|
63
|
-
border: 1px solid var(--pie-border-light, #e5e7eb);
|
|
64
|
-
border-radius: 8px;
|
|
65
|
-
background: var(--pie-background, #fff);
|
|
66
|
-
color: var(--pie-text, #111827);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.pie-section-player-content-card-header {
|
|
70
|
-
display: flex;
|
|
71
|
-
align-items: center;
|
|
72
|
-
gap: 0.75rem;
|
|
73
|
-
padding: 0.75rem 1rem;
|
|
74
|
-
border-bottom: 1px solid var(--pie-border-light, #e5e7eb);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.pie-section-player-content-card-header h2 {
|
|
78
|
-
margin: 0;
|
|
79
|
-
font-size: 0.95rem;
|
|
80
|
-
font-weight: 600;
|
|
81
|
-
color: var(--pie-text, #111827);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.pie-section-player-content-card-header pie-item-toolbar {
|
|
85
|
-
margin-left: auto;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.pie-section-player-content-card-body {
|
|
89
|
-
padding: 1rem;
|
|
90
|
-
color: var(--pie-text, #111827);
|
|
91
|
-
}
|
|
92
|
-
</style>
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import "../passage-shell-element.js";
|
|
3
|
-
import "@pie-players/pie-toolbars/components/item-toolbar-element";
|
|
4
|
-
import { getEntityTitle } from "./composition.js";
|
|
5
|
-
import type { PassageEntity } from "@pie-players/pie-players-shared/types";
|
|
6
|
-
import type { PlayerElementParams } from "./player-action.js";
|
|
7
|
-
|
|
8
|
-
let {
|
|
9
|
-
passage,
|
|
10
|
-
resolvedPlayerTag,
|
|
11
|
-
playerAction,
|
|
12
|
-
playerParams,
|
|
13
|
-
passageToolbarTools,
|
|
14
|
-
} = $props<{
|
|
15
|
-
passage: PassageEntity;
|
|
16
|
-
resolvedPlayerTag: string;
|
|
17
|
-
playerAction: (node: HTMLElement, params: PlayerElementParams) => unknown;
|
|
18
|
-
playerParams: PlayerElementParams;
|
|
19
|
-
passageToolbarTools: string;
|
|
20
|
-
}>();
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
<pie-passage-shell
|
|
24
|
-
item-id={passage.id}
|
|
25
|
-
content-kind="rubric-block-stimulus"
|
|
26
|
-
item={passage}
|
|
27
|
-
>
|
|
28
|
-
<div class="pie-section-player-content-card">
|
|
29
|
-
<div
|
|
30
|
-
class="pie-section-player-content-card-header pie-section-player-passage-header pie-section-player__passage-header"
|
|
31
|
-
data-region="header"
|
|
32
|
-
>
|
|
33
|
-
{#if getEntityTitle(passage)}
|
|
34
|
-
<h2>{getEntityTitle(passage)}</h2>
|
|
35
|
-
{/if}
|
|
36
|
-
<pie-item-toolbar
|
|
37
|
-
item-id={passage.id}
|
|
38
|
-
catalog-id={passage.id}
|
|
39
|
-
tools={passageToolbarTools}
|
|
40
|
-
content-kind="rubric-block-stimulus"
|
|
41
|
-
size="md"
|
|
42
|
-
language="en-US"
|
|
43
|
-
></pie-item-toolbar>
|
|
44
|
-
</div>
|
|
45
|
-
<div
|
|
46
|
-
class="pie-section-player-content-card-body pie-section-player-passage-content pie-section-player__passage-content"
|
|
47
|
-
data-region="content"
|
|
48
|
-
>
|
|
49
|
-
<svelte:element
|
|
50
|
-
this={resolvedPlayerTag}
|
|
51
|
-
use:playerAction={playerParams}
|
|
52
|
-
></svelte:element>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</pie-passage-shell>
|
|
56
|
-
|
|
57
|
-
<style>
|
|
58
|
-
.pie-section-player-content-card {
|
|
59
|
-
border: 1px solid var(--pie-border-light, #e5e7eb);
|
|
60
|
-
border-radius: 8px;
|
|
61
|
-
background: var(--pie-background, #fff);
|
|
62
|
-
color: var(--pie-text, #111827);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.pie-section-player-content-card-header {
|
|
66
|
-
display: flex;
|
|
67
|
-
align-items: center;
|
|
68
|
-
gap: 0.75rem;
|
|
69
|
-
padding: 0.75rem 1rem;
|
|
70
|
-
border-bottom: 1px solid var(--pie-border-light, #e5e7eb);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.pie-section-player-content-card-header h2 {
|
|
74
|
-
margin: 0;
|
|
75
|
-
font-size: 0.95rem;
|
|
76
|
-
font-weight: 600;
|
|
77
|
-
color: var(--pie-text, #111827);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.pie-section-player-content-card-header pie-item-toolbar {
|
|
81
|
-
margin-left: auto;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.pie-section-player-content-card-body {
|
|
85
|
-
padding: 1rem;
|
|
86
|
-
color: var(--pie-text, #111827);
|
|
87
|
-
}
|
|
88
|
-
</style>
|