@lynx-js/lynx-ui-common 3.136.0 → 3.139.0
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/CHANGELOG.md +12 -0
- package/dist/const/index.d.ts +2 -2
- package/dist/hooks/index.d.ts +8 -8
- package/dist/index.d.ts +6 -6
- package/dist/reactive/hooks/useReactiveValue.d.ts +1 -1
- package/dist/reactive/hooks/useReactiveValueChange.d.ts +1 -1
- package/dist/reactive/hooks/useReactiveValueEvent.d.ts +2 -2
- package/dist/reactive/index.d.ts +5 -5
- package/dist/reactive/updateReactive.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/interfaces/BaseScrollEvents.d.ts +4 -4
- package/dist/types/interfaces/BaseScrollEvents.d.ts.map +1 -1
- package/dist/types/interfaces/index.d.ts +4 -4
- package/dist/utils/index.d.ts +12 -12
- package/dist/utils/interpolation.d.ts +1 -1
- package/package.json +1 -1
- package/src/types/interfaces/BaseScrollEvents.ts +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @lynx-js/lynx-ui-common
|
|
2
2
|
|
|
3
|
+
## 3.139.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Correct generated API types for scroll callbacks and union-valued arrays. ([#273](https://github.com/lynx-family/lynx-ui/pull/273))
|
|
8
|
+
|
|
9
|
+
## 3.137.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Emit declaration imports with explicit ESM-compatible paths. ([#280](https://github.com/lynx-family/lynx-ui/pull/280))
|
|
14
|
+
|
|
3
15
|
## 3.136.0
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/const/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './BaseScrollEventsMapping';
|
|
2
|
-
export * from './BaseUIEventsMapping';
|
|
1
|
+
export * from './BaseScrollEventsMapping.js';
|
|
2
|
+
export * from './BaseUIEventsMapping.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { useUnmount } from './useUnmount';
|
|
2
|
-
export { useGlobalEventListener } from './useGlobalEventListener';
|
|
3
|
-
export { useLatest } from './useLatest';
|
|
4
|
-
export { useRegisteredEvents } from './useRegisteredEvents';
|
|
5
|
-
export { useMemoizedFn } from './useMemoizedFn';
|
|
6
|
-
export { usePrevious } from './usePrevious';
|
|
7
|
-
export { supportUsePreCommit, usePreCommit } from './usePreCommit';
|
|
1
|
+
export { useUnmount } from './useUnmount.js';
|
|
2
|
+
export { useGlobalEventListener } from './useGlobalEventListener.js';
|
|
3
|
+
export { useLatest } from './useLatest.js';
|
|
4
|
+
export { useRegisteredEvents } from './useRegisteredEvents.js';
|
|
5
|
+
export { useMemoizedFn } from './useMemoizedFn.js';
|
|
6
|
+
export { usePrevious } from './usePrevious.js';
|
|
7
|
+
export { supportUsePreCommit, usePreCommit } from './usePreCommit.js';
|
|
8
8
|
export declare function useFirstRender(cb: () => void): boolean;
|
|
9
9
|
export declare function useJSFirstRender(cb: () => void): boolean;
|
|
10
10
|
export declare function useLepusFirstRender(cb: () => void): boolean;
|
|
@@ -12,6 +12,6 @@ export declare function useLepusFirstRender(cb: () => void): boolean;
|
|
|
12
12
|
* @deprecated use useMemoizedFn instead
|
|
13
13
|
*/
|
|
14
14
|
export declare function usePersistCallback(fn: (...args: unknown[]) => void): (...arg: unknown[]) => void;
|
|
15
|
-
export { useGCCollector, type UseGCCollectorOptions } from './useGCCollector';
|
|
15
|
+
export { useGCCollector, type UseGCCollectorOptions } from './useGCCollector.js';
|
|
16
16
|
export declare function useThrottle(fn: (...args: unknown[]) => void, delay: number, dep?: never[]): (...args: unknown[]) => void;
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export * from './hooks';
|
|
2
|
-
export * from './utils';
|
|
3
|
-
export * from './const';
|
|
4
|
-
export type * from './types';
|
|
5
|
-
export type { ReactiveValueOptions, ReactiveValueAPI, ReactiveValueType, Subscriber, Unsubscribe, } from './reactive';
|
|
6
|
-
export { useReactiveValue, useReactiveValueEvent, updateReactiveValue, useReactiveValueChange, } from './reactive';
|
|
1
|
+
export * from './hooks/index.js';
|
|
2
|
+
export * from './utils/index.js';
|
|
3
|
+
export * from './const/index.js';
|
|
4
|
+
export type * from './types/index.js';
|
|
5
|
+
export type { ReactiveValueOptions, ReactiveValueAPI, ReactiveValueType, Subscriber, Unsubscribe, } from './reactive/index.js';
|
|
6
|
+
export { useReactiveValue, useReactiveValueEvent, updateReactiveValue, useReactiveValueChange, } from './reactive/index.js';
|
|
7
7
|
export { useMainThreadImperativeHandle } from '@lynx-js/react-use';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MainThreadRef } from '@lynx-js/react';
|
|
2
|
-
import type { ReactiveValueOptions, Subscriber, Unsubscribe } from '../types';
|
|
2
|
+
import type { ReactiveValueOptions, Subscriber, Unsubscribe } from '../types.js';
|
|
3
3
|
export type ReactiveValue<T> = ReturnType<typeof createMainThreadReactiveValue<T>>;
|
|
4
4
|
export declare function createMainThreadReactiveValue<T>(initialValue: T, options?: ReactiveValueOptions): {
|
|
5
5
|
_value: T;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { MainThreadRef } from '@lynx-js/react';
|
|
2
|
-
import type { ReactiveValue } from '../hooks/useReactiveValue';
|
|
2
|
+
import type { ReactiveValue } from '../hooks/useReactiveValue.js';
|
|
3
3
|
export declare function useReactiveValueChange<T>(valueRef: MainThreadRef<ReactiveValue<T>>, callback: (value: T) => void): void;
|
|
4
4
|
//# sourceMappingURL=useReactiveValueChange.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { MainThreadRef } from '@lynx-js/react';
|
|
2
|
-
import type { ReactiveValue } from '../hooks/useReactiveValue';
|
|
3
|
-
import type { ReactiveEventName } from '../types';
|
|
2
|
+
import type { ReactiveValue } from '../hooks/useReactiveValue.js';
|
|
3
|
+
import type { ReactiveEventName } from '../types.js';
|
|
4
4
|
export declare function useReactiveValueEvent<T>(valueRef: MainThreadRef<ReactiveValue<T>>, event: ReactiveEventName, callback: (value: T) => void): void;
|
|
5
5
|
//# sourceMappingURL=useReactiveValueEvent.d.ts.map
|
package/dist/reactive/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export type { ReactiveValueOptions, ReactiveValueAPI, ReactiveValueType, Subscriber, Unsubscribe, } from './types';
|
|
2
|
-
export { useReactiveValue } from './hooks/useReactiveValue';
|
|
3
|
-
export { useReactiveValueEvent } from './hooks/useReactiveValueEvent';
|
|
4
|
-
export { useReactiveValueChange } from './hooks/useReactiveValueChange';
|
|
5
|
-
export { updateReactiveValue } from './updateReactive';
|
|
1
|
+
export type { ReactiveValueOptions, ReactiveValueAPI, ReactiveValueType, Subscriber, Unsubscribe, } from './types.js';
|
|
2
|
+
export { useReactiveValue } from './hooks/useReactiveValue.js';
|
|
3
|
+
export { useReactiveValueEvent } from './hooks/useReactiveValueEvent.js';
|
|
4
|
+
export { useReactiveValueChange } from './hooks/useReactiveValueChange.js';
|
|
5
|
+
export { updateReactiveValue } from './updateReactive.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { MainThreadRef } from '@lynx-js/react';
|
|
2
|
-
import type { ReactiveValue } from './hooks/useReactiveValue';
|
|
2
|
+
import type { ReactiveValue } from './hooks/useReactiveValue.js';
|
|
3
3
|
export declare function updateReactiveValue<T>(valueRef: MainThreadRef<ReactiveValue<T>>, value: T): void;
|
|
4
4
|
//# sourceMappingURL=updateReactive.d.ts.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from './interfaces';
|
|
1
|
+
export type * from './interfaces/index.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ScrollEndEvent, ScrollEvent, ScrollToLowerEvent, ScrollToUpperEvent } from '@lynx-js/types';
|
|
2
2
|
export interface BaseScrollEvents {
|
|
3
3
|
/**
|
|
4
4
|
* Being triggered when scrolling occurs.
|
|
@@ -16,7 +16,7 @@ export interface BaseScrollEvents {
|
|
|
16
16
|
* @Android
|
|
17
17
|
* @iOS
|
|
18
18
|
*/
|
|
19
|
-
onScrollEnd?: (e:
|
|
19
|
+
onScrollEnd?: (e: ScrollEndEvent) => void;
|
|
20
20
|
/**
|
|
21
21
|
* Being triggered when scrolling to upper.
|
|
22
22
|
* @zh 滚动到顶部时触发。
|
|
@@ -25,7 +25,7 @@ export interface BaseScrollEvents {
|
|
|
25
25
|
* @Android
|
|
26
26
|
* @iOS
|
|
27
27
|
*/
|
|
28
|
-
onScrollToUpper?: (e:
|
|
28
|
+
onScrollToUpper?: (e: ScrollToUpperEvent) => void;
|
|
29
29
|
/**
|
|
30
30
|
* Being triggered when scrolling to lower.
|
|
31
31
|
* @zh 滚动到底部时触发。
|
|
@@ -34,6 +34,6 @@ export interface BaseScrollEvents {
|
|
|
34
34
|
* @Android
|
|
35
35
|
* @iOS
|
|
36
36
|
*/
|
|
37
|
-
onScrollToLower?: (e:
|
|
37
|
+
onScrollToLower?: (e: ScrollToLowerEvent) => void;
|
|
38
38
|
}
|
|
39
39
|
//# sourceMappingURL=BaseScrollEvents.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseScrollEvents.d.ts","sourceRoot":"","sources":["../../../src/types/interfaces/BaseScrollEvents.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"BaseScrollEvents.d.ts","sourceRoot":"","sources":["../../../src/types/interfaces/BaseScrollEvents.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,gBAAgB,CAAA;AAEvB,MAAM,WAAW,gBAAgB;IAC/B;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,KAAK,IAAI,CAAA;IACnC;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,CAAA;IACzC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,kBAAkB,KAAK,IAAI,CAAA;IACjD;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,kBAAkB,KAAK,IAAI,CAAA;CAClD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CSSProperties } from '@lynx-js/types';
|
|
2
|
-
export type * from './BaseScrollEvents';
|
|
3
|
-
export type * from './BaseUIEvents';
|
|
4
|
-
export type * from './BaseUIProps';
|
|
5
|
-
export type * from './LazyInterface';
|
|
2
|
+
export type * from './BaseScrollEvents.js';
|
|
3
|
+
export type * from './BaseUIEvents.js';
|
|
4
|
+
export type * from './BaseUIProps.js';
|
|
5
|
+
export type * from './LazyInterface.js';
|
|
6
6
|
export interface Point {
|
|
7
7
|
x: number;
|
|
8
8
|
y: number;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export * from './common';
|
|
2
|
-
export * from './version';
|
|
3
|
-
export * from './selector';
|
|
4
|
-
export * from './log';
|
|
5
|
-
export * from './mainThreadify';
|
|
6
|
-
export { convertOverlayMode, registerOverlayMode } from './popoverUtils';
|
|
7
|
-
export { convertToPx, screenWidth, screenHeight } from './convertToPx';
|
|
8
|
-
export { interpolate, interpolateJS } from './interpolation';
|
|
9
|
-
export { renderContentWithExtraProps } from './renderContentWithExtraProps';
|
|
10
|
-
export { delayFrames } from './delayFrames';
|
|
11
|
-
export { getEventDetail } from './getEventDetail';
|
|
12
|
-
export type { EventDetailWithLayout } from './getEventDetail';
|
|
1
|
+
export * from './common.js';
|
|
2
|
+
export * from './version.js';
|
|
3
|
+
export * from './selector.js';
|
|
4
|
+
export * from './log.js';
|
|
5
|
+
export * from './mainThreadify.js';
|
|
6
|
+
export { convertOverlayMode, registerOverlayMode } from './popoverUtils.js';
|
|
7
|
+
export { convertToPx, screenWidth, screenHeight } from './convertToPx.js';
|
|
8
|
+
export { interpolate, interpolateJS } from './interpolation.js';
|
|
9
|
+
export { renderContentWithExtraProps } from './renderContentWithExtraProps.js';
|
|
10
|
+
export { delayFrames } from './delayFrames.js';
|
|
11
|
+
export { getEventDetail } from './getEventDetail.js';
|
|
12
|
+
export type { EventDetailWithLayout } from './getEventDetail.js';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
4
|
|
|
5
5
|
import type {
|
|
6
|
-
|
|
6
|
+
ScrollEndEvent,
|
|
7
7
|
ScrollEvent,
|
|
8
|
+
ScrollToLowerEvent,
|
|
9
|
+
ScrollToUpperEvent,
|
|
8
10
|
} from '@lynx-js/types'
|
|
9
11
|
|
|
10
12
|
export interface BaseScrollEvents {
|
|
@@ -24,7 +26,7 @@ export interface BaseScrollEvents {
|
|
|
24
26
|
* @Android
|
|
25
27
|
* @iOS
|
|
26
28
|
*/
|
|
27
|
-
onScrollEnd?: (e:
|
|
29
|
+
onScrollEnd?: (e: ScrollEndEvent) => void
|
|
28
30
|
/**
|
|
29
31
|
* Being triggered when scrolling to upper.
|
|
30
32
|
* @zh 滚动到顶部时触发。
|
|
@@ -33,7 +35,7 @@ export interface BaseScrollEvents {
|
|
|
33
35
|
* @Android
|
|
34
36
|
* @iOS
|
|
35
37
|
*/
|
|
36
|
-
onScrollToUpper?: (e:
|
|
38
|
+
onScrollToUpper?: (e: ScrollToUpperEvent) => void
|
|
37
39
|
/**
|
|
38
40
|
* Being triggered when scrolling to lower.
|
|
39
41
|
* @zh 滚动到底部时触发。
|
|
@@ -42,5 +44,5 @@ export interface BaseScrollEvents {
|
|
|
42
44
|
* @Android
|
|
43
45
|
* @iOS
|
|
44
46
|
*/
|
|
45
|
-
onScrollToLower?: (e:
|
|
47
|
+
onScrollToLower?: (e: ScrollToLowerEvent) => void
|
|
46
48
|
}
|