@micromag/screen-quote 0.3.832 → 0.4.6

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.
@@ -1 +1 @@
1
- .micromag-screen-quote-container .micromag-screen-quote-background{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-quote-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-quote-disabled.micromag-screen-quote-container{overflow:hidden;pointer-events:none}.micromag-screen-quote-hidden.micromag-screen-quote-container{display:none;visibility:hidden}.micromag-screen-quote-placeholder.micromag-screen-quote-container .micromag-screen-quote-content{padding:6px;position:relative}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor,.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-quote-container .micromag-screen-quote-background{z-index:0}.micromag-screen-quote-container .micromag-screen-quote-content{z-index:1}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor,.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{margin:10px auto;width:100%}.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{height:200px}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor{height:50px}.micromag-screen-quote-container .micromag-screen-quote-quote{font-size:2em}.micromag-screen-quote-container .micromag-screen-quote-quote.micromag-screen-quote-withMargin{margin-bottom:1em}.micromag-screen-quote-container.micromag-screen-quote-isPlaceholder .micromag-screen-quote-layout{padding:10px}
1
+ .micromag-screen-quote-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-quote-container .micromag-screen-quote-background{height:100%;left:0;position:absolute;top:0;width:100%;z-index:0}.micromag-screen-quote-container .micromag-screen-quote-content{z-index:1}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor,.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{border:2px dashed var(--mm-gray-800);color:var(--mm-gray-800);margin:10px auto;width:100%}.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{height:200px}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor{height:50px}.micromag-screen-quote-container .micromag-screen-quote-quote{font-size:2em}.micromag-screen-quote-container .micromag-screen-quote-quote.micromag-screen-quote-withMargin{margin-bottom:1em}.micromag-screen-quote-container.micromag-screen-quote-isPlaceholder .micromag-screen-quote-layout{padding:10px}
package/es/index.d.ts ADDED
@@ -0,0 +1,123 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { TextElement, BackgroundElement, Header, Footer } from '@micromag/core';
3
+
4
+ interface QuoteScreenProps {
5
+ layout?: 'top' | 'middle' | 'bottom' | 'split';
6
+ quote?: TextElement | null;
7
+ author?: TextElement | null;
8
+ spacing?: number;
9
+ background?: BackgroundElement | null;
10
+ header?: Header | null;
11
+ footer?: Footer | null;
12
+ current?: boolean;
13
+ preload?: boolean;
14
+ className?: string | null;
15
+ }
16
+ declare function QuoteScreen({ layout, quote, author, spacing, background, header, footer, current, preload, className, }: QuoteScreenProps): react_jsx_runtime.JSX.Element;
17
+
18
+ declare const _default: {
19
+ id: string;
20
+ type: string;
21
+ group: {
22
+ label: {
23
+ defaultMessage: string;
24
+ description: string;
25
+ };
26
+ order: number;
27
+ };
28
+ title: {
29
+ defaultMessage: string;
30
+ description: string;
31
+ };
32
+ component: typeof QuoteScreen;
33
+ layouts: string[];
34
+ fields: ({
35
+ name: string;
36
+ type: string;
37
+ defaultValue: string;
38
+ label: {
39
+ defaultMessage: string;
40
+ description: string;
41
+ };
42
+ fieldType?: undefined;
43
+ theme?: undefined;
44
+ } | {
45
+ name: string;
46
+ type: string;
47
+ fieldType: string;
48
+ theme: {
49
+ textStyle: string;
50
+ badge?: undefined;
51
+ callToAction?: undefined;
52
+ };
53
+ label: {
54
+ defaultMessage: string;
55
+ description: string;
56
+ };
57
+ defaultValue?: undefined;
58
+ } | {
59
+ name: string;
60
+ type: string;
61
+ theme: {
62
+ textStyle: string;
63
+ badge?: undefined;
64
+ callToAction?: undefined;
65
+ };
66
+ label: {
67
+ defaultMessage: string;
68
+ description: string;
69
+ };
70
+ defaultValue?: undefined;
71
+ fieldType?: undefined;
72
+ } | {
73
+ name: string;
74
+ type: string;
75
+ label: {
76
+ defaultMessage: string;
77
+ description: string;
78
+ };
79
+ defaultValue?: undefined;
80
+ fieldType?: undefined;
81
+ theme?: undefined;
82
+ } | {
83
+ name: string;
84
+ type: string;
85
+ label: {
86
+ defaultMessage: string;
87
+ description: string;
88
+ };
89
+ theme: {
90
+ badge: {
91
+ label: {
92
+ textStyle: string;
93
+ };
94
+ boxStyle: string;
95
+ };
96
+ textStyle?: undefined;
97
+ callToAction?: undefined;
98
+ };
99
+ defaultValue?: undefined;
100
+ fieldType?: undefined;
101
+ } | {
102
+ name: string;
103
+ type: string;
104
+ label: {
105
+ defaultMessage: string;
106
+ description: string;
107
+ };
108
+ theme: {
109
+ callToAction: {
110
+ label: {
111
+ textStyle: string;
112
+ };
113
+ boxStyle: string;
114
+ };
115
+ textStyle?: undefined;
116
+ badge?: undefined;
117
+ };
118
+ defaultValue?: undefined;
119
+ fieldType?: undefined;
120
+ })[];
121
+ };
122
+
123
+ export { QuoteScreen, _default as default };
package/es/index.js CHANGED
@@ -1,9 +1,7 @@
1
1
  import { FormattedMessage, defineMessage } from 'react-intl';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import classNames from 'classnames';
4
- import PropTypes from 'prop-types';
5
4
  import React from 'react';
6
- import { PropTypes as PropTypes$1 } from '@micromag/core';
7
5
  import { ScreenElement } from '@micromag/core/components';
8
6
  import { useScreenSize, useScreenRenderContext, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef } from '@micromag/core/contexts';
9
7
  import { isHeaderFilled, isFooterFilled, getFooterProps, isTextFilled } from '@micromag/core/utils';
@@ -19,41 +17,27 @@ var styles = {"container":"micromag-screen-quote-container","background":"microm
19
17
 
20
18
  // NOTE: this might be better with a scroll
21
19
 
22
- var propTypes = {
23
- layout: PropTypes.oneOf(['top', 'middle', 'bottom', 'split']),
24
- quote: PropTypes$1.textElement,
25
- author: PropTypes$1.textElement,
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
- className: PropTypes.string
33
- };
34
- var defaultProps = {
35
- layout: 'top',
36
- quote: null,
37
- author: null,
38
- spacing: 20,
39
- background: null,
40
- header: null,
41
- footer: null,
42
- current: true,
43
- preload: true,
44
- className: null
45
- };
46
- var QuoteScreen = function QuoteScreen(_ref) {
47
- var layout = _ref.layout,
48
- quote = _ref.quote,
49
- author = _ref.author,
50
- spacing = _ref.spacing,
51
- background = _ref.background,
52
- header = _ref.header,
53
- footer = _ref.footer,
54
- current = _ref.current,
55
- preload = _ref.preload,
56
- className = _ref.className;
20
+ function QuoteScreen(_ref) {
21
+ var _ref$layout = _ref.layout,
22
+ layout = _ref$layout === void 0 ? 'top' : _ref$layout,
23
+ _ref$quote = _ref.quote,
24
+ quote = _ref$quote === void 0 ? null : _ref$quote,
25
+ _ref$author = _ref.author,
26
+ author = _ref$author === void 0 ? null : _ref$author,
27
+ _ref$spacing = _ref.spacing,
28
+ spacing = _ref$spacing === void 0 ? 20 : _ref$spacing,
29
+ _ref$background = _ref.background,
30
+ background = _ref$background === void 0 ? null : _ref$background,
31
+ _ref$header = _ref.header,
32
+ header = _ref$header === void 0 ? null : _ref$header,
33
+ _ref$footer = _ref.footer,
34
+ footer = _ref$footer === void 0 ? null : _ref$footer,
35
+ _ref$current = _ref.current,
36
+ current = _ref$current === void 0 ? true : _ref$current,
37
+ _ref$preload = _ref.preload,
38
+ preload = _ref$preload === void 0 ? true : _ref$preload,
39
+ _ref$className = _ref.className,
40
+ className = _ref$className === void 0 ? null : _ref$className;
57
41
  var _useScreenSize = useScreenSize(),
58
42
  width = _useScreenSize.width,
59
43
  height = _useScreenSize.height,
@@ -171,9 +155,7 @@ var QuoteScreen = function QuoteScreen(_ref) {
171
155
  withoutVideo: isPreview,
172
156
  className: styles.background
173
157
  }) : null);
174
- };
175
- QuoteScreen.propTypes = propTypes;
176
- QuoteScreen.defaultProps = defaultProps;
158
+ }
177
159
 
