@micromag/screen-gallery-feed 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.
@@ -1 +1 @@
1
- .micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-background{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-emptyCaption,.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-emptyImage{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-gallery-feed-container{position:relative}.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-background{z-index:0}.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-content{z-index:1}.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-emptyCaption,.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-emptyImage{margin:10px auto;width:100%}.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-emptyImage{height:200px}.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-emptyCaption{height:50px}.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-image,.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-imageContainer,.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-video{position:relative!important}.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-imageContainer{overflow:hidden}.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-footer{-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out}.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-footer a{padding:0}.micromag-screen-gallery-feed-container .micromag-screen-gallery-feed-footer.micromag-screen-gallery-feed-disabled{opacity:0;pointer-events:none}.micromag-screen-gallery-feed-container.micromag-screen-gallery-feed-isPlaceholder .micromag-screen-gallery-feed-layout{padding:10px}
1
+ .container{position:relative}.container .background{height:100%;left:0;position:absolute;top:0;width:100%;z-index:0}.container .content{z-index:1}.container .emptyCaption,.container .emptyImage{border:2px dashed var(--mm-gray-800);color:var(--mm-gray-800);margin:10px auto;width:100%}.container .emptyImage{height:200px}.container .emptyCaption{height:50px}.container .image,.container .imageContainer,.container .video{position:relative!important}.container .imageContainer{overflow:hidden}.container .footer{-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out}.container .footer a{padding:0}.container .footer.disabled{opacity:0;pointer-events:none}.container.isPlaceholder .layout{padding:10px}
package/es/index.d.ts ADDED
@@ -0,0 +1,201 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ImageElementWithCaption, ImageMedia, TextStyle, BackgroundElement, Header, Footer } from '@micromag/core';
3
+
4
+ interface GalleryFeedScreenProps {
5
+ layout?: 'normal' | 'reverse';
6
+ images?: ImageElementWithCaption[] | ImageMedia[] | null;
7
+ withCaptions?: boolean;
8
+ imageCaptionStyle?: TextStyle | null;
9
+ spacing?: number;
10
+ background?: BackgroundElement | null;
11
+ header?: Header | null;
12
+ footer?: Footer | null;
13
+ current?: boolean;
14
+ active?: boolean;
15
+ preload?: boolean;
16
+ type?: string | null;
17
+ className?: string | null;
18
+ }
19
+ declare function GalleryFeedScreen({ layout, images, withCaptions, imageCaptionStyle, spacing: initialSpacing, background, header, footer, current, active, preload, type, className, }: GalleryFeedScreenProps): react_jsx_runtime.JSX.Element;
20
+
21
+ declare function GalleryFeedCaptionsScreen({ ...props }: {
22
+ [x: string]: any;
23
+ }): react_jsx_runtime.JSX.Element;
24
+
25
+ declare const _default: ({
26
+ id: string;
27
+ type: string;
28
+ group: {
29
+ label: {
30
+ defaultMessage: string;
31
+ description: string;
32
+ };
33
+ order: number;
34
+ };
35
+ title: {
36
+ defaultMessage: string;
37
+ description: string;
38
+ };
39
+ component: typeof GalleryFeedScreen;
40
+ layouts: string[];
41
+ fields: ({
42
+ name: string;
43
+ type: string;
44
+ label: {
45
+ defaultMessage: string;
46
+ description: string;
47
+ };
48
+ defaultValue?: undefined;
49
+ isHorizontal?: undefined;
50
+ theme?: undefined;
51
+ } | {
52
+ name: string;
53
+ type: string;
54
+ defaultValue: number;
55
+ isHorizontal: boolean;
56
+ label: {
57
+ defaultMessage: string;
58
+ description: string;
59
+ };
60
+ theme?: undefined;
61
+ } | {
62
+ name: string;
63
+ type: string;
64
+ label: {
65
+ defaultMessage: string;
66
+ description: string;
67
+ };
68
+ theme: {
69
+ badge: {
70
+ label: {
71
+ textStyle: string;
72
+ };
73
+ boxStyle: string;
74
+ };
75
+ callToAction?: undefined;
76
+ };
77
+ defaultValue?: undefined;
78
+ isHorizontal?: undefined;
79
+ } | {
80
+ name: string;
81
+ type: string;
82
+ label: {
83
+ defaultMessage: string;
84
+ description: string;
85
+ };
86
+ theme: {
87
+ callToAction: {
88
+ label: {
89
+ textStyle: string;
90
+ };
91
+ boxStyle: string;
92
+ };
93
+ badge?: undefined;
94
+ };
95
+ defaultValue?: undefined;
96
+ isHorizontal?: undefined;
97
+ })[];
98
+ } | {
99
+ id: string;
100
+ type: string;
101
+ group: {
102
+ label: {
103
+ defaultMessage: string;
104
+ description: string;
105
+ };
106
+ order: number;
107
+ };
108
+ title: {
109
+ defaultMessage: string;
110
+ description: string;
111
+ };
112
+ component: typeof GalleryFeedCaptionsScreen;
113
+ layouts: string[];
114
+ fields: ({
115
+ name: string;
116
+ type: string;
117
+ defaultValue: string;
118
+ label: {
119
+ defaultMessage: string;
120
+ description: string;
121
+ };
122
+ theme?: undefined;
123
+ isHorizontal?: undefined;
124
+ } | {
125
+ name: string;
126
+ type: string;
127
+ theme: {
128
+ caption: {
129
+ textStyle: string;
130
+ };
131
+ badge?: undefined;
132
+ callToAction?: undefined;
133
+ };
134
+ label: {
135
+ defaultMessage: string;
136
+ description: string;
137
+ };
138
+ defaultValue?: undefined;
139
+ isHorizontal?: undefined;
140
+ } | {
141
+ name: string;
142
+ type: string;
143
+ defaultValue: number;
144
+ isHorizontal: boolean;
145
+ label: {
146
+ defaultMessage: string;
147
+ description: string;
148
+ };
149
+ theme?: undefined;
150
+ } | {
151
+ name: string;
152
+ type: string;
153
+ label: {
154
+ defaultMessage: string;
155
+ description: string;
156
+ };
157
+ defaultValue?: undefined;
158
+ theme?: undefined;
159
+ isHorizontal?: undefined;
160
+ } | {
161
+ name: string;
162
+ type: string;
163
+ label: {
164
+ defaultMessage: string;
165
+ description: string;
166
+ };
167
+ theme: {
168
+ badge: {
169
+ label: {
170
+ textStyle: string;
171
+ };
172
+ boxStyle: string;
173
+ };
174
+ caption?: undefined;
175
+ callToAction?: undefined;
176
+ };
177
+ defaultValue?: undefined;
178
+ isHorizontal?: undefined;
179
+ } | {
180
+ name: string;
181
+ type: string;
182
+ label: {
183
+ defaultMessage: string;
184
+ description: string;
185
+ };
186
+ theme: {
187
+ callToAction: {
188
+ label: {
189
+ textStyle: string;
190
+ };
191
+ boxStyle: string;
192
+ };
193
+ caption?: undefined;
194
+ badge?: undefined;
195
+ };
196
+ defaultValue?: undefined;
197
+ isHorizontal?: undefined;
198
+ })[];
199
+ })[];
200
+
201
+ export { GalleryFeedCaptionsScreen, GalleryFeedScreen, _default as default };
package/es/index.js CHANGED
@@ -4,9 +4,7 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
4
4
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
5
5
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
6
6
  import classNames from 'classnames';
7
- import PropTypes from 'prop-types';
8
7
  import React, { useState, useCallback } from 'react';
9
- import { PropTypes as PropTypes$1 } from '@micromag/core';
10
8
  import { ScreenElement } from '@micromag/core/components';
11
9
  import { useScreenSize, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef, useScreenRenderContext } from '@micromag/core/contexts';
12
10
  import { useTrackScreenEvent, useDimensionObserver } from '@micromag/core/hooks';
@@ -22,52 +20,35 @@ import Visual from '@micromag/element-visual';
22
20
  import _objectDestructuringEmpty from '@babel/runtime/helpers/objectDestructuringEmpty';
23
21
  import _extends from '@babel/runtime/helpers/extends';
24
22
 
25
- var styles = {"container":"micromag-screen-gallery-feed-container","background":"micromag-screen-gallery-feed-background","emptyImage":"micromag-screen-gallery-feed-emptyImage","emptyCaption":"micromag-screen-gallery-feed-emptyCaption","content":"micromag-screen-gallery-feed-content","image":"micromag-screen-gallery-feed-image","imageContainer":"micromag-screen-gallery-feed-imageContainer","video":"micromag-screen-gallery-feed-video","footer":"micromag-screen-gallery-feed-footer","disabled":"micromag-screen-gallery-feed-disabled","isPlaceholder":"micromag-screen-gallery-feed-isPlaceholder","layout":"micromag-screen-gallery-feed-layout"};
23
+ var styles = {"container":"container","background":"background","content":"content","emptyImage":"emptyImage","emptyCaption":"emptyCaption","image":"image","imageContainer":"imageContainer","video":"video","footer":"footer","disabled":"disabled","caption":"caption","isPlaceholder":"isPlaceholder","layout":"layout"};
26
24
 
27
- var propTypes = {
28
- layout: PropTypes.oneOf(['normal', 'reverse']),
29
- images: PropTypes.oneOfType([PropTypes$1.imageElementsWithCaption, PropTypes$1.imageMedias]),
30
- withCaptions: PropTypes.bool,
31
- imageCaptionStyle: PropTypes$1.textStyle,
32
- spacing: PropTypes.number,
33
- background: PropTypes$1.backgroundElement,
34
- header: PropTypes$1.header,
35
- footer: PropTypes$1.footer,
36
- current: PropTypes.bool,
37
- active: PropTypes.bool,
38
- preload: PropTypes.bool,
39
- type: PropTypes.string,
40
- className: PropTypes.string
41
- };
42
- var defaultProps = {
43
- layout: 'normal',
44
- images: null,
45
- withCaptions: false,
46
- imageCaptionStyle: null,
47
- spacing: 20,
48
- background: null,
49
- header: null,
50
- footer: null,
51
- current: true,
52
- active: true,
53
- preload: true,
54
- type: null,
55
- className: null
56
- };
57
- var GalleryFeedScreen = function GalleryFeedScreen(_ref) {
58
- var layout = _ref.layout,
59
- images = _ref.images,
60
- withCaptions = _ref.withCaptions,
61
- imageCaptionStyle = _ref.imageCaptionStyle,
62
- initialSpacing = _ref.spacing,
63
- background = _ref.background,
64
- header = _ref.header,
65
- footer = _ref.footer,
66
- current = _ref.current,
67
- active = _ref.active,
68
- preload = _ref.preload,
69
- type = _ref.type,
70
- className = _ref.className;
25
+ function GalleryFeedScreen(_ref) {
26
+ var _ref$layout = _ref.layout,
27
+ layout = _ref$layout === void 0 ? 'normal' : _ref$layout,
28
+ _ref$images = _ref.images,
29
+ images = _ref$images === void 0 ? null : _ref$images,
30
+ _ref$withCaptions = _ref.withCaptions,
31
+ withCaptions = _ref$withCaptions === void 0 ? false : _ref$withCaptions,
32
+ _ref$imageCaptionStyl = _ref.imageCaptionStyle,
33
+ imageCaptionStyle = _ref$imageCaptionStyl === void 0 ? null : _ref$imageCaptionStyl,
34
+ _ref$spacing = _ref.spacing,
35
+ initialSpacing = _ref$spacing === void 0 ? 20 : _ref$spacing,
36
+ _ref$background = _ref.background,
37
+ background = _ref$background === void 0 ? null : _ref$background,
38
+ _ref$header = _ref.header,
39
+ header = _ref$header === void 0 ? null : _ref$header,
40
+ _ref$footer = _ref.footer,
41
+ footer = _ref$footer === void 0 ? null : _ref$footer,
42
+ _ref$current = _ref.current,
43
+ current = _ref$current === void 0 ? true : _ref$current,
44
+ _ref$active = _ref.active,
45
+ active = _ref$active === void 0 ? true : _ref$active,
46
+ _ref$preload = _ref.preload,
47
+ preload = _ref$preload === void 0 ? true : _ref$preload,
48
+ _ref$type = _ref.type,
49
+ type = _ref$type === void 0 ? null : _ref$type,
50
+ _ref$className = _ref.className,
51
+ className = _ref$className === void 0 ? null : _ref$className;
71
52
  var trackScreenEvent = useTrackScreenEvent(type);
72
53
  var _useScreenSize = useScreenSize(),
73
54
  width = _useScreenSize.width,
@@ -278,16 +259,14 @@ var GalleryFeedScreen = function GalleryFeedScreen(_ref) {
278
259
  withoutVideo: isPreview,
279
260
  className: styles.background
280
261
  }) : null);
281
- };
282
- GalleryFeedScreen.propTypes = propTypes;
283
- GalleryFeedScreen.defaultProps = defaultProps;
262
+ }
284
263
 
