@remotion/maptiler 4.0.529 → 4.0.530

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.
@@ -4,4 +4,4 @@ export type MapLayerProps = InteractiveBaseProps & Pick<InteractivePremountProps
4
4
  readonly beforeId?: string;
5
5
  readonly layer: LayerSpecification;
6
6
  };
7
- export declare const MapLayer: ({ from, durationInFrames, trimBefore, playbackRate, freeze, hidden, name, showInTimeline, premountFor, postmountFor, ...props }: MapLayerProps) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const MapLayer: ({ from, durationInFrames, trimBefore, playbackRate, loop, freeze, hidden, name, showInTimeline, premountFor, postmountFor, ...props }: MapLayerProps) => import("react/jsx-runtime").JSX.Element;
@@ -24,7 +24,7 @@ export declare const MapOverlay: import("react").ComponentType<InteractiveBasePr
24
24
  readonly opacity?: number | undefined;
25
25
  readonly rotation?: number | undefined;
26
26
  readonly rotationAlignment?: "map" | "viewport" | undefined;
27
- } & import("react").RefAttributes<HTMLDivElement>>;
27
+ }>;
28
28
  export declare const MapMarker: import("react").ComponentType<InteractiveBaseProps & InteractivePremountProps & InteractiveTransformProps & {
29
29
  readonly anchor?: MapOverlayAnchor | undefined;
30
30
  readonly children?: ReactNode;
@@ -36,4 +36,4 @@ export declare const MapMarker: import("react").ComponentType<InteractiveBasePro
36
36
  readonly opacity?: number | undefined;
37
37
  readonly rotation?: number | undefined;
38
38
  readonly rotationAlignment?: "map" | "viewport" | undefined;
39
- } & import("react").RefAttributes<HTMLDivElement>>;
39
+ }>;
@@ -20,4 +20,4 @@ export declare const MapRegion: import("react").ComponentType<InteractiveBasePro
20
20
  readonly progress?: number | undefined;
21
21
  readonly strokeColor?: string | undefined;
22
22
  readonly strokeWidth?: number | undefined;
23
- } & import("react").RefAttributes<HTMLDivElement>>;
23
+ }>;
@@ -18,4 +18,4 @@ export declare const MapRoute: import("react").ComponentType<InteractiveBaseProp
18
18
  readonly progress?: number | undefined;
19
19
  readonly strokeColor?: string | undefined;
20
20
  readonly strokeWidth?: number | undefined;
21
- } & import("react").RefAttributes<HTMLDivElement>>;
21
+ }>;
@@ -6,4 +6,4 @@ export type MapSourceProps = InteractiveBaseProps & Pick<InteractivePremountProp
6
6
  readonly id: string;
7
7
  readonly source: SourceSpecification;
8
8
  };
