@destyler/hover-card 0.2.7 → 0.2.9

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/dist/index.d.mts CHANGED
@@ -1,10 +1,11 @@
1
+ import * as _destyler_anatomy0 from "@destyler/anatomy";
1
2
  import { Placement, PositioningOptions } from "@destyler/popper";
2
3
  import * as _destyler_xstate0 from "@destyler/xstate";
3
4
  import { AnyEventObject, Machine, XSend, XState } from "@destyler/xstate";
4
5
  import { CommonProperties, DirectionProperty, NormalizeProps, PropTypes, RequiredBy } from "@destyler/types";
5
6
 
6
7
  //#region src/anatomy.d.ts
7
- declare const anatomy: any;
8
+ declare const anatomy: _destyler_anatomy0.AnatomyInstance<"arrow" | "arrowTip" | "trigger" | "positioner" | "content">;
8
9
  //#endregion
9
10
  //#region src/types.d.ts
10
11
  interface OpenChangeDetails {
package/dist/index.mjs CHANGED
@@ -33,7 +33,6 @@ function connect(state, send, normalize) {
33
33
  return {
34
34
  open,
35
35
  setOpen(nextOpen) {
36
- if (nextOpen === open) return;
37
36
  send(nextOpen ? "OPEN" : "CLOSE");
38
37
  },
39
38
  reposition(options = {}) {
@@ -229,6 +228,15 @@ function machine(userContext) {
229
228
  on: {
230
229
  "CONTROLLED.CLOSE": "closed",
231
230
  "CONTROLLED.OPEN": "open",
231
+ "OPEN": "open",
232
+ "CLOSE": [{
233
+ guard: "isOpenControlled",
234
+ target: "open",
235
+ actions: ["invokeOnClose"]
236
+ }, {
237
+ target: "closed",
238
+ actions: ["invokeOnClose"]
239
+ }],
232
240
  "POINTER_ENTER": {
233
241
  target: "open",
234
242
  actions: ["setIsPointer"]
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@destyler/hover-card",
3
3
  "type": "module",
4
- "version": "0.2.7",
4
+ "version": "0.2.9",
5
5
  "description": "for sighted users to preview content available behind a link.",
6
6
  "author": "Elone Hoo <elonehoo@gmail.com>",
7
7
  "license": "MIT",
@@ -22,13 +22,13 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@destyler/anatomy": "0.2.7",
26
- "@destyler/dismissable": "0.2.7",
27
- "@destyler/types": "0.2.7",
28
- "@destyler/dom": "0.2.7",
29
- "@destyler/popper": "0.2.7",
30
- "@destyler/utils": "0.2.7",
31
- "@destyler/xstate": "0.2.7"
25
+ "@destyler/anatomy": "0.2.9",
26
+ "@destyler/dom": "0.2.9",
27
+ "@destyler/popper": "0.2.9",
28
+ "@destyler/types": "0.2.9",
29
+ "@destyler/xstate": "0.2.9",
30
+ "@destyler/dismissable": "0.2.9",
31
+ "@destyler/utils": "0.2.9"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"