@povio/ui 2.2.3 → 2.2.4

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.
@@ -1,10 +1,10 @@
1
- import { motion, react_exports } from "../../../node_modules/.pnpm/motion@12.23.28_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/motion/dist/es/react.js";
2
1
  import { DomUtils } from "../../../utils/dom.utils.js";
3
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
3
  import { clsx } from "clsx";
5
4
  import { useEffect, useMemo, useRef, useState } from "react";
6
5
  import { Dialog, DialogTrigger, Modal, ModalOverlay } from "react-aria-components";
7
6
  import { useResizeObserver, useViewportSize } from "@react-aria/utils";
7
+ import { AnimatePresence, animate, motion, useMotionValue } from "motion/react";
8
8
  var MotionModal = motion.create(Modal);
9
9
  var MotionModalOverlay = motion.create(ModalOverlay);
10
10
  var inertiaTransition = {
@@ -30,7 +30,7 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = fa
30
30
  windowHeight: Math.max(window.innerHeight, viewport.height) - sheetMarginTop
31
31
  };
32
32
  }, [viewport.height, sheetMarginTop]);
33
- const y = (0, react_exports.useMotionValue)(sheetHeight);
33
+ const y = useMotionValue(sheetHeight);
34
34
  const closeVelocityRef = useRef(true);
35
35
  const overlayRef = useRef(null);
36
36
  const containerRef = useRef(null);
@@ -53,11 +53,11 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = fa
53
53
  oldHeightRef.current = rect.height;
54
54
  if (y.get() < 0) {
55
55
  y.stop();
56
- (0, react_exports.animate)(y, 0);
56
+ animate(y, 0);
57
57
  }
58
58
  }
59
59
  });
