earthnut 0.1.7-alpha.0 → 0.1.7
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/components/image/index.d.ts +12 -0
- package/components/image/types.d.ts +12 -0
- package/components/image/useSrcChange.d.ts +11 -0
- package/components/ripples/LazyRippleEle.d.ts +1 -1
- package/components/ripples/RipplesEle.d.ts +1 -1
- package/components/ripples/types.d.ts +1 -1
- package/components/ripples/useOptionUpdate.d.ts +1 -1
- package/customHooks/useRipples/buildBackground/utils/create-canvas-element.d.ts +1 -1
- package/customHooks/useRipples/use-lazy-ripple.d.ts +5 -4
- package/index.cjs +1 -1
- package/index.d.ts +10 -3
- package/index.mjs +1 -1
- package/package.json +3 -53
- package/705/index.cjs +0 -7
- package/705/index.mjs +0 -7
- package/BackgroundRipple/index.cjs +0 -7
- package/BackgroundRipple/index.mjs +0 -7
- package/Layout/index.cjs +0 -7
- package/Layout/index.mjs +0 -7
- package/LazyBackgroundRipple/index.cjs +0 -7
- package/LazyBackgroundRipple/index.mjs +0 -7
- package/components/index.d.ts +0 -12
- package/customHooks/index.d.ts +0 -12
- package/dog.d.ts +0 -8
- package/useAnimationFrame/index.cjs +0 -7
- package/useAnimationFrame/index.mjs +0 -7
- package/useInputIsComposing/index.cjs +0 -7
- package/useInputIsComposing/index.mjs +0 -7
- package/useLazyRipples/index.cjs +0 -7
- package/useLazyRipples/index.mjs +0 -7
- package/useRipples/index.cjs +0 -7
- package/useRipples/index.mjs +0 -7
- package/useTimeId/index.cjs +0 -7
- package/useTimeId/index.mjs +0 -7
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/image/index.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { EnImageProps } from './types';
|
|
9
|
+
/** 简单的图像 */
|
|
10
|
+
declare const Image: React.ForwardRefExoticComponent<Omit<EnImageProps, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
11
|
+
export { Image };
|
|
12
|
+
export type { EnImageProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/image/types.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
export type EnImageProps = {
|
|
8
|
+
/** 下载错误时展示的图像 */
|
|
9
|
+
errorSrc?: string;
|
|
10
|
+
/** 加载中的图像 */
|
|
11
|
+
loadingSrc?: string;
|
|
12
|
+
} & React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license MIT
|
|
3
|
+
* earthnut@components/image/useSrcChange.d.ts
|
|
4
|
+
* Copyright (c) 2025 earthnut.dev
|
|
5
|
+
* 请在项目根参看详细许可证明
|
|
6
|
+
*/
|
|
7
|
+
/** 当地址触发变更 */
|
|
8
|
+
export declare function useSrcChange(src: string, fallbackSrc?: string): {
|
|
9
|
+
resultSrc: string;
|
|
10
|
+
loadComplete: number;
|
|
11
|
+
};
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
* @CreateDate 周四 12/12/2024
|
|
13
13
|
* @Description 涟漪
|
|
14
14
|
****************************************************************************/
|
|
15
|
-
import React from 'react';
|
|
16
15
|
import { RipplesOptions } from '../../customHooks/useRipples/types';
|
|
17
16
|
import { RippleEle } from './types';
|
|
17
|
+
import * as React from 'react';
|
|
18
18
|
/**
|
|
19
19
|
*
|
|
20
20
|
* ### 一个 ripple 背景组件
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Copyright (c) 2025 earthnut.dev
|
|
5
5
|
* 请在项目根参看详细许可证明
|
|
6
6
|
*/
|
|
7
|
-
import React from 'react';
|
|
8
7
|
import { RipplesOptions } from '../../customHooks/useRipples/types';
|
|
9
8
|
import { RippleEle } from './types';
|
|
9
|
+
import * as React from 'react';
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
12
12
|
* ### 一个 ripple 背景组件
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
* Copyright (c) 2025 earthnut.dev
|
|
5
5
|
* 请在项目根参看详细许可证明
|
|
6
6
|
*/
|
|
7
|
-
import { Ripples } from 'components/ripples';
|
|
7
|
+
import { Ripples } from '../../../../components/ripples';
|
|
8
8
|
/** 根据给出的 html 数据构建一个 canvas */
|
|
9
9
|
export declare function createCanvasElement(this: Ripples, img: CanvasImageSource): HTMLCanvasElement;
|
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Copyright (c) 2025 earthnut.dev
|
|
5
5
|
* 请在项目根参看详细许可证明
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
7
|
+
import { Ripples } from './ripplesClass';
|
|
8
|
+
import { RipplesOptions } from './types';
|
|
8
9
|
/** 动态加载包含的自定义的钩子 */
|
|
9
|
-
export declare function useLazyRipples(): {
|
|
10
|
-
|
|
10
|
+
export declare function useLazyRipples(canvas: React.RefObject<HTMLCanvasElement | null>, option?: RipplesOptions): {
|
|
11
|
+
ripples: React.RefObject<Ripples | null>;
|
|
11
12
|
isLoading: boolean;
|
|
12
|
-
error:
|
|
13
|
+
error: unknown;
|
|
13
14
|
};
|