@micromag/screen-text 0.3.832 → 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.
@@ -1 +1 @@
1
- .micromag-screen-text-container .micromag-screen-text-background{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-text-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-text-disabled.micromag-screen-text-container{overflow:hidden;pointer-events:none}.micromag-screen-text-hidden.micromag-screen-text-container{display:none;visibility:hidden}.micromag-screen-text-placeholder.micromag-screen-text-container .micromag-screen-text-content{padding:6px;position:relative}.micromag-screen-text-container .micromag-screen-text-emptyText,.micromag-screen-text-container .micromag-screen-text-emptyTitle{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-text-container .micromag-screen-text-background{z-index:0}.micromag-screen-text-container .micromag-screen-text-content{z-index:1}.micromag-screen-text-container .micromag-screen-text-emptyText,.micromag-screen-text-container .micromag-screen-text-emptyTitle{margin:10px auto;width:100%}.micromag-screen-text-container .micromag-screen-text-emptyTitle{height:100px}.micromag-screen-text-container .micromag-screen-text-emptyText{height:50px}.micromag-screen-text-container .micromag-screen-text-title.micromag-screen-text-withMargin{margin-bottom:20px}.micromag-screen-text-container.micromag-screen-text-isPlaceholder .micromag-screen-text-layout{padding:10px}
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 .emptyText,.container .emptyTitle{border:2px dashed var(--mm-gray-800);color:var(--mm-gray-800);margin:10px auto;width:100%}.container .emptyTitle{height:100px}.container .emptyText{height:50px}.container .title.withMargin{margin-bottom:20px}.container.isPlaceholder .layout{padding:10px}
package/es/index.d.ts ADDED
@@ -0,0 +1,212 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { TextElement, HeadingElement, Header, Footer, BackgroundElement } from '@micromag/core';
3
+
4
+ interface TextScreenProps {
5
+ layout?: 'top' | 'middle' | 'bottom' | 'split';
6
+ text?: TextElement | null;
7
+ title?: HeadingElement | null;
8
+ withTitle?: boolean;
9
+ spacing?: number;
10
+ header?: Header | null;
11
+ footer?: Footer | null;
12
+ background?: BackgroundElement | null;
13
+ current?: boolean;
14
+ preload?: boolean;
15
+ className?: string | null;
16
+ }
17
+ declare function TextScreen({ layout, text, title, withTitle, spacing, header, footer, background, current, preload, className, }: TextScreenProps): react_jsx_runtime.JSX.Element;
18
+
19
+ declare function TextTitleScreen({ ...props }: {
20
+ [x: string]: any;
21
+ }): react_jsx_runtime.JSX.Element;
22
+
23
+ declare const _default: ({
24
+ id: string;
25
+ type: string;
26
+ group: {
27
+ label: {
28
+ defaultMessage: string;
29
+ description: string;
30
+ };
31
+ order: number;
32
+ };
33
+ title: {
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
37
+ component: typeof TextScreen;
38
+ layouts: string[];
39
+ fields: ({
40
+ name: string;
41
+ type: string;
42
+ defaultValue: string;
43
+ label: {
44
+ defaultMessage: string;
45
+ description: string;
46
+ };
47
+ theme?: undefined;
48
+ } | {
49
+ name: string;
50
+ type: string;
51
+ theme: {
52
+ textStyle: string;
53
+ badge?: undefined;
54
+ callToAction?: undefined;
55
+ };
56
+ label: {
57
+ defaultMessage: string;
58
+ description: string;
59
+ };
60
+ defaultValue?: undefined;
61
+ } | {
62
+ name: string;
63
+ type: string;
64
+ label: {
65
+ defaultMessage: string;
66
+ description: string;
67
+ };
68
+ defaultValue?: undefined;
69
+ theme?: undefined;
70
+ } | {
71
+ name: string;
72
+ type: string;
73
+ label: {
74
+ defaultMessage: string;
75
+ description: string;
76
+ };
77
+ theme: {
78
+ badge: {
79
+ label: {
80
+ textStyle: string;
81
+ };
82
+ boxStyle: string;
83
+ };
84
+ textStyle?: undefined;
85
+ callToAction?: undefined;
86
+ };
87
+ defaultValue?: undefined;
88
+ } | {
89
+ name: string;
90
+ type: string;
91
+ label: {
92
+ defaultMessage: string;
93
+ description: string;
94
+ };
95
+ theme: {
96
+ callToAction: {
97
+ label: {
98
+ textStyle: string;
99
+ };
100
+ boxStyle: string;
101
+ };
102
+ textStyle?: undefined;
103
+ badge?: undefined;
104
+ };
105
+ defaultValue?: undefined;
106
+ })[];
107
+ } | {
108
+ id: string;
109
+ type: string;
110
+ group: {
111
+ label: {
112
+ defaultMessage: string;
113
+ description: string;
114
+ };
115
+ order: number;
116
+ };
117
+ title: {
118
+ defaultMessage: string;
119
+ description: string;
120
+ };
121
+ component: typeof TextTitleScreen;
122
+ layouts: string[];
123
+ fields: ({
124
+ name: string;
125
+ type: string;
126
+ defaultValue: string;
127
+ label: {
128
+ defaultMessage: string;
129
+ description: string;
130
+ };
131
+ inline?: undefined;
132
+ theme?: undefined;
133
+ } | {
134
+ name: string;
135
+ type: string;
136
+ inline: boolean;
137
+ theme: {
138
+ textStyle: string;
139
+ badge?: undefined;
140
+ callToAction?: undefined;
141
+ };
142
+ label: {
143
+ defaultMessage: string;
144
+ description: string;
145
+ };
146
+ defaultValue?: undefined;
147
+ } | {
148
+ name: string;
149
+ type: string;
150
+ theme: {
151
+ textStyle: string;
152
+ badge?: undefined;
153
+ callToAction?: undefined;
154
+ };
155
+ label: {
156
+ defaultMessage: string;
157
+ description: string;
158
+ };
159
+ defaultValue?: undefined;
160
+ inline?: undefined;
161
+ } | {
162
+ name: string;
163
+ type: string;
164
+ label: {
165
+ defaultMessage: string;
166
+ description: string;
167
+ };
168
+ defaultValue?: undefined;
169
+ inline?: undefined;
170
+ theme?: undefined;
171
+ } | {
172
+ name: string;
173
+ type: string;
174
+ label: {
175
+ defaultMessage: string;
176
+ description: string;
177
+ };
178
+ theme: {
179
+ badge: {
180
+ label: {
181
+ textStyle: string;
182
+ };
183
+ boxStyle: string;
184
+ };
185
+ textStyle?: undefined;
186
+ callToAction?: undefined;
187
+ };
188
+ defaultValue?: undefined;
189
+ inline?: undefined;
190
+ } | {
191
+ name: string;
192
+ type: string;
193
+ label: {
194
+ defaultMessage: string;
195
+ description: string;
196
+ };
197
+ theme: {
198
+ callToAction: {
199
+ label: {
200
+ textStyle: string;
201
+ };
202
+ boxStyle: string;
203
+ };
204
+ textStyle?: undefined;
205
+ badge?: undefined;
206
+ };
207
+ defaultValue?: undefined;
208
+ inline?: undefined;
209
+ })[];
210
+ })[];
211
+
212
+ export { TextScreen, _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 { isTextFilled, isHeaderFilled, isFooterFilled, getFooterProps } from '@micromag/core/utils';
@@ -17,46 +15,31 @@ import Text from '@micromag/element-text';
17
15
  import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
18
16
  import _extends from '@babel/runtime/helpers/extends';
19
17
 
20
- var styles = {"container":"micromag-screen-text-container","background":"micromag-screen-text-background","content":"micromag-screen-text-content","emptyTitle":"micromag-screen-text-emptyTitle","emptyText":"micromag-screen-text-emptyText","title":"micromag-screen-text-title","withMargin":"micromag-screen-text-withMargin","isPlaceholder":"micromag-screen-text-isPlaceholder","layout":"micromag-screen-text-layout"};
18
+ var styles = {"container":"container","background":"background","content":"content","emptyTitle":"emptyTitle","emptyText":"emptyText","title":"title","withMargin":"withMargin","isPlaceholder":"isPlaceholder","layout":"layout"};
21
19
 
22
- var propTypes = {
23
- layout: PropTypes.oneOf(['top', 'middle', 'bottom', 'split']),
24
- text: PropTypes$1.textElement,
25
- title: PropTypes$1.headingElement,
26
- withTitle: PropTypes.bool,
27
- spacing: PropTypes.number,
28
- header: PropTypes$1.header,
29
- footer: PropTypes$1.footer,
30
- background: PropTypes$1.backgroundElement,
31
- current: PropTypes.bool,
32
- preload: PropTypes.bool,
33
- className: PropTypes.string
34
- };
35
- var defaultProps = {
36
- layout: 'top',
37
- text: null,
38
- title: null,
39
- withTitle: false,
40
- spacing: 20,
41
- header: null,
42
- footer: null,
43
- background: null,
44
- current: true,
45
- preload: true,
46
- className: null
47
- };
48
- var TextScreen = function TextScreen(_ref) {
49
- var layout = _ref.layout,
50
- text = _ref.text,
51
- title = _ref.title,
52
- withTitle = _ref.withTitle,
53
- spacing = _ref.spacing,
54
- header = _ref.header,
55
- footer = _ref.footer,
56
- background = _ref.background,
57
- current = _ref.current,
58
- preload = _ref.preload,
59
- className = _ref.className;
20
+ function TextScreen(_ref) {
21
+ var _ref$layout = _ref.layout,
22
+ layout = _ref$layout === void 0 ? 'top' : _ref$layout,
23
+ _ref$text = _ref.text,
24
+ text = _ref$text === void 0 ? null : _ref$text,
25
+ _ref$title = _ref.title,
26
+ title = _ref$title === void 0 ? null : _ref$title,
27
+ _ref$withTitle = _ref.withTitle,
28
+ withTitle = _ref$withTitle === void 0 ? false : _ref$withTitle,
29
+ _ref$spacing = _ref.spacing,
30
+ spacing = _ref$spacing === void 0 ? 20 : _ref$spacing,
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$background = _ref.background,
36
+ background = _ref$background === void 0 ? null : _ref$background,
37
+ _ref$current = _ref.current,
38
+ current = _ref$current === void 0 ? true : _ref$current,
39
+ _ref$preload = _ref.preload,
40
+ preload = _ref$preload === void 0 ? true : _ref$preload,
41
+ _ref$className = _ref.className,
42
+ className = _ref$className === void 0 ? null : _ref$className;
60
43
  var _useScreenSize = useScreenSize(),
61
44
  width = _useScreenSize.width,
62
45
  height = _useScreenSize.height,
@@ -175,16 +158,14 @@ var TextScreen = function TextScreen(_ref) {
175
158
  withoutVideo: isPreview,
176
159
  className: styles.background
177
160
  }) : null);
178
- };
179
- TextScreen.propTypes = propTypes;
180
- TextScreen.defaultProps = defaultProps;
161
+ }
181
162
 
182
- var TextTitleScreen = function TextTitleScreen(_ref) {
163
+ function TextTitleScreen(_ref) {
183
164
  var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
184
165
  return /*#__PURE__*/React.createElement(TextScreen, Object.assign({}, props, {
185
166
  withTitle: true
186
167
  }));
187
- };
168
+ }
188
169
 
189
170
  // import * as transforms from './transforms/index';
190
171
 
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 .emptyText,.container .emptyTitle{border:2px dashed var(--mm-gray-800);color:var(--mm-gray-800);margin:10px auto;width:100%}.container .emptyTitle{height:100px}.container .emptyText{height:50px}.container .title.withMargin{margin-bottom:20px}.container.isPlaceholder .layout{padding:10px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-text",
3
- "version": "0.3.832",
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": "^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
63
  "@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-heading": "^0.3.832",
69
- "@micromag/element-layout": "^0.3.832",
70
- "@micromag/element-text": "^0.3.832",
71
- "@micromag/transforms": "^0.3.832",
64
+ "@micromag/core": "^0.4.4",
65
+ "@micromag/element-background": "^0.4.4",
66
+ "@micromag/element-container": "^0.4.4",
67
+ "@micromag/element-footer": "^0.4.4",
68
+ "@micromag/element-header": "^0.4.4",
69
+ "@micromag/element-heading": "^0.4.4",
70
+ "@micromag/element-layout": "^0.4.4",
71
+ "@micromag/element-text": "^0.4.4",
72
+ "@micromag/transforms": "^0.4.4",
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": "04b8519c3a3ddace5a21497e22faa11865d57f6d",
83
+ "types": "es/index.d.ts"
83
84
  }