@micromag/screen-quote 0.4.49 → 0.4.50
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.js +72 -80
- package/package.json +11 -11
package/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FormattedMessage, defineMessage } from 'react-intl';
|
|
2
|
+
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
3
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
|
-
import React from 'react';
|
|
5
5
|
import { ScreenElement } from '@micromag/core/components';
|
|
6
6
|
import { useScreenSize, useScreenRenderContext, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef } from '@micromag/core/contexts';
|
|
7
7
|
import { isHeaderFilled, isFooterFilled, getFooterProps, isTextFilled } from '@micromag/core/utils';
|
|
@@ -12,11 +12,10 @@ import Header from '@micromag/element-header';
|
|
|
12
12
|
import Layout, { Spacer } from '@micromag/element-layout';
|
|
13
13
|
import Quote from '@micromag/element-quote';
|
|
14
14
|
import Text from '@micromag/element-text';
|
|
15
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
15
16
|
|
|
16
17
|
var styles = {"container":"micromag-screen-quote-container","background":"micromag-screen-quote-background","content":"micromag-screen-quote-content","emptyQuote":"micromag-screen-quote-emptyQuote","emptyAuthor":"micromag-screen-quote-emptyAuthor","quote":"micromag-screen-quote-quote","withMargin":"micromag-screen-quote-withMargin","isPlaceholder":"micromag-screen-quote-isPlaceholder","layout":"micromag-screen-quote-layout"};
|
|
17
18
|
|
|
18
|
-
// NOTE: this might be better with a scroll
|
|
19
|
-
|
|
20
19
|
function QuoteScreen(_ref) {
|
|
21
20
|
var _ref$layout = _ref.layout,
|
|
22
21
|
layout = _ref$layout === void 0 ? 'top' : _ref$layout,
|
|
@@ -77,84 +76,77 @@ function QuoteScreen(_ref) {
|
|
|
77
76
|
var quoteWithMargin = hasQuote && hasAuthor && !isSplitted;
|
|
78
77
|
var backgroundPlaying = current && (isView || isEdit) && (isCurrentMedia || !isView);
|
|
79
78
|
var mediaShouldLoad = current || preload;
|
|
80
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/jsxs("div", {
|
|
81
80
|
className: classNames([styles.container, className, _defineProperty({}, styles.isPlaceholder, isPlaceholder)]),
|
|
82
|
-
"data-screen-ready": true
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
"
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
playing: backgroundPlaying,
|
|
152
|
-
muted: muted,
|
|
153
|
-
shouldLoad: mediaShouldLoad,
|
|
154
|
-
mediaRef: mediaRef,
|
|
155
|
-
withoutVideo: isPreview,
|
|
156
|
-
className: styles.background
|
|
157
|
-
}) : null);
|
|
81
|
+
"data-screen-ready": true,
|
|
82
|
+
children: [/*#__PURE__*/jsx(Container, {
|
|
83
|
+
width: width,
|
|
84
|
+
height: height,
|
|
85
|
+
className: styles.content,
|
|
86
|
+
children: /*#__PURE__*/jsxs(Layout, {
|
|
87
|
+
className: styles.layout,
|
|
88
|
+
fullscreen: true,
|
|
89
|
+
verticalAlign: verticalAlign,
|
|
90
|
+
style: !isPlaceholder ? {
|
|
91
|
+
padding: spacing,
|
|
92
|
+
paddingTop: (!isPreview ? viewerTopHeight : 0) + (hasHeader ? spacing / 2 : spacing),
|
|
93
|
+
paddingBottom: (!isPreview ? viewerBottomHeight : 0) + (hasFooter ? spacing / 2 : spacing)
|
|
94
|
+
} : null,
|
|
95
|
+
children: [!isPlaceholder && hasHeader ? /*#__PURE__*/jsx("div", {
|
|
96
|
+
style: {
|
|
97
|
+
paddingBottom: spacing
|
|
98
|
+
},
|
|
99
|
+
children: /*#__PURE__*/jsx(Header, _objectSpread({}, header))
|
|
100
|
+
}) : null, !isPlaceholder && hasFooter && isMiddleLayout ? /*#__PURE__*/jsx(Spacer, {}, "spacer-cta-top") : null, !isPlaceholder && hasHeader && isBottomLayout ? /*#__PURE__*/jsx(Spacer, {}, "spacer-cta-top") : null, !isPlaceholder && hasHeader && !hasFooter && isMiddleLayout ? /*#__PURE__*/jsx(Spacer, {}, "spacer-cta-top") : null, /*#__PURE__*/jsx(ScreenElement, {
|
|
101
|
+
placeholder: "quote",
|
|
102
|
+
emptyLabel: /*#__PURE__*/jsx(FormattedMessage, {
|
|
103
|
+
id: "CrzYgw",
|
|
104
|
+
defaultMessage: [{
|
|
105
|
+
"type": 0,
|
|
106
|
+
"value": "Quote"
|
|
107
|
+
}]
|
|
108
|
+
}),
|
|
109
|
+
emptyClassName: styles.emptyQuote,
|
|
110
|
+
isEmpty: !hasQuote,
|
|
111
|
+
children: hasQuote ? /*#__PURE__*/jsx(Quote, _objectSpread({
|
|
112
|
+
className: classNames([styles.quote, _defineProperty({}, styles.withMargin, quoteWithMargin)])
|
|
113
|
+
}, quote)) : null
|
|
114
|
+
}, "quote"), isSplitted ? /*#__PURE__*/jsx(Spacer, {}, "spacer") : null, /*#__PURE__*/jsx(ScreenElement, {
|
|
115
|
+
placeholder: "subtitle",
|
|
116
|
+
emptyLabel: /*#__PURE__*/jsx(FormattedMessage, {
|
|
117
|
+
id: "xYqGzM",
|
|
118
|
+
defaultMessage: [{
|
|
119
|
+
"type": 0,
|
|
120
|
+
"value": "Author"
|
|
121
|
+
}]
|
|
122
|
+
}),
|
|
123
|
+
emptyClassName: styles.emptyAuthor,
|
|
124
|
+
isEmpty: !hasAuthor,
|
|
125
|
+
children: hasAuthor ? /*#__PURE__*/jsx(Text, _objectSpread({
|
|
126
|
+
className: styles.author
|
|
127
|
+
}, author)) : null
|
|
128
|
+
}, "author"), !isPlaceholder && hasFooter && (isTopLayout || isMiddleLayout) ? /*#__PURE__*/jsx(Spacer, {}, "spacer-cta-bottom") : null, !isPlaceholder && hasHeader && !hasFooter && isMiddleLayout ? /*#__PURE__*/jsx(Spacer, {}, "spacer-cta-bottom") : null, !isPlaceholder && hasFooter ? /*#__PURE__*/jsx("div", {
|
|
129
|
+
style: {
|
|
130
|
+
paddingTop: spacing,
|
|
131
|
+
paddingLeft: Math.max(viewerBottomSidesWidth - spacing, 0),
|
|
132
|
+
paddingRight: Math.max(viewerBottomSidesWidth - spacing, 0)
|
|
133
|
+
},
|
|
134
|
+
children: /*#__PURE__*/jsx(Footer, _objectSpread({}, footerProps))
|
|
135
|
+
}) : null]
|
|
136
|
+
})
|
|
137
|
+
}), !isPlaceholder ? /*#__PURE__*/jsx(Background, {
|
|
138
|
+
background: background,
|
|
139
|
+
width: width,
|
|
140
|
+
height: height,
|
|
141
|
+
resolution: resolution,
|
|
142
|
+
playing: backgroundPlaying,
|
|
143
|
+
muted: muted,
|
|
144
|
+
shouldLoad: mediaShouldLoad,
|
|
145
|
+
mediaRef: mediaRef,
|
|
146
|
+
withoutVideo: isPreview,
|
|
147
|
+
className: styles.background
|
|
148
|
+
}) : null]
|
|
149
|
+
});
|
|
158
150
|
}
|
|
159
151
|
|
|
160
152
|
// import * as transforms from './transforms/index';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-quote",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.50",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -61,15 +61,15 @@
|
|
|
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-layout": "^0.4.
|
|
70
|
-
"@micromag/element-quote": "^0.4.
|
|
71
|
-
"@micromag/element-text": "^0.4.
|
|
72
|
-
"@micromag/transforms": "^0.4.
|
|
64
|
+
"@micromag/core": "^0.4.50",
|
|
65
|
+
"@micromag/element-background": "^0.4.50",
|
|
66
|
+
"@micromag/element-container": "^0.4.50",
|
|
67
|
+
"@micromag/element-footer": "^0.4.50",
|
|
68
|
+
"@micromag/element-header": "^0.4.50",
|
|
69
|
+
"@micromag/element-layout": "^0.4.50",
|
|
70
|
+
"@micromag/element-quote": "^0.4.50",
|
|
71
|
+
"@micromag/element-text": "^0.4.50",
|
|
72
|
+
"@micromag/transforms": "^0.4.50",
|
|
73
73
|
"classnames": "^2.2.6",
|
|
74
74
|
"lodash": "^4.17.23",
|
|
75
75
|
"react-intl": "^8.1.3 || ^10.0.0",
|
|
@@ -79,6 +79,6 @@
|
|
|
79
79
|
"access": "public",
|
|
80
80
|
"registry": "https://registry.npmjs.org/"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "940d5ca98f8f448b79eaa3e2fa685c3ee95185b8",
|
|
83
83
|
"types": "es/index.d.ts"
|
|
84
84
|
}
|