9
- export declare const MapSource: ({ from, durationInFrames, trimBefore, playbackRate, freeze, hidden, name, showInTimeline, premountFor, postmountFor, ...props }: MapSourceProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const MapSource: ({ from, durationInFrames, trimBefore, playbackRate, loop, freeze, hidden, name, showInTimeline, premountFor, postmountFor, ...props }: MapSourceProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,10 +1,10 @@
1
1
  import { Map as MapTilerMap, type MapOptions } from '@maptiler/sdk';
2
- import type { ComponentType, ReactNode } from 'react';
3
2
  import '@maptiler/sdk/style.css';
4
- import { type InteractiveBaseProps, type InteractivePremountProps, type SequenceControls } from 'remotion';
3
+ import type { ComponentType, ReactNode } from 'react';
4
+ import { type InteractiveBaseProps, type InteractiveCropProps, type InteractivePremountProps, type InteractiveTransformProps, type SequenceControls } from 'remotion';
5
5
  export type MapViewportMapOptions = Omit<MapOptions, 'apiKey' | 'bearing' | 'center' | 'container' | 'fadeDuration' | 'interactive' | 'language' | 'padding' | 'pitch' | 'projection' | 'style' | 'terrain' | 'terrainExaggeration' | 'zoom'>;
6
6
  export type MapAdministrativeBorders = 'all' | 'country-only' | 'none';
7
- export type MapViewportProps = InteractiveBaseProps & InteractivePremountProps & {
7
+ export type MapViewportProps = InteractiveBaseProps & InteractiveCropProps & InteractivePremountProps & InteractiveTransformProps & {
8
8
  readonly apiKey: string | null;
9
9
  readonly backgroundColor?: string;
10
10
  readonly bearing?: number;
@@ -237,7 +237,8 @@ var MapHeatmap = (props) => {
237
237
  name,
238
238
  showInTimeline,
239
239
  trimBefore,
240
- playbackRate
240
+ playbackRate,
241
+ loop
241
242
  } = props;
242
243
  const {
243
244
  effectivePremountFor,
@@ -248,7 +249,11 @@ var MapHeatmap = (props) => {
248
249
  postmountingActive
249
250
  } = Internals2.usePremounting({
250
251
  from: from ?? 0,
251
- durationInFrames: durationInFrames ?? Infinity,
252
+ durationInFrames: Internals2.resolveSequenceDuration({
253
+ durationInFrames,
254
+ playbackRate,
255
+ loop
256
+ }),
252
257
  premountFor: premountFor ?? null,
253
258
  postmountFor: postmountFor ?? null,
254
259
  style: null,
@@ -264,6 +269,7 @@ var MapHeatmap = (props) => {
264
269
  from: from ?? 0,
265
270
  trimBefore,
266
271
  playbackRate,
272
+ loop,
267
273
  durationInFrames: durationInFrames ?? Infinity,
268
274
  freeze,
269
275
  hidden,
@@ -376,6 +382,7 @@ var MapLayer = ({
376
382
  durationInFrames,
377
383
  trimBefore,
378
384
  playbackRate,
385
+ loop,
379
386
  freeze,
380
387
  hidden,
381
388
  name,
@@ -393,7 +400,11 @@ var MapLayer = ({
393
400
  postmountingActive
394
401
  } = Internals3.usePremounting({
395
402
  from: from ?? 0,
396
- durationInFrames: durationInFrames ?? Infinity,
403
+ durationInFrames: Internals3.resolveSequenceDuration({
404
+ durationInFrames,
405
+ playbackRate,
406
+ loop
407
+ }),
397
408
  premountFor: premountFor ?? null,
398
409
  postmountFor: postmountFor ?? null,
399
410
  style: null,
@@ -410,6 +421,7 @@ var MapLayer = ({
410
421
  durationInFrames,
411
422
  trimBefore,
412
423
  playbackRate,
424
+ loop,
413
425
  freeze,
414
426
  hidden,
415
427
  showInTimeline: showInTimeline ?? false,
@@ -425,12 +437,7 @@ var MapLayer = ({
425
437
  });
426
438
  };
427
439
  // src/MapOverlay.tsx
428
- import {
429
- forwardRef,
430
- useContext as useContext5,
431
- useImperativeHandle,
432
- useRef as useRef4
433
- } from "react";
440
+ import { useContext as useContext5 } from "react";
434
441
  import {
435
442
  Interactive,
436
443
  Freeze as Freeze3,
@@ -501,7 +508,7 @@ var mapOverlaySchema = {
501
508
  },
502
509
  ...Interactive.transformSchema
503
510
  };
504
- var MapOverlayRefForwardingFunction = ({
511
+ var MapOverlayInner = ({
505
512
  anchor = "center",
506
513
  children,
507
514
  latitude,
@@ -520,18 +527,17 @@ var MapOverlayRefForwardingFunction = ({
520
527
  styleWhilePostmounted,
521
528
  trimBefore,
522
529
  playbackRate,
530
+ loop,
523
531
  freeze,
524
532
  hidden,
525
533
  name,
526
534
  showInTimeline,
527
535
  controls
528
- }, ref) => {
536
+ }) => {
529
537
  const { map } = useContext5(MapTilerContext);
530
- const refForOutline = useRef4(null);
531
538
  const point = map?.project([longitude, latitude]);
532
539
  const horizontalAnchor = anchor.includes("left") ? 0 : anchor.includes("right") ? -100 : -50;
533
540
  const verticalAnchor = anchor.includes("top") ? 0 : anchor.includes("bottom") ? -100 : -50;
534
- useImperativeHandle(ref, () => refForOutline.current, []);
535
541
  const {
536
542
  effectivePremountFor,
537
543
  effectivePostmountFor,
@@ -542,7 +548,11 @@ var MapOverlayRefForwardingFunction = ({
542
548
  premountingStyle
543
549
  } = Internals4.usePremounting({
544
550
  from: from ?? 0,
545
- durationInFrames: durationInFrames ?? Infinity,
551
+ durationInFrames: Internals4.resolveSequenceDuration({
552
+ durationInFrames,
553
+ playbackRate,
554
+ loop
555
+ }),
546
556
  premountFor: premountFor ?? null,
547
557
  postmountFor: postmountFor ?? null,
548
558
  style: { opacity, ...style },
@@ -558,19 +568,18 @@ var MapOverlayRefForwardingFunction = ({
558
568
  from: from ?? 0,
559
569
  trimBefore,
560
570
  playbackRate,
571
+ loop,
561
572
  durationInFrames: durationInFrames ?? Infinity,
562
573
  freeze,
563
574
  hidden,
564
575
  name: name ?? "<MapOverlay>",
565
576
  showInTimeline: showInTimeline ?? true,
566
577
  controls,
567
- outlineRef: refForOutline,
568
578
  _remotionInternalPremountDisplay: effectivePremountFor || null,
569
579
  _remotionInternalPostmountDisplay: effectivePostmountFor || null,
570
580
  _remotionInternalIsPremounting: premountingActive,
571
581
  _remotionInternalIsPostmounting: postmountingActive,
572
582
  children: /* @__PURE__ */ jsx3("div", {
573
- ref: refForOutline,
574
583
  style: {
575
584
  left: (point?.x ?? 0) + offsetX,
576
585
  opacity,
@@ -587,7 +596,6 @@ var MapOverlayRefForwardingFunction = ({
587
596
  })
588
597
  });
589
598
  };
590
- var MapOverlayInner = forwardRef(MapOverlayRefForwardingFunction);
591
599
  var MapOverlay = Interactive.withSchema({
592
600
  Component: MapOverlayInner,
593
601
  componentName: "<MapOverlay>",
@@ -599,7 +607,7 @@ var MapMarker = MapOverlay;
599
607
  import {
600
608
  helpers as helpers2
601
609
  } from "@maptiler/sdk";
602
- import { useContext as useContext6, useEffect as useEffect4, useRef as useRef5 } from "react";
610
+ import { useContext as useContext6, useEffect as useEffect4, useRef as useRef4 } from "react";
603
611
  import {
604
612
  Freeze as Freeze4,
605
613
  Sequence as Sequence4,
@@ -633,9 +641,9 @@ var MapPointDrawing = ({
633
641
  }) => {
634
642
  const { map, styleRevision } = useContext6(MapTilerContext);
635
643
  const { continueRender, delayRender } = useDelayRender3();
636
- const layerIdsRef = useRef5(null);
644
+ const layerIdsRef = useRef4(null);
637
645
  const applyPremountVisibility = useMapPremounting(() => Object.entries(layerIdsRef.current ?? {}).filter(([key]) => key.endsWith("LayerId")).map(([, value]) => value));
638
- const optionsRef = useRef5(null);
646
+ const optionsRef = useRef4(null);
639
647
  const outlineColorIsDynamic = typeof outlineColor === "string";
640
648
  const outlineOpacityIsDynamic = typeof outlineOpacity === "number";
641
649
  const outlineWidthIsDynamic = typeof outlineWidth === "number";
@@ -830,7 +838,8 @@ var MapPoint = (props) => {
830
838
  name,
831
839
  showInTimeline,
832
840
  trimBefore,
833
- playbackRate
841
+ playbackRate,
842
+ loop
834
843
  } = props;
835
844
  const {
836
845
  effectivePremountFor,
@@ -841,7 +850,11 @@ var MapPoint = (props) => {
841
850
  postmountingActive
842
851
  } = Internals5.usePremounting({
843
852
  from: from ?? 0,
844
- durationInFrames: durationInFrames ?? Infinity,
853
+ durationInFrames: Internals5.resolveSequenceDuration({
854
+ durationInFrames,
855
+ playbackRate,
856
+ loop
857
+ }),
845
858
  premountFor: premountFor ?? null,
846
859
  postmountFor: postmountFor ?? null,
847
860
  style: null,
@@ -857,6 +870,7 @@ var MapPoint = (props) => {
857
870
  from: from ?? 0,
858
871
  trimBefore,
859
872
  playbackRate,
873
+ loop,
860
874
  durationInFrames: durationInFrames ?? Infinity,
861
875
  freeze,
862
876
  hidden,
@@ -877,7 +891,7 @@ var MapPoint = (props) => {
877
891
  import {
878
892
  helpers as helpers4
879
893
  } from "@maptiler/sdk";
880
- import { useContext as useContext8, useEffect as useEffect6, useMemo as useMemo2, useRef as useRef7 } from "react";
894
+ import { useContext as useContext8, useEffect as useEffect6, useMemo as useMemo2, useRef as useRef6 } from "react";
881
895
  import {
882
896
  Freeze as Freeze6,
883
897
  Sequence as Sequence6,
@@ -890,7 +904,7 @@ import {
890
904
  helpers as helpers3
891
905
  } from "@maptiler/sdk";
892
906
  import { length as getLineLength, lineSliceAlong, lineString } from "@turf/turf";
893
- import { useContext as useContext7, useEffect as useEffect5, useRef as useRef6, useState } from "react";
907
+ import { useContext as useContext7, useEffect as useEffect5, useRef as useRef5, useState } from "react";
894
908
  import {
895
909
  Freeze as Freeze5,
896
910
  Sequence as Sequence5,
@@ -974,9 +988,9 @@ var MapPolylineDrawing = ({
974
988
  }) => {
975
989
  const { map, styleRevision } = useContext7(MapTilerContext);
976
990
  const { cancelRender, continueRender, delayRender } = useDelayRender4();
977
- const layerIdsRef = useRef6(null);
991
+ const layerIdsRef = useRef5(null);
978
992
  const applyPremountVisibility = useMapPremounting(() => Object.entries(layerIdsRef.current ?? {}).filter(([key]) => key.endsWith("LayerId")).map(([, value]) => value));
979
- const optionsRef = useRef6(null);
993
+ const optionsRef = useRef5(null);
980
994
  const [layerRevision, setLayerRevision] = useState(0);
981
995
  const lineBlurIsDynamic = typeof lineBlur === "number";
982
996
  const lineColorIsDynamic = typeof lineColor === "string";
@@ -1213,7 +1227,8 @@ var MapPolyline = (props) => {
1213
1227
  name,
1214
1228
  showInTimeline,
1215
1229
  trimBefore,
1216
- playbackRate
1230
+ playbackRate,
1231
+ loop
1217
1232
  } = props;
1218
1233
  const {
1219
1234
  effectivePremountFor,
@@ -1224,7 +1239,11 @@ var MapPolyline = (props) => {
1224
1239
  postmountingActive
1225
1240
  } = Internals6.usePremounting({
1226
1241
  from: from ?? 0,
1227
- durationInFrames: durationInFrames ?? Infinity,
1242
+ durationInFrames: Internals6.resolveSequenceDuration({
1243
+ durationInFrames,
1244
+ playbackRate,
1245
+ loop
1246
+ }),
1228
1247
  premountFor: premountFor ?? null,
1229
1248
  postmountFor: postmountFor ?? null,
1230
1249
  style: null,
@@ -1240,6 +1259,7 @@ var MapPolyline = (props) => {
1240
1259
  from: from ?? 0,
1241
1260
  trimBefore,
1242
1261
  playbackRate,
1262
+ loop,
1243
1263
  durationInFrames: durationInFrames ?? Infinity,
1244
1264
  freeze,
1245
1265
  hidden,
@@ -1321,9 +1341,9 @@ var MapPolygonDrawing = ({
1321
1341
  }) => {
1322
1342
  const { map, styleRevision } = useContext8(MapTilerContext);
1323
1343
  const { continueRender, delayRender } = useDelayRender5();
1324
- const layerIdsRef = useRef7(null);
1344
+ const layerIdsRef = useRef6(null);
1325
1345
  const applyPremountVisibility = useMapPremounting(() => Object.entries(layerIdsRef.current ?? {}).filter(([key]) => key.endsWith("LayerId")).map(([, value]) => value));
1326
- const optionsRef = useRef7(null);
1346
+ const optionsRef = useRef6(null);
1327
1347
  const fillColorIsDynamic = typeof fillColor === "string";
1328
1348
  const fillOpacityIsDynamic = typeof fillOpacity === "number";
1329
1349
  const outlineBlurIsDynamic = typeof outlineBlur === "number";
@@ -1519,7 +1539,8 @@ var MapPolygon = (props) => {
1519
1539
  name,
1520
1540
  showInTimeline,
1521
1541
  trimBefore,
1522
- playbackRate
1542
+ playbackRate,
1543
+ loop
1523
1544
  } = props;
1524
1545
  const {
1525
1546
  effectivePremountFor,
@@ -1530,7 +1551,11 @@ var MapPolygon = (props) => {
1530
1551
  postmountingActive
1531
1552
  } = Internals7.usePremounting({
1532
1553
  from: from ?? 0,
1533
- durationInFrames: durationInFrames ?? Infinity,
1554
+ durationInFrames: Internals7.resolveSequenceDuration({
1555
+ durationInFrames,
1556
+ playbackRate,
1557
+ loop
1558
+ }),
1534
1559
  premountFor: premountFor ?? null,
1535
1560
  postmountFor: postmountFor ?? null,
1536
1561
  style: null,
@@ -1546,6 +1571,7 @@ var MapPolygon = (props) => {
1546
1571
  from: from ?? 0,
1547
1572
  trimBefore,
1548
1573
  playbackRate,
1574
+ loop,
1549
1575
  durationInFrames: durationInFrames ?? Infinity,
1550
1576
  freeze,
1551
1577
  hidden,
@@ -1564,15 +1590,7 @@ var MapPolygon = (props) => {
1564
1590
  };
1565
1591
  // src/MapRegion.tsx
1566
1592
  import { length as getLineLength2, lineSliceAlong as lineSliceAlong2, lineString as lineString2 } from "@turf/turf";
1567
- import {
1568
- forwardRef as forwardRef2,
1569
- useContext as useContext9,
1570
- useEffect as useEffect7,
1571
- useImperativeHandle as useImperativeHandle2,
1572
- useMemo as useMemo3,
1573
- useRef as useRef8,
1574
- useState as useState2
1575
- } from "react";
1593
+ import { useContext as useContext9, useEffect as useEffect7, useMemo as useMemo3, useState as useState2 } from "react";
1576
1594
  import {
1577
1595
  Interactive as Interactive2,
1578
1596
  Freeze as Freeze7,
@@ -1792,14 +1810,11 @@ var MapRegionDrawing = ({
1792
1810
  return null;
1793
1811
  };
1794
1812
  var MapRegionBounds = ({
1795
- feature,
1796
- refForOutline
1813
+ feature
1797
1814
  }) => {
1798
1815
  const { map } = useContext9(MapTilerContext);
1799
1816
  if (!map) {
1800
- return /* @__PURE__ */ jsx7("div", {
1801
- ref: refForOutline
1802
- });
1817
+ return /* @__PURE__ */ jsx7("div", {});
1803
1818
  }
1804
1819
  const points = feature.geometry.coordinates.flat().map(([longitude, latitude]) => map.project([longitude, latitude]));
1805
1820
  const left = Math.min(...points.map((point) => point.x));
@@ -1807,7 +1822,6 @@ var MapRegionBounds = ({
1807
1822
  const top = Math.min(...points.map((point) => point.y));
1808
1823
  const bottom = Math.max(...points.map((point) => point.y));
1809
1824
  return /* @__PURE__ */ jsx7("div", {
1810
- ref: refForOutline,
1811
1825
  style: {
1812
1826
  height: bottom - top,
1813
1827
  left,
@@ -1820,7 +1834,7 @@ var MapRegionBounds = ({
1820
1834
  }
1821
1835
  });
1822
1836
  };
1823
- var MapRegionRefForwardingFunction = ({
1837
+ var MapRegionInner = ({
1824
1838
  feature,
1825
1839
  fill = 0,
1826
1840
  fillColor,
@@ -1835,14 +1849,13 @@ var MapRegionRefForwardingFunction = ({
1835
1849
  postmountFor,
1836
1850
  trimBefore,
1837
1851
  playbackRate,
1852
+ loop,
1838
1853
  freeze,
1839
1854
  hidden,
1840
1855
  name,
1841
1856
  showInTimeline,
1842
1857
  controls
1843
- }, ref) => {
1844
- const refForOutline = useRef8(null);
1845
- useImperativeHandle2(ref, () => refForOutline.current, []);
1858
+ }) => {
1846
1859
  const {
1847
1860
  effectivePremountFor,
1848
1861
  effectivePostmountFor,
@@ -1852,7 +1865,11 @@ var MapRegionRefForwardingFunction = ({
1852
1865
  postmountingActive
1853
1866
  } = Internals8.usePremounting({
1854
1867
  from: from ?? 0,
1855
- durationInFrames: durationInFrames ?? Infinity,
1868
+ durationInFrames: Internals8.resolveSequenceDuration({
1869
+ durationInFrames,
1870
+ playbackRate,
1871
+ loop
1872
+ }),
1856
1873
  premountFor: premountFor ?? null,
1857
1874
  postmountFor: postmountFor ?? null,
1858
1875
  style: null,
@@ -1868,13 +1885,13 @@ var MapRegionRefForwardingFunction = ({
1868
1885
  from: from ?? 0,
1869
1886
  trimBefore,
1870
1887
  playbackRate,
1888
+ loop,
1871
1889
  durationInFrames: durationInFrames ?? Infinity,
1872
1890
  freeze,
1873
1891
  hidden,
1874
1892
  name: name ?? `<${feature.properties.name}>`,
1875
1893
  showInTimeline: showInTimeline ?? true,
1876
1894
  controls,
1877
- outlineRef: refForOutline,
1878
1895
  _remotionInternalPremountDisplay: effectivePremountFor || null,
1879
1896
  _remotionInternalPostmountDisplay: effectivePostmountFor || null,
1880
1897
  _remotionInternalIsPremounting: premountingActive,
@@ -1892,15 +1909,13 @@ var MapRegionRefForwardingFunction = ({
1892
1909
  strokeWidth
1893
1910
  }),
1894
1911
  /* @__PURE__ */ jsx7(MapRegionBounds, {
1895
- feature,
1896
- refForOutline
1912
+ feature
1897
1913
  })
1898
1914
  ]
1899
1915
  })
1900
1916
  })
1901
1917
  });
1902
1918
  };
1903
- var MapRegionInner = forwardRef2(MapRegionRefForwardingFunction);
1904
1919
  var MapRegion = Interactive2.withSchema({
1905
1920
  Component: MapRegionInner,
1906
1921
  componentName: "<MapRegion>",
@@ -1909,15 +1924,7 @@ var MapRegion = Interactive2.withSchema({
1909
1924
  });
1910
1925
  // src/MapRoute.tsx
1911
1926
  import { length as getLineLength3, lineSliceAlong as lineSliceAlong3, lineString as lineString3 } from "@turf/turf";
1912
- import {
1913
- forwardRef as forwardRef3,
1914
- useContext as useContext10,
1915
- useEffect as useEffect8,
1916
- useImperativeHandle as useImperativeHandle3,
1917
- useMemo as useMemo4,
1918
- useRef as useRef9,
1919
- useState as useState3
1920
- } from "react";
1927
+ import { useContext as useContext10, useEffect as useEffect8, useMemo as useMemo4, useState as useState3 } from "react";
1921
1928
  import {
1922
1929
  Interactive as Interactive3,
1923
1930
  Freeze as Freeze8,
@@ -2085,15 +2092,10 @@ var MapRouteDrawing = ({
2085
2092
  }, [glowLayerId, map, sourceId]);
2086
2093
  return null;
2087
2094
  };
2088
- var MapRouteBounds = ({
2089
- feature,
2090
- refForOutline
2091
- }) => {
2095
+ var MapRouteBounds = ({ feature }) => {
2092
2096
  const { map } = useContext10(MapTilerContext);
2093
2097
  if (!map) {
2094
- return /* @__PURE__ */ jsx8("div", {
2095
- ref: refForOutline
2096
- });
2098
+ return /* @__PURE__ */ jsx8("div", {});
2097
2099
  }
2098
2100
  const points = feature.geometry.coordinates.map(([longitude, latitude]) => map.project([longitude, latitude]));
2099
2101
  const left = Math.min(...points.map((point) => point.x));
@@ -2101,7 +2103,6 @@ var MapRouteBounds = ({
2101
2103
  const top = Math.min(...points.map((point) => point.y));
2102
2104
  const bottom = Math.max(...points.map((point) => point.y));
2103
2105
  return /* @__PURE__ */ jsx8("div", {
2104
- ref: refForOutline,
2105
2106
  style: {
2106
2107
  height: bottom - top,
2107
2108
  left,
@@ -2114,7 +2115,7 @@ var MapRouteBounds = ({
2114
2115
  }
2115
2116
  });
2116
2117
  };
2117
- var MapRouteRefForwardingFunction = ({
2118
+ var MapRouteInner = ({
2118
2119
  feature,
2119
2120
  glow = 0.72,
2120
2121
  id,
@@ -2127,14 +2128,13 @@ var MapRouteRefForwardingFunction = ({
2127
2128
  postmountFor,
2128
2129
  trimBefore,
2129
2130
  playbackRate,
2131
+ loop,
2130
2132
  freeze,
2131
2133
  hidden,
2132
2134
  name,
2133
2135
  showInTimeline,
2134
2136
  controls
2135
- }, ref) => {
2136
- const refForOutline = useRef9(null);
2137
- useImperativeHandle3(ref, () => refForOutline.current, []);
2137
+ }) => {
2138
2138
  const {
2139
2139
  effectivePremountFor,
2140
2140
  effectivePostmountFor,
@@ -2144,7 +2144,11 @@ var MapRouteRefForwardingFunction = ({
2144
2144
  postmountingActive
2145
2145
  } = Internals9.usePremounting({
2146
2146
  from: from ?? 0,
2147
- durationInFrames: durationInFrames ?? Infinity,
2147
+ durationInFrames: Internals9.resolveSequenceDuration({
2148
+ durationInFrames,
2149
+ playbackRate,
2150
+ loop
2151
+ }),
2148
2152
  premountFor: premountFor ?? null,
2149
2153
  postmountFor: postmountFor ?? null,
2150
2154
  style: null,
@@ -2160,13 +2164,13 @@ var MapRouteRefForwardingFunction = ({
2160
2164
  from: from ?? 0,
2161
2165
  trimBefore,
2162
2166
  playbackRate,
2167
+ loop,
2163
2168
  durationInFrames: durationInFrames ?? Infinity,
2164
2169
  freeze,
2165
2170
  hidden,
2166
2171
  name: name ?? `<${feature.properties.name}>`,
2167
2172
  showInTimeline: showInTimeline ?? true,
2168
2173
  controls,
2169
- outlineRef: refForOutline,
2170
2174
  _remotionInternalPremountDisplay: effectivePremountFor || null,
2171
2175
  _remotionInternalPostmountDisplay: effectivePostmountFor || null,
2172
2176
  _remotionInternalIsPremounting: premountingActive,
@@ -2182,15 +2186,13 @@ var MapRouteRefForwardingFunction = ({
2182
2186
  strokeWidth
2183
2187
  }),
2184
2188
  /* @__PURE__ */ jsx8(MapRouteBounds, {
2185
- feature,
2186
- refForOutline
2189
+ feature
2187
2190
  })
2188
2191
  ]
2189
2192
  })
2190
2193
  })
2191
2194
  });
2192
2195
  };
2193
- var MapRouteInner = forwardRef3(MapRouteRefForwardingFunction);
2194
2196
  var MapRoute = Interactive3.withSchema({
2195
2197
  Component: MapRouteInner,
2196
2198
  componentName: "<MapRoute>",
@@ -2198,7 +2200,7 @@ var MapRoute = Interactive3.withSchema({
2198
2200
  supportsEffects: false
2199
2201
  });
2200
2202
  // src/MapSource.tsx
2201
- import { useContext as useContext11, useEffect as useEffect9, useRef as useRef10 } from "react";
2203
+ import { useContext as useContext11, useEffect as useEffect9, useRef as useRef7 } from "react";
2202
2204
  import {
2203
2205
  Freeze as Freeze9,
2204
2206
  Sequence as Sequence9,
@@ -2208,7 +2210,7 @@ import {
2208
2210
  import { jsx as jsx9 } from "react/jsx-runtime";
2209
2211
  var MapSourceContent = ({ children, id, source }) => {
2210
2212
  const { map, styleRevision } = useContext11(MapTilerContext);
2211
- const sourceRef = useRef10(source);
2213
+ const sourceRef = useRef7(source);
2212
2214
  const { continueRender, delayRender } = useDelayRender8();
2213
2215
  sourceRef.current = source;
2214
2216
  useEffect9(() => {
@@ -2266,6 +2268,7 @@ var MapSource = ({
2266
2268
  durationInFrames,
2267
2269
  trimBefore,
2268
2270
  playbackRate,
2271
+ loop,
2269
2272
  freeze,
2270
2273
  hidden,
2271
2274
  name,
@@ -2283,7 +2286,11 @@ var MapSource = ({
2283
2286
  postmountingActive
2284
2287
  } = Internals10.usePremounting({
2285
2288
  from: from ?? 0,
2286
- durationInFrames: durationInFrames ?? Infinity,
2289
+ durationInFrames: Internals10.resolveSequenceDuration({
2290
+ durationInFrames,
2291
+ playbackRate,
2292
+ loop
2293
+ }),
2287
2294
  premountFor: premountFor ?? null,
2288
2295
  postmountFor: postmountFor ?? null,
2289
2296
  style: null,
@@ -2300,6 +2307,7 @@ var MapSource = ({
2300
2307
  durationInFrames,
2301
2308
  trimBefore,
2302
2309
  playbackRate,
2310
+ loop,
2303
2311
  freeze,
2304
2312
  hidden,
2305
2313
  showInTimeline: showInTimeline ?? false,
@@ -2315,21 +2323,11 @@ var MapSource = ({
2315
2323
  });
2316
2324
  };
2317
2325
  // src/MapViewport.tsx
2318
- import { Map as MapTilerMap, MapStyle } from "@maptiler/sdk";
2326
+ import { MapStyle, Map as MapTilerMap } from "@maptiler/sdk";
2319
2327
  import"@maptiler/sdk/style.css";
2320
- import {
2321
- forwardRef as forwardRef4,
2322
- useEffect as useEffect10,
2323
- useImperativeHandle as useImperativeHandle4,
2324
- useMemo as useMemo5,
2325
- useRef as useRef11,
2326
- useState as useState4
2327
- } from "react";
2328
+ import { useEffect as useEffect10, useMemo as useMemo5, useRef as useRef8, useState as useState4 } from "react";
2328
2329
  import {
2329
2330
  Interactive as Interactive4,
2330
- Freeze as Freeze10,
2331
- Sequence as Sequence10,
2332
- Internals as Internals11,
2333
2331
  useDelayRender as useDelayRender9
2334
2332
  } from "remotion";
2335
2333
  import { jsx as jsx10, jsxs as jsxs3, Fragment as Fragment3 } from "react/jsx-runtime";
@@ -2471,9 +2469,9 @@ var MissingApiKey = () => {
2471
2469
  ]
2472
2470
  });
2473
2471
  };
2474
- var MapViewportContentRefForwardingFunction = ({
2472
+ var MapViewportContent = ({
2475
2473
  apiKey,
2476
- premountingStyle,
2474
+ style,
2477
2475
  backgroundColor = "#dfe7e2",
2478
2476
  bearing = 0,
2479
2477
  centerLatitude = 0,
@@ -2494,11 +2492,10 @@ var MapViewportContentRefForwardingFunction = ({
2494
2492
  terrain = false,
2495
2493
  terrainExaggeration = 1,
2496
2494
  zoom = 4
2497
- }, ref) => {
2498
- const mapContainerRef = useRef11(null);
2499
- const mapRef = useRef11(null);
2500
- const viewportRef = useRef11(null);
2501
- const initialCameraRef = useRef11({
2495
+ }) => {
2496
+ const mapContainerRef = useRef8(null);
2497
+ const mapRef = useRef8(null);
2498
+ const initialCameraRef = useRef8({
2502
2499
  bearing,
2503
2500
  centerLatitude,
2504
2501
  centerLongitude,
@@ -2509,7 +2506,7 @@ var MapViewportContentRefForwardingFunction = ({
2509
2506
  pitch,
2510
2507
  zoom
2511
2508
  });
2512
- const initialMapOptionsRef = useRef11({
2509
+ const initialMapOptionsRef = useRef8({
2513
2510
  administrativeBorders,
2514
2511
  language,
2515
2512
  mapOptions,
@@ -2519,12 +2516,12 @@ var MapViewportContentRefForwardingFunction = ({
2519
2516
  terrain,
2520
2517
  terrainExaggeration
2521
2518
  });
2522
- const lastMapStyleRef = useRef11(mapStyle);
2523
- const lastLayerVisibilityRef = useRef11({
2519
+ const lastMapStyleRef = useRef8(mapStyle);
2520
+ const lastLayerVisibilityRef = useRef8({
2524
2521
  administrativeBorders,
2525
2522
  showLabels
2526
2523
  });
2527
- const onMapReadyRef = useRef11(onMapReady);
2524
+ const onMapReadyRef = useRef8(onMapReady);
2528
2525
  onMapReadyRef.current = onMapReady;
2529
2526
  const { continueRender, delayRender } = useDelayRender9();
2530
2527
  const [map, setMap] = useState4(null);
@@ -2532,7 +2529,6 @@ var MapViewportContentRefForwardingFunction = ({
2532
2529
  const [styleRevision, setStyleRevision] = useState4(0);
2533
2530
  const [loadingHandle] = useState4(() => delayRender("Loading MapTiler map"));
2534
2531
  const contextValue = useMemo5(() => ({ cameraRevision, map, styleRevision }), [cameraRevision, map, styleRevision]);
2535
- useImperativeHandle4(ref, () => viewportRef.current, []);
2536
2532
  useEffect10(() => {
2537
2533
  if (!apiKey) {
2538
2534
  continueRender(loadingHandle);
@@ -2710,13 +2706,12 @@ var MapViewportContentRefForwardingFunction = ({
2710
2706
  }
2711
2707
  }, [map, projection]);
2712
2708
  return /* @__PURE__ */ jsx10("div", {
2713
- ref: viewportRef,
2714
2709
  style: {
2715
2710
  backgroundColor,
2716
2711
  inset: 0,
2717
2712
  overflow: "hidden",
2718
2713
  position: "absolute",
2719
- ...premountingStyle
2714
+ ...style
2720
2715
  },
2721
2716
  children: apiKey ? /* @__PURE__ */ jsxs3(Fragment3, {
2722
2717
  children: [
@@ -2735,73 +2730,11 @@ var MapViewportContentRefForwardingFunction = ({
2735
2730
  }) : /* @__PURE__ */ jsx10(MissingApiKey, {})
2736
2731
  });
2737
2732
  };
2738
- var MapViewportContent = forwardRef4(MapViewportContentRefForwardingFunction);
2739
- var MapViewportRefForwardingFunction = ({
2740
- durationInFrames,
2741
- from,
2742
- trimBefore,
2743
- playbackRate,
2744
- freeze,
2745
- hidden,
2746
- name,
2747
- showInTimeline,
2748
- controls,
2749
- premountFor,
2750
- postmountFor,
2751
- styleWhilePremounted,
2752
- styleWhilePostmounted,
2753
- ...props
2754
- }, ref) => {
2755
- const {
2756
- effectivePremountFor,
2757
- effectivePostmountFor,
2758
- freezeFrame,
2759
- isPremountingOrPostmounting,
2760
- premountingActive,
2761
- postmountingActive,
2762
- premountingStyle
2763
- } = Internals11.usePremounting({
2764
- from: from ?? 0,
2765
- durationInFrames: durationInFrames ?? Infinity,
2766
- premountFor: premountFor ?? null,
2767
- postmountFor: postmountFor ?? null,
2768
- style: null,
2769
- styleWhilePremounted: styleWhilePremounted ?? null,
2770
- styleWhilePostmounted: styleWhilePostmounted ?? null,
2771
- hideWhilePremounted: "opacity"
2772
- });
2773
- return /* @__PURE__ */ jsx10(Freeze10, {
2774
- frame: freezeFrame,
2775
- active: isPremountingOrPostmounting,
2776
- children: /* @__PURE__ */ jsx10(Sequence10, {
2777
- layout: "none",
2778
- durationInFrames,
2779
- from,
2780
- trimBefore,
2781
- playbackRate,
2782
- freeze,
2783
- hidden,
2784
- showInTimeline,
2785
- controls,
2786
- name: name ?? "<MapViewport>",
2787
- _remotionInternalPremountDisplay: effectivePremountFor || null,
2788
- _remotionInternalPostmountDisplay: effectivePostmountFor || null,
2789
- _remotionInternalIsPremounting: premountingActive,
2790
- _remotionInternalIsPostmounting: postmountingActive,
2791
- children: /* @__PURE__ */ jsx10(MapViewportContent, {
2792
- ...props,
2793
- ref,
2794
- premountingStyle
2795
- })
2796
- })
2797
- });
2798
- };
2799
- var MapViewportInner = forwardRef4(MapViewportRefForwardingFunction);
2800
2733
  var MapViewport = Interactive4.withSchema({
2801
- Component: MapViewportInner,
2734
+ Component: MapViewportContent,
2802
2735
  componentName: "<MapViewport>",
2803
2736
  schema: mapViewportSchema,
2804
- supportsEffects: false
2737
+ wrapInSequence: true
2805
2738
  });
2806
2739
  export {
2807
2740
  useMapTiler,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/maptiler",
3
- "version": "4.0.529",
3
+ "version": "4.0.530",
4
4
  "description": "MapTiler components for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@maptiler/sdk": "4.0.2",
27
27
  "@turf/turf": "7.3.2",
28
- "remotion": "4.0.529"
28
+ "remotion": "4.0.530"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": ">=16.8.0",
@@ -42,7 +42,7 @@
42
42
  "devDependencies": {
43
43
  "react": "19.2.3",
44
44
  "react-dom": "19.2.3",
45
- "@remotion/eslint-config-internal": "4.0.529",
45
+ "@remotion/eslint-config-internal": "4.0.530",
46
46
  "eslint": "9.19.0",
47
47
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
48
48
  },