@destyler/popover 0.1.0 → 0.2.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.
@@ -346,20 +346,18 @@ function machine(userContext) {
346
346
  setInitialFocus(ctx$1) {
347
347
  if (ctx$1.modal) return;
348
348
  raf(() => {
349
- const element = getInitialFocus({
349
+ getInitialFocus({
350
350
  root: dom.getContentEl(ctx$1),
351
351
  getInitialEl: ctx$1.initialFocusEl,
352
352
  enabled: ctx$1.autoFocus
353
- });
354
- element?.focus({ preventScroll: true });
353
+ })?.focus({ preventScroll: true });
355
354
  });
356
355
  },
357
356
  setFinalFocus(ctx$1, evt) {
358
357
  const restoreFocus = evt.restoreFocus ?? evt.previousEvent?.restoreFocus;
359
358
  if (restoreFocus != null && !restoreFocus) return;
360
359
  raf(() => {
361
- const element = dom.getTriggerEl(ctx$1);
362
- element?.focus({ preventScroll: true });
360
+ dom.getTriggerEl(ctx$1)?.focus({ preventScroll: true });
363
361
  });
364
362
  },
365
363
  invokeOnOpen(ctx$1) {
package/package.json CHANGED
@@ -1,31 +1,40 @@
1
1
  {
2
2
  "name": "@destyler/popover",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
5
  "description": "displays rich content in a portal, triggered by a button.",
6
6
  "author": "Elone Hoo <elonehoo@gmail.com>",
7
7
  "license": "MIT",
8
+ "homepage": "https://github.com/destyler/destyler",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/destyler/destyler.git",
12
+ "directory": "packages/components/popover"
13
+ },
8
14
  "exports": {
9
- ".": "./dist/index.js"
15
+ ".": "./dist/index.mjs"
10
16
  },
11
- "main": "dist/index.js",
12
- "module": "dist/index.js",
13
- "types": "dist/index.d.ts",
17
+ "main": "dist/index.mjs",
18
+ "module": "dist/index.mjs",
19
+ "types": "dist/index.d.mts",
14
20
  "files": [
15
21
  "*.d.ts",
16
22
  "dist"
17
23
  ],
18
24
  "dependencies": {
19
- "@destyler/anatomy": "0.1.0",
20
- "@destyler/aria-hidden": "0.1.0",
21
- "@destyler/dismissable": "0.1.0",
22
- "@destyler/focus-trap": "0.1.0",
23
- "@destyler/popper": "0.1.0",
24
- "@destyler/remove-scroll": "0.1.0",
25
- "@destyler/utils": "0.1.0",
26
- "@destyler/dom": "0.1.0",
27
- "@destyler/types": "0.1.0",
28
- "@destyler/xstate": "0.1.0"
25
+ "@destyler/anatomy": "0.2.0",
26
+ "@destyler/aria-hidden": "0.2.0",
27
+ "@destyler/dismissable": "0.2.0",
28
+ "@destyler/dom": "0.2.0",
29
+ "@destyler/focus-trap": "0.2.0",
30
+ "@destyler/types": "0.2.0",
31
+ "@destyler/popper": "0.2.0",
32
+ "@destyler/remove-scroll": "0.2.0",
33
+ "@destyler/utils": "0.2.0",
34
+ "@destyler/xstate": "0.2.0"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
29
38
  },
30
39
  "scripts": {
31
40
  "clear": "rimraf ./dist",
File without changes