285
- var GalleryFeedCaptionsScreen = function GalleryFeedCaptionsScreen(_ref) {
264
+ function GalleryFeedCaptionsScreen(_ref) {
286
265
  var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
287
266
  return /*#__PURE__*/React.createElement(GalleryFeedScreen, Object.assign({}, props, {
288
267
  withCaptions: true
289
268
  }));
290
- };
269
+ }
291
270
 
292
271
  var definition = [{
293
272
  id: 'gallery-feed',
package/es/styles.css ADDED
@@ -0,0 +1 @@
1
+ .container{position:relative}.container .background{height:100%;left:0;position:absolute;top:0;width:100%;z-index:0}.container .content{z-index:1}.container .emptyCaption,.container .emptyImage{border:2px dashed var(--mm-gray-800);color:var(--mm-gray-800);margin:10px auto;width:100%}.container .emptyImage{height:200px}.container .emptyCaption{height:50px}.container .image,.container .imageContainer,.container .video{position:relative!important}.container .imageContainer{overflow:hidden}.container .footer{-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out}.container .footer a{padding:0}.container .footer.disabled{opacity:0;pointer-events:none}.container.isPlaceholder .layout{padding:10px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-gallery-feed",
3
- "version": "0.3.829",
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,38 +49,38 @@
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.824",
64
- "@micromag/element-background": "^0.3.824",
65
- "@micromag/element-container": "^0.3.824",
66
- "@micromag/element-footer": "^0.3.829",
67
- "@micromag/element-header": "^0.3.824",
68
- "@micromag/element-layout": "^0.3.824",
69
- "@micromag/element-scroll": "^0.3.824",
70
- "@micromag/element-stack": "^0.3.824",
71
- "@micromag/element-text": "^0.3.824",
72
- "@micromag/element-visual": "^0.3.824",
73
- "@micromag/transforms": "^0.3.824",
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-layout": "^0.4.4",
70
+ "@micromag/element-scroll": "^0.4.4",
71
+ "@micromag/element-stack": "^0.4.4",
72
+ "@micromag/element-text": "^0.4.4",
73
+ "@micromag/element-visual": "^0.4.4",
74
+ "@micromag/transforms": "^0.4.4",
74
75
  "classnames": "^2.2.6",
75
- "lodash": "^4.17.21",
76
- "prop-types": "^15.7.2",
77
- "react-intl": "^6.6.4",
76
+ "lodash": "^4.17.23",
77
+ "react-intl": "^8.1.3",
78
78
  "uuid": "^9.0.0"
79
79
  },
80
80
  "publishConfig": {
81
81
  "access": "public",
82
82
  "registry": "https://registry.npmjs.org/"
83
83
  },
84
- "gitHead": "35fb9241ce6f9580397150bd05115f9a6f4048c8"
84
+ "gitHead": "04b8519c3a3ddace5a21497e22faa11865d57f6d",
85
+ "types": "es/index.d.ts"
85
86
  }