@micromag/screen-timeline 0.4.69 → 0.4.71
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/es/index.d.ts +3 -1
- package/es/index.js +5 -3
- package/package.json +13 -13
package/es/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ForwardedRef } from 'react';
|
|
2
3
|
import { HeadingElement, TextElement, TextStyle, Color, Header, Footer, BackgroundElement, Alternatives } from '@micromag/core';
|
|
3
4
|
|
|
4
5
|
interface TimelineProps {
|
|
@@ -22,9 +23,10 @@ interface TimelineProps {
|
|
|
22
23
|
active?: boolean;
|
|
23
24
|
preload?: boolean;
|
|
24
25
|
type?: string | null;
|
|
26
|
+
mediaRef?: ForwardedRef<HTMLMediaElement> | null;
|
|
25
27
|
className?: string | null;
|
|
26
28
|
}
|
|
27
|
-
declare function Timeline({ layout, title, items, itemTitleStyle, itemDescriptionStyle, withoutLine, bulletColor, lineColor, bulletShape, bulletFilled, illustrated, spacing: initialSpacing, itemBottomSpacing: initialItemBottomSpacing, header, footer, background, alternatives, current, active, preload, type, className, }: TimelineProps): react_jsx_runtime.JSX.Element;
|
|
29
|
+
declare function Timeline({ layout, title, items, itemTitleStyle, itemDescriptionStyle, withoutLine, bulletColor, lineColor, bulletShape, bulletFilled, illustrated, spacing: initialSpacing, itemBottomSpacing: initialItemBottomSpacing, header, footer, background, alternatives, current, active, preload, type, mediaRef: customMediaRef, className, }: TimelineProps): react_jsx_runtime.JSX.Element;
|
|
28
30
|
|
|
29
31
|
declare function TimelineIllustratedScreen({ ...props }: {
|
|
30
32
|
[x: string]: any;
|
package/es/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { useMemo, useState, useEffect, useCallback } from 'react';
|
|
|
8
8
|
import { ScreenElement } from '@micromag/core/components';
|
|
9
9
|
import { useScreenSize, useViewerContext, useViewerWebView, useScreenRenderContext, usePlaybackContext, usePlaybackMediaRef, useViewerContainer } from '@micromag/core/contexts';
|
|
10
10
|
import { useTrackScreenEvent, useActivityDetector, useDebounce, useTrackScreenMedia, useDimensionObserver } from '@micromag/core/hooks';
|
|
11
|
-
import { isTextFilled, getStyleFromColor, isHeaderFilled, isFooterFilled, getFooterProps } from '@micromag/core/utils';
|
|
11
|
+
import { isTextFilled, getStyleFromColor, isHeaderFilled, isFooterFilled, getFooterProps, mergeRefs } from '@micromag/core/utils';
|
|
12
12
|
import Audio from '@micromag/element-audio';
|
|
13
13
|
import Background from '@micromag/element-background';
|
|
14
14
|
import Container from '@micromag/element-container';
|
|
@@ -69,6 +69,8 @@ function Timeline(_ref) {
|
|
|
69
69
|
preload = _ref$preload === void 0 ? true : _ref$preload,
|
|
70
70
|
_ref$type = _ref.type,
|
|
71
71
|
type = _ref$type === void 0 ? null : _ref$type,
|
|
72
|
+
_ref$mediaRef = _ref.mediaRef,
|
|
73
|
+
customMediaRef = _ref$mediaRef === void 0 ? null : _ref$mediaRef,
|
|
72
74
|
_ref$className = _ref.className,
|
|
73
75
|
className = _ref$className === void 0 ? null : _ref$className;
|
|
74
76
|
var trackScreenEvent = useTrackScreenEvent(type);
|
|
@@ -536,7 +538,7 @@ function Timeline(_ref) {
|
|
|
536
538
|
}) : null]
|
|
537
539
|
}), audioAlternativeMedia !== null ? /*#__PURE__*/jsx(Audio, _objectSpread(_objectSpread({}, finalAudioAlternative), {}, {
|
|
538
540
|
paused: !audioPlaying,
|
|
539
|
-
mediaRef: mediaRef,
|
|
541
|
+
mediaRef: mergeRefs(mediaRef, customMediaRef),
|
|
540
542
|
muted: muted,
|
|
541
543
|
className: styles.audio,
|
|
542
544
|
shouldLoad: mediaShouldLoad,
|
|
@@ -556,7 +558,7 @@ function Timeline(_ref) {
|
|
|
556
558
|
playing: backgroundPlaying,
|
|
557
559
|
muted: muted,
|
|
558
560
|
shouldLoad: mediaShouldLoad,
|
|
559
|
-
mediaRef: audioAlternativeMedia === null ? mediaRef : null,
|
|
561
|
+
mediaRef: audioAlternativeMedia === null ? mergeRefs(mediaRef, customMediaRef) : null,
|
|
560
562
|
withoutVideo: isPreview,
|
|
561
563
|
className: styles.background
|
|
562
564
|
}) : null]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-timeline",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.71",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -61,17 +61,17 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@babel/runtime": "^7.28.6",
|
|
64
|
-
"@micromag/core": "^0.4.
|
|
65
|
-
"@micromag/element-background": "^0.4.
|
|
66
|
-
"@micromag/element-container": "^0.4.
|
|
67
|
-
"@micromag/element-footer": "^0.4.
|
|
68
|
-
"@micromag/element-header": "^0.4.
|
|
69
|
-
"@micromag/element-heading": "^0.4.
|
|
70
|
-
"@micromag/element-layout": "^0.4.
|
|
71
|
-
"@micromag/element-scroll": "^0.4.
|
|
72
|
-
"@micromag/element-text": "^0.4.
|
|
73
|
-
"@micromag/element-visual": "^0.4.
|
|
74
|
-
"@micromag/transforms": "^0.4.
|
|
64
|
+
"@micromag/core": "^0.4.71",
|
|
65
|
+
"@micromag/element-background": "^0.4.71",
|
|
66
|
+
"@micromag/element-container": "^0.4.71",
|
|
67
|
+
"@micromag/element-footer": "^0.4.71",
|
|
68
|
+
"@micromag/element-header": "^0.4.71",
|
|
69
|
+
"@micromag/element-heading": "^0.4.71",
|
|
70
|
+
"@micromag/element-layout": "^0.4.71",
|
|
71
|
+
"@micromag/element-scroll": "^0.4.71",
|
|
72
|
+
"@micromag/element-text": "^0.4.71",
|
|
73
|
+
"@micromag/element-visual": "^0.4.71",
|
|
74
|
+
"@micromag/transforms": "^0.4.71",
|
|
75
75
|
"classnames": "^2.2.6",
|
|
76
76
|
"lodash": "^4.17.23",
|
|
77
77
|
"react-intl": "^8.1.3 || ^10.0.0",
|
|
@@ -81,6 +81,6 @@
|
|
|
81
81
|
"access": "public",
|
|
82
82
|
"registry": "https://registry.npmjs.org/"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "9101554bc5761e32b4a002a10d26800608c69773",
|
|
85
85
|
"types": "es/index.d.ts"
|
|
86
86
|
}
|