@bendyline/squisq-react 2.12.25 → 2.12.26
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/{chunk-2GNCILIQ.js → chunk-XR3KNKLP.js} +41 -20
- package/dist/index.js +1 -1
- package/dist/player/index.js +1 -1
- package/dist/squisq-player.full.global.js +408 -408
- package/dist/squisq-player.global.js +83 -83
- package/dist/standalone-player-full.js +1 -1
- package/dist/standalone-source.js +1 -1
- package/package.json +2 -2
|
@@ -2938,6 +2938,7 @@ function useSlideSwipe(opts) {
|
|
|
2938
2938
|
|
|
2939
2939
|
// src/DocPlayer.tsx
|
|
2940
2940
|
import {
|
|
2941
|
+
coverRepeatsLeadingBlock,
|
|
2941
2942
|
expandCoverBlock,
|
|
2942
2943
|
createTemplateContext,
|
|
2943
2944
|
markdownToDoc,
|
|
@@ -3288,6 +3289,39 @@ function DocPlayerContent({
|
|
|
3288
3289
|
}),
|
|
3289
3290
|
[resolvedPipStyle]
|
|
3290
3291
|
);
|
|
3292
|
+
const coverLayers = useMemo6(() => {
|
|
3293
|
+
const startBlockConfig = doc.startBlock;
|
|
3294
|
+
if (!appearance.showCoverSlide || !startBlockConfig) return null;
|
|
3295
|
+
const context = createTemplateContext(effectiveTheme, 0, 1, activeViewport, {
|
|
3296
|
+
motion: resolveMotionForDoc(doc, effectiveTheme, motionProp)
|
|
3297
|
+
});
|
|
3298
|
+
return expandCoverBlock(startBlockConfig, context, appearance.coverSlideTemplate);
|
|
3299
|
+
}, [
|
|
3300
|
+
doc,
|
|
3301
|
+
motionProp,
|
|
3302
|
+
activeViewport,
|
|
3303
|
+
effectiveTheme,
|
|
3304
|
+
appearance.showCoverSlide,
|
|
3305
|
+
appearance.coverSlideTemplate
|
|
3306
|
+
]);
|
|
3307
|
+
const coverIsFirstSlide = !!coverLayers && coverRepeatsLeadingBlock(doc);
|
|
3308
|
+
const playbackDoc = useMemo6(() => {
|
|
3309
|
+
if (!coverIsFirstSlide || !coverLayers) return doc;
|
|
3310
|
+
const [first, ...rest] = doc.blocks;
|
|
3311
|
+
return {
|
|
3312
|
+
...doc,
|
|
3313
|
+
blocks: [
|
|
3314
|
+
{
|
|
3315
|
+
...first,
|
|
3316
|
+
template: void 0,
|
|
3317
|
+
autoTemplate: void 0,
|
|
3318
|
+
templateData: void 0,
|
|
3319
|
+
layers: coverLayers
|
|
3320
|
+
},
|
|
3321
|
+
...rest
|
|
3322
|
+
]
|
|
3323
|
+
};
|
|
3324
|
+
}, [doc, coverIsFirstSlide, coverLayers]);
|
|
3291
3325
|
const hasAnchoredBlocks = useMemo6(
|
|
3292
3326
|
() => doc.blocks.some(
|
|
3293
3327
|
(block) => typeof block.sourceStartTime === "number"
|
|
@@ -3307,7 +3341,7 @@ function DocPlayerContent({
|
|
|
3307
3341
|
prevBlock: _prevBlock,
|
|
3308
3342
|
blocks: expandedBlocks,
|
|
3309
3343
|
suppressOutgoingForNextBlock
|
|
3310
|
-
} = useDocPlayback(
|
|
3344
|
+
} = useDocPlayback(playbackDoc, currentTime, {
|
|
3311
3345
|
basePath,
|
|
3312
3346
|
viewport: activeViewport,
|
|
3313
3347
|
theme: effectiveTheme,
|
|
@@ -3327,31 +3361,18 @@ function DocPlayerContent({
|
|
|
3327
3361
|
// would no longer match live playback.
|
|
3328
3362
|
useAudioSegmentTiming: audioMode !== "synthetic" || renderMode && hasAnchoredBlocks
|
|
3329
3363
|
});
|
|
3330
|
-
const coverBlock = useMemo6(
|
|
3331
|
-
|
|
3332
|
-
if (!appearance.showCoverSlide) return null;
|
|
3333
|
-
if (!startBlockConfig) return null;
|
|
3334
|
-
const context = createTemplateContext(effectiveTheme, 0, 1, activeViewport, {
|
|
3335
|
-
motion: resolveMotionForDoc(doc, effectiveTheme, motionProp)
|
|
3336
|
-
});
|
|
3337
|
-
const layers = expandCoverBlock(startBlockConfig, context, appearance.coverSlideTemplate);
|
|
3338
|
-
return {
|
|
3364
|
+
const coverBlock = useMemo6(
|
|
3365
|
+
() => coverLayers && !coverIsFirstSlide ? {
|
|
3339
3366
|
id: "cover-block",
|
|
3340
3367
|
startTime: -1,
|
|
3341
3368
|
// Not part of timeline
|
|
3342
3369
|
duration: 0,
|
|
3343
3370
|
// Static
|
|
3344
3371
|
audioSegment: -1,
|
|
3345
|
-
layers
|
|
3346
|
-
}
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
motionProp,
|
|
3350
|
-
activeViewport,
|
|
3351
|
-
effectiveTheme,
|
|
3352
|
-
appearance.showCoverSlide,
|
|
3353
|
-
appearance.coverSlideTemplate
|
|
3354
|
-
]);
|
|
3372
|
+
layers: coverLayers
|
|
3373
|
+
} : null,
|
|
3374
|
+
[coverLayers, coverIsFirstSlide]
|
|
3375
|
+
);
|
|
3355
3376
|
const hasManagedCover = !!coverBlock;
|
|
3356
3377
|
const [slideshowCoverVisible, setSlideshowCoverVisible] = useState7(false);
|
|
3357
3378
|
const [isSlideshowPickerOpen, setIsSlideshowPickerOpen] = useState7(false);
|
package/dist/index.js
CHANGED
package/dist/player/index.js
CHANGED