@vuer-ai/vuer-uikit 0.0.21 → 0.0.23
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/{chunk-G5KMD72J.mjs → chunk-7JAADHQO.mjs} +49 -41
- package/dist/{chunk-UPTTGNMB.js → chunk-C7VFXWS6.js} +2 -2
- package/dist/{chunk-FORVP7XH.js → chunk-FUQCOZWA.js} +49 -41
- package/dist/{chunk-NODFVSVC.mjs → chunk-QZVQRU25.mjs} +2 -2
- package/dist/highlight-cursor/enhanced-components.js +8 -8
- package/dist/highlight-cursor/enhanced-components.mjs +3 -3
- package/dist/highlight-cursor/index.js +8 -8
- package/dist/highlight-cursor/index.mjs +3 -3
- package/dist/index.js +133 -133
- package/dist/index.mjs +13 -13
- package/dist/ui/index.js +120 -120
- package/dist/ui/index.mjs +12 -12
- package/dist/ui/input-numbers.js +2 -2
- package/dist/ui/input-numbers.mjs +1 -1
- package/dist/ui/version-badge.js +2 -2
- package/dist/ui/version-badge.mjs +1 -1
- package/package.json +1 -1
- package/src/ui/input-numbers.tsx +65 -54
- package/src/ui/version-badge.tsx +5 -3
- package/dist/{chunk-HLJ7PQA7.mjs → chunk-ALTUOIWV.mjs} +2 -2
- package/dist/{chunk-V4KNORQN.js → chunk-W7D57QE6.js} +2 -2
|
@@ -37,50 +37,58 @@ var InputNumbers = forwardRef(function InputNumbers2({ size, value, onValuesChan
|
|
|
37
37
|
};
|
|
38
38
|
document.addEventListener("click", stopClick2, true);
|
|
39
39
|
}, []);
|
|
40
|
-
const bind = useGesture(
|
|
41
|
-
|
|
42
|
-
event
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
40
|
+
const bind = useGesture(
|
|
41
|
+
{
|
|
42
|
+
onDrag: ({ delta: [dx], event, initial, distance: [, oy], xy, memo = 0 }) => {
|
|
43
|
+
if (typeof document === "undefined") return memo || 0;
|
|
44
|
+
event.stopPropagation();
|
|
45
|
+
event.preventDefault();
|
|
46
|
+
if (selectRange.current[0] === null) {
|
|
47
|
+
selectRange.current[0] = getHoverElementAndIndex(
|
|
48
|
+
document.elementFromPoint(...initial),
|
|
49
|
+
inputs.current
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
let newMX = memo + dx / 2;
|
|
53
|
+
if (Math.abs(newMX) >= (inputChange.current ? 1 : 5)) {
|
|
54
|
+
const multiplyStep = event.shiftKey ? 5 : event.altKey ? 1 / 5 : 1;
|
|
55
|
+
const newValue = value.map((v, i) => {
|
|
56
|
+
const [first, last] = selectRange.current;
|
|
57
|
+
if (first === null || last === null) {
|
|
58
|
+
return v;
|
|
59
|
+
} else if (i <= Math.max(first, last) && i >= Math.min(first, last)) {
|
|
60
|
+
return Number(((v || 0) + Math.floor(newMX) * step * multiplyStep).toPrecision(6));
|
|
61
|
+
} else {
|
|
62
|
+
return v;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
onValuesChange == null ? void 0 : onValuesChange(newValue);
|
|
66
|
+
newMX = 0;
|
|
67
|
+
inputChange.current = true;
|
|
68
|
+
changeElementsHoverState(inputs.current, selectRange.current, "x");
|
|
69
|
+
stopClick();
|
|
70
|
+
}
|
|
71
|
+
if (!inputChange.current) {
|
|
72
|
+
const currentElement = document.elementFromPoint(...xy);
|
|
73
|
+
const currentIndex = getHoverElementAndIndex(currentElement, inputs.current);
|
|
74
|
+
selectRange.current[1] = currentIndex ?? selectRange.current[1];
|
|
75
|
+
changeElementsHoverState(inputs.current, selectRange.current, oy !== 0 ? "y" : "none");
|
|
76
|
+
stopClick();
|
|
77
|
+
}
|
|
78
|
+
return newMX;
|
|
79
|
+
},
|
|
80
|
+
onDragEnd: () => {
|
|
81
|
+
if (typeof document === "undefined") return;
|
|
82
|
+
selectRange.current = [null, null];
|
|
83
|
+
inputChange.current = false;
|
|
84
|
+
changeElementsHoverState(inputs.current, selectRange.current, "none");
|
|
75
85
|
}
|
|
76
|
-
return newMX;
|
|
77
86
|
},
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
changeElementsHoverState(inputs.current, selectRange.current, "none");
|
|
87
|
+
{
|
|
88
|
+
// Pass config options to make gesture library SSR-safe
|
|
89
|
+
enabled: typeof document !== "undefined"
|
|
82
90
|
}
|
|
83
|
-
|
|
91
|
+
);
|
|
84
92
|
const valueChangeHandler = useCallback(
|
|
85
93
|
(index) => {
|
|
86
94
|
return (e) => {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var chunkEFIRD3FN_js = require('./chunk-EFIRD3FN.js');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
|
|
6
|
-
var PACKAGE_VERSION = "0.0.
|
|
7
|
-
var PACKAGE_NAME = "@vuer-ai/vuer-uikit";
|
|
6
|
+
var PACKAGE_VERSION = "0.0.23" ;
|
|
7
|
+
var PACKAGE_NAME = "@vuer-ai/vuer-uikit" ;
|
|
8
8
|
function VersionBadge({
|
|
9
9
|
className,
|
|
10
10
|
showPrefix = true,
|
|
@@ -39,50 +39,58 @@ var InputNumbers = react.forwardRef(function InputNumbers2({ size, value, onValu
|
|
|
39
39
|
};
|
|
40
40
|
document.addEventListener("click", stopClick2, true);
|
|
41
41
|
}, []);
|
|
42
|
-
const bind = react$1.useGesture(
|
|
43
|
-
|
|
44
|
-
event
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
42
|
+
const bind = react$1.useGesture(
|
|
43
|
+
{
|
|
44
|
+
onDrag: ({ delta: [dx], event, initial, distance: [, oy], xy, memo = 0 }) => {
|
|
45
|
+
if (typeof document === "undefined") return memo || 0;
|
|
46
|
+
event.stopPropagation();
|
|
47
|
+
event.preventDefault();
|
|
48
|
+
if (selectRange.current[0] === null) {
|
|
49
|
+
selectRange.current[0] = getHoverElementAndIndex(
|
|
50
|
+
document.elementFromPoint(...initial),
|
|
51
|
+
inputs.current
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
let newMX = memo + dx / 2;
|
|
55
|
+
if (Math.abs(newMX) >= (inputChange.current ? 1 : 5)) {
|
|
56
|
+
const multiplyStep = event.shiftKey ? 5 : event.altKey ? 1 / 5 : 1;
|
|
57
|
+
const newValue = value.map((v, i) => {
|
|
58
|
+
const [first, last] = selectRange.current;
|
|
59
|
+
if (first === null || last === null) {
|
|
60
|
+
return v;
|
|
61
|
+
} else if (i <= Math.max(first, last) && i >= Math.min(first, last)) {
|
|
62
|
+
return Number(((v || 0) + Math.floor(newMX) * step * multiplyStep).toPrecision(6));
|
|
63
|
+
} else {
|
|
64
|
+
return v;
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
onValuesChange == null ? void 0 : onValuesChange(newValue);
|
|
68
|
+
newMX = 0;
|
|
69
|
+
inputChange.current = true;
|
|
70
|
+
changeElementsHoverState(inputs.current, selectRange.current, "x");
|
|
71
|
+
stopClick();
|
|
72
|
+
}
|
|
73
|
+
if (!inputChange.current) {
|
|
74
|
+
const currentElement = document.elementFromPoint(...xy);
|
|
75
|
+
const currentIndex = getHoverElementAndIndex(currentElement, inputs.current);
|
|
76
|
+
selectRange.current[1] = currentIndex ?? selectRange.current[1];
|
|
77
|
+
changeElementsHoverState(inputs.current, selectRange.current, oy !== 0 ? "y" : "none");
|
|
78
|
+
stopClick();
|
|
79
|
+
}
|
|
80
|
+
return newMX;
|
|
81
|
+
},
|
|
82
|
+
onDragEnd: () => {
|
|
83
|
+
if (typeof document === "undefined") return;
|
|
84
|
+
selectRange.current = [null, null];
|
|
85
|
+
inputChange.current = false;
|
|
86
|
+
changeElementsHoverState(inputs.current, selectRange.current, "none");
|
|
77
87
|
}
|
|
78
|
-
return newMX;
|
|
79
88
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
changeElementsHoverState(inputs.current, selectRange.current, "none");
|
|
89
|
+
{
|
|
90
|
+
// Pass config options to make gesture library SSR-safe
|
|
91
|
+
enabled: typeof document !== "undefined"
|
|
84
92
|
}
|
|
85
|
-
|
|
93
|
+
);
|
|
86
94
|
const valueChangeHandler = react.useCallback(
|
|
87
95
|
(index) => {
|
|
88
96
|
return (e) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Badge } from './chunk-WO3WHXDP.mjs';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
-
var PACKAGE_VERSION = "0.0.
|
|
5
|
-
var PACKAGE_NAME = "@vuer-ai/vuer-uikit";
|
|
4
|
+
var PACKAGE_VERSION = "0.0.23" ;
|
|
5
|
+
var PACKAGE_NAME = "@vuer-ai/vuer-uikit" ;
|
|
6
6
|
function VersionBadge({
|
|
7
7
|
className,
|
|
8
8
|
showPrefix = true,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-MZ4POL3U.js');
|
|
3
|
+
var chunkW7D57QE6_js = require('../chunk-W7D57QE6.js');
|
|
5
4
|
require('../chunk-IXHMIR5P.js');
|
|
6
5
|
require('../chunk-5OUTEHVX.js');
|
|
6
|
+
require('../chunk-MZ4POL3U.js');
|
|
7
|
+
require('../chunk-OQ237S4Z.js');
|
|
7
8
|
require('../chunk-SKO72K64.js');
|
|
8
9
|
require('../chunk-UFHMEEGL.js');
|
|
9
|
-
require('../chunk-OQ237S4Z.js');
|
|
10
10
|
require('../chunk-XWS4SIB5.js');
|
|
11
11
|
require('../chunk-EOFYA6CS.js');
|
|
12
12
|
require('../chunk-XXWQ4RVP.js');
|
|
@@ -17,21 +17,21 @@ require('../chunk-OTPUWWEB.js');
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "CursorButton", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkW7D57QE6_js.CursorButton; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "CursorInputRoot", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkW7D57QE6_js.CursorInputRoot; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "CursorSelectTrigger", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkW7D57QE6_js.CursorSelectTrigger; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "CursorTabs", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkW7D57QE6_js.CursorTabs; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "CursorTextarea", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkW7D57QE6_js.CursorTextarea; }
|
|
37
37
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-
|
|
2
|
-
import '../chunk-QVUX6LLD.mjs';
|
|
1
|
+
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-ALTUOIWV.mjs';
|
|
3
2
|
import '../chunk-MRVMXKZO.mjs';
|
|
4
3
|
import '../chunk-DDOX4EEM.mjs';
|
|
4
|
+
import '../chunk-QVUX6LLD.mjs';
|
|
5
|
+
import '../chunk-VXHM7V6F.mjs';
|
|
5
6
|
import '../chunk-QYRRQ65X.mjs';
|
|
6
7
|
import '../chunk-44KW6PTD.mjs';
|
|
7
|
-
import '../chunk-VXHM7V6F.mjs';
|
|
8
8
|
import '../chunk-M4IVLZIH.mjs';
|
|
9
9
|
import '../chunk-Q5KEB4UK.mjs';
|
|
10
10
|
import '../chunk-KTNZSZ5Y.mjs';
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
require('../chunk-KJ42IGH6.js');
|
|
4
4
|
var chunkQEY7BWIR_js = require('../chunk-QEY7BWIR.js');
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-MZ4POL3U.js');
|
|
5
|
+
var chunkW7D57QE6_js = require('../chunk-W7D57QE6.js');
|
|
7
6
|
require('../chunk-IXHMIR5P.js');
|
|
8
7
|
require('../chunk-5OUTEHVX.js');
|
|
8
|
+
require('../chunk-MZ4POL3U.js');
|
|
9
|
+
require('../chunk-OQ237S4Z.js');
|
|
9
10
|
require('../chunk-SKO72K64.js');
|
|
10
11
|
var chunkUFHMEEGL_js = require('../chunk-UFHMEEGL.js');
|
|
11
|
-
require('../chunk-OQ237S4Z.js');
|
|
12
12
|
require('../chunk-XWS4SIB5.js');
|
|
13
13
|
require('../chunk-EOFYA6CS.js');
|
|
14
14
|
require('../chunk-XXWQ4RVP.js');
|
|
@@ -23,23 +23,23 @@ Object.defineProperty(exports, "CursorProvider", {
|
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "CursorButton", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkW7D57QE6_js.CursorButton; }
|
|
27
27
|
});
|
|
28
28
|
Object.defineProperty(exports, "CursorInputRoot", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkW7D57QE6_js.CursorInputRoot; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "CursorSelectTrigger", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkW7D57QE6_js.CursorSelectTrigger; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "CursorTabs", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkW7D57QE6_js.CursorTabs; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "CursorTextarea", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkW7D57QE6_js.CursorTextarea; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "withCursor", {
|
|
45
45
|
enumerable: true,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import '../chunk-VGCVIHBR.mjs';
|
|
2
2
|
export { CursorProvider } from '../chunk-OOI3SJDU.mjs';
|
|
3
|
-
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-
|
|
4
|
-
import '../chunk-QVUX6LLD.mjs';
|
|
3
|
+
export { CursorButton, CursorInputRoot, CursorSelectTrigger, CursorTabs, CursorTextarea } from '../chunk-ALTUOIWV.mjs';
|
|
5
4
|
import '../chunk-MRVMXKZO.mjs';
|
|
6
5
|
import '../chunk-DDOX4EEM.mjs';
|
|
6
|
+
import '../chunk-QVUX6LLD.mjs';
|
|
7
|
+
import '../chunk-VXHM7V6F.mjs';
|
|
7
8
|
import '../chunk-QYRRQ65X.mjs';
|
|
8
9
|
export { withCursor } from '../chunk-44KW6PTD.mjs';
|
|
9
|
-
import '../chunk-VXHM7V6F.mjs';
|
|
10
10
|
import '../chunk-M4IVLZIH.mjs';
|
|
11
11
|
import '../chunk-Q5KEB4UK.mjs';
|
|
12
12
|
import '../chunk-KTNZSZ5Y.mjs';
|