60
- return /* @__PURE__ */ jsx(react_exports.AnimatePresence, { children: isOpen && /* @__PURE__ */ jsxs(MotionModalOverlay, {
60
+ return /* @__PURE__ */ jsx(AnimatePresence, { children: isOpen && /* @__PURE__ */ jsxs(MotionModalOverlay, {
61
61
  isOpen: true,
62
62
  UNSTABLE_portalContainer: portalContainerRef?.current,
63
63
  className: clsx("fixed top-0 left-0 z-10 w-screen", containerClassName),
@@ -119,7 +119,7 @@ var BottomSheetBase = ({ isOpen, onOpenChange, onStateChange, isDismissable = fa
119
119
  onDragEnd: (e, { velocity }) => {
120
120
  containerRef.current?.style.removeProperty("pointer-events");
121
121
  if (y.get() > 0) if (closeVelocityRef.current && velocity.y > 10 || y.get() > 200) onOpenChange?.(false);
122
- else (0, react_exports.animate)(y, 0, {
122
+ else animate(y, 0, {
123
123
  ...inertiaTransition,
124
124
  min: 0,
125
125
  max: 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@povio/ui",
3
- "version": "2.2.3",
3
+ "version": "2.2.4",
4
4
  "type": "module",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -15,24 +15,6 @@
15
15
  ],
16
16
  "homepage": "https://povio.com",
17
17
  "license": "UNLICENSED",
18
- "peerDependencies": {
19
- "@casl/ability": "^6.7.3",
20
- "@casl/react": "^5.0.0",
21
- "@tiptap/core": "^3.19.0",
22
- "@tiptap/extension-color": "^3.19.0",
23
- "@tiptap/extension-heading": "^3.19.0",
24
- "@tiptap/extension-highlight": "^3.19.0",
25
- "@tiptap/extension-link": "^3.19.0",
26
- "@tiptap/extension-placeholder": "^3.19.0",
27
- "@tiptap/extension-text-align": "^3.19.0",
28
- "@tiptap/extension-text-style": "^3.19.0",
29
- "@tiptap/extension-underline": "^3.19.0",
30
- "@tiptap/pm": "^3.19.0",
31
- "@tiptap/react": "^3.19.0",
32
- "@tiptap/starter-kit": "^3.19.0",
33
- "react": "^19.1.0",
34
- "react-dom": "^19.1.0"
35
- },
36
18
  "dependencies": {
37
19
  "@dnd-kit/core": "^6.3.1",
38
20
  "@dnd-kit/modifiers": "^9.0.0",
@@ -68,5 +50,61 @@
68
50
  "tailwindcss": "^4.1.18",
69
51
  "tailwindcss-react-aria-components": "^2.0.1",
70
52
  "zod": "^4.3.5"
53
+ },
54
+ "peerDependencies": {
55
+ "@casl/ability": "^6.7.3",
56
+ "@casl/react": "^5.0.0",
57
+ "@tiptap/core": "^3.19.0",
58
+ "@tiptap/extension-color": "^3.19.0",
59
+ "@tiptap/extension-heading": "^3.19.0",
60
+ "@tiptap/extension-highlight": "^3.19.0",
61
+ "@tiptap/extension-link": "^3.19.0",
62
+ "@tiptap/extension-placeholder": "^3.19.0",
63
+ "@tiptap/extension-text-align": "^3.19.0",
64
+ "@tiptap/extension-text-style": "^3.19.0",
65
+ "@tiptap/extension-underline": "^3.19.0",
66
+ "@tiptap/pm": "^3.19.0",
67
+ "@tiptap/react": "^3.19.0",
68
+ "@tiptap/starter-kit": "^3.19.0",
69
+ "react": "^19.1.0",
70
+ "react-dom": "^19.1.0"
71
+ },
72
+ "peerDependenciesMeta": {
73
+ "@tiptap/core": {
74
+ "optional": true
75
+ },
76
+ "@tiptap/extension-color": {
77
+ "optional": true
78
+ },
79
+ "@tiptap/extension-heading": {
80
+ "optional": true
81
+ },
82
+ "@tiptap/extension-highlight": {
83
+ "optional": true
84
+ },
85
+ "@tiptap/extension-link": {
86
+ "optional": true
87
+ },
88
+ "@tiptap/extension-placeholder": {
89
+ "optional": true
90
+ },
91
+ "@tiptap/extension-text-align": {
92
+ "optional": true
93
+ },
94
+ "@tiptap/extension-text-style": {
95
+ "optional": true
96
+ },
97
+ "@tiptap/extension-underline": {
98
+ "optional": true
99
+ },
100
+ "@tiptap/pm": {
101
+ "optional": true
102
+ },
103
+ "@tiptap/react": {
104
+ "optional": true
105
+ },
106
+ "@tiptap/starter-kit": {
107
+ "optional": true
108
+ }
71
109
  }
72
110
  }
@@ -1,31 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __export = (all, symbols) => {
6
- let target = {};
7
- for (var name in all) __defProp(target, name, {
8
- get: all[name],
9
- enumerable: true
10
- });
11
- if (symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
12
- return target;
13
- };
14
- var __copyProps = (to, from, except, desc) => {
15
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
16
- key = keys[i];
17
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
18
- get: ((k) => from[k]).bind(null, key),
19
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
20
- });
21
- }
22
- return to;
23
- };
24
- var __reExport = (target, mod, secondTarget, symbols) => {
25
- if (symbols) {
26
- __defProp(target, Symbol.toStringTag, { value: "Module" });
27
- secondTarget && __defProp(secondTarget, Symbol.toStringTag, { value: "Module" });
28
- }
29
- __copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default");
30
- };
31
- export { __export, __reExport };
@@ -1,10 +0,0 @@
1
- import { __export, __reExport } from "../../../../../../../_virtual/rolldown:runtime.js";
2
- import { m, motion } from "framer-motion";
3
- export * from "framer-motion";
4
- var react_exports = /* @__PURE__ */ __export({
5
- m: () => m,
6
- motion: () => motion
7
- }, 1);
8
- import * as import_framer_motion from "framer-motion";
9
- __reExport(react_exports, import_framer_motion, void 0, 1);
10
- export { motion, react_exports };