@micromag/viewer 0.4.98 → 0.4.101
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/es/index.d.ts +10 -10
- package/es/index.js +4 -4
- package/package.json +29 -26
package/es/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import React__default, { RefObject } from 'react';
|
|
2
3
|
import { Story, Visitor, TrackingVariables, ViewerTheme, DeviceScreen, RenderContext, ScreenComponent, MediaElement } from '@micromag/core';
|
|
3
|
-
import React, { RefObject } from 'react';
|
|
4
4
|
|
|
5
5
|
interface ViewerContainerProps {
|
|
6
6
|
story?: Story | null;
|
|
@@ -24,7 +24,7 @@ interface ViewerContainerProps {
|
|
|
24
24
|
settings?: Record<string, unknown> | null;
|
|
25
25
|
children?: (...args: unknown[]) => void;
|
|
26
26
|
}
|
|
27
|
-
declare function ViewerContainer({ story, paused, muted, screenComponents, memoryRouter, basePath, routes, withoutRouter, googleApiKey, visitor, locale, locales, translations, pathWithIndex, trackingVariables, trackingDisabled, trackingPaused, settings, ...otherProps }: ViewerContainerProps):
|
|
27
|
+
declare function ViewerContainer({ story, paused, muted, screenComponents, memoryRouter, basePath, routes, withoutRouter, googleApiKey, visitor, locale, locales, translations, pathWithIndex, trackingVariables, trackingDisabled, trackingPaused, settings, ...otherProps }: ViewerContainerProps): React.JSX.Element;
|
|
28
28
|
|
|
29
29
|
interface ViewerProps {
|
|
30
30
|
story?: Story | null;
|
|
@@ -49,15 +49,15 @@ interface ViewerProps {
|
|
|
49
49
|
neighborPreloadScreens?: number | null;
|
|
50
50
|
topSafezoneHeight?: number | null;
|
|
51
51
|
bottomSafezoneHeight?: number | null;
|
|
52
|
-
menuDotsButtons?:
|
|
52
|
+
menuDotsButtons?: React__default.ReactNode | null;
|
|
53
53
|
menuIsScreenWidth?: boolean;
|
|
54
|
-
menuHeader?:
|
|
55
|
-
menuFooter?:
|
|
56
|
-
menuItems?: (string |
|
|
54
|
+
menuHeader?: React__default.ReactNode | null;
|
|
55
|
+
menuFooter?: React__default.ReactNode | null;
|
|
56
|
+
menuItems?: (string | React__default.ReactNode)[];
|
|
57
57
|
shareBasePath?: string | null;
|
|
58
58
|
shareOptions?: string[] | null;
|
|
59
|
-
afterShareMenuButton?:
|
|
60
|
-
beforeScreensMenuButton?:
|
|
59
|
+
afterShareMenuButton?: React__default.ReactNode | null;
|
|
60
|
+
beforeScreensMenuButton?: React__default.ReactNode | null;
|
|
61
61
|
backToFirstScreenTimeout?: number | null;
|
|
62
62
|
closeable?: boolean;
|
|
63
63
|
readyWithoutSize?: boolean;
|
|
@@ -90,6 +90,6 @@ interface ViewerProps {
|
|
|
90
90
|
} | null;
|
|
91
91
|
className?: string | null;
|
|
92
92
|
}
|
|
93
|
-
declare function Viewer({ story, basePath, theme: viewerTheme, width, height, screen: screenId, screenState, deviceScreens, renderContext, tapNextScreenWidthPercent, tapMaximumDuration, longPressPauseDelay, storyIsParsed, neighborScreensActive, neighborScreenOffset, neighborScreenScale, neighborPreloadDelay, neighborPreloadBackward, neighborPreloadScreens, topSafezoneHeight, bottomSafezoneHeight, menuIsScreenWidth, menuHeader, menuFooter, menuItems, shareBasePath, shareOptions, afterShareMenuButton, beforeScreensMenuButton, backToFirstScreenTimeout, menuDotsButtons, closeable, readyWithoutSize, withMetadata, withMicromagBranding, withoutGestures, withoutMenu, withoutScreensMenu, withoutShareMenu, withoutMenuShadow, withoutNavigationArrow, withoutTransitions, withNeighborScreens, withFullscreenWebView, withNavigationHint, withoutPlaybackControls, withoutAutoUnmute, onClose: onCloseViewer, onInteraction, onEnd, onScreenChange, onViewModeChange, onMenuChange, currentScreenMedia, screensMedias, screenSizeOptions, className, }: ViewerProps):
|
|
93
|
+
declare function Viewer({ story, basePath, theme: viewerTheme, width, height, screen: screenId, screenState, deviceScreens, renderContext, tapNextScreenWidthPercent, tapMaximumDuration, longPressPauseDelay, storyIsParsed, neighborScreensActive, neighborScreenOffset, neighborScreenScale, neighborPreloadDelay, neighborPreloadBackward, neighborPreloadScreens, topSafezoneHeight, bottomSafezoneHeight, menuIsScreenWidth, menuHeader, menuFooter, menuItems, shareBasePath, shareOptions, afterShareMenuButton, beforeScreensMenuButton, backToFirstScreenTimeout, menuDotsButtons, closeable, readyWithoutSize, withMetadata, withMicromagBranding, withoutGestures, withoutMenu, withoutScreensMenu, withoutShareMenu, withoutMenuShadow, withoutNavigationArrow, withoutTransitions, withNeighborScreens, withFullscreenWebView, withNavigationHint, withoutPlaybackControls, withoutAutoUnmute, onClose: onCloseViewer, onInteraction, onEnd, onScreenChange, onViewModeChange, onMenuChange, currentScreenMedia, screensMedias, screenSizeOptions, className, }: ViewerProps): React__default.JSX.Element;
|
|
94
94
|
|
|
95
95
|
export { Viewer, ViewerContainer as default };
|
package/es/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c } from 'react/compiler-runtime';
|
|
2
2
|
import { useRoutes, useUrlGenerator, RoutesProvider } from '@folklore/routes';
|
|
3
|
-
import isEmpty from 'lodash/isEmpty';
|
|
4
|
-
import uniq from 'lodash/uniq';
|
|
3
|
+
import isEmpty from 'lodash-es/isEmpty';
|
|
4
|
+
import uniq from 'lodash-es/uniq';
|
|
5
5
|
import { Link, useLocation, Route, Switch, Router } from 'wouter';
|
|
6
6
|
import { memoryLocation } from 'wouter/memory-location';
|
|
7
7
|
import { useViewerSize, usePlaybackContext, useViewerWebView, useViewerInteraction, useStory, ViewerProvider, ScreenSizeProvider, StoryProvider, TrackingProvider, PlaybackProvider, VisitorProvider, ComponentsProvider, SCREENS_NAMESPACE, GoogleMapsClientProvider, GoogleKeysProvider, SettingsProvider } from '@micromag/core/contexts';
|
|
@@ -15,7 +15,7 @@ import { useEffect, useState, useRef, useImperativeHandle } from 'react';
|
|
|
15
15
|
import { useIntl, FormattedMessage } from 'react-intl';
|
|
16
16
|
import EventEmitter from 'wolfy87-eventemitter';
|
|
17
17
|
import { Label, CloseIcon, ScreenPreview, Screen, ArrowIcon, Button as Button$1, PlayIcon, Spinner, PauseIcon, UnmuteIcon, MuteIcon, Meta, FontFaces } from '@micromag/core/components';
|
|
18
|
-
import { getStyleFromColor, easings, getStyleFromText, getColorAsString,
|
|
18
|
+
import { getStyleFromColor, easings, getStyleFromText, getColorAsString, mergeRefs, getDeviceScreens, getMediaIsPlaying, getMediaFilename, getMediaSrc } from '@micromag/core/utils';
|
|
19
19
|
import { ShareIncentive } from '@micromag/elements/all';
|
|
20
20
|
import FocusLock from 'react-focus-lock';
|
|
21
21
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
@@ -23,7 +23,7 @@ import { useSpringRef, useSpring } from '@react-spring/core';
|
|
|
23
23
|
import Scroll from '@micromag/element-scroll';
|
|
24
24
|
import ShareOptions from '@micromag/element-share-options';
|
|
25
25
|
import { useGesture } from '@use-gesture/react';
|
|
26
|
-
import isString from 'lodash/isString';
|
|
26
|
+
import isString from 'lodash-es/isString';
|
|
27
27
|
import queryString from 'query-string';
|
|
28
28
|
import WebView from '@micromag/element-webview';
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/viewer",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.101",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"type": "git",
|
|
12
12
|
"url": "git+https://github.com/urbania-media/micromag-js.git"
|
|
13
13
|
},
|
|
14
|
+
"license": "ISC",
|
|
14
15
|
"author": {
|
|
15
16
|
"name": "Folklore",
|
|
16
17
|
"email": "info@folklore.email"
|
|
@@ -29,10 +30,10 @@
|
|
|
29
30
|
"email": "jc@folklore.email"
|
|
30
31
|
}
|
|
31
32
|
],
|
|
32
|
-
"
|
|
33
|
+
"sideEffects": [
|
|
34
|
+
"**/*.css"
|
|
35
|
+
],
|
|
33
36
|
"type": "module",
|
|
34
|
-
"module": "es/index.js",
|
|
35
|
-
"style": "assets/css/styles.css",
|
|
36
37
|
"exports": {
|
|
37
38
|
".": {
|
|
38
39
|
"types": "./es/index.d.ts",
|
|
@@ -42,42 +43,37 @@
|
|
|
42
43
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
43
44
|
"./assets/css/styles.css": "./assets/css/styles.css"
|
|
44
45
|
},
|
|
46
|
+
"module": "es/index.js",
|
|
47
|
+
"types": "es/index.d.ts",
|
|
48
|
+
"style": "assets/css/styles.css",
|
|
45
49
|
"files": [
|
|
46
50
|
"lib",
|
|
47
51
|
"es",
|
|
48
52
|
"assets"
|
|
49
53
|
],
|
|
50
54
|
"scripts": {
|
|
51
|
-
"
|
|
55
|
+
"build": "../../scripts/prepare-package.sh --types",
|
|
52
56
|
"build-css": "../../scripts/build-css.js ./src/styles/styles.css ./assets/css/build.css",
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
},
|
|
56
|
-
"devDependencies": {
|
|
57
|
-
"react": "^19.0.0",
|
|
58
|
-
"react-dom": "^19.0.0"
|
|
59
|
-
},
|
|
60
|
-
"peerDependencies": {
|
|
61
|
-
"react": "^19.0.0",
|
|
62
|
-
"react-dom": "^19.0.0"
|
|
57
|
+
"clean": "rm -rf es && rm -rf lib && rm -rf assets && rm -rf styles",
|
|
58
|
+
"prepublishOnly": "npm run build"
|
|
63
59
|
},
|
|
64
60
|
"dependencies": {
|
|
65
61
|
"@babel/runtime": "^7.28.6",
|
|
66
62
|
"@folklore/routes": "^0.4.4",
|
|
67
|
-
"@micromag/core": "^0.4.
|
|
68
|
-
"@micromag/element-badge": "^0.4.
|
|
69
|
-
"@micromag/element-scroll": "^0.4.
|
|
70
|
-
"@micromag/element-share-options": "^0.4.
|
|
71
|
-
"@micromag/element-webview": "^0.4.
|
|
72
|
-
"@micromag/elements": "^0.4.
|
|
73
|
-
"@micromag/intl": "^0.4.
|
|
74
|
-
"@micromag/screens": "^0.4.
|
|
63
|
+
"@micromag/core": "^0.4.100",
|
|
64
|
+
"@micromag/element-badge": "^0.4.100",
|
|
65
|
+
"@micromag/element-scroll": "^0.4.100",
|
|
66
|
+
"@micromag/element-share-options": "^0.4.100",
|
|
67
|
+
"@micromag/element-webview": "^0.4.100",
|
|
68
|
+
"@micromag/elements": "^0.4.100",
|
|
69
|
+
"@micromag/intl": "^0.4.100",
|
|
70
|
+
"@micromag/screens": "^0.4.101",
|
|
75
71
|
"@react-spring/core": "^10.0.3",
|
|
76
72
|
"@react-spring/web": "^10.0.3",
|
|
77
73
|
"@use-gesture/react": "^10.3.0",
|
|
78
74
|
"classnames": "^2.2.6",
|
|
79
75
|
"detect-pointer-events": "^1.0.2",
|
|
80
|
-
"lodash": "^4.17.23",
|
|
76
|
+
"lodash-es": "^4.17.23",
|
|
81
77
|
"query-string": "^9.1.1",
|
|
82
78
|
"react-focus-lock": "^2.11.2",
|
|
83
79
|
"react-helmet": "^6.1.0",
|
|
@@ -86,10 +82,17 @@
|
|
|
86
82
|
"wolfy87-eventemitter": "^5.2.9",
|
|
87
83
|
"wouter": "^3.0.0"
|
|
88
84
|
},
|
|
85
|
+
"devDependencies": {
|
|
86
|
+
"react": "^19.0.0",
|
|
87
|
+
"react-dom": "^19.0.0"
|
|
88
|
+
},
|
|
89
|
+
"peerDependencies": {
|
|
90
|
+
"react": "^19.0.0",
|
|
91
|
+
"react-dom": "^19.0.0"
|
|
92
|
+
},
|
|
89
93
|
"publishConfig": {
|
|
90
94
|
"access": "public",
|
|
91
95
|
"registry": "https://registry.npmjs.org/"
|
|
92
96
|
},
|
|
93
|
-
"gitHead": "
|
|
94
|
-
"types": "es/index.d.ts"
|
|
97
|
+
"gitHead": "88aec42cff116b686d2331bf397ba2ada2fa393d"
|
|
95
98
|
}
|