@vnejs/uis.react.screen 0.1.2

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.
@@ -0,0 +1,29 @@
1
+ import "./Screen.styl";
2
+ export declare const Screen: ({ zIndex, transition, className, bgSrc, view, transformOriginX, transformOriginY, scale, clip, mask, filter, isShow, isForce, isHidden, withBlur, withDark, withBackgroundDark, withBackgroundBlur, withPointerEventsNone, isStretchedRatio, isDisableAutoread, isIgnoreOnScreenshot, isAllowAutoread, onClick, children, }: {
3
+ zIndex?: number;
4
+ transition?: number;
5
+ className?: string;
6
+ bgSrc?: string;
7
+ view?: string;
8
+ transformOriginX?: any;
9
+ transformOriginY?: any;
10
+ scale?: any;
11
+ clip?: any;
12
+ mask?: any;
13
+ filter?: any;
14
+ isShow?: boolean;
15
+ isForce?: boolean;
16
+ isHidden?: boolean;
17
+ withBlur?: boolean;
18
+ withDark?: boolean;
19
+ withBackgroundDark?: boolean;
20
+ withBackgroundBlur?: boolean;
21
+ withPointerEventsNone?: boolean;
22
+ isStretchedRatio?: boolean;
23
+ isDisableAutoread?: boolean;
24
+ isIgnoreOnScreenshot?: boolean;
25
+ isAllowAutoread?: boolean;
26
+ onClick: any;
27
+ children: any;
28
+ }) => import("react/jsx-runtime").JSX.Element;
29
+ //# sourceMappingURL=Screen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Screen.d.ts","sourceRoot":"","sources":["../src/Screen.tsx"],"names":[],"mappings":"AAMA,OAAO,eAAe,CAAC;AAIvB,eAAO,MAAM,MAAM,GAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BtB,4CAyCA,CAAC"}
package/dist/Screen.js ADDED
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { cn } from "@bem-react/classname";
4
+ import { View } from "@vnejs/uis.react";
5
+ import "./Screen.styl";
6
+ const b = cn("Screen");
7
+ export const Screen = ({ zIndex = 0, transition = 500, className = "", bgSrc = "", view = "", transformOriginX = null, transformOriginY = null, scale = null, clip = null, mask = null, filter = null, isShow = false, isForce = false, isHidden = false, withBlur = false, withDark = false, withBackgroundDark = false, withBackgroundBlur = false, withPointerEventsNone = false, isStretchedRatio = false, isDisableAutoread = true, isIgnoreOnScreenshot = true, isAllowAutoread = false, onClick, children, }) => {
8
+ const styleBg = useMemo(() => {
9
+ const result = {};
10
+ if (bgSrc)
11
+ result.backgroundImage = `url("${bgSrc}")`;
12
+ if (transition && !isForce)
13
+ result.transition = transition === 0 ? "none" : `${transition}ms`;
14
+ return result;
15
+ }, [transition, bgSrc, isForce]);
16
+ return (_jsxs(View, { className: b({ view, withBlur, withDark, withPointerEventsNone, isStretchedRatio }, [className]), top: 0, right: 0, bottom: 0, left: 0, isDisableAutoread: isDisableAutoread, isIgnoreOnScreenshot: isIgnoreOnScreenshot, isAllowAutoread: isAllowAutoread, transition: transition, zIndex: zIndex, isShow: isShow, isForce: isForce, isHidden: isHidden, view: view, scale: scale, clip: clip, mask: mask, filter: filter, transformOriginX: transformOriginX, transformOriginY: transformOriginY, onClick: onClick, children: [_jsx("div", { className: b("background", { withDark: withBackgroundDark, withBlur: withBackgroundBlur }), style: styleBg }), _jsx("div", { className: b("children"), children: children })] }));
17
+ };
18
+ //# sourceMappingURL=Screen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Screen.js","sourceRoot":"","sources":["../src/Screen.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,OAAO,EAAE,EAAE,EAAE,MAAM,sBAAsB,CAAC;AAE1C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAExC,OAAO,eAAe,CAAC;AAEvB,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC;AAEvB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,MAAM,GAAG,CAAC,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IAAI,EAAE,CAAC,EACP,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,oBAAoB,EAC1C,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,gBAAgB,EAClC,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,EAAE,OAAO,aAEhB,cACE,SAAS,EAAE,CAAC,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,kBAAkB,EAAE,QAAQ,EAAE,kBAAkB,EAAE,CAAC,EAC1F,KAAK,EAAE,OAAO,GACd,EACF,cAAK,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,YAAG,QAAQ,GAAO,IAC1C,CACR,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,45 @@
1
+ .Screen
2
+ --vne-screen-brightness: 0.4
3
+ --vne-screen-blur: 20px
4
+
5
+ &-background,
6
+ &-children
7
+ position: absolute
8
+ top: 0
9
+ bottom: 0
10
+ left: 0
11
+ right: 0
12
+
13
+ &-background
14
+ background-position: center
15
+ background-repeat: no-repeat
16
+ background-size: cover
17
+
18
+ &_withBlur
19
+ filter: blur(var(--vne-screen-blur))
20
+
21
+ &_withDark
22
+ filter: brightness(var(--vne-screen-brightness))
23
+
24
+ &_withBlur&_withDark
25
+ filter: blur(var(--vne-screen-blur)) brightness(var(--vne-screen-brightness))
26
+
27
+ &_withBlur
28
+ backdrop-filter: blur(var(--vne-screen-blur))
29
+
30
+ &_withDark
31
+ backdrop-filter: brightness(var(--vne-screen-brightness))
32
+
33
+ &_withBlur&_withDark
34
+ backdrop-filter: blur(var(--vne-screen-blur)) brightness(var(--vne-screen-brightness))
35
+
36
+ &_withPointerEventsNone
37
+ pointer-events: none
38
+
39
+ &_isStretchedRatio
40
+ aspect-ratio: 16 / 9
41
+ min-width: 100vw
42
+ min-height: 100vh
43
+ top: 50% !important
44
+ left: 50% !important
45
+ transform: translateX(-50%) translateY(-50%)
@@ -0,0 +1,2 @@
1
+ export * from "./Screen";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from "./Screen";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@vnejs/uis.react.screen",
3
+ "version": "0.1.2",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "scripts": {
7
+ "build": "node ../../scripts/build-package.mjs",
8
+ "publish:major:plugin": "npm run publish:major",
9
+ "publish:minor:plugin": "npm run publish:minor",
10
+ "publish:patch:plugin": "npm run publish:patch",
11
+ "publish:major": "npm run build && npm version major && npm publish --access public",
12
+ "publish:minor": "npm run build && npm version minor && npm publish --access public",
13
+ "publish:patch": "npm run build && npm version patch && npm publish --access public"
14
+ },
15
+ "peerDependencies": {
16
+ "@bem-react/classname": "1.5.12",
17
+ "@vnejs/uis.utils": "~0.1.0",
18
+ "react": "19.2.4",
19
+ "react-dom": "19.2.4",
20
+ "@vnejs/uis.react": "~0.1.0"
21
+ },
22
+ "devDependencies": {
23
+ "@vnejs/uis.react": "~0.1.0",
24
+ "typescript": "^5.7.3",
25
+ "@types/react": "^19.0.10",
26
+ "@types/react-dom": "^19.0.4"
27
+ },
28
+ "files": [
29
+ "dist",
30
+ "package.json"
31
+ ]
32
+ }