@vuer-ai/vuer-uikit 0.0.2 → 0.0.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.
- package/README.md +80 -0
- package/dist/chunk-25GQKTNF.mjs +105 -0
- package/dist/chunk-277NQUJD.js +99 -0
- package/dist/chunk-3FR3WKI4.mjs +24 -0
- package/dist/chunk-3Q75Z2CT.mjs +76 -0
- package/dist/chunk-5BIQ3IN7.js +93 -0
- package/dist/chunk-5GPQ7U5B.mjs +50 -0
- package/dist/chunk-66JQXJEV.mjs +272 -0
- package/dist/chunk-6ILSFDR5.mjs +161 -0
- package/dist/chunk-6L4KPPOD.mjs +90 -0
- package/dist/chunk-75QDQ67T.js +56 -0
- package/dist/chunk-7A7VNE3J.mjs +31 -0
- package/dist/chunk-7SXCVFSA.mjs +200 -0
- package/dist/chunk-7V4ELMOH.js +52 -0
- package/dist/chunk-7WUQTWQX.js +303 -0
- package/dist/chunk-A2Z57NAA.js +202 -0
- package/dist/chunk-ATDHGFVI.mjs +82 -0
- package/dist/chunk-ATEHWT2R.mjs +78 -0
- package/dist/chunk-B5EMQBVL.js +93 -0
- package/dist/chunk-CLTLT5XW.js +27 -0
- package/dist/chunk-COFRS37Z.mjs +337 -0
- package/dist/chunk-CP7QYV4N.mjs +110 -0
- package/dist/chunk-CZSRIDXN.mjs +165 -0
- package/dist/chunk-D4C5V4EN.mjs +53 -0
- package/dist/chunk-DWIK2CUV.mjs +45 -0
- package/dist/chunk-ECWCQWV5.js +148 -0
- package/dist/chunk-ENZI5WM7.js +108 -0
- package/dist/chunk-FVT46HEE.js +21 -0
- package/dist/chunk-FXIL4NQZ.js +58 -0
- package/dist/chunk-FYS6YECN.js +33 -0
- package/dist/chunk-G7XNQVPB.js +187 -0
- package/dist/chunk-GSXXTAQ3.js +373 -0
- package/dist/chunk-HUQZOPYD.js +2 -0
- package/dist/chunk-HW6SLBO3.mjs +9 -0
- package/dist/chunk-IPKCIMU4.mjs +156 -0
- package/dist/chunk-J7PTSP4Q.mjs +19 -0
- package/dist/chunk-KJ42IGH6.js +2 -0
- package/dist/chunk-KO7BQ6RR.js +83 -0
- package/dist/chunk-KQHNQQUZ.js +103 -0
- package/dist/chunk-KVFK3YC7.js +187 -0
- package/dist/chunk-KYKEJFJT.js +110 -0
- package/dist/chunk-LD7Y34QT.js +79 -0
- package/dist/chunk-LVSI4HYF.mjs +409 -0
- package/dist/chunk-M3KBBKQR.mjs +15 -0
- package/dist/chunk-MASRZTZC.mjs +34 -0
- package/dist/chunk-NN7R5DNL.mjs +119 -0
- package/dist/chunk-OE56M4MX.js +93 -0
- package/dist/chunk-OTDY2E2A.js +163 -0
- package/dist/chunk-PKGNHHWG.mjs +60 -0
- package/dist/chunk-Q3APPCB2.mjs +91 -0
- package/dist/chunk-QOUX33X5.mjs +111 -0
- package/dist/chunk-QS7WS6DD.mjs +1 -0
- package/dist/chunk-QZASHJNJ.js +24 -0
- package/dist/chunk-R6XNT4PN.js +431 -0
- package/dist/chunk-RACVRWME.js +136 -0
- package/dist/chunk-S2F2GRDB.mjs +1 -0
- package/dist/chunk-SI56IQWH.js +102 -0
- package/dist/chunk-ST4P6AN6.js +2 -0
- package/dist/chunk-TOZYLDAL.mjs +72 -0
- package/dist/chunk-UFR656UY.mjs +87 -0
- package/dist/chunk-UWO6RBCE.js +11 -0
- package/dist/chunk-VGCVIHBR.mjs +1 -0
- package/dist/chunk-WOG6UIG5.mjs +71 -0
- package/dist/chunk-X2QENXCS.mjs +54 -0
- package/dist/chunk-XACRGXGF.js +75 -0
- package/dist/chunk-XPNUQSKQ.mjs +94 -0
- package/dist/chunk-YQORMF34.js +110 -0
- package/dist/chunk-Z37VNICQ.js +67 -0
- package/dist/chunk-ZJXBC33M.js +112 -0
- package/dist/highlight-cursor/cursor-context.d.mts +7 -0
- package/dist/highlight-cursor/cursor-context.d.ts +7 -0
- package/dist/highlight-cursor/cursor-context.js +14 -0
- package/dist/highlight-cursor/cursor-context.mjs +1 -0
- package/dist/highlight-cursor/cursor-provider.d.mts +7 -0
- package/dist/highlight-cursor/cursor-provider.d.ts +7 -0
- package/dist/highlight-cursor/cursor-provider.js +12 -0
- package/dist/highlight-cursor/cursor-provider.mjs +3 -0
- package/dist/highlight-cursor/enhanced-components.d.mts +20 -0
- package/dist/highlight-cursor/enhanced-components.d.ts +20 -0
- package/dist/highlight-cursor/enhanced-components.js +36 -0
- package/dist/highlight-cursor/enhanced-components.mjs +11 -0
- package/dist/highlight-cursor/index.d.mts +16 -0
- package/dist/highlight-cursor/index.d.ts +16 -0
- package/dist/highlight-cursor/index.js +50 -0
- package/dist/highlight-cursor/index.mjs +13 -0
- package/dist/highlight-cursor/tabs-cursor-context.d.mts +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.d.ts +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.js +14 -0
- package/dist/highlight-cursor/tabs-cursor-context.mjs +1 -0
- package/dist/highlight-cursor/types.d.mts +39 -0
- package/dist/highlight-cursor/types.d.ts +39 -0
- package/dist/highlight-cursor/types.js +2 -0
- package/dist/highlight-cursor/types.mjs +1 -0
- package/dist/highlight-cursor/with-cursor.d.mts +7 -0
- package/dist/highlight-cursor/with-cursor.d.ts +7 -0
- package/dist/highlight-cursor/with-cursor.js +11 -0
- package/dist/highlight-cursor/with-cursor.mjs +2 -0
- package/dist/index.css +314 -0
- package/dist/index.d.mts +51 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +425 -6744
- package/dist/index.mjs +34 -0
- package/dist/styles/theme.css +191 -0
- package/dist/styles/theme.d.mts +2 -0
- package/dist/styles/theme.d.ts +2 -0
- package/dist/styles/toast.css +58 -0
- package/dist/styles/toast.d.mts +2 -0
- package/dist/styles/toast.d.ts +2 -0
- package/dist/styles/variables.css +188 -0
- package/dist/styles/variables.d.mts +2 -0
- package/dist/styles/variables.d.ts +2 -0
- package/dist/ui/avatar.d.mts +16 -0
- package/dist/ui/avatar.d.ts +16 -0
- package/dist/ui/avatar.js +23 -0
- package/dist/ui/avatar.mjs +2 -0
- package/dist/ui/badge.d.mts +14 -0
- package/dist/ui/badge.d.ts +14 -0
- package/dist/ui/badge.js +16 -0
- package/dist/ui/badge.mjs +3 -0
- package/dist/ui/button.d.mts +16 -0
- package/dist/ui/button.d.ts +16 -0
- package/dist/ui/button.js +12 -0
- package/dist/ui/button.mjs +3 -0
- package/dist/ui/card.d.mts +12 -0
- package/dist/ui/card.d.ts +12 -0
- package/dist/ui/card.js +36 -0
- package/dist/ui/card.mjs +3 -0
- package/dist/ui/checkbox.d.mts +11 -0
- package/dist/ui/checkbox.d.ts +11 -0
- package/dist/ui/checkbox.js +12 -0
- package/dist/ui/checkbox.mjs +3 -0
- package/dist/ui/collapsible.d.mts +9 -0
- package/dist/ui/collapsible.d.ts +9 -0
- package/dist/ui/collapsible.js +20 -0
- package/dist/ui/collapsible.mjs +3 -0
- package/dist/ui/dropdown.d.mts +28 -0
- package/dist/ui/dropdown.d.ts +28 -0
- package/dist/ui/dropdown.js +68 -0
- package/dist/ui/dropdown.mjs +3 -0
- package/dist/ui/index.d.mts +44 -0
- package/dist/ui/index.d.ts +44 -0
- package/dist/ui/index.js +398 -0
- package/dist/ui/index.mjs +29 -0
- package/dist/ui/input-numbers.d.mts +15 -0
- package/dist/ui/input-numbers.d.ts +15 -0
- package/dist/ui/input-numbers.js +13 -0
- package/dist/ui/input-numbers.mjs +4 -0
- package/dist/ui/input.d.mts +22 -0
- package/dist/ui/input.d.ts +22 -0
- package/dist/ui/input.js +16 -0
- package/dist/ui/input.mjs +3 -0
- package/dist/ui/layout.d.mts +12 -0
- package/dist/ui/layout.d.ts +12 -0
- package/dist/ui/layout.js +12 -0
- package/dist/ui/layout.mjs +3 -0
- package/dist/ui/modal.d.mts +28 -0
- package/dist/ui/modal.d.ts +28 -0
- package/dist/ui/modal.js +48 -0
- package/dist/ui/modal.mjs +3 -0
- package/dist/ui/popover.d.mts +10 -0
- package/dist/ui/popover.d.ts +10 -0
- package/dist/ui/popover.js +23 -0
- package/dist/ui/popover.mjs +2 -0
- package/dist/ui/radio-group.d.mts +8 -0
- package/dist/ui/radio-group.d.ts +8 -0
- package/dist/ui/radio-group.js +16 -0
- package/dist/ui/radio-group.mjs +3 -0
- package/dist/ui/select.d.mts +28 -0
- package/dist/{types/ui → ui}/select.d.ts +18 -14
- package/dist/ui/select.js +48 -0
- package/dist/ui/select.mjs +3 -0
- package/dist/ui/sheet.d.mts +16 -0
- package/dist/ui/sheet.d.ts +16 -0
- package/dist/ui/sheet.js +39 -0
- package/dist/ui/sheet.mjs +2 -0
- package/dist/ui/slider.d.mts +10 -0
- package/dist/ui/slider.d.ts +10 -0
- package/dist/ui/slider.js +12 -0
- package/dist/ui/slider.mjs +3 -0
- package/dist/ui/switch.d.mts +7 -0
- package/dist/ui/switch.d.ts +7 -0
- package/dist/ui/switch.js +12 -0
- package/dist/ui/switch.mjs +3 -0
- package/dist/ui/tabs.d.mts +16 -0
- package/dist/ui/tabs.d.ts +16 -0
- package/dist/ui/tabs.js +25 -0
- package/dist/ui/tabs.mjs +4 -0
- package/dist/ui/textarea.d.mts +16 -0
- package/dist/ui/textarea.d.ts +16 -0
- package/dist/ui/textarea.js +12 -0
- package/dist/ui/textarea.mjs +3 -0
- package/dist/ui/theme-context.d.mts +17 -0
- package/dist/{types/ui → ui}/theme-context.d.ts +5 -3
- package/dist/ui/theme-context.js +14 -0
- package/dist/ui/theme-context.mjs +1 -0
- package/dist/ui/toast.d.mts +7 -0
- package/dist/ui/toast.d.ts +7 -0
- package/dist/ui/toast.js +14 -0
- package/dist/ui/toast.mjs +1 -0
- package/dist/ui/toggle-group.d.mts +12 -0
- package/dist/ui/toggle-group.d.ts +12 -0
- package/dist/ui/toggle-group.js +17 -0
- package/dist/ui/toggle-group.mjs +4 -0
- package/dist/ui/toggle.d.mts +13 -0
- package/dist/ui/toggle.d.ts +13 -0
- package/dist/ui/toggle.js +16 -0
- package/dist/ui/toggle.mjs +3 -0
- package/dist/ui/tooltip.d.mts +10 -0
- package/dist/ui/tooltip.d.ts +10 -0
- package/dist/ui/tooltip.js +23 -0
- package/dist/ui/tooltip.mjs +2 -0
- package/dist/ui/tree-view.d.mts +27 -0
- package/dist/ui/tree-view.d.ts +27 -0
- package/dist/ui/tree-view.js +11 -0
- package/dist/ui/tree-view.mjs +2 -0
- package/dist/utils/cn.d.mts +5 -0
- package/dist/utils/cn.d.ts +5 -0
- package/dist/utils/cn.js +10 -0
- package/dist/utils/cn.mjs +1 -0
- package/dist/utils/index.d.mts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +11 -0
- package/dist/utils/index.mjs +2 -0
- package/package.json +49 -27
- package/dist/index.umd.js +0 -74
- package/dist/types/index.d.ts +0 -4
- package/dist/types/lib/utils.d.ts +0 -2
- package/dist/types/ui/button.d.ts +0 -13
- package/dist/types/ui/input.d.ts +0 -19
- package/dist/vuer-uikit.css +0 -1
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkCLTLT5XW_js = require('./chunk-CLTLT5XW.js');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var getVisibleRect = (element, elementRect) => {
|
|
8
|
+
let parent = element.parentElement;
|
|
9
|
+
let visibleRect = {
|
|
10
|
+
...elementRect,
|
|
11
|
+
left: elementRect.left,
|
|
12
|
+
right: elementRect.right,
|
|
13
|
+
top: elementRect.top,
|
|
14
|
+
bottom: elementRect.bottom,
|
|
15
|
+
width: elementRect.width,
|
|
16
|
+
height: elementRect.height,
|
|
17
|
+
x: elementRect.x,
|
|
18
|
+
y: elementRect.y
|
|
19
|
+
};
|
|
20
|
+
while (parent) {
|
|
21
|
+
const style = window.getComputedStyle(parent);
|
|
22
|
+
const hasOverflow = [style.overflowY, style.overflowX].some(
|
|
23
|
+
(overflow) => ["auto", "scroll", "hidden"].includes(overflow)
|
|
24
|
+
);
|
|
25
|
+
if (hasOverflow) {
|
|
26
|
+
const parentRect = parent.getBoundingClientRect();
|
|
27
|
+
const newLeft = Math.max(visibleRect.left, parentRect.left);
|
|
28
|
+
const newTop = Math.max(visibleRect.top, parentRect.top);
|
|
29
|
+
const newRight = Math.min(visibleRect.right, parentRect.right);
|
|
30
|
+
const newBottom = Math.min(visibleRect.bottom, parentRect.bottom);
|
|
31
|
+
visibleRect = {
|
|
32
|
+
...visibleRect,
|
|
33
|
+
left: newLeft,
|
|
34
|
+
top: newTop,
|
|
35
|
+
right: newRight,
|
|
36
|
+
bottom: newBottom,
|
|
37
|
+
width: Math.max(0, newRight - newLeft),
|
|
38
|
+
height: Math.max(0, newBottom - newTop),
|
|
39
|
+
x: newLeft,
|
|
40
|
+
y: newTop
|
|
41
|
+
};
|
|
42
|
+
if (visibleRect.width <= 0 || visibleRect.height <= 0) {
|
|
43
|
+
return new DOMRect(0, 0, 0, 0);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
parent = parent.parentElement;
|
|
47
|
+
}
|
|
48
|
+
return DOMRect.fromRect(visibleRect);
|
|
49
|
+
};
|
|
50
|
+
function withCursor(Component) {
|
|
51
|
+
const displayName = Component.displayName || Component.name || "Component";
|
|
52
|
+
const EnhancedComponent = react.forwardRef(
|
|
53
|
+
({ id: propId, onMouseEnter, onMouseMove, onMouseLeave, ...props }, ref) => {
|
|
54
|
+
const { registerHoveredElement, unregisterHoveredElement, updateElementDimensions } = chunkCLTLT5XW_js.useCursor();
|
|
55
|
+
const generatedId = react.useId();
|
|
56
|
+
const id = propId || `cursor-element-${generatedId}`;
|
|
57
|
+
const elementRef = react.useRef(null);
|
|
58
|
+
const handleMouseEnter = (event) => {
|
|
59
|
+
if (elementRef.current) {
|
|
60
|
+
const elementRect = elementRef.current.getBoundingClientRect();
|
|
61
|
+
const visibleRect = getVisibleRect(elementRef.current, elementRect);
|
|
62
|
+
registerHoveredElement(id, visibleRect, elementRef.current);
|
|
63
|
+
}
|
|
64
|
+
onMouseEnter == null ? void 0 : onMouseEnter(event);
|
|
65
|
+
};
|
|
66
|
+
const handleMouseMove = (event) => {
|
|
67
|
+
if (elementRef.current) {
|
|
68
|
+
const elementRect = elementRef.current.getBoundingClientRect();
|
|
69
|
+
const visibleRect = getVisibleRect(elementRef.current, elementRect);
|
|
70
|
+
updateElementDimensions(visibleRect);
|
|
71
|
+
}
|
|
72
|
+
onMouseMove == null ? void 0 : onMouseMove(event);
|
|
73
|
+
};
|
|
74
|
+
const handleMouseOut = (event) => {
|
|
75
|
+
var _a;
|
|
76
|
+
const rect = (_a = elementRef.current) == null ? void 0 : _a.getBoundingClientRect();
|
|
77
|
+
if (rect) {
|
|
78
|
+
const { clientX, clientY } = event;
|
|
79
|
+
const isOutside = clientX < rect.left || clientX > rect.right || clientY < rect.top || clientY > rect.bottom;
|
|
80
|
+
if (isOutside) {
|
|
81
|
+
unregisterHoveredElement();
|
|
82
|
+
}
|
|
83
|
+
} else {
|
|
84
|
+
unregisterHoveredElement();
|
|
85
|
+
}
|
|
86
|
+
onMouseLeave == null ? void 0 : onMouseLeave(event);
|
|
87
|
+
};
|
|
88
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
89
|
+
Component,
|
|
90
|
+
{
|
|
91
|
+
...props,
|
|
92
|
+
id,
|
|
93
|
+
ref: (node) => {
|
|
94
|
+
if (typeof ref === "function") {
|
|
95
|
+
ref(node);
|
|
96
|
+
} else if (ref) {
|
|
97
|
+
ref.current = node;
|
|
98
|
+
}
|
|
99
|
+
elementRef.current = node;
|
|
100
|
+
},
|
|
101
|
+
onMouseEnter: handleMouseEnter,
|
|
102
|
+
onMouseMove: handleMouseMove,
|
|
103
|
+
onMouseOut: handleMouseOut
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
EnhancedComponent.displayName = `withCursor(${displayName})`;
|
|
109
|
+
return EnhancedComponent;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
exports.withCursor = withCursor;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkCLTLT5XW_js = require('../chunk-CLTLT5XW.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "CursorContext", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkCLTLT5XW_js.CursorContext; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "useCursor", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkCLTLT5XW_js.useCursor; }
|
|
14
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CursorContext, useCursor } from '../chunk-3FR3WKI4.mjs';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { CursorProviderProps } from './types.mjs';
|
|
3
|
+
import 'react';
|
|
4
|
+
|
|
5
|
+
declare const CursorProvider: ({ children, maxOffsetX, maxOffsetY, cursorSize, transitionDuration, cursorClassName, className, as: Component, ...props }: CursorProviderProps) => react_jsx_runtime.JSX.Element;
|
|
6
|
+
|
|
7
|
+
export { CursorProvider };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { CursorProviderProps } from './types.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
|
|
5
|
+
declare const CursorProvider: ({ children, maxOffsetX, maxOffsetY, cursorSize, transitionDuration, cursorClassName, className, as: Component, ...props }: CursorProviderProps) => react_jsx_runtime.JSX.Element;
|
|
6
|
+
|
|
7
|
+
export { CursorProvider };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkA2Z57NAA_js = require('../chunk-A2Z57NAA.js');
|
|
4
|
+
require('../chunk-UWO6RBCE.js');
|
|
5
|
+
require('../chunk-CLTLT5XW.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "CursorProvider", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkA2Z57NAA_js.CursorProvider; }
|
|
12
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EnhancedComponentProps } from './types.mjs';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { Textarea } from '../ui/textarea.mjs';
|
|
4
|
+
import { TabsProps } from '../ui/tabs.mjs';
|
|
5
|
+
import { ButtonProps } from '../ui/button.mjs';
|
|
6
|
+
import { InputRootProps } from '../ui/input.mjs';
|
|
7
|
+
import { SelectTrigger } from '../ui/select.mjs';
|
|
8
|
+
import 'react/jsx-runtime';
|
|
9
|
+
import 'class-variance-authority/types';
|
|
10
|
+
import 'class-variance-authority';
|
|
11
|
+
import '@radix-ui/react-tabs';
|
|
12
|
+
import '@radix-ui/react-select';
|
|
13
|
+
|
|
14
|
+
declare const CursorButton: react.ForwardRefExoticComponent<Omit<EnhancedComponentProps<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>, "ref"> & react.RefAttributes<HTMLElement>>;
|
|
15
|
+
declare const CursorTabs: react.ForwardRefExoticComponent<Omit<EnhancedComponentProps<TabsProps>, "ref"> & react.RefAttributes<HTMLElement>>;
|
|
16
|
+
declare const CursorInputRoot: react.ForwardRefExoticComponent<Omit<EnhancedComponentProps<Omit<InputRootProps, "ref"> & react.RefAttributes<HTMLInputElement>>, "ref"> & react.RefAttributes<HTMLElement>>;
|
|
17
|
+
declare const CursorSelectTrigger: typeof SelectTrigger;
|
|
18
|
+
declare const CursorTextarea: typeof Textarea;
|
|
19
|
+
|
|
20
|
+
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { EnhancedComponentProps } from './types.js';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { Textarea } from '../ui/textarea.js';
|
|
4
|
+
import { TabsProps } from '../ui/tabs.js';
|
|
5
|
+
import { ButtonProps } from '../ui/button.js';
|
|
6
|
+
import { InputRootProps } from '../ui/input.js';
|
|
7
|
+
import { SelectTrigger } from '../ui/select.js';
|
|
8
|
+
import 'react/jsx-runtime';
|
|
9
|
+
import 'class-variance-authority/types';
|
|
10
|
+
import 'class-variance-authority';
|
|
11
|
+
import '@radix-ui/react-tabs';
|
|
12
|
+
import '@radix-ui/react-select';
|
|
13
|
+
|
|
14
|
+
declare const CursorButton: react.ForwardRefExoticComponent<Omit<EnhancedComponentProps<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>, "ref"> & react.RefAttributes<HTMLElement>>;
|
|
15
|
+
declare const CursorTabs: react.ForwardRefExoticComponent<Omit<EnhancedComponentProps<TabsProps>, "ref"> & react.RefAttributes<HTMLElement>>;
|
|
16
|
+
declare const CursorInputRoot: react.ForwardRefExoticComponent<Omit<EnhancedComponentProps<Omit<InputRootProps, "ref"> & react.RefAttributes<HTMLInputElement>>, "ref"> & react.RefAttributes<HTMLElement>>;
|
|
17
|
+
declare const CursorSelectTrigger: typeof SelectTrigger;
|
|
18
|
+
declare const CursorTextarea: typeof Textarea;
|
|
19
|
+
|
|
20
|
+
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkFVT46HEE_js = require('../chunk-FVT46HEE.js');
|
|
4
|
+
require('../chunk-RACVRWME.js');
|
|
5
|
+
require('../chunk-7V4ELMOH.js');
|
|
6
|
+
require('../chunk-7WUQTWQX.js');
|
|
7
|
+
require('../chunk-5BIQ3IN7.js');
|
|
8
|
+
require('../chunk-ENZI5WM7.js');
|
|
9
|
+
require('../chunk-B5EMQBVL.js');
|
|
10
|
+
require('../chunk-ZJXBC33M.js');
|
|
11
|
+
require('../chunk-ST4P6AN6.js');
|
|
12
|
+
require('../chunk-UWO6RBCE.js');
|
|
13
|
+
require('../chunk-CLTLT5XW.js');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Object.defineProperty(exports, "CursorButton", {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return chunkFVT46HEE_js.CursorButton; }
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports, "CursorInputRoot", {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () { return chunkFVT46HEE_js.CursorInputRoot; }
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(exports, "CursorSelectTrigger", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () { return chunkFVT46HEE_js.CursorSelectTrigger; }
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(exports, "CursorTabs", {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () { return chunkFVT46HEE_js.CursorTabs; }
|
|
32
|
+
});
|
|
33
|
+
Object.defineProperty(exports, "CursorTextarea", {
|
|
34
|
+
enumerable: true,
|
|
35
|
+
get: function () { return chunkFVT46HEE_js.CursorTextarea; }
|
|
36
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-M3KBBKQR.mjs';
|
|
2
|
+
import '../chunk-QOUX33X5.mjs';
|
|
3
|
+
import '../chunk-5GPQ7U5B.mjs';
|
|
4
|
+
import '../chunk-66JQXJEV.mjs';
|
|
5
|
+
import '../chunk-Q3APPCB2.mjs';
|
|
6
|
+
import '../chunk-25GQKTNF.mjs';
|
|
7
|
+
import '../chunk-6L4KPPOD.mjs';
|
|
8
|
+
import '../chunk-CP7QYV4N.mjs';
|
|
9
|
+
import '../chunk-QS7WS6DD.mjs';
|
|
10
|
+
import '../chunk-HW6SLBO3.mjs';
|
|
11
|
+
import '../chunk-3FR3WKI4.mjs';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { CursorProvider } from './cursor-provider.mjs';
|
|
2
|
+
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from './enhanced-components.mjs';
|
|
3
|
+
export { TabsCursorProvider } from './tabs-cursor-context.mjs';
|
|
4
|
+
export { withCursor } from './with-cursor.mjs';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
import './types.mjs';
|
|
7
|
+
import 'react';
|
|
8
|
+
import '../ui/textarea.mjs';
|
|
9
|
+
import 'class-variance-authority/types';
|
|
10
|
+
import 'class-variance-authority';
|
|
11
|
+
import '../ui/tabs.mjs';
|
|
12
|
+
import '@radix-ui/react-tabs';
|
|
13
|
+
import '../ui/button.mjs';
|
|
14
|
+
import '../ui/input.mjs';
|
|
15
|
+
import '../ui/select.mjs';
|
|
16
|
+
import '@radix-ui/react-select';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export { CursorProvider } from './cursor-provider.js';
|
|
2
|
+
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from './enhanced-components.js';
|
|
3
|
+
export { TabsCursorProvider } from './tabs-cursor-context.js';
|
|
4
|
+
export { withCursor } from './with-cursor.js';
|
|
5
|
+
import 'react/jsx-runtime';
|
|
6
|
+
import './types.js';
|
|
7
|
+
import 'react';
|
|
8
|
+
import '../ui/textarea.js';
|
|
9
|
+
import 'class-variance-authority/types';
|
|
10
|
+
import 'class-variance-authority';
|
|
11
|
+
import '../ui/tabs.js';
|
|
12
|
+
import '@radix-ui/react-tabs';
|
|
13
|
+
import '../ui/button.js';
|
|
14
|
+
import '../ui/input.js';
|
|
15
|
+
import '../ui/select.js';
|
|
16
|
+
import '@radix-ui/react-select';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
require('../chunk-KJ42IGH6.js');
|
|
4
|
+
var chunkA2Z57NAA_js = require('../chunk-A2Z57NAA.js');
|
|
5
|
+
var chunkFVT46HEE_js = require('../chunk-FVT46HEE.js');
|
|
6
|
+
require('../chunk-RACVRWME.js');
|
|
7
|
+
require('../chunk-7V4ELMOH.js');
|
|
8
|
+
require('../chunk-7WUQTWQX.js');
|
|
9
|
+
require('../chunk-5BIQ3IN7.js');
|
|
10
|
+
require('../chunk-ENZI5WM7.js');
|
|
11
|
+
var chunkB5EMQBVL_js = require('../chunk-B5EMQBVL.js');
|
|
12
|
+
var chunkZJXBC33M_js = require('../chunk-ZJXBC33M.js');
|
|
13
|
+
require('../chunk-ST4P6AN6.js');
|
|
14
|
+
require('../chunk-UWO6RBCE.js');
|
|
15
|
+
require('../chunk-CLTLT5XW.js');
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Object.defineProperty(exports, "CursorProvider", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkA2Z57NAA_js.CursorProvider; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "CursorButton", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkFVT46HEE_js.CursorButton; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "CursorInputRoot", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkFVT46HEE_js.CursorInputRoot; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "CursorSelectTrigger", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkFVT46HEE_js.CursorSelectTrigger; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "CursorTabs", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunkFVT46HEE_js.CursorTabs; }
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(exports, "CursorTextarea", {
|
|
40
|
+
enumerable: true,
|
|
41
|
+
get: function () { return chunkFVT46HEE_js.CursorTextarea; }
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(exports, "TabsCursorProvider", {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () { return chunkB5EMQBVL_js.TabsCursorProvider; }
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(exports, "withCursor", {
|
|
48
|
+
enumerable: true,
|
|
49
|
+
get: function () { return chunkZJXBC33M_js.withCursor; }
|
|
50
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import '../chunk-VGCVIHBR.mjs';
|
|
2
|
+
export { CursorProvider } from '../chunk-7SXCVFSA.mjs';
|
|
3
|
+
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-M3KBBKQR.mjs';
|
|
4
|
+
import '../chunk-QOUX33X5.mjs';
|
|
5
|
+
import '../chunk-5GPQ7U5B.mjs';
|
|
6
|
+
import '../chunk-66JQXJEV.mjs';
|
|
7
|
+
import '../chunk-Q3APPCB2.mjs';
|
|
8
|
+
import '../chunk-25GQKTNF.mjs';
|
|
9
|
+
export { TabsCursorProvider } from '../chunk-6L4KPPOD.mjs';
|
|
10
|
+
export { withCursor } from '../chunk-CP7QYV4N.mjs';
|
|
11
|
+
import '../chunk-QS7WS6DD.mjs';
|
|
12
|
+
import '../chunk-HW6SLBO3.mjs';
|
|
13
|
+
import '../chunk-3FR3WKI4.mjs';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
interface TabsCursorContextType {
|
|
5
|
+
setCursorTarget: (el: HTMLElement | null) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const TabsCursorProvider: ({ children, className, ...props }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
12
|
+
declare const useTabsCursor: () => TabsCursorContextType;
|
|
13
|
+
|
|
14
|
+
export { TabsCursorProvider, useTabsCursor };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
3
|
+
|
|
4
|
+
interface TabsCursorContextType {
|
|
5
|
+
setCursorTarget: (el: HTMLElement | null) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const TabsCursorProvider: ({ children, className, ...props }: {
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: CSSProperties;
|
|
11
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
12
|
+
declare const useTabsCursor: () => TabsCursorContextType;
|
|
13
|
+
|
|
14
|
+
export { TabsCursorProvider, useTabsCursor };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkB5EMQBVL_js = require('../chunk-B5EMQBVL.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "TabsCursorProvider", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkB5EMQBVL_js.TabsCursorProvider; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "useTabsCursor", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkB5EMQBVL_js.useTabsCursor; }
|
|
14
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TabsCursorProvider, useTabsCursor } from '../chunk-6L4KPPOD.mjs';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode, ElementType, MouseEvent, ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
interface CursorContextType {
|
|
4
|
+
mousePosition: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
hoveredElementId: string | null;
|
|
9
|
+
elementDimensions: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
right?: number;
|
|
15
|
+
bottom?: number;
|
|
16
|
+
};
|
|
17
|
+
registerHoveredElement: (id: string, dimensions: DOMRect, element?: HTMLElement) => void;
|
|
18
|
+
unregisterHoveredElement: () => void;
|
|
19
|
+
updateElementDimensions: (dimensions: DOMRect) => void;
|
|
20
|
+
}
|
|
21
|
+
interface CursorProviderProps extends HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
maxOffsetX?: number;
|
|
24
|
+
maxOffsetY?: number;
|
|
25
|
+
cursorSize?: number;
|
|
26
|
+
transitionDuration?: number;
|
|
27
|
+
cursorClassName?: string;
|
|
28
|
+
as?: ElementType;
|
|
29
|
+
}
|
|
30
|
+
interface WithCursorProps {
|
|
31
|
+
id?: string;
|
|
32
|
+
onMouseEnter?: (event: MouseEvent<HTMLElement>) => void;
|
|
33
|
+
onMouseMove?: (event: MouseEvent<HTMLElement>) => void;
|
|
34
|
+
onMouseLeave?: (event: MouseEvent<HTMLElement>) => void;
|
|
35
|
+
}
|
|
36
|
+
type EnhancedComponentProps<P> = P & WithCursorProps;
|
|
37
|
+
type EnhancedComponent<P = Record<string, unknown>> = ComponentType<EnhancedComponentProps<P>>;
|
|
38
|
+
|
|
39
|
+
export type { CursorContextType, CursorProviderProps, EnhancedComponent, EnhancedComponentProps, WithCursorProps };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode, ElementType, MouseEvent, ComponentType } from 'react';
|
|
2
|
+
|
|
3
|
+
interface CursorContextType {
|
|
4
|
+
mousePosition: {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
};
|
|
8
|
+
hoveredElementId: string | null;
|
|
9
|
+
elementDimensions: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
right?: number;
|
|
15
|
+
bottom?: number;
|
|
16
|
+
};
|
|
17
|
+
registerHoveredElement: (id: string, dimensions: DOMRect, element?: HTMLElement) => void;
|
|
18
|
+
unregisterHoveredElement: () => void;
|
|
19
|
+
updateElementDimensions: (dimensions: DOMRect) => void;
|
|
20
|
+
}
|
|
21
|
+
interface CursorProviderProps extends HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
maxOffsetX?: number;
|
|
24
|
+
maxOffsetY?: number;
|
|
25
|
+
cursorSize?: number;
|
|
26
|
+
transitionDuration?: number;
|
|
27
|
+
cursorClassName?: string;
|
|
28
|
+
as?: ElementType;
|
|
29
|
+
}
|
|
30
|
+
interface WithCursorProps {
|
|
31
|
+
id?: string;
|
|
32
|
+
onMouseEnter?: (event: MouseEvent<HTMLElement>) => void;
|
|
33
|
+
onMouseMove?: (event: MouseEvent<HTMLElement>) => void;
|
|
34
|
+
onMouseLeave?: (event: MouseEvent<HTMLElement>) => void;
|
|
35
|
+
}
|
|
36
|
+
type EnhancedComponentProps<P> = P & WithCursorProps;
|
|
37
|
+
type EnhancedComponent<P = Record<string, unknown>> = ComponentType<EnhancedComponentProps<P>>;
|
|
38
|
+
|
|
39
|
+
export type { CursorContextType, CursorProviderProps, EnhancedComponent, EnhancedComponentProps, WithCursorProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentType } from 'react';
|
|
3
|
+
import { EnhancedComponentProps } from './types.mjs';
|
|
4
|
+
|
|
5
|
+
declare function withCursor<P extends object>(Component: ComponentType<P>): react.ForwardRefExoticComponent<react.PropsWithoutRef<EnhancedComponentProps<P>> & react.RefAttributes<HTMLElement>>;
|
|
6
|
+
|
|
7
|
+
export { withCursor };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentType } from 'react';
|
|
3
|
+
import { EnhancedComponentProps } from './types.js';
|
|
4
|
+
|
|
5
|
+
declare function withCursor<P extends object>(Component: ComponentType<P>): react.ForwardRefExoticComponent<react.PropsWithoutRef<EnhancedComponentProps<P>> & react.RefAttributes<HTMLElement>>;
|
|
6
|
+
|
|
7
|
+
export { withCursor };
|