oops-ui 0.0.13 → 1.0.1
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/LICENSE +13 -1
- package/README.md +143 -0
- package/client.mjs +10 -0
- package/client.mjs.map +1 -0
- package/index.mjs +3 -0
- package/layoutUtil.mjs +10 -0
- package/layoutUtil.mjs.map +1 -0
- package/package.json +59 -108
- package/server.mjs +8 -0
- package/server.mjs.map +1 -0
- package/styles/common.css +1 -0
- package/styles/common.scss +143 -0
- package/styles/flex.scss +38 -0
- package/styles/header.scss +54 -0
- package/styles/image.scss +10 -0
- package/styles/input.scss +131 -0
- package/styles/loading-keyframes.scss +242 -0
- package/styles/reset.css +1 -0
- package/styles/reset.scss +90 -0
- package/styles/respond.scss +54 -0
- package/styles/root-normal-dark.scss +85 -0
- package/styles/root-normal-light.scss +83 -0
- package/styles/root-weird-dark.scss +1 -0
- package/styles/root.scss +326 -0
- package/styles/text.scss +111 -0
- package/styles/vars-color.scss +295 -0
- package/styles/vars-size.scss +6 -0
- package/type/components/ThemeContext/index.d.ts +25 -0
- package/type/components/ThemeContext/types.d.ts +28 -0
- package/type/components/button/button.d.ts +10 -0
- package/type/components/button/index.d.ts +9 -0
- package/type/components/image/index.d.ts +11 -0
- package/type/components/image/types.d.ts +13 -0
- package/type/components/image/useSrcChange.d.ts +11 -0
- package/type/components/layout/content.d.ts +17 -0
- package/type/components/layout/footer.d.ts +21 -0
- package/type/components/layout/get-value.d.ts +10 -0
- package/type/components/layout/header.d.ts +23 -0
- package/type/components/layout/index.d.ts +8 -0
- package/type/components/layout/is-fragment.d.ts +9 -0
- package/type/components/layout/layout.d.ts +55 -0
- package/type/components/layout/sidebar.d.ts +29 -0
- package/type/components/layout/types.d.ts +101 -0
- package/type/components/marquee/MarqueeEle.d.ts +15 -0
- package/type/components/marquee/index.d.ts +7 -0
- package/type/components/marquee/type.d.ts +9 -0
- package/type/components/menu/index.d.ts +6 -0
- package/type/components/menu/menu.d.ts +6 -0
- package/type/components/ripples/Content.d.ts +8 -0
- package/type/components/ripples/LazyRippleEle.d.ts +42 -0
- package/type/components/ripples/RipplesEle.d.ts +42 -0
- package/type/components/ripples/index.d.ts +11 -0
- package/type/components/ripples/types.d.ts +17 -0
- package/type/components/ripples/useOptionUpdate.d.ts +12 -0
- package/type/components/shared/EnLayoutContent/index.d.ts +19 -0
- package/type/components/shared/EnLayoutContent/types.d.ts +17 -0
- package/type/components/switch/SwitchContainer.d.ts +7 -0
- package/type/components/switch/SwitchContent.d.ts +10 -0
- package/type/components/switch/SwitchLabel.d.ts +9 -0
- package/type/components/switch/index.d.ts +14 -0
- package/type/customHooks/use-xcn/index.d.ts +14 -0
- package/type/customHooks/useAnimationFrame.d.ts +58 -0
- package/type/customHooks/useInputIsComposing.d.ts +44 -0
- package/type/customHooks/useRipples/buildBackground/create-background-color.d.ts +9 -0
- package/type/customHooks/useRipples/buildBackground/create-linear-gradient.d.ts +9 -0
- package/type/customHooks/useRipples/buildBackground/default-background/_createImageData.d.ts +13 -0
- package/type/customHooks/useRipples/buildBackground/default-background/circleDataList.d.ts +24 -0
- package/type/customHooks/useRipples/buildBackground/default-background/createCanvasElementBySize.d.ts +8 -0
- package/type/customHooks/useRipples/buildBackground/default-background/createDefault.d.ts +8 -0
- package/type/customHooks/useRipples/buildBackground/default-background/index.d.ts +18 -0
- package/type/customHooks/useRipples/buildBackground/load-image.d.ts +19 -0
- package/type/customHooks/useRipples/buildBackground/run-side.d.ts +15 -0
- package/type/customHooks/useRipples/buildBackground/type.d.ts +37 -0
- package/type/customHooks/useRipples/buildBackground/utils/bind-image.d.ts +10 -0
- package/type/customHooks/useRipples/buildBackground/utils/create-canvas-element.d.ts +9 -0
- package/type/customHooks/useRipples/buildBackground/utils/create-image-by-src.d.ts +8 -0
- package/type/customHooks/useRipples/buildBackground/utils/get-background-style.d.ts +9 -0
- package/type/customHooks/useRipples/buildBackground/utils/hide-css-background.d.ts +16 -0
- package/type/customHooks/useRipples/buildBackground/utils/restore-css-background.d.ts +13 -0
- package/type/customHooks/useRipples/callback/can-side.d.ts +14 -0
- package/type/customHooks/useRipples/callback/destroy.d.ts +9 -0
- package/type/customHooks/useRipples/callback/drop.d.ts +9 -0
- package/type/customHooks/useRipples/callback/extract-url.d.ts +8 -0
- package/type/customHooks/useRipples/callback/fade.d.ts +9 -0
- package/type/customHooks/useRipples/callback/get-new-image.d.ts +14 -0
- package/type/customHooks/useRipples/callback/reload-background.d.ts +12 -0
- package/type/customHooks/useRipples/callback/scale.d.ts +8 -0
- package/type/customHooks/useRipples/index.d.ts +45 -0
- package/type/customHooks/useRipples/init/index.d.ts +11 -0
- package/type/customHooks/useRipples/init/initEvent.d.ts +11 -0
- package/type/customHooks/useRipples/init/initShaders.d.ts +13 -0
- package/type/customHooks/useRipples/init/initTexture.d.ts +13 -0
- package/type/customHooks/useRipples/render/computeTextureBoundaries.d.ts +9 -0
- package/type/customHooks/useRipples/render/draw.d.ts +13 -0
- package/type/customHooks/useRipples/render/drawQuad.d.ts +13 -0
- package/{dist/types → type}/customHooks/useRipples/render/dropAtPointer.d.ts +8 -2
- package/type/customHooks/useRipples/render/index.d.ts +12 -0
- package/type/customHooks/useRipples/render/swapBufferIndices.d.ts +11 -0
- package/type/customHooks/useRipples/render/update.d.ts +11 -0
- package/type/customHooks/useRipples/rippersData/defaultData.d.ts +11 -0
- package/type/customHooks/useRipples/rippersData/fadeData.d.ts +51 -0
- package/{dist/types → type}/customHooks/useRipples/rippersData/index.d.ts +24 -18
- package/{dist/types → type}/customHooks/useRipples/rippersData/loadConfig.d.ts +12 -2
- package/type/customHooks/useRipples/rippersData/renderData.d.ts +80 -0
- package/type/customHooks/useRipples/rippersData/useOptions.d.ts +91 -0
- package/{dist/types → type}/customHooks/useRipples/rippersData/vertexSource.d.ts +17 -11
- package/type/customHooks/useRipples/ripple.html.d.ts +12 -0
- package/type/customHooks/useRipples/ripplesClass.d.ts +57 -0
- package/{dist/types → type}/customHooks/useRipples/tools.d.ts +18 -8
- package/type/customHooks/useRipples/types.d.ts +209 -0
- package/type/customHooks/useRipples/use-lazy-ripple.d.ts +15 -0
- package/{dist/types → type}/customHooks/useTimeId.d.ts +10 -6
- package/type/dog.d.ts +8 -0
- package/type/index.client.d.ts +20 -0
- package/type/index.d.ts +8 -0
- package/type/index.server.d.ts +8 -0
- package/type/storage/main-logic .d.ts +26 -0
- package/type/storage/storage-store.d.ts +14 -0
- package/type/utilities/cookie.d.ts +21 -0
- package/type/utilities/sys.d.ts +41 -0
- package/ReadMe.md +0 -17
- package/dist/BackgroundRipple/index.cjs +0 -1
- package/dist/BackgroundRipple/index.mjs +0 -1
- package/dist/index.cjs +0 -1
- package/dist/index.js +0 -1
- package/dist/index.mjs +0 -1
- package/dist/styles/common.css +0 -353
- package/dist/styles/common.scss +0 -504
- package/dist/types/components/button/button.d.ts +0 -2
- package/dist/types/components/button/index.d.ts +0 -3
- package/dist/types/components/button/style/index.d.ts +0 -1
- package/dist/types/components/index.d.ts +0 -1
- package/dist/types/components/layout/header.d.ts +0 -4
- package/dist/types/components/layout/index.d.ts +0 -0
- package/dist/types/components/layout/interface.d.ts +0 -8
- package/dist/types/components/layout/layout.d.ts +0 -14
- package/dist/types/components/menu/index.d.ts +0 -0
- package/dist/types/components/menu/menu.d.ts +0 -0
- package/dist/types/components/menu/style/index.d.ts +0 -0
- package/dist/types/components/ripples/RipplesEle.d.ts +0 -33
- package/dist/types/components/ripples/index.d.ts +0 -2
- package/dist/types/components/ripples/style/index.d.ts +0 -0
- package/dist/types/customHooks/index.d.ts +0 -5
- package/dist/types/customHooks/useAnimationFrame.d.ts +0 -41
- package/dist/types/customHooks/useInputIsComposing.d.ts +0 -45
- package/dist/types/customHooks/useRipples/defaultData.d.ts +0 -5
- package/dist/types/customHooks/useRipples/index.d.ts +0 -46
- package/dist/types/customHooks/useRipples/init/hideCssBackground.d.ts +0 -9
- package/dist/types/customHooks/useRipples/init/initEvent.d.ts +0 -5
- package/dist/types/customHooks/useRipples/init/initGL.d.ts +0 -5
- package/dist/types/customHooks/useRipples/init/initShaders.d.ts +0 -7
- package/dist/types/customHooks/useRipples/init/initTexture.d.ts +0 -7
- package/dist/types/customHooks/useRipples/init/loadImage.d.ts +0 -13
- package/dist/types/customHooks/useRipples/render/computeTextureBoundaries.d.ts +0 -7
- package/dist/types/customHooks/useRipples/render/drawQuad.d.ts +0 -7
- package/dist/types/customHooks/useRipples/render/render.d.ts +0 -7
- package/dist/types/customHooks/useRipples/render/step.d.ts +0 -6
- package/dist/types/customHooks/useRipples/render/swapBufferIndices.d.ts +0 -2
- package/dist/types/customHooks/useRipples/render/update.d.ts +0 -2
- package/dist/types/customHooks/useRipples/rippersData/createImageData.d.ts +0 -4
- package/dist/types/customHooks/useRipples/rippersData/renderData.d.ts +0 -85
- package/dist/types/customHooks/useRipples/ripple.html.d.ts +0 -3
- package/dist/types/customHooks/useRipples/ripplesClass.d.ts +0 -120
- package/dist/types/index.d.ts +0 -3
- package/dist/useAnimationFrame/index.cjs +0 -1
- package/dist/useAnimationFrame/index.mjs +0 -1
- package/dist/useInputIsComposing/index.cjs +0 -1
- package/dist/useInputIsComposing/index.mjs +0 -1
- package/dist/useRipples/index.cjs +0 -1
- package/dist/useRipples/index.mjs +0 -1
- package/dist/useTimeId/index.cjs +0 -1
- package/dist/useTimeId/index.mjs +0 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/customHooks/useRipples/rippersData/useOptions.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { ImageCrossOrigin, RippleImgUrl, RipplesUseOptions } from '../types';
|
|
8
|
+
/** 用户使用参数 */
|
|
9
|
+
export declare class UseOptions {
|
|
10
|
+
#private;
|
|
11
|
+
/** 倍级触发光标事件 */
|
|
12
|
+
set accelerating(value: number);
|
|
13
|
+
/**
|
|
14
|
+
* 倍级触发光标事件
|
|
15
|
+
*/
|
|
16
|
+
get accelerating(): number;
|
|
17
|
+
/** 是否与鼠标互动 */
|
|
18
|
+
set interactive(value: boolean);
|
|
19
|
+
/**
|
|
20
|
+
* 是否与鼠标互动
|
|
21
|
+
*/
|
|
22
|
+
get interactive(): boolean;
|
|
23
|
+
/** 分辨率
|
|
24
|
+
*
|
|
25
|
+
* 纹理的尺寸,该项目中该值为纹理的宽和高
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
set resolution(value: number);
|
|
29
|
+
/**
|
|
30
|
+
* 纹理的尺寸,该项目中该值为纹理的宽和高
|
|
31
|
+
*/
|
|
32
|
+
get resolution(): number;
|
|
33
|
+
/**
|
|
34
|
+
* 扰动系数
|
|
35
|
+
*
|
|
36
|
+
* 缺省 `0.01`
|
|
37
|
+
*
|
|
38
|
+
* 取之范围 `0.01 - 1`
|
|
39
|
+
*/
|
|
40
|
+
set perturbance(value: number);
|
|
41
|
+
/**
|
|
42
|
+
* 扰动系数
|
|
43
|
+
*/
|
|
44
|
+
get perturbance(): number;
|
|
45
|
+
/**
|
|
46
|
+
* 扩散半径
|
|
47
|
+
*
|
|
48
|
+
* 缺省为 `20`
|
|
49
|
+
*/
|
|
50
|
+
set dropRadius(value: number);
|
|
51
|
+
/**
|
|
52
|
+
* 扩散半径
|
|
53
|
+
*/
|
|
54
|
+
get dropRadius(): number;
|
|
55
|
+
/** 传入的背景图片 */
|
|
56
|
+
imgUrl: RippleImgUrl;
|
|
57
|
+
/** 闲置波动 */
|
|
58
|
+
set idleFluctuations(value: boolean);
|
|
59
|
+
/**
|
|
60
|
+
* 闲置波动
|
|
61
|
+
*/
|
|
62
|
+
get idleFluctuations(): boolean;
|
|
63
|
+
/** 雨滴落下的时间间隔 */
|
|
64
|
+
set raindropsTimeInterval(value: number);
|
|
65
|
+
/**
|
|
66
|
+
* 雨滴落下的时间间隔
|
|
67
|
+
*/
|
|
68
|
+
get raindropsTimeInterval(): number;
|
|
69
|
+
/** crossOrigin (是否跨域) */
|
|
70
|
+
crossOrigin: ImageCrossOrigin;
|
|
71
|
+
/** canvas 的显隐 */
|
|
72
|
+
visible: boolean;
|
|
73
|
+
/** 当前执行的状态 */
|
|
74
|
+
running: boolean;
|
|
75
|
+
/** 当前执行的状态 */
|
|
76
|
+
set playingState(value: boolean);
|
|
77
|
+
/**
|
|
78
|
+
* 当前执行的状态
|
|
79
|
+
*/
|
|
80
|
+
get playingState(): boolean;
|
|
81
|
+
/** 当前时候为暗黑模式 */
|
|
82
|
+
get darkMode(): boolean | undefined;
|
|
83
|
+
/** 当前时候为暗黑模式 */
|
|
84
|
+
set darkMode(value: boolean | undefined);
|
|
85
|
+
/** 上一次执行渲染状态 */
|
|
86
|
+
lastRunningState: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* 构建使用参数的数据
|
|
89
|
+
*/
|
|
90
|
+
constructor(options: RipplesUseOptions);
|
|
91
|
+
}
|
|
@@ -1,28 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/customHooks/useRipples/rippersData/vertexSource.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
4
10
|
export declare const vertexShader = "\n attribute vec2 vertex;\n varying vec2 coord;\n void main() {\n coord = vertex * 0.5 + 0.5;\n gl_Position = vec4(vertex, 0.0, 1.0);\n }";
|
|
5
|
-
|
|
11
|
+
/**
|
|
6
12
|
*
|
|
7
13
|
*
|
|
8
14
|
*
|
|
9
|
-
|
|
15
|
+
*/
|
|
10
16
|
export declare const updateProgramFragmentSource = "\n precision highp float;\n\n uniform sampler2D texture;\n uniform vec2 delta;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n \n vec2 dx = vec2(delta.x, 0.0);\n vec2 dy = vec2(0.0, delta.y);\n \n float average = (\n texture2D(texture, coord - dx).r +\n texture2D(texture, coord - dy).r +\n texture2D(texture, coord + dx).r +\n texture2D(texture, coord + dy).r\n ) * 0.25;\n \n info.g += (average - info.r) * 2.0;\n info.g *= 0.995;\n info.r += info.g;\n \n gl_FragColor = info;\n }\n ";
|
|
11
|
-
|
|
17
|
+
/**
|
|
12
18
|
*
|
|
13
19
|
*
|
|
14
20
|
*
|
|
15
|
-
|
|
21
|
+
*/
|
|
16
22
|
export declare const renderVertexSource = "\n precision highp float;\n\n attribute vec2 vertex;\n uniform vec2 topLeft;\n uniform vec2 bottomRight;\n uniform vec2 containerRatio;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n void main() {\n backgroundCoord = mix(topLeft, bottomRight, vertex * 0.5 + 0.5);\n backgroundCoord.y = 1.0 - backgroundCoord.y;\n ripplesCoord = vec2(vertex.x, -vertex.y) * containerRatio * 0.5 + 0.5;\n gl_Position = vec4(vertex.x, -vertex.y, 0.0, 1.0);\n }\n ";
|
|
17
|
-
|
|
23
|
+
/**
|
|
18
24
|
*
|
|
19
25
|
*
|
|
20
26
|
*
|
|
21
|
-
|
|
27
|
+
*/
|
|
22
28
|
export declare const renderProgramFragmentSource = "\n precision highp float;\n\n uniform sampler2D samplerBackground;\n uniform sampler2D samplerRipples;\n uniform vec2 delta;\n\n uniform float perturbance;\n varying vec2 ripplesCoord;\n varying vec2 backgroundCoord;\n\n void main() {\n float height = texture2D(samplerRipples, ripplesCoord).r;\n float heightX = texture2D(samplerRipples, vec2(ripplesCoord.x + delta.x, ripplesCoord.y)).r;\n float heightY = texture2D(samplerRipples, vec2(ripplesCoord.x, ripplesCoord.y + delta.y)).r;\n vec3 dx = vec3(delta.x, heightX - height, 0.0);\n vec3 dy = vec3(0.0, heightY - height, delta.y);\n vec2 offset = -normalize(cross(dy, dx)).xz;\n float specular = pow(max(0.0, dot(offset, normalize(vec2(-0.6, 1.0)))), 4.0);\n gl_FragColor = texture2D(samplerBackground, backgroundCoord + offset * perturbance) + specular;\n }";
|
|
23
|
-
|
|
29
|
+
/**
|
|
24
30
|
*
|
|
25
31
|
* fragmentSource
|
|
26
32
|
*
|
|
27
|
-
|
|
33
|
+
*/
|
|
28
34
|
export declare const dropProgramFragmentSource = "precision highp float;\n\n const float PI = 3.141592653589793;\n uniform sampler2D texture;\n uniform vec2 center;\n uniform float radius;\n uniform float strength;\n\n varying vec2 coord;\n\n void main() {\n vec4 info = texture2D(texture, coord);\n\n float drop = max(0.0, 1.0 - length(center * 0.5 + 0.5 - coord) / radius);\n drop = 0.5 - cos(drop * PI) * 0.5;\n info.r += drop * strength;\n gl_FragColor = info;\n }";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/customHooks/useRipples/ripple.html.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { Ripples } from './ripplesClass';
|
|
8
|
+
import { RipplesOptions } from './types';
|
|
9
|
+
/**
|
|
10
|
+
* ripple 的 html 导出,不依赖于 react
|
|
11
|
+
*/
|
|
12
|
+
export declare function useRipples(element: HTMLElement, options: RipplesOptions): Ripples;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/customHooks/useRipples/ripplesClass.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { RipplesData } from './rippersData';
|
|
8
|
+
import { RipplesOptions } from './types';
|
|
9
|
+
import { RipplesRenderData } from './rippersData/renderData';
|
|
10
|
+
import { UseOptions } from './rippersData/useOptions';
|
|
11
|
+
import { FadeData } from './rippersData/fadeData';
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* ## 水波动涟漪的效果
|
|
15
|
+
*
|
|
16
|
+
* 魔改自大佬的[jQuey 代码](https://github.com/sirxemic/jquery.ripples)
|
|
17
|
+
*/
|
|
18
|
+
export declare class Ripples extends RipplesData {
|
|
19
|
+
#private;
|
|
20
|
+
/** 渲染数据 */
|
|
21
|
+
renderData: RipplesRenderData | null;
|
|
22
|
+
/** 使用参数 */
|
|
23
|
+
options: UseOptions;
|
|
24
|
+
/** 背景使用的数据 */
|
|
25
|
+
fadeData: FadeData;
|
|
26
|
+
defaults: import("./types").RipplesDefaultData;
|
|
27
|
+
/** 初始化状态 */
|
|
28
|
+
initialized: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 构建 Ripple 对象
|
|
31
|
+
*/
|
|
32
|
+
constructor(canvas: HTMLCanvasElement, options?: RipplesOptions);
|
|
33
|
+
/** 模拟雨滴下落 */
|
|
34
|
+
raindropsFall(): void;
|
|
35
|
+
/** 公共方法,触发 */
|
|
36
|
+
drop(x: number, y: number, radius: number, strength: number): void;
|
|
37
|
+
/**
|
|
38
|
+
* 缓进缓出
|
|
39
|
+
*/
|
|
40
|
+
fade(): void;
|
|
41
|
+
/** 元素的尺寸发生变化 */
|
|
42
|
+
reloadBackground(): void;
|
|
43
|
+
/** 销毁 */
|
|
44
|
+
destroy(): void;
|
|
45
|
+
/** 展示元素 */
|
|
46
|
+
show(): void;
|
|
47
|
+
/** 隐藏元素 */
|
|
48
|
+
hide(): void;
|
|
49
|
+
/** 暂停动画涟漪状态 */
|
|
50
|
+
pause(): void;
|
|
51
|
+
/** 播放动画涟漪状态 */
|
|
52
|
+
play(): void;
|
|
53
|
+
/** 切换当前状态 */
|
|
54
|
+
changePlayingState(): void;
|
|
55
|
+
/** 给初始化变量赋值 */
|
|
56
|
+
set(property: keyof RipplesOptions, value: unknown): void;
|
|
57
|
+
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/customHooks/useRipples/tools.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
1
7
|
/****************************************************************************
|
|
2
|
-
* @Author
|
|
3
|
-
* @Email
|
|
8
|
+
* @Author earthnut
|
|
9
|
+
* @Email earthnut.dev@outlook.com
|
|
4
10
|
* @ProjectName website
|
|
5
11
|
* @FileName tools.ts
|
|
6
12
|
* @CreateDate 周六 12/07/2024
|
|
@@ -8,20 +14,24 @@
|
|
|
8
14
|
****************************************************************************/
|
|
9
15
|
import { Ripples } from './ripplesClass';
|
|
10
16
|
import { Program } from './types';
|
|
11
|
-
|
|
17
|
+
/**
|
|
12
18
|
*
|
|
13
19
|
* 增加 WebGLProgram
|
|
14
20
|
*
|
|
15
21
|
*
|
|
16
|
-
|
|
22
|
+
*/
|
|
17
23
|
export declare function createProgram(vertexSource: string, fragmentSource: string, gl: WebGLRenderingContext, _uniformValues?: string): Program;
|
|
18
|
-
|
|
24
|
+
/**
|
|
19
25
|
*
|
|
20
26
|
* 绑定纹理
|
|
21
27
|
*
|
|
22
|
-
|
|
28
|
+
*/
|
|
23
29
|
export declare function bindTexture(this: Ripples, texture: WebGLTexture, unit?: number): void;
|
|
24
|
-
|
|
30
|
+
/**
|
|
25
31
|
* 给 canvas 设置样式
|
|
26
|
-
|
|
32
|
+
*/
|
|
27
33
|
export declare function setCanvasStyle(canvas: HTMLCanvasElement): void;
|
|
34
|
+
/** 背景色值为空 */
|
|
35
|
+
export declare function isNoneBackGroundColor(color: string): boolean;
|
|
36
|
+
/** 背景图为空 */
|
|
37
|
+
export declare function isNoneBackgroundImage(src: string): boolean;
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/customHooks/useRipples/types.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
/****************************************************************************
|
|
8
|
+
* @Author earthnut
|
|
9
|
+
* @Email earthnut.dev@outlook.com
|
|
10
|
+
* @ProjectName react-ripples
|
|
11
|
+
* @FileName interface.ts
|
|
12
|
+
* @CreateDate 周二 12/17/2024
|
|
13
|
+
* @Description BackgroundRipples 的类型声明文件
|
|
14
|
+
****************************************************************************/
|
|
15
|
+
import { HTMLAttributes } from 'react';
|
|
16
|
+
export type ImageCrossOrigin = 'anonymous' | 'use-credentials' | 'no-cors';
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* 背景涟漪的 props 类型
|
|
20
|
+
*
|
|
21
|
+
* - children 可选属性,定义子组件或子组件们
|
|
22
|
+
* - style 可选属性,定义自定义外壳的样式,在内含 `children` 时生效
|
|
23
|
+
* - option 可选属性,自定义涟漪的初始化属性
|
|
24
|
+
* - resolution 分辨率,纹理的尺寸,该项目中该值为纹理的宽和高,缺省为 `256`
|
|
25
|
+
* - dropRadius 扩撒半径,缺省值为 `20`
|
|
26
|
+
* - perturbance 扰动系数,缺省为 `0.03`
|
|
27
|
+
* - interactive 光标交互,缺省为 `true` ,关闭须显示传入 `false` 值
|
|
28
|
+
* - accelerating 加速光标移动触发,缺省为 `1`
|
|
29
|
+
* - crossOrigin 原始样式
|
|
30
|
+
* - imgUrl 原始背景图片地址
|
|
31
|
+
* - playingState 当前的播放状态,缺省为 `true` ,设定为 `false` 时并不关闭,而是暂停
|
|
32
|
+
* - raindropsTimeInterval 雨滴滴落的间隔,缺省为 `3600`,可设置区间为 `10 ~ 12000`
|
|
33
|
+
* 该值还将影响无背景设置时默认背景的切换频率,几乎每两个雨滴落下就会切换一次背景
|
|
34
|
+
* - idleFluctuations 闲置波动,在光标交互不触发时,将触发模拟雨滴,缺省为 `true`
|
|
35
|
+
* - darkMode 暗黑模式,仅用于在默认的背景图时更改默认背景图的背景色,如果使用了 `imgUrl` 配置,请执行处理色差异常
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export type BackgroundRipplesProps = HTMLAttributes<HTMLDivElement> & {
|
|
39
|
+
/**
|
|
40
|
+
* ## 可设定涟漪的参数
|
|
41
|
+
*
|
|
42
|
+
* - resolution 波速,值越小,波动越快。缺省为 `360`
|
|
43
|
+
* - dropRadius 波动强度,值越小,波动效果越大,缺省值为 `12`
|
|
44
|
+
* - perturbance 扰动系数,值越大,对原背景造成干涉越强,缺省为 `0.01`
|
|
45
|
+
* - interactive 光标交互,缺省为 `true` ,关闭须显示传入 `false` 值
|
|
46
|
+
* - accelerating 加速光标移动触发,类似于扰动系数,及作用与鼠标或手指触发,缺省为 `1`
|
|
47
|
+
* - crossOrigin 原始样式
|
|
48
|
+
* - imgUrl 原始背景图片地址
|
|
49
|
+
* - playingState 当前的播放状态,缺省为 `true` ,设定为 `false` 时并不关闭,而是暂停
|
|
50
|
+
* - raindropsTimeInterval 雨滴滴落的间隔,缺省为 `3650`,可设置区间为 `10 ~ 12000`,值越小,雨越大
|
|
51
|
+
* 该值还将影响无背景设置时默认背景的切换频率,几乎每两个雨滴落下就会切换一次背景
|
|
52
|
+
* - idleFluctuations 闲置波动,在光标交互不触发时,将触发模拟雨滴,缺省为 `true`
|
|
53
|
+
* - darkMode 暗黑模式,仅用于在默认的背景图时更改默认背景图的背景色,如果使用了 `imgUrl` 配置,请执行处理色差异常
|
|
54
|
+
*/
|
|
55
|
+
option?: RipplesOptions;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
* WebGLProgram
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
export interface Program {
|
|
63
|
+
id: WebGLProgram;
|
|
64
|
+
uniforms: {
|
|
65
|
+
[x: string]: Float32Array;
|
|
66
|
+
};
|
|
67
|
+
locations: {
|
|
68
|
+
[x: string]: WebGLUniformLocation;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 设定的元素背景的 url 地址
|
|
73
|
+
*
|
|
74
|
+
* 缺省为 `null`
|
|
75
|
+
*/
|
|
76
|
+
export type RippleImgUrl = string | string[] | null;
|
|
77
|
+
export type RipplesUseOptions = {
|
|
78
|
+
/**
|
|
79
|
+
* 波速
|
|
80
|
+
*
|
|
81
|
+
* 作用为波传播的速度,值越大,波传播的越慢
|
|
82
|
+
*
|
|
83
|
+
* 缺省为 `360`
|
|
84
|
+
*/
|
|
85
|
+
resolution: number;
|
|
86
|
+
/**
|
|
87
|
+
* 波动强度
|
|
88
|
+
*
|
|
89
|
+
* 值越小,波动越明显
|
|
90
|
+
*
|
|
91
|
+
* 缺省为 `12`
|
|
92
|
+
*/
|
|
93
|
+
dropRadius: number;
|
|
94
|
+
/**
|
|
95
|
+
* 扰动系数
|
|
96
|
+
*
|
|
97
|
+
* 缺省 `0.01`
|
|
98
|
+
*
|
|
99
|
+
* 取之范围 `0.01 - 1`
|
|
100
|
+
*
|
|
101
|
+
* 值越大,扰动效果越明显
|
|
102
|
+
*/
|
|
103
|
+
perturbance: number;
|
|
104
|
+
/**
|
|
105
|
+
* 是否开启光标滑动轨迹
|
|
106
|
+
*
|
|
107
|
+
* 缺省为 `true`
|
|
108
|
+
*/
|
|
109
|
+
interactive: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* 加速光标移动触发,缺省为 `1`
|
|
112
|
+
*
|
|
113
|
+
*
|
|
114
|
+
* 由于大佬原方法在光标触发 mousemove 时不怎么明显
|
|
115
|
+
*
|
|
116
|
+
* 所以以倍级触发会让波动更加明显
|
|
117
|
+
*
|
|
118
|
+
* 可设置区间为 `2 - 100`
|
|
119
|
+
*/
|
|
120
|
+
accelerating: number;
|
|
121
|
+
/**
|
|
122
|
+
* 原设定的背景图片
|
|
123
|
+
*
|
|
124
|
+
* 缺省为 `''`
|
|
125
|
+
*/
|
|
126
|
+
crossOrigin: ImageCrossOrigin;
|
|
127
|
+
/**
|
|
128
|
+
* 设定的元素背景的 url 地址
|
|
129
|
+
*
|
|
130
|
+
* 缺省为 `null`
|
|
131
|
+
*/
|
|
132
|
+
imgUrl: RippleImgUrl;
|
|
133
|
+
/**
|
|
134
|
+
* 当前涟漪的状态
|
|
135
|
+
*
|
|
136
|
+
* 缺省为 `true` , 即涟漪触发正在执行
|
|
137
|
+
*/
|
|
138
|
+
playingState: boolean;
|
|
139
|
+
/**
|
|
140
|
+
* 雨滴滴落的时间间隔
|
|
141
|
+
*
|
|
142
|
+
* 单位为 ms
|
|
143
|
+
*
|
|
144
|
+
* 缺省值为 `3600`
|
|
145
|
+
*
|
|
146
|
+
*
|
|
147
|
+
* 可设置区间为 `10 ~ 12000`
|
|
148
|
+
*
|
|
149
|
+
* 该值还将影响无背景设置时默认背景的切换频率,几乎每两个雨滴落下就会切换一次背景
|
|
150
|
+
*/
|
|
151
|
+
raindropsTimeInterval: number;
|
|
152
|
+
/**
|
|
153
|
+
* 闲置波动
|
|
154
|
+
*
|
|
155
|
+
* 在光标交互不触发时,将触发模拟雨滴
|
|
156
|
+
*
|
|
157
|
+
* 缺省为 `true`
|
|
158
|
+
*/
|
|
159
|
+
idleFluctuations: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* 是否为暗黑模式
|
|
162
|
+
*
|
|
163
|
+
* 在使用默认的主题设置时,当页面使用暗黑模式时出现了文本看不清的现象
|
|
164
|
+
*
|
|
165
|
+
*/
|
|
166
|
+
darkMode: boolean | undefined;
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
*
|
|
170
|
+
* 涟漪设定参数
|
|
171
|
+
*
|
|
172
|
+
* - resolution 分波速,值越小,波动越快。缺省为 `360`
|
|
173
|
+
* - dropRadius 波动强度,值越小,波动效果越大,缺省值为 `12`
|
|
174
|
+
* - perturbance 扰动系数,值越大,对原背景造成干涉越强,缺省为 `0.01`
|
|
175
|
+
* - interactive 光标交互,缺省为 `true` ,关闭须显示传入 `false` 值
|
|
176
|
+
* - accelerating 加速光标移动触发,类似于扰动系数,及作用与鼠标或手指触发,缺省为 `1`
|
|
177
|
+
* - crossOrigin 原始样式
|
|
178
|
+
* - imgUrl 原始背景图片地址
|
|
179
|
+
* - playingState 当前的播放状态,缺省为 `true` ,设定为 `false` 时并不关闭,而是暂停
|
|
180
|
+
* - raindropsTimeInterval 雨滴滴落的间隔,缺省为 `3650`,可设置区间为 `10 ~ 12000`,值越小,雨越大
|
|
181
|
+
* 该值还将影响无背景设置时默认背景的切换频率,几乎每两个雨滴落下就会切换一次背景
|
|
182
|
+
* - idleFluctuations 闲置波动,在光标交互不触发时,将触发模拟雨滴,缺省为 `true`
|
|
183
|
+
* - darkMode 暗黑模式,仅用于在默认的背景图时更改默认背景图的背景色,如果使用了 `imgUrl` 配置,请执行处理色差异常
|
|
184
|
+
*/
|
|
185
|
+
export type RipplesOptions = {
|
|
186
|
+
[x in keyof RipplesUseOptions]?: RipplesUseOptions[x];
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* 初始默认值
|
|
190
|
+
*/
|
|
191
|
+
export interface RipplesDefaultData {
|
|
192
|
+
/** 默认的图像地址 */
|
|
193
|
+
imgUrl: null;
|
|
194
|
+
/** */
|
|
195
|
+
resolution: 360;
|
|
196
|
+
dropRadius: 12;
|
|
197
|
+
perturbance: 0.01;
|
|
198
|
+
interactive: true;
|
|
199
|
+
crossOrigin: 'no-cors';
|
|
200
|
+
playingState: true;
|
|
201
|
+
accelerating: 1;
|
|
202
|
+
raindropsTimeInterval: 3600;
|
|
203
|
+
idleFluctuations: true;
|
|
204
|
+
darkMode: undefined;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
*
|
|
208
|
+
*/
|
|
209
|
+
export type Textures = WebGLTexture[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/customHooks/useRipples/use-lazy-ripple.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { RefObject } from 'react';
|
|
8
|
+
import { Ripples } from './ripplesClass';
|
|
9
|
+
import { RipplesOptions } from './types';
|
|
10
|
+
/** 动态加载包含的自定义的钩子 */
|
|
11
|
+
export declare function useLazyRipples(canvas: RefObject<HTMLCanvasElement | null>, option?: RipplesOptions): {
|
|
12
|
+
ripples: RefObject<Ripples | null>;
|
|
13
|
+
isLoading: boolean;
|
|
14
|
+
error: unknown;
|
|
15
|
+
};
|
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/customHooks/useTimeId.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
2
8
|
*
|
|
3
9
|
* ### 导出一个使用 `useRef` 创建的 `NodeJS.Timeout`
|
|
4
10
|
*
|
|
5
11
|
* 该数值在组件卸载时会自动调用 `clearTimeout` 清理
|
|
6
12
|
*
|
|
7
13
|
* @version 0.0.3
|
|
8
|
-
* @see https://
|
|
14
|
+
* @see https://earthnut.dev/custom-hooks/use-time-id
|
|
9
15
|
* @example
|
|
10
16
|
*
|
|
11
17
|
* 使用:
|
|
12
18
|
*
|
|
13
19
|
* ```ts
|
|
14
|
-
* import { useTimeId } from '
|
|
15
|
-
* // 也可以全量导入
|
|
16
|
-
* // import { useTimeId } from 'oops-ui';
|
|
20
|
+
* // import { useTimeId } from 'earthnut';
|
|
17
21
|
* ...
|
|
18
22
|
* const timeoutId = useTimeId();
|
|
19
23
|
*
|
|
@@ -42,5 +46,5 @@
|
|
|
42
46
|
*
|
|
43
47
|
* 根本就不用引入这个自定义 `hook` , 哈哈哈哈哈
|
|
44
48
|
*
|
|
45
|
-
|
|
49
|
+
*/
|
|
46
50
|
export declare function useTimeId(): import("react").RefObject<NodeJS.Timeout | undefined>;
|
package/type/dog.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/index.client.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
export { useLazyRipples } from './customHooks/useRipples/use-lazy-ripple';
|
|
8
|
+
export { BackgroundRipple, LazyBackgroundRipple } from './components/ripples';
|
|
9
|
+
export { useTimeId } from './customHooks/useTimeId';
|
|
10
|
+
export { useAnimationFrame } from './customHooks/useAnimationFrame';
|
|
11
|
+
export type { UseAnimationFrameResult, AnimationFrameOption, } from './customHooks/useAnimationFrame';
|
|
12
|
+
export { useInputIsComposing } from './customHooks/useInputIsComposing';
|
|
13
|
+
export { useRipples } from './customHooks/useRipples';
|
|
14
|
+
export type { Ripples, BackgroundRipplesProps, RipplesOptions, RippleImgUrl, } from './customHooks/useRipples';
|
|
15
|
+
export type { LayoutProps, LayoutSideBarProps, LayoutHeaderProps, LayoutFooterProps, } from './components/layout';
|
|
16
|
+
export { Image, Image as EnImage } from './components/image';
|
|
17
|
+
export type { EnImageProps } from './components/image';
|
|
18
|
+
export { useColorMode, ThemeColorModeProvider } from './components/ThemeContext';
|
|
19
|
+
export type { ColorMode, ThemeContextType, ThemeColorModeProviderProps, } from './components/ThemeContext/types';
|
|
20
|
+
export { Switch, Switch as EnSwitch } from './components/switch';
|
package/type/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/index.server.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
export { _en, _en as enc, _en as en } from './customHooks/use-xcn';
|
|
8
|
+
export { Layout, LayoutContent, LayoutFooter, LayoutHeader, LayoutSideBar, EnLayout, EnLayoutContent, EnLayoutFooter, EnLayoutHeader, EnLayoutSideBar, } from './components/layout';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/storage/main-logic .d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
declare function set(key: string, value: unknown): void;
|
|
8
|
+
declare function get<T>(key: string): T;
|
|
9
|
+
declare function getAndDel<T = boolean>(key: string): T;
|
|
10
|
+
declare function del(key: string): void;
|
|
11
|
+
declare function clear(): void;
|
|
12
|
+
declare function setSession(key: string, value: unknown): void;
|
|
13
|
+
declare function getSession<T>(key: string): T;
|
|
14
|
+
declare function delSession(key: string): void;
|
|
15
|
+
export { del as delStorage, set as setStorage, get as getStorage, getAndDel as getStorageAndDel, clear as clearStorage, setSession as setSessionStorage, getSession as getSessionStorage, delSession as delSessionStorage, };
|
|
16
|
+
declare const storageMainLogic: {
|
|
17
|
+
del: typeof del;
|
|
18
|
+
set: typeof set;
|
|
19
|
+
get: typeof get;
|
|
20
|
+
getAndDel: typeof getAndDel;
|
|
21
|
+
clear: typeof clear;
|
|
22
|
+
setSession: typeof setSession;
|
|
23
|
+
getSession: typeof getSession;
|
|
24
|
+
delSession: typeof delSession;
|
|
25
|
+
};
|
|
26
|
+
export { storageMainLogic };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/storage/storage-store.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import { ColorMode } from 'components/ThemeContext/types';
|
|
8
|
+
/** storage 的数据仓库 */
|
|
9
|
+
export declare const storageStore: {
|
|
10
|
+
/** 获取本地的数据中的主题值 */
|
|
11
|
+
theme: ColorMode | "";
|
|
12
|
+
/** 获取本地储存的 token */
|
|
13
|
+
token: string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/utilities/cookie.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
export declare const manageCookie: {
|
|
8
|
+
getItem(keyItem: string): string | null;
|
|
9
|
+
setItem(option: {
|
|
10
|
+
keyItem: string;
|
|
11
|
+
value: string;
|
|
12
|
+
end?: string | number | Date;
|
|
13
|
+
path?: string;
|
|
14
|
+
domain?: string;
|
|
15
|
+
secure?: string;
|
|
16
|
+
}): boolean;
|
|
17
|
+
deleteItem(key: string, path?: string, domain?: string): boolean;
|
|
18
|
+
/** 校验当前 key 是否存在 */
|
|
19
|
+
exist(key: string): boolean;
|
|
20
|
+
keys(): string[];
|
|
21
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* enr@type/utilities/sys.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
declare class SysInfo {
|
|
8
|
+
#private;
|
|
9
|
+
/**
|
|
10
|
+
* 设备振动
|
|
11
|
+
**/
|
|
12
|
+
vibrate(): void;
|
|
13
|
+
/**
|
|
14
|
+
* 分享网站
|
|
15
|
+
* @param [url='https://letmiseesee.pages.dev'] 网页地址 默认值 https://letmiseesee.pages.dev
|
|
16
|
+
* @param [text=''] text 文本
|
|
17
|
+
* @param [title='随笔记余生'] title 网站标题,缺省值
|
|
18
|
+
* @description
|
|
19
|
+
**/
|
|
20
|
+
share(url?: string, text?: string, title?: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* 当前是否为手机设备
|
|
23
|
+
**/
|
|
24
|
+
isPhone(): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 当前设备是否为小平设备
|
|
27
|
+
**/
|
|
28
|
+
get isSmallScreen(): 'small' | 'middle' | 'large';
|
|
29
|
+
/**
|
|
30
|
+
* 是否为暗黑模式
|
|
31
|
+
**/
|
|
32
|
+
get isDark(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 设备当前的旋转状态
|
|
35
|
+
*
|
|
36
|
+
* 只返回是否旋转
|
|
37
|
+
**/
|
|
38
|
+
get isOrientation(): boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare const sysInfo: SysInfo;
|
|
41
|
+
export {};
|