@micromag/screen-slideshow 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-slideshow-container .micromag-screen-slideshow-background,.micromag-screen-slideshow-container .micromag-screen-slideshow-inner,.micromag-screen-slideshow-container .micromag-screen-slideshow-placeholder{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-slideshow-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-slideshow-disabled.micromag-screen-slideshow-container{overflow:hidden;pointer-events:none}.micromag-screen-slideshow-hidden.micromag-screen-slideshow-container{display:none;visibility:hidden}.micromag-screen-slideshow-placeholder.micromag-screen-slideshow-container .micromag-screen-slideshow-content{padding:6px;position:relative}.micromag-screen-slideshow-container .micromag-screen-slideshow-background{z-index:0}.micromag-screen-slideshow-container .micromag-screen-slideshow-content{z-index:1}.micromag-screen-slideshow-container .micromag-screen-slideshow-caption{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.micromag-screen-slideshow-container .micromag-screen-slideshow-header{left:0;position:absolute;top:0;width:100%;z-index:2}.micromag-screen-slideshow-container .micromag-screen-slideshow-footer{bottom:0;left:0;position:absolute;width:100%}
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 .inner,.container .placeholder{height:100%;left:0;position:absolute;top:0;width:100%}.container .caption{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.container .header{left:0;position:absolute;top:0;width:100%;z-index:2}.container .footer{bottom:0;left:0;position:absolute;width:100%}
package/es/index.d.ts ADDED
@@ -0,0 +1,95 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ImageMedia, ImageElement, BackgroundElement, Header, Footer, Transitions } from '@micromag/core';
3
+
4
+ interface SlideshowScreenProps {
5
+ slides?: ImageMedia[] | ImageElement[];
6
+ withCaptions?: boolean;
7
+ spacing?: number;
8
+ captionMaxLines?: number;
9
+ transitionDelay?: number;
10
+ background?: BackgroundElement | null;
11
+ header?: Header | null;
12
+ footer?: Footer | null;
13
+ current?: boolean;
14
+ active?: boolean;
15
+ preload?: boolean;
16
+ transitions?: Transitions | null;
17
+ className?: string | null;
18
+ }
19
+ declare function SlideshowScreen({ slides, withCaptions, background, header, footer, current, active, preload, spacing, transitionDelay, captionMaxLines, transitions, className, }: SlideshowScreenProps): react_jsx_runtime.JSX.Element;
20
+
21
+ declare const _default: {
22
+ id: string;
23
+ type: string;
24
+ group: {
25
+ label: {
26
+ defaultMessage: string;
27
+ description: string;
28
+ };
29
+ order: number;
30
+ };
31
+ title: {
32
+ defaultMessage: string;
33
+ description: string;
34
+ };
35
+ component: typeof SlideshowScreen;
36
+ fields: ({
37
+ name: string;
38
+ type: string;
39
+ label: {
40
+ defaultMessage: string;
41
+ description: string;
42
+ };
43
+ min?: undefined;
44
+ float?: undefined;
45
+ theme?: undefined;
46
+ } | {
47
+ name: string;
48
+ type: string;
49
+ min: number;
50
+ float: boolean;
51
+ label: {
52
+ defaultMessage: string;
53
+ description: string;
54
+ };
55
+ theme?: undefined;
56
+ } | {
57
+ name: string;
58
+ type: string;
59
+ label: {
60
+ defaultMessage: string;
61
+ description: string;
62
+ };
63
+ theme: {
64
+ badge: {
65
+ label: {
66
+ textStyle: string;
67
+ };
68
+ boxStyle: string;
69
+ };
70
+ callToAction?: undefined;
71
+ };
72
+ min?: undefined;
73
+ float?: undefined;
74
+ } | {
75
+ name: string;
76
+ type: string;
77
+ label: {
78
+ defaultMessage: string;
79
+ description: string;
80
+ };
81
+ theme: {
82
+ callToAction: {
83
+ label: {
84
+ textStyle: string;
85
+ };
86
+ boxStyle: string;
87
+ };
88
+ badge?: undefined;
89
+ };
90
+ min?: undefined;
91
+ float?: undefined;
92
+ })[];
93
+ }[];
94
+
95
+ export { SlideshowScreen, _default as default };
package/es/index.js CHANGED
@@ -2,9 +2,7 @@ import { FormattedMessage, defineMessage } from 'react-intl';
2
2
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
3
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
4
4
  import classNames from 'classnames';
5
- import PropTypes from 'prop-types';
6
5
  import React, { useState, useCallback, useRef } from 'react';
7
- import { PropTypes as PropTypes$1 } from '@micromag/core';
8
6
  import { Transitions, ScreenElement } from '@micromag/core/components';
9
7
  import { useScreenSize, useViewerContext, useViewerInteraction, useScreenRenderContext, usePlaybackContext, usePlaybackMediaRef } from '@micromag/core/contexts';
10
8
  import { useDimensionObserver } from '@micromag/core/hooks';
@@ -16,53 +14,35 @@ import Header from '@micromag/element-header';
16
14
  import Text from '@micromag/element-text';
17
15
  import Visual from '@micromag/element-visual';
18
16
 
19
- var styles = {"container":"micromag-screen-slideshow-container","placeholder":"micromag-screen-slideshow-placeholder","inner":"micromag-screen-slideshow-inner","background":"micromag-screen-slideshow-background","content":"micromag-screen-slideshow-content","caption":"micromag-screen-slideshow-caption","header":"micromag-screen-slideshow-header","footer":"micromag-screen-slideshow-footer"};
17
+ var styles = {"container":"container","background":"background","content":"content","inner":"inner","placeholder":"placeholder","caption":"caption","header":"header","footer":"footer"};
20
18
 
21
- var propTypes = {
22
- slides: PropTypes.oneOfType([PropTypes$1.imageMedias, PropTypes$1.imageElements]),
23
- withCaptions: PropTypes.bool,
24
- spacing: PropTypes.number,
25
- captionMaxLines: PropTypes.number,
26
- transitionDelay: PropTypes.number,
27
- background: PropTypes$1.backgroundElement,
28
- header: PropTypes$1.header,
29
- footer: PropTypes$1.footer,
30
- current: PropTypes.bool,
31
- active: PropTypes.bool,
32
- preload: PropTypes.bool,
33
- transitions: PropTypes$1.transitions,
34
- className: PropTypes.string
35
- };
36
- var defaultProps = {
37
- withCaptions: false,
38
- slides: [],
39
- spacing: 20,
40
- captionMaxLines: 2,
41
- transitionDelay: 1,
42
- // in seconds
43
- background: null,
44
- header: null,
45
- footer: null,
46
- current: true,
47
- active: true,
48
- preload: true,
49
- transitions: null,
50
- className: null
51
- };
52
- var SlideshowScreen = function SlideshowScreen(_ref) {
53
- var slides = _ref.slides,
54
- withCaptions = _ref.withCaptions,
55
- background = _ref.background,
56
- header = _ref.header,
57
- footer = _ref.footer,
58
- current = _ref.current,
59
- active = _ref.active,
60
- preload = _ref.preload,
61
- spacing = _ref.spacing,
62
- transitionDelay = _ref.transitionDelay,
63
- captionMaxLines = _ref.captionMaxLines,
64
- transitions = _ref.transitions,
65
- className = _ref.className;
19
+ function SlideshowScreen(_ref) {
20
+ var _ref$slides = _ref.slides,
21
+ slides = _ref$slides === void 0 ? [] : _ref$slides,
22
+ _ref$withCaptions = _ref.withCaptions,
23
+ withCaptions = _ref$withCaptions === void 0 ? false : _ref$withCaptions,
24
+ _ref$background = _ref.background,
25
+ background = _ref$background === void 0 ? null : _ref$background,
26
+ _ref$header = _ref.header,
27
+ header = _ref$header === void 0 ? null : _ref$header,
28
+ _ref$footer = _ref.footer,
29
+ footer = _ref$footer === void 0 ? null : _ref$footer,
30
+ _ref$current = _ref.current,
31
+ current = _ref$current === void 0 ? true : _ref$current,
32
+ _ref$active = _ref.active,
33
+ active = _ref$active === void 0 ? true : _ref$active,
34
+ _ref$preload = _ref.preload,
35
+ preload = _ref$preload === void 0 ? true : _ref$preload,
36
+ _ref$spacing = _ref.spacing,
37
+ spacing = _ref$spacing === void 0 ? 20 : _ref$spacing,
38
+ _ref$transitionDelay = _ref.transitionDelay,
39
+ transitionDelay = _ref$transitionDelay === void 0 ? 1 : _ref$transitionDelay,
40
+ _ref$captionMaxLines = _ref.captionMaxLines,
41
+ captionMaxLines = _ref$captionMaxLines === void 0 ? 2 : _ref$captionMaxLines,
42
+ _ref$transitions = _ref.transitions,
43
+ transitions = _ref$transitions === void 0 ? null : _ref$transitions,
44
+ _ref$className = _ref.className,
45
+ className = _ref$className === void 0 ? null : _ref$className;
66
46
  var _useScreenSize = useScreenSize(),
67
47
  width = _useScreenSize.width,
68
48
  height = _useScreenSize.height,
@@ -247,9 +227,7 @@ var SlideshowScreen = function SlideshowScreen(_ref) {
247
227
  withoutVideo: isPreview,
248
228
  className: styles.background
249
229
  }) : null);
250
- };
251
- SlideshowScreen.propTypes = propTypes;
252
- SlideshowScreen.defaultProps = defaultProps;
230
+ }
253
231
 
254
232
  // import * as transforms from './transforms/index';
255
233
 
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 .inner,.container .placeholder{height:100%;left:0;position:absolute;top:0;width:100%}.container .caption{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.container .header{left:0;position:absolute;top:0;width:100%;z-index:2}.container .footer{bottom:0;left:0;position:absolute;width:100%}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-slideshow",
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,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.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-text": "^0.3.824",
70
- "@micromag/element-visual": "^0.3.824",
71
- "@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-text": "^0.4.4",
71
+ "@micromag/element-visual": "^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": "35fb9241ce6f9580397150bd05115f9a6f4048c8"
82
+ "gitHead": "04b8519c3a3ddace5a21497e22faa11865d57f6d",
83
+ "types": "es/index.d.ts"
83
84
  }