178
160
  // import * as transforms from './transforms/index';
179
161
 
package/es/styles.css ADDED
@@ -0,0 +1 @@
1
+ .micromag-screen-quote-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-quote-container .micromag-screen-quote-background{height:100%;left:0;position:absolute;top:0;width:100%;z-index:0}.micromag-screen-quote-container .micromag-screen-quote-content{z-index:1}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor,.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{border:2px dashed var(--mm-gray-800);color:var(--mm-gray-800);margin:10px auto;width:100%}.micromag-screen-quote-container .micromag-screen-quote-emptyQuote{height:200px}.micromag-screen-quote-container .micromag-screen-quote-emptyAuthor{height:50px}.micromag-screen-quote-container .micromag-screen-quote-quote{font-size:2em}.micromag-screen-quote-container .micromag-screen-quote-quote.micromag-screen-quote-withMargin{margin-bottom:1em}.micromag-screen-quote-container.micromag-screen-quote-isPlaceholder .micromag-screen-quote-layout{padding:10px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-quote",
3
- "version": "0.3.832",
3
+ "version": "0.4.6",
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": "^16.8.0 || ^17.0.0 || ^18.0.0",
55
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
55
+ "react": "^19.2.0",
56
+ "react-dom": "^18.3.0 || ^19.0.0"
56
57
  },
57
58
  "peerDependencies": {
58
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
59
- "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
59
+ "react": "^19.2.0",
60
+ "react-dom": "^18.3.0 || ^19.0.0"
60
61
  },
61
62
  "dependencies": {
62
- "@babel/runtime": "^7.13.10",
63
- "@micromag/core": "^0.3.832",
64
- "@micromag/element-background": "^0.3.832",
65
- "@micromag/element-container": "^0.3.832",
66
- "@micromag/element-footer": "^0.3.832",
67
- "@micromag/element-header": "^0.3.832",
68
- "@micromag/element-layout": "^0.3.832",
69
- "@micromag/element-quote": "^0.3.832",
70
- "@micromag/element-text": "^0.3.832",
71
- "@micromag/transforms": "^0.3.832",
63
+ "@babel/runtime": "^7.28.6",
64
+ "@micromag/core": "^0.4.6",
65
+ "@micromag/element-background": "^0.4.6",
66
+ "@micromag/element-container": "^0.4.6",
67
+ "@micromag/element-footer": "^0.4.6",
68
+ "@micromag/element-header": "^0.4.6",
69
+ "@micromag/element-layout": "^0.4.6",
70
+ "@micromag/element-quote": "^0.4.6",
71
+ "@micromag/element-text": "^0.4.6",
72
+ "@micromag/transforms": "^0.4.6",
72
73
  "classnames": "^2.2.6",
73
- "lodash": "^4.17.21",
74
- "prop-types": "^15.7.2",
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": "4969d64e304334cfd47321e624e5914e0694c55f"
82
+ "gitHead": "cf8440c2851b864167a1f545aa56551d55473263",
83
+ "types": "es/index.d.ts"
83
84
  }