@bendyline/squisq-react 2.12.26 → 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.
@@ -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-HPABEDRG.js";
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-L3PODEKP.js";
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-HPABEDRG.js";
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
- gap: "8px",
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
  "/",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  LinearDocView
3
- } from "./chunk-L3PODEKP.js";
3
+ } from "./chunk-FZNGE23J.js";
4
4
 
5
5
  // src/PaginatedDocView.tsx
6
6
  import {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BlockRenderer
3
- } from "../chunk-HPABEDRG.js";
3
+ } from "../chunk-3DBHZKBG.js";
4
4
  import "../chunk-E7TEWUNF.js";
5
5
  import "../chunk-A65WPCGZ.js";
6
6
  import {
package/dist/index.js CHANGED
@@ -17,17 +17,17 @@ import {
17
17
  resolveDocPlayerAppearance,
18
18
  useBuildNavigation,
19
19
  useMediaClipDurations
20
- } from "./chunk-XR3KNKLP.js";
20
+ } from "./chunk-GAZHUNKY.js";
21
21
  import {
22
22
  PaginatedDocView
23
- } from "./chunk-74MMSPTK.js";
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-L3PODEKP.js";
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-HPABEDRG.js";
60
+ } from "./chunk-3DBHZKBG.js";
61
61
  import {
62
62
  ImageLayer,
63
63
  MapLayer,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  PaginatedDocView
3
- } from "../chunk-74MMSPTK.js";
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-L3PODEKP.js";
10
+ } from "../chunk-FZNGE23J.js";
11
11
  import "../chunk-TT6ENR6T.js";
12
12
  import "../chunk-OWC7DNGJ.js";
13
- import "../chunk-HPABEDRG.js";
13
+ import "../chunk-3DBHZKBG.js";
14
14
  import "../chunk-E7TEWUNF.js";
15
15
  import "../chunk-A65WPCGZ.js";
16
16
  import "../chunk-OTYJ4MRH.js";
@@ -12,8 +12,8 @@ import {
12
12
  MediaClipLayer,
13
13
  SocialCaptionOverlay,
14
14
  formatTime
15
- } from "../chunk-XR3KNKLP.js";
16
- import "../chunk-L3PODEKP.js";
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-HPABEDRG.js";
25
+ } from "../chunk-3DBHZKBG.js";
26
26
  import "../chunk-E7TEWUNF.js";
27
27
  import "../chunk-A65WPCGZ.js";
28
28
  import "../chunk-OTYJ4MRH.js";