@micromag/screen-share 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.
- package/assets/css/styles.css +1 -1
- package/es/index.d.ts +160 -0
- package/es/index.js +35 -59
- package/es/styles.css +1 -0
- package/package.json +21 -20
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
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 .heading{margin-bottom:10px}.layout{overflow-x:hidden;overflow-y:auto;overflow:hidden auto;padding:10px;scrollbar-width:none}.layout::-webkit-scrollbar{display:none}.shareOptions.isCentered{-ms-flex-pack:center;justify-content:center}.shareButton{display:-ms-flexbox;display:flex;width:100%}.emptyHeading,.emptyOptions{border:2px dashed var(--mm-gray-800);color:var(--mm-gray-800);margin:10px auto;padding:10px;width:100%}.emptyOptions{padding:40px}.header{top:0;z-index:1}.footer,.header{left:0;margin-top:0;position:absolute;width:100%}.footer{bottom:0}
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { HeadingElement, BoxStyle, TextStyle, BackgroundElement, Header, Footer } from '@micromag/core';
|
|
3
|
+
|
|
4
|
+
interface ShareScreenProps {
|
|
5
|
+
layout?: 'top' | 'middle' | 'bottom';
|
|
6
|
+
heading?: HeadingElement | null;
|
|
7
|
+
shareUrl?: string | null;
|
|
8
|
+
options?: Record<string, boolean> | null;
|
|
9
|
+
buttonsStyle?: BoxStyle | null;
|
|
10
|
+
buttonsTextStyle?: TextStyle | null;
|
|
11
|
+
centered?: boolean;
|
|
12
|
+
spacing?: number;
|
|
13
|
+
background?: BackgroundElement | null;
|
|
14
|
+
header?: Header | null;
|
|
15
|
+
footer?: Footer | null;
|
|
16
|
+
id?: string | null;
|
|
17
|
+
index?: number | null;
|
|
18
|
+
current?: boolean;
|
|
19
|
+
active?: boolean;
|
|
20
|
+
className?: string | null;
|
|
21
|
+
}
|
|
22
|
+
declare function ShareScreen({ layout, heading, shareUrl, options, buttonsStyle, buttonsTextStyle, centered, spacing, background, header, footer, id, index, current, active, className, }: ShareScreenProps): react_jsx_runtime.JSX.Element;
|
|
23
|
+
|
|
24
|
+
declare const _default: {
|
|
25
|
+
id: string;
|
|
26
|
+
type: string;
|
|
27
|
+
group: {
|
|
28
|
+
label: {
|
|
29
|
+
defaultMessage: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
order: number;
|
|
33
|
+
};
|
|
34
|
+
title: {
|
|
35
|
+
defaultMessage: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
component: typeof ShareScreen;
|
|
39
|
+
layouts: string[];
|
|
40
|
+
fields: ({
|
|
41
|
+
name: string;
|
|
42
|
+
type: string;
|
|
43
|
+
defaultValue: string;
|
|
44
|
+
label: {
|
|
45
|
+
defaultMessage: string;
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
help?: undefined;
|
|
49
|
+
theme?: undefined;
|
|
50
|
+
isList?: undefined;
|
|
51
|
+
fields?: undefined;
|
|
52
|
+
} | {
|
|
53
|
+
name: string;
|
|
54
|
+
type: string;
|
|
55
|
+
label: {
|
|
56
|
+
defaultMessage: string;
|
|
57
|
+
description: string;
|
|
58
|
+
};
|
|
59
|
+
help: {
|
|
60
|
+
defaultMessage: string;
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
63
|
+
defaultValue?: undefined;
|
|
64
|
+
theme?: undefined;
|
|
65
|
+
isList?: undefined;
|
|
66
|
+
fields?: undefined;
|
|
67
|
+
} | {
|
|
68
|
+
name: string;
|
|
69
|
+
type: string;
|
|
70
|
+
theme: {
|
|
71
|
+
textStyle: string;
|
|
72
|
+
badge?: undefined;
|
|
73
|
+
callToAction?: undefined;
|
|
74
|
+
};
|
|
75
|
+
label: {
|
|
76
|
+
defaultMessage: string;
|
|
77
|
+
description: string;
|
|
78
|
+
};
|
|
79
|
+
defaultValue?: undefined;
|
|
80
|
+
help?: undefined;
|
|
81
|
+
isList?: undefined;
|
|
82
|
+
fields?: undefined;
|
|
83
|
+
} | {
|
|
84
|
+
name: string;
|
|
85
|
+
type: string;
|
|
86
|
+
isList: boolean;
|
|
87
|
+
label: {
|
|
88
|
+
defaultMessage: string;
|
|
89
|
+
description: string;
|
|
90
|
+
};
|
|
91
|
+
fields: {
|
|
92
|
+
name: string;
|
|
93
|
+
type: string;
|
|
94
|
+
defaultValue: boolean;
|
|
95
|
+
label: {
|
|
96
|
+
defaultMessage: string;
|
|
97
|
+
description: string;
|
|
98
|
+
};
|
|
99
|
+
}[];
|
|
100
|
+
defaultValue?: undefined;
|
|
101
|
+
help?: undefined;
|
|
102
|
+
theme?: undefined;
|
|
103
|
+
} | {
|
|
104
|
+
name: string;
|
|
105
|
+
type: string;
|
|
106
|
+
label: {
|
|
107
|
+
defaultMessage: string;
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
110
|
+
defaultValue?: undefined;
|
|
111
|
+
help?: undefined;
|
|
112
|
+
theme?: undefined;
|
|
113
|
+
isList?: undefined;
|
|
114
|
+
fields?: undefined;
|
|
115
|
+
} | {
|
|
116
|
+
name: string;
|
|
117
|
+
type: string;
|
|
118
|
+
label: {
|
|
119
|
+
defaultMessage: string;
|
|
120
|
+
description: string;
|
|
121
|
+
};
|
|
122
|
+
theme: {
|
|
123
|
+
badge: {
|
|
124
|
+
label: {
|
|
125
|
+
textStyle: string;
|
|
126
|
+
};
|
|
127
|
+
boxStyle: string;
|
|
128
|
+
};
|
|
129
|
+
textStyle?: undefined;
|
|
130
|
+
callToAction?: undefined;
|
|
131
|
+
};
|
|
132
|
+
defaultValue?: undefined;
|
|
133
|
+
help?: undefined;
|
|
134
|
+
isList?: undefined;
|
|
135
|
+
fields?: undefined;
|
|
136
|
+
} | {
|
|
137
|
+
name: string;
|
|
138
|
+
type: string;
|
|
139
|
+
label: {
|
|
140
|
+
defaultMessage: string;
|
|
141
|
+
description: string;
|
|
142
|
+
};
|
|
143
|
+
theme: {
|
|
144
|
+
callToAction: {
|
|
145
|
+
label: {
|
|
146
|
+
textStyle: string;
|
|
147
|
+
};
|
|
148
|
+
boxStyle: string;
|
|
149
|
+
};
|
|
150
|
+
textStyle?: undefined;
|
|
151
|
+
badge?: undefined;
|
|
152
|
+
};
|
|
153
|
+
defaultValue?: undefined;
|
|
154
|
+
help?: undefined;
|
|
155
|
+
isList?: undefined;
|
|
156
|
+
fields?: undefined;
|
|
157
|
+
})[];
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export { ShareScreen, _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 _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
5
|
import React, { useMemo, useCallback } from 'react';
|
|
7
|
-
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
8
6
|
import { ScreenElement } from '@micromag/core/components';
|
|
9
7
|
import { useScreenSize, useScreenRenderContext, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef } from '@micromag/core/contexts';
|
|
10
8
|
import { useDimensionObserver, useTrackScreenEvent } from '@micromag/core/hooks';
|
|
@@ -17,61 +15,41 @@ import Heading from '@micromag/element-heading';
|
|
|
17
15
|
import Layout, { Spacer } from '@micromag/element-layout';
|
|
18
16
|
import ShareOptions from '@micromag/element-share-options';
|
|
19
17
|
|
|
20
|
-
var styles = {"
|
|
18
|
+
var styles = {"container":"container","background":"background","content":"content","heading":"heading","layout":"layout","shareOptions":"shareOptions","isCentered":"isCentered","shareButton":"shareButton","emptyHeading":"emptyHeading","emptyOptions":"emptyOptions","header":"header","footer":"footer"};
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
layout
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
active: true,
|
|
56
|
-
className: null
|
|
57
|
-
};
|
|
58
|
-
var ShareScreen = function ShareScreen(_ref) {
|
|
59
|
-
var layout = _ref.layout,
|
|
60
|
-
heading = _ref.heading,
|
|
61
|
-
shareUrl = _ref.shareUrl,
|
|
62
|
-
options = _ref.options,
|
|
63
|
-
buttonsStyle = _ref.buttonsStyle,
|
|
64
|
-
buttonsTextStyle = _ref.buttonsTextStyle,
|
|
65
|
-
centered = _ref.centered,
|
|
66
|
-
spacing = _ref.spacing,
|
|
67
|
-
background = _ref.background,
|
|
68
|
-
header = _ref.header,
|
|
69
|
-
footer = _ref.footer,
|
|
70
|
-
id = _ref.id,
|
|
71
|
-
index = _ref.index,
|
|
72
|
-
current = _ref.current,
|
|
73
|
-
active = _ref.active,
|
|
74
|
-
className = _ref.className;
|
|
20
|
+
function ShareScreen(_ref) {
|
|
21
|
+
var _ref$layout = _ref.layout,
|
|
22
|
+
layout = _ref$layout === void 0 ? 'top' : _ref$layout,
|
|
23
|
+
_ref$heading = _ref.heading,
|
|
24
|
+
heading = _ref$heading === void 0 ? null : _ref$heading,
|
|
25
|
+
_ref$shareUrl = _ref.shareUrl,
|
|
26
|
+
shareUrl = _ref$shareUrl === void 0 ? null : _ref$shareUrl,
|
|
27
|
+
_ref$options = _ref.options,
|
|
28
|
+
options = _ref$options === void 0 ? null : _ref$options,
|
|
29
|
+
_ref$buttonsStyle = _ref.buttonsStyle,
|
|
30
|
+
buttonsStyle = _ref$buttonsStyle === void 0 ? null : _ref$buttonsStyle,
|
|
31
|
+
_ref$buttonsTextStyle = _ref.buttonsTextStyle,
|
|
32
|
+
buttonsTextStyle = _ref$buttonsTextStyle === void 0 ? null : _ref$buttonsTextStyle,
|
|
33
|
+
_ref$centered = _ref.centered,
|
|
34
|
+
centered = _ref$centered === void 0 ? false : _ref$centered,
|
|
35
|
+
_ref$spacing = _ref.spacing,
|
|
36
|
+
spacing = _ref$spacing === void 0 ? 20 : _ref$spacing,
|
|
37
|
+
_ref$background = _ref.background,
|
|
38
|
+
background = _ref$background === void 0 ? null : _ref$background,
|
|
39
|
+
_ref$header = _ref.header,
|
|
40
|
+
header = _ref$header === void 0 ? null : _ref$header,
|
|
41
|
+
_ref$footer = _ref.footer,
|
|
42
|
+
footer = _ref$footer === void 0 ? null : _ref$footer,
|
|
43
|
+
_ref$id = _ref.id,
|
|
44
|
+
id = _ref$id === void 0 ? null : _ref$id,
|
|
45
|
+
_ref$index = _ref.index,
|
|
46
|
+
index = _ref$index === void 0 ? null : _ref$index,
|
|
47
|
+
_ref$current = _ref.current,
|
|
48
|
+
current = _ref$current === void 0 ? true : _ref$current,
|
|
49
|
+
_ref$active = _ref.active,
|
|
50
|
+
active = _ref$active === void 0 ? true : _ref$active,
|
|
51
|
+
_ref$className = _ref.className,
|
|
52
|
+
className = _ref$className === void 0 ? null : _ref$className;
|
|
75
53
|
var _useScreenSize = useScreenSize(),
|
|
76
54
|
width = _useScreenSize.width,
|
|
77
55
|
height = _useScreenSize.height,
|
|
@@ -236,9 +214,7 @@ var ShareScreen = function ShareScreen(_ref) {
|
|
|
236
214
|
withoutVideo: isPreview,
|
|
237
215
|
className: styles.background
|
|
238
216
|
}) : null);
|
|
239
|
-
}
|
|
240
|
-
ShareScreen.propTypes = propTypes;
|
|
241
|
-
ShareScreen.defaultProps = defaultProps;
|
|
217
|
+
}
|
|
242
218
|
|
|
243
219
|
// import * as transforms from './transforms/index';
|
|
244
220
|
|
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 .heading{margin-bottom:10px}.layout{overflow-x:hidden;overflow-y:auto;overflow:hidden auto;padding:10px;scrollbar-width:none}.layout::-webkit-scrollbar{display:none}.shareOptions.isCentered{-ms-flex-pack:center;justify-content:center}.shareButton{display:-ms-flexbox;display:flex;width:100%}.emptyHeading,.emptyOptions{border:2px dashed var(--mm-gray-800);color:var(--mm-gray-800);margin:10px auto;padding:10px;width:100%}.emptyOptions{padding:40px}.header{top:0;z-index:1}.footer,.header{left:0;margin-top:0;position:absolute;width:100%}.footer{bottom:0}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-share",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"style": "assets/css/styles.css",
|
|
40
40
|
"exports": {
|
|
41
41
|
".": {
|
|
42
|
+
"types": "./es/index.d.ts",
|
|
42
43
|
"import": "./es/index.js"
|
|
43
44
|
},
|
|
44
45
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
@@ -52,37 +53,37 @@
|
|
|
52
53
|
"scripts": {
|
|
53
54
|
"clean": "rm -rf es && rm -rf lib && rm -rf assets",
|
|
54
55
|
"prepublishOnly": "npm run build",
|
|
55
|
-
"build": "../../scripts/prepare-package.sh"
|
|
56
|
+
"build": "../../scripts/prepare-package.sh --types"
|
|
56
57
|
},
|
|
57
58
|
"devDependencies": {
|
|
58
|
-
"react": "^
|
|
59
|
-
"react-dom": "^
|
|
59
|
+
"react": "^19.2.0",
|
|
60
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
60
61
|
},
|
|
61
62
|
"peerDependencies": {
|
|
62
|
-
"react": "^
|
|
63
|
-
"react-dom": "^
|
|
63
|
+
"react": "^19.2.0",
|
|
64
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
64
65
|
},
|
|
65
66
|
"dependencies": {
|
|
66
67
|
"@babel/runtime": "^7.13.10",
|
|
67
|
-
"@micromag/core": "^0.
|
|
68
|
-
"@micromag/element-background": "^0.
|
|
69
|
-
"@micromag/element-container": "^0.
|
|
70
|
-
"@micromag/element-footer": "^0.
|
|
71
|
-
"@micromag/element-header": "^0.
|
|
72
|
-
"@micromag/element-heading": "^0.
|
|
73
|
-
"@micromag/element-layout": "^0.
|
|
74
|
-
"@micromag/element-share-options": "^0.
|
|
75
|
-
"@micromag/element-text": "^0.
|
|
76
|
-
"@micromag/transforms": "^0.
|
|
68
|
+
"@micromag/core": "^0.4.4",
|
|
69
|
+
"@micromag/element-background": "^0.4.4",
|
|
70
|
+
"@micromag/element-container": "^0.4.4",
|
|
71
|
+
"@micromag/element-footer": "^0.4.4",
|
|
72
|
+
"@micromag/element-header": "^0.4.4",
|
|
73
|
+
"@micromag/element-heading": "^0.4.4",
|
|
74
|
+
"@micromag/element-layout": "^0.4.4",
|
|
75
|
+
"@micromag/element-share-options": "^0.4.4",
|
|
76
|
+
"@micromag/element-text": "^0.4.4",
|
|
77
|
+
"@micromag/transforms": "^0.4.4",
|
|
77
78
|
"classnames": "^2.2.6",
|
|
78
|
-
"lodash": "^4.17.
|
|
79
|
-
"
|
|
80
|
-
"react-intl": "^6.6.4",
|
|
79
|
+
"lodash": "^4.17.23",
|
|
80
|
+
"react-intl": "^8.1.3",
|
|
81
81
|
"uuid": "^9.0.0"
|
|
82
82
|
},
|
|
83
83
|
"publishConfig": {
|
|
84
84
|
"access": "public",
|
|
85
85
|
"registry": "https://registry.npmjs.org/"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "04b8519c3a3ddace5a21497e22faa11865d57f6d",
|
|
88
|
+
"types": "es/index.d.ts"
|
|
88
89
|
}
|