@bendyline/squisq-react 2.12.25 → 2.12.27
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-HPABEDRG.js → chunk-3DBHZKBG.js} +8 -1
- package/dist/{chunk-L3PODEKP.js → chunk-FZNGE23J.js} +2 -1
- package/dist/{chunk-2GNCILIQ.js → chunk-GAZHUNKY.js} +49 -25
- package/dist/{chunk-74MMSPTK.js → chunk-ZXPSPNO6.js} +1 -1
- package/dist/diagram-pictures/index.js +1 -1
- package/dist/index.js +4 -4
- package/dist/page/index.js +3 -3
- package/dist/player/index.js +3 -3
- package/dist/squisq-player.full.global.js +503 -501
- package/dist/squisq-player.global.js +94 -92
- package/dist/standalone-player-full.js +1 -1
- package/dist/standalone-source.js +1 -1
- package/package.json +2 -2
|
@@ -378,6 +378,13 @@ function BlockRenderer({
|
|
|
378
378
|
animationsEnabled,
|
|
379
379
|
reducedMotion
|
|
380
380
|
]);
|
|
381
|
+
const countUpOffset = (layer) => {
|
|
382
|
+
if (layer.buildStep === void 0 || layer.animation?.type !== "countUp") return 0;
|
|
383
|
+
if (buildPlayback !== "timed" || !timeline || !block.build) return 0;
|
|
384
|
+
const start = timeline.starts[layer.buildStep];
|
|
385
|
+
const delay = entranceDelays.get(layer.buildStep);
|
|
386
|
+
return start === void 0 || delay === void 0 ? 0 : start - delay;
|
|
387
|
+
};
|
|
381
388
|
const growText = growTextToFit && !isGeometryBoundTemplate(block.template);
|
|
382
389
|
useLayoutEffect(() => {
|
|
383
390
|
const svg = svgRef.current;
|
|
@@ -438,7 +445,7 @@ function BlockRenderer({
|
|
|
438
445
|
layer,
|
|
439
446
|
basePath,
|
|
440
447
|
viewport,
|
|
441
|
-
blockTime,
|
|
448
|
+
blockTime: blockTime - countUpOffset(layer),
|
|
442
449
|
isPlaying,
|
|
443
450
|
muted,
|
|
444
451
|
animationsEnabled,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-OWC7DNGJ.js";
|
|
9
9
|
import {
|
|
10
10
|
BlockRenderer
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3DBHZKBG.js";
|
|
12
12
|
import {
|
|
13
13
|
svgDataImageSrc,
|
|
14
14
|
useMediaUrl
|
|
@@ -184,6 +184,7 @@ function StatBandSection({ section }) {
|
|
|
184
184
|
);
|
|
185
185
|
const maxValue = Math.max(1, ...numericValues.filter((value) => Number.isFinite(value)));
|
|
186
186
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
187
|
+
section.slots.title && /* @__PURE__ */ jsx2("h2", { className: "squisq-page-section-title squisq-page-stats-title", children: section.slots.title }),
|
|
187
188
|
/* @__PURE__ */ jsx2("div", { className: "squisq-page-stats", children: items.map((item, i) => /* @__PURE__ */ jsxs("div", { className: `squisq-page-stat${comparison ? " squisq-page-stat--bars" : ""}`, children: [
|
|
188
189
|
/* @__PURE__ */ jsx2("span", { className: "squisq-page-stat-value", children: item.value }),
|
|
189
190
|
comparison && Number.isFinite(numericValues[i]) && /* @__PURE__ */ jsx2(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LinearDocView
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FZNGE23J.js";
|
|
4
4
|
import {
|
|
5
5
|
useAudioSync,
|
|
6
6
|
useDocPlayback,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-OWC7DNGJ.js";
|
|
16
16
|
import {
|
|
17
17
|
BlockRenderer
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-3DBHZKBG.js";
|
|
19
19
|
import {
|
|
20
20
|
isCaptureDrivenVideo,
|
|
21
21
|
seekVideoToFrame
|
|
@@ -1378,7 +1378,10 @@ function DocControlsOverlay({
|
|
|
1378
1378
|
background: "linear-gradient(transparent, rgba(0,0,0,0.8))",
|
|
1379
1379
|
display: "flex",
|
|
1380
1380
|
alignItems: "center",
|
|
1381
|
-
|
|
1381
|
+
// In a phone-width player the timeline wraps to its own row rather
|
|
1382
|
+
// than being squeezed to a dot between the time and the counter.
|
|
1383
|
+
flexWrap: "wrap",
|
|
1384
|
+
gap: "4px 8px",
|
|
1382
1385
|
zIndex: 100
|
|
1383
1386
|
},
|
|
1384
1387
|
children: [
|
|
@@ -1430,7 +1433,7 @@ function DocControlsOverlay({
|
|
|
1430
1433
|
" / ",
|
|
1431
1434
|
formatTime(state.totalDuration)
|
|
1432
1435
|
] }),
|
|
1433
|
-
/* @__PURE__ */ jsx6(
|
|
1436
|
+
/* @__PURE__ */ jsx6("div", { style: { flex: "1 1 120px", minWidth: 0, display: "flex" }, children: /* @__PURE__ */ jsx6(
|
|
1434
1437
|
DocProgressBar,
|
|
1435
1438
|
{
|
|
1436
1439
|
state,
|
|
@@ -1439,7 +1442,7 @@ function DocControlsOverlay({
|
|
|
1439
1442
|
expandedBlocks,
|
|
1440
1443
|
getBlockTitle
|
|
1441
1444
|
}
|
|
1442
|
-
),
|
|
1445
|
+
) }),
|
|
1443
1446
|
/* @__PURE__ */ jsxs3("span", { style: { color: "rgba(255,255,255,0.5)", fontSize: "11px", whiteSpace: "nowrap" }, children: [
|
|
1444
1447
|
state.currentBlockIndex + 1,
|
|
1445
1448
|
"/",
|
|
@@ -2938,6 +2941,7 @@ function useSlideSwipe(opts) {
|
|
|
2938
2941
|
|
|
2939
2942
|
// src/DocPlayer.tsx
|
|
2940
2943
|
import {
|
|
2944
|
+
coverRepeatsLeadingBlock,
|
|
2941
2945
|
expandCoverBlock,
|
|
2942
2946
|
createTemplateContext,
|
|
2943
2947
|
markdownToDoc,
|
|
@@ -3288,6 +3292,39 @@ function DocPlayerContent({
|
|
|
3288
3292
|
}),
|
|
3289
3293
|
[resolvedPipStyle]
|
|
3290
3294
|
);
|
|
3295
|
+
const coverLayers = useMemo6(() => {
|
|
3296
|
+
const startBlockConfig = doc.startBlock;
|
|
3297
|
+
if (!appearance.showCoverSlide || !startBlockConfig) return null;
|
|
3298
|
+
const context = createTemplateContext(effectiveTheme, 0, 1, activeViewport, {
|
|
3299
|
+
motion: resolveMotionForDoc(doc, effectiveTheme, motionProp)
|
|
3300
|
+
});
|
|
3301
|
+
return expandCoverBlock(startBlockConfig, context, appearance.coverSlideTemplate);
|
|
3302
|
+
}, [
|
|
3303
|
+
doc,
|
|
3304
|
+
motionProp,
|
|
3305
|
+
activeViewport,
|
|
3306
|
+
effectiveTheme,
|
|
3307
|
+
appearance.showCoverSlide,
|
|
3308
|
+
appearance.coverSlideTemplate
|
|
3309
|
+
]);
|
|
3310
|
+
const coverIsFirstSlide = !!coverLayers && coverRepeatsLeadingBlock(doc);
|
|
3311
|
+
const playbackDoc = useMemo6(() => {
|
|
3312
|
+
if (!coverIsFirstSlide || !coverLayers) return doc;
|
|
3313
|
+
const [first, ...rest] = doc.blocks;
|
|
3314
|
+
return {
|
|
3315
|
+
...doc,
|
|
3316
|
+
blocks: [
|
|
3317
|
+
{
|
|
3318
|
+
...first,
|
|
3319
|
+
template: void 0,
|
|
3320
|
+
autoTemplate: void 0,
|
|
3321
|
+
templateData: void 0,
|
|
3322
|
+
layers: coverLayers
|
|
3323
|
+
},
|
|
3324
|
+
...rest
|
|
3325
|
+
]
|
|
3326
|
+
};
|
|
3327
|
+
}, [doc, coverIsFirstSlide, coverLayers]);
|
|
3291
3328
|
const hasAnchoredBlocks = useMemo6(
|
|
3292
3329
|
() => doc.blocks.some(
|
|
3293
3330
|
(block) => typeof block.sourceStartTime === "number"
|
|
@@ -3307,7 +3344,7 @@ function DocPlayerContent({
|
|
|
3307
3344
|
prevBlock: _prevBlock,
|
|
3308
3345
|
blocks: expandedBlocks,
|
|
3309
3346
|
suppressOutgoingForNextBlock
|
|
3310
|
-
} = useDocPlayback(
|
|
3347
|
+
} = useDocPlayback(playbackDoc, currentTime, {
|
|
3311
3348
|
basePath,
|
|
3312
3349
|
viewport: activeViewport,
|
|
3313
3350
|
theme: effectiveTheme,
|
|
@@ -3327,31 +3364,18 @@ function DocPlayerContent({
|
|
|
3327
3364
|
// would no longer match live playback.
|
|
3328
3365
|
useAudioSegmentTiming: audioMode !== "synthetic" || renderMode && hasAnchoredBlocks
|
|
3329
3366
|
});
|
|
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 {
|
|
3367
|
+
const coverBlock = useMemo6(
|
|
3368
|
+
() => coverLayers && !coverIsFirstSlide ? {
|
|
3339
3369
|
id: "cover-block",
|
|
3340
3370
|
startTime: -1,
|
|
3341
3371
|
// Not part of timeline
|
|
3342
3372
|
duration: 0,
|
|
3343
3373
|
// Static
|
|
3344
3374
|
audioSegment: -1,
|
|
3345
|
-
layers
|
|
3346
|
-
}
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
motionProp,
|
|
3350
|
-
activeViewport,
|
|
3351
|
-
effectiveTheme,
|
|
3352
|
-
appearance.showCoverSlide,
|
|
3353
|
-
appearance.coverSlideTemplate
|
|
3354
|
-
]);
|
|
3375
|
+
layers: coverLayers
|
|
3376
|
+
} : null,
|
|
3377
|
+
[coverLayers, coverIsFirstSlide]
|
|
3378
|
+
);
|
|
3355
3379
|
const hasManagedCover = !!coverBlock;
|
|
3356
3380
|
const [slideshowCoverVisible, setSlideshowCoverVisible] = useState7(false);
|
|
3357
3381
|
const [isSlideshowPickerOpen, setIsSlideshowPickerOpen] = useState7(false);
|
package/dist/index.js
CHANGED
|
@@ -17,17 +17,17 @@ import {
|
|
|
17
17
|
resolveDocPlayerAppearance,
|
|
18
18
|
useBuildNavigation,
|
|
19
19
|
useMediaClipDurations
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-GAZHUNKY.js";
|
|
21
21
|
import {
|
|
22
22
|
PaginatedDocView
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ZXPSPNO6.js";
|
|
24
24
|
import {
|
|
25
25
|
CanvasSection,
|
|
26
26
|
LinearDocView,
|
|
27
27
|
PageSectionView,
|
|
28
28
|
PageViewContext,
|
|
29
29
|
usePageView
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-FZNGE23J.js";
|
|
31
31
|
import {
|
|
32
32
|
useModalDialog
|
|
33
33
|
} from "./chunk-JP457U6N.js";
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
} from "./chunk-OWC7DNGJ.js";
|
|
58
58
|
import {
|
|
59
59
|
BlockRenderer
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-3DBHZKBG.js";
|
|
61
61
|
import {
|
|
62
62
|
ImageLayer,
|
|
63
63
|
MapLayer,
|
package/dist/page/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PaginatedDocView
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-ZXPSPNO6.js";
|
|
4
4
|
import {
|
|
5
5
|
CanvasSection,
|
|
6
6
|
LinearDocView,
|
|
7
7
|
PageSectionView,
|
|
8
8
|
PageViewContext,
|
|
9
9
|
usePageView
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-FZNGE23J.js";
|
|
11
11
|
import "../chunk-TT6ENR6T.js";
|
|
12
12
|
import "../chunk-OWC7DNGJ.js";
|
|
13
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-3DBHZKBG.js";
|
|
14
14
|
import "../chunk-E7TEWUNF.js";
|
|
15
15
|
import "../chunk-A65WPCGZ.js";
|
|
16
16
|
import "../chunk-OTYJ4MRH.js";
|
package/dist/player/index.js
CHANGED
|
@@ -12,8 +12,8 @@ import {
|
|
|
12
12
|
MediaClipLayer,
|
|
13
13
|
SocialCaptionOverlay,
|
|
14
14
|
formatTime
|
|
15
|
-
} from "../chunk-
|
|
16
|
-
import "../chunk-
|
|
15
|
+
} from "../chunk-GAZHUNKY.js";
|
|
16
|
+
import "../chunk-FZNGE23J.js";
|
|
17
17
|
import "../chunk-UUGOEH5Q.js";
|
|
18
18
|
import "../chunk-TT6ENR6T.js";
|
|
19
19
|
import {
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from "../chunk-OWC7DNGJ.js";
|
|
23
23
|
import {
|
|
24
24
|
BlockRenderer
|
|
25
|
-
} from "../chunk-
|
|
25
|
+
} from "../chunk-3DBHZKBG.js";
|
|
26
26
|
import "../chunk-E7TEWUNF.js";
|
|
27
27
|
import "../chunk-A65WPCGZ.js";
|
|
28
28
|
import "../chunk-OTYJ4MRH.js";
|