@micromag/screen-audio 0.3.829 → 0.4.4
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/assets/css/styles.css +1 -1
- package/es/index.d.ts +98 -0
- package/es/index.js +23 -43
- package/es/styles.css +1 -0
- package/package.json +20 -19
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.container{height:100%;overflow:hidden;position:relative;width:100%}.container .background{height:100%;left:0;position:absolute;top:0;width:100%;z-index:0}.container .content{z-index:1}.container .audio{bottom:50%;left:0;position:absolute;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);width:100%}.container .bottom{bottom:0;left:0;position:absolute;-webkit-transition:padding .2s ease-out,-webkit-transform .2s ease-out;transition:padding .2s ease-out,-webkit-transform .2s ease-out;transition:transform .2s ease-out,padding .2s ease-out;transition:transform .2s ease-out,padding .2s ease-out,-webkit-transform .2s ease-out;width:100%}.container .bottom>*{margin-bottom:10px}.container .bottom>:last-child{margin-bottom:0}.container .empty{border:2px dashed var(--mm-gray-800);color:var(--mm-gray-800);height:100px;margin:0 auto;width:100%}.container.isPreview{pointer-events:none}
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { AudioElement, BackgroundElement, Header, Footer } from '@micromag/core';
|
|
3
|
+
|
|
4
|
+
interface AudioScreenProps {
|
|
5
|
+
layout?: 'middle';
|
|
6
|
+
audio?: AudioElement | null;
|
|
7
|
+
spacing?: number;
|
|
8
|
+
background?: BackgroundElement | null;
|
|
9
|
+
header?: Header | null;
|
|
10
|
+
footer?: Footer | null;
|
|
11
|
+
current?: boolean;
|
|
12
|
+
preload?: boolean;
|
|
13
|
+
mediaRef?: ((...args: unknown[]) => void) | null;
|
|
14
|
+
showWave?: boolean;
|
|
15
|
+
className?: string | null;
|
|
16
|
+
}
|
|
17
|
+
declare function AudioScreen({ layout, audio, spacing, background, header, footer, current, preload, mediaRef: customMediaRef, showWave, className, }: AudioScreenProps): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
declare const _default: {
|
|
20
|
+
id: string;
|
|
21
|
+
type: string;
|
|
22
|
+
group: {
|
|
23
|
+
label: {
|
|
24
|
+
defaultMessage: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
order: number;
|
|
28
|
+
};
|
|
29
|
+
title: {
|
|
30
|
+
defaultMessage: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
component: typeof AudioScreen;
|
|
34
|
+
layouts: string[];
|
|
35
|
+
fields: ({
|
|
36
|
+
name: string;
|
|
37
|
+
type: string;
|
|
38
|
+
theme: {
|
|
39
|
+
color: string;
|
|
40
|
+
badge?: undefined;
|
|
41
|
+
callToAction?: undefined;
|
|
42
|
+
};
|
|
43
|
+
defaultValue: {
|
|
44
|
+
autoPlay: boolean;
|
|
45
|
+
};
|
|
46
|
+
label: {
|
|
47
|
+
defaultMessage: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
} | {
|
|
51
|
+
name: string;
|
|
52
|
+
type: string;
|
|
53
|
+
label: {
|
|
54
|
+
defaultMessage: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
theme?: undefined;
|
|
58
|
+
defaultValue?: undefined;
|
|
59
|
+
} | {
|
|
60
|
+
name: string;
|
|
61
|
+
type: string;
|
|
62
|
+
label: {
|
|
63
|
+
defaultMessage: string;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
theme: {
|
|
67
|
+
badge: {
|
|
68
|
+
label: {
|
|
69
|
+
textStyle: string;
|
|
70
|
+
};
|
|
71
|
+
boxStyle: string;
|
|
72
|
+
};
|
|
73
|
+
color?: undefined;
|
|
74
|
+
callToAction?: undefined;
|
|
75
|
+
};
|
|
76
|
+
defaultValue?: undefined;
|
|
77
|
+
} | {
|
|
78
|
+
name: string;
|
|
79
|
+
type: string;
|
|
80
|
+
label: {
|
|
81
|
+
defaultMessage: string;
|
|
82
|
+
description: string;
|
|
83
|
+
};
|
|
84
|
+
theme: {
|
|
85
|
+
callToAction: {
|
|
86
|
+
label: {
|
|
87
|
+
textStyle: string;
|
|
88
|
+
};
|
|
89
|
+
boxStyle: string;
|
|
90
|
+
};
|
|
91
|
+
color?: undefined;
|
|
92
|
+
badge?: undefined;
|
|
93
|
+
};
|
|
94
|
+
defaultValue?: undefined;
|
|
95
|
+
})[];
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export { AudioScreen, _default as default };
|
package/es/index.js
CHANGED
|
@@ -3,9 +3,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
3
3
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
4
4
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
-
import PropTypes from 'prop-types';
|
|
7
6
|
import React, { useState, useEffect, useCallback, useMemo } from 'react';
|
|
8
|
-
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
9
7
|
import { ScreenElement } from '@micromag/core/components';
|
|
10
8
|
import { useScreenSize, useScreenRenderContext, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef } from '@micromag/core/contexts';
|
|
11
9
|
import { useTrackScreenMedia } from '@micromag/core/hooks';
|
|
@@ -18,46 +16,30 @@ import Footer from '@micromag/element-footer';
|
|
|
18
16
|
import Header from '@micromag/element-header';
|
|
19
17
|
import Layout, { Spacer } from '@micromag/element-layout';
|
|
20
18
|
|
|
21
|
-
var styles = {"container":"
|
|
19
|
+
var styles = {"container":"container","background":"background","content":"content","audio":"audio","bottom":"bottom","empty":"empty","isPreview":"isPreview"};
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
layout: PropTypes.oneOf(['middle']),
|
|
25
|
-
audio: PropTypes$1.audioElement,
|
|
26
|
-
spacing: PropTypes.number,
|
|
27
|
-
background: PropTypes$1.backgroundElement,
|
|
28
|
-
header: PropTypes$1.header,
|
|
29
|
-
footer: PropTypes$1.footer,
|
|
30
|
-
current: PropTypes.bool,
|
|
31
|
-
preload: PropTypes.bool,
|
|
32
|
-
mediaRef: PropTypes.func,
|
|
33
|
-
showWave: PropTypes.bool,
|
|
34
|
-
className: PropTypes.string
|
|
35
|
-
};
|
|
36
|
-
var defaultProps = {
|
|
37
|
-
layout: 'middle',
|
|
38
|
-
audio: null,
|
|
39
|
-
spacing: 20,
|
|
40
|
-
background: null,
|
|
41
|
-
header: null,
|
|
42
|
-
footer: null,
|
|
43
|
-
current: true,
|
|
44
|
-
preload: true,
|
|
45
|
-
mediaRef: null,
|
|
46
|
-
showWave: true,
|
|
47
|
-
className: null
|
|
48
|
-
};
|
|
49
|
-
var AudioScreen = function AudioScreen(_ref) {
|
|
21
|
+
function AudioScreen(_ref) {
|
|
50
22
|
_ref.layout;
|
|
51
|
-
var audio = _ref.audio,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
23
|
+
var _ref$audio = _ref.audio,
|
|
24
|
+
audio = _ref$audio === void 0 ? null : _ref$audio,
|
|
25
|
+
_ref$spacing = _ref.spacing,
|
|
26
|
+
spacing = _ref$spacing === void 0 ? 20 : _ref$spacing,
|
|
27
|
+
_ref$background = _ref.background,
|
|
28
|
+
background = _ref$background === void 0 ? null : _ref$background,
|
|
29
|
+
_ref$header = _ref.header,
|
|
30
|
+
header = _ref$header === void 0 ? null : _ref$header,
|
|
31
|
+
_ref$footer = _ref.footer,
|
|
32
|
+
footer = _ref$footer === void 0 ? null : _ref$footer,
|
|
33
|
+
_ref$current = _ref.current,
|
|
34
|
+
current = _ref$current === void 0 ? true : _ref$current,
|
|
35
|
+
_ref$preload = _ref.preload,
|
|
36
|
+
preload = _ref$preload === void 0 ? true : _ref$preload,
|
|
37
|
+
_ref$mediaRef = _ref.mediaRef,
|
|
38
|
+
customMediaRef = _ref$mediaRef === void 0 ? null : _ref$mediaRef,
|
|
39
|
+
_ref$showWave = _ref.showWave,
|
|
40
|
+
showWave = _ref$showWave === void 0 ? true : _ref$showWave,
|
|
41
|
+
_ref$className = _ref.className,
|
|
42
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
61
43
|
var _useScreenSize = useScreenSize(),
|
|
62
44
|
width = _useScreenSize.width,
|
|
63
45
|
height = _useScreenSize.height,
|
|
@@ -295,9 +277,7 @@ var AudioScreen = function AudioScreen(_ref) {
|
|
|
295
277
|
withoutVideo: isPreview,
|
|
296
278
|
className: styles.background
|
|
297
279
|
}) : null);
|
|
298
|
-
}
|
|
299
|
-
AudioScreen.propTypes = propTypes;
|
|
300
|
-
AudioScreen.defaultProps = defaultProps;
|
|
280
|
+
}
|
|
301
281
|
|
|
302
282
|
// import * as transforms from './transforms/index';
|
|
303
283
|
|
package/es/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.container{height:100%;overflow:hidden;position:relative;width:100%}.container .background{height:100%;left:0;position:absolute;top:0;width:100%;z-index:0}.container .content{z-index:1}.container .audio{bottom:50%;left:0;position:absolute;-webkit-transform:translateY(50%);-ms-transform:translateY(50%);transform:translateY(50%);width:100%}.container .bottom{bottom:0;left:0;position:absolute;-webkit-transition:padding .2s ease-out,-webkit-transform .2s ease-out;transition:padding .2s ease-out,-webkit-transform .2s ease-out;transition:transform .2s ease-out,padding .2s ease-out;transition:transform .2s ease-out,padding .2s ease-out,-webkit-transform .2s ease-out;width:100%}.container .bottom>*{margin-bottom:10px}.container .bottom>:last-child{margin-bottom:0}.container .empty{border:2px dashed var(--mm-gray-800);color:var(--mm-gray-800);height:100px;margin:0 auto;width:100%}.container.isPreview{pointer-events:none}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-audio",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"style": "assets/css/styles.css",
|
|
36
36
|
"exports": {
|
|
37
37
|
".": {
|
|
38
|
+
"types": "./es/index.d.ts",
|
|
38
39
|
"import": "./es/index.js"
|
|
39
40
|
},
|
|
40
41
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
@@ -48,36 +49,36 @@
|
|
|
48
49
|
"scripts": {
|
|
49
50
|
"clean": "rm -rf es && rm -rf lib && rm -rf assets",
|
|
50
51
|
"prepublishOnly": "npm run build",
|
|
51
|
-
"build": "../../scripts/prepare-package.sh"
|
|
52
|
+
"build": "../../scripts/prepare-package.sh --types"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
54
|
-
"react": "^
|
|
55
|
-
"react-dom": "^
|
|
55
|
+
"react": "^19.2.0",
|
|
56
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
56
57
|
},
|
|
57
58
|
"peerDependencies": {
|
|
58
|
-
"react": "^
|
|
59
|
-
"react-dom": "^
|
|
59
|
+
"react": "^19.2.0",
|
|
60
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
60
61
|
},
|
|
61
62
|
"dependencies": {
|
|
62
63
|
"@babel/runtime": "^7.13.10",
|
|
63
|
-
"@micromag/core": "^0.
|
|
64
|
-
"@micromag/element-audio": "^0.
|
|
65
|
-
"@micromag/element-background": "^0.
|
|
66
|
-
"@micromag/element-closed-captions": "^0.
|
|
67
|
-
"@micromag/element-container": "^0.
|
|
68
|
-
"@micromag/element-footer": "^0.
|
|
69
|
-
"@micromag/element-header": "^0.
|
|
70
|
-
"@micromag/element-layout": "^0.
|
|
71
|
-
"@micromag/transforms": "^0.
|
|
64
|
+
"@micromag/core": "^0.4.4",
|
|
65
|
+
"@micromag/element-audio": "^0.4.4",
|
|
66
|
+
"@micromag/element-background": "^0.4.4",
|
|
67
|
+
"@micromag/element-closed-captions": "^0.4.4",
|
|
68
|
+
"@micromag/element-container": "^0.4.4",
|
|
69
|
+
"@micromag/element-footer": "^0.4.4",
|
|
70
|
+
"@micromag/element-header": "^0.4.4",
|
|
71
|
+
"@micromag/element-layout": "^0.4.4",
|
|
72
|
+
"@micromag/transforms": "^0.4.4",
|
|
72
73
|
"classnames": "^2.2.6",
|
|
73
|
-
"lodash": "^4.17.
|
|
74
|
-
"
|
|
75
|
-
"react-intl": "^6.6.4",
|
|
74
|
+
"lodash": "^4.17.23",
|
|
75
|
+
"react-intl": "^8.1.3",
|
|
76
76
|
"uuid": "^9.0.0"
|
|
77
77
|
},
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public",
|
|
80
80
|
"registry": "https://registry.npmjs.org/"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "04b8519c3a3ddace5a21497e22faa11865d57f6d",
|
|
83
|
+
"types": "es/index.d.ts"
|
|
83
84
|
}
|