@lynx-js/lynx-ui-presence 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 +20 -0
- package/dist/Presence.d.ts +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.docs.d.ts +6 -2
- package/dist/types/index.docs.d.ts.map +1 -1
- package/dist/usePresence.d.ts +1 -1
- package/dist/usePresenceGroup.d.ts +2 -2
- package/dist/useVisibilityFromPresence.d.ts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +2 -2
- package/src/types/index.docs.ts +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @lynx-js/lynx-ui-presence
|
|
2
2
|
|
|
3
|
+
## 3.139.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add the canonical `PresenceUIVariants` type name and deprecate the previous `PresenceUiVariants` alias. ([#333](https://github.com/lynx-family/lynx-ui/pull/333))
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`1a4ad19`](https://github.com/lynx-family/lynx-ui/commit/1a4ad190993d57425b4c377a7dd63882cc65a8d2)]:
|
|
12
|
+
- @lynx-js/lynx-ui-common@3.139.0
|
|
13
|
+
|
|
14
|
+
## 3.137.0
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Emit declaration imports with explicit ESM-compatible paths. ([#280](https://github.com/lynx-family/lynx-ui/pull/280))
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`064ea4e`](https://github.com/lynx-family/lynx-ui/commit/064ea4e49cd3d0ac5754519cbee43d8ab3040024)]:
|
|
21
|
+
- @lynx-js/lynx-ui-common@3.137.0
|
|
22
|
+
|
|
3
23
|
## 3.136.0
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/Presence.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PresenceAnimationStatus, PresenceContextType, PresenceProps } from './types';
|
|
1
|
+
import type { PresenceAnimationStatus, PresenceContextType, PresenceProps } from './types/index.js';
|
|
2
2
|
export declare const PresenceContext: import("react").Context<PresenceContextType>;
|
|
3
3
|
export declare const renderPresenceChildren: (props: {
|
|
4
4
|
children: PresenceProps["children"];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { Presence, PresenceContext, renderPresenceChildren } from './Presence';
|
|
2
|
-
export { PresenceState, resolveAnimationStatus, presenceClassVariants, } from './utils';
|
|
3
|
-
export { usePresenceGroup } from './usePresenceGroup';
|
|
4
|
-
export { useVisibilityFromPresence } from './useVisibilityFromPresence';
|
|
5
|
-
export type * from './types';
|
|
1
|
+
export { Presence, PresenceContext, renderPresenceChildren } from './Presence.js';
|
|
2
|
+
export { PresenceState, resolveAnimationStatus, presenceClassVariants, } from './utils.js';
|
|
3
|
+
export { usePresenceGroup } from './usePresenceGroup.js';
|
|
4
|
+
export { useVisibilityFromPresence } from './useVisibilityFromPresence.js';
|
|
5
|
+
export type * from './types/index.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type * from './index.docs';
|
|
1
|
+
export type * from './index.docs.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from '@lynx-js/react';
|
|
2
2
|
import type { AnimationEvent, EventHandler, TransitionEvent } from '@lynx-js/types';
|
|
3
|
-
import type { PresenceState } from '../utils';
|
|
3
|
+
import type { PresenceState } from '../utils.js';
|
|
4
4
|
export interface PresenceAnimationStatus {
|
|
5
5
|
/**
|
|
6
6
|
* The popper is opened.
|
|
@@ -34,7 +34,7 @@ export interface PresenceAnimationStatus {
|
|
|
34
34
|
* Use them as CSS selectors to style different states.
|
|
35
35
|
* @zh Presence 根据状态注入的 ui-variants,可用于 CSS selector 按状态定制样式。
|
|
36
36
|
*/
|
|
37
|
-
export interface
|
|
37
|
+
export interface PresenceUIVariants {
|
|
38
38
|
/**
|
|
39
39
|
* Applied when `status.open` is true.
|
|
40
40
|
* @zh 当 status.open 为 true 时生效,可用于 `.ui-open { ... }`。
|
|
@@ -61,6 +61,10 @@ export interface PresenceUiVariants {
|
|
|
61
61
|
*/
|
|
62
62
|
'ui-animating'?: boolean;
|
|
63
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* @deprecated Use `PresenceUIVariants` instead.
|
|
66
|
+
*/
|
|
67
|
+
export type PresenceUiVariants = PresenceUIVariants;
|
|
64
68
|
export type PresenceChildrenType = (status: PresenceAnimationStatus) => ReactNode;
|
|
65
69
|
export interface PresenceProps {
|
|
66
70
|
show: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.docs.d.ts","sourceRoot":"","sources":["../../src/types/index.docs.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,eAAe,EAChB,MAAM,gBAAgB,CAAA;AAEvB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IAEd;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO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AAC,CAAA;QACrD,WAAW,EAAE,YAAY,CAAC,cAAc,CAAC,CAAA;QACzC,qBAAqB,EAAE,YAAY,CAAC,eAAe,CAAC,CAAA;QACpD,mBAAmB,EAAE,YAAY,CAAC,eAAe,CAAC,CAAA;KACnD,CAAA;CACF;AAED,MAAM,MAAM,qBAAqB,GAAG,mBAAmB,CAAA"}
|
package/dist/usePresence.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PresenceAnimationStatus, PresenceContextType, PresenceProps, usePresenceProps, usePresenceReturnType } from './types';
|
|
1
|
+
import type { PresenceAnimationStatus, PresenceContextType, PresenceProps, usePresenceProps, usePresenceReturnType } from './types/index.js';
|
|
2
2
|
export declare const PresenceContext: import("react").Context<PresenceContextType>;
|
|
3
3
|
export declare function usePresence(props: usePresenceProps): usePresenceReturnType;
|
|
4
4
|
export declare const renderPresenceChildren: (props: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from '@lynx-js/react';
|
|
2
|
-
import type { PresenceChildrenType, PresenceContextType } from './types';
|
|
3
|
-
import { PresenceState } from './utils';
|
|
2
|
+
import type { PresenceChildrenType, PresenceContextType } from './types/index.js';
|
|
3
|
+
import { PresenceState } from './utils.js';
|
|
4
4
|
export declare const PresenceContext: import("react").Context<PresenceContextType>;
|
|
5
5
|
export interface usePresenceGroupProps {
|
|
6
6
|
show: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from '@lynx-js/types';
|
|
2
|
-
import { PresenceState } from './utils';
|
|
2
|
+
import { PresenceState } from './utils.js';
|
|
3
3
|
/**
|
|
4
4
|
* A hook that derives visibility state from a PresenceState.
|
|
5
5
|
* It returns 'visible' when the presence state indicates the component
|
package/dist/utils.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/lynx-ui-presence",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.139.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/lynx-family/lynx-ui.git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"clsx": "^2.1.1",
|
|
28
|
-
"@lynx-js/lynx-ui-common": "3.
|
|
28
|
+
"@lynx-js/lynx-ui-common": "3.139.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@lynx-js/react": "0.123.1",
|
package/src/types/index.docs.ts
CHANGED
|
@@ -50,7 +50,7 @@ export interface PresenceAnimationStatus {
|
|
|
50
50
|
* Use them as CSS selectors to style different states.
|
|
51
51
|
* @zh Presence 根据状态注入的 ui-variants,可用于 CSS selector 按状态定制样式。
|
|
52
52
|
*/
|
|
53
|
-
export interface
|
|
53
|
+
export interface PresenceUIVariants {
|
|
54
54
|
/**
|
|
55
55
|
* Applied when `status.open` is true.
|
|
56
56
|
* @zh 当 status.open 为 true 时生效,可用于 `.ui-open { ... }`。
|
|
@@ -82,6 +82,11 @@ export interface PresenceUiVariants {
|
|
|
82
82
|
'ui-animating'?: boolean
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
/**
|
|
86
|
+
* @deprecated Use `PresenceUIVariants` instead.
|
|
87
|
+
*/
|
|
88
|
+
export type PresenceUiVariants = PresenceUIVariants
|
|
89
|
+
|
|
85
90
|
export type PresenceChildrenType = (
|
|
86
91
|
status: PresenceAnimationStatus,
|
|
87
92
|
) => ReactNode
|