@vuer-ai/vuer-uikit 0.0.48 → 0.0.50
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-GFPXAGJY.js → chunk-2GFFK54M.js} +10 -2
- package/dist/chunk-2QG7LH4Z.js +11 -0
- package/dist/{chunk-TBFX36YV.mjs → chunk-2XYF6PKB.mjs} +2 -9
- package/dist/chunk-36Q5EL3V.mjs +9 -0
- package/dist/{chunk-KEVAPLWO.js → chunk-37WZTN4K.js} +16 -4
- package/dist/{chunk-A77ETENM.js → chunk-3EC5RXZ4.js} +2 -9
- package/dist/chunk-4GZZAQRD.js +20 -0
- package/dist/chunk-6TMEH2MB.js +14 -0
- package/dist/{chunk-GCIH5IMQ.mjs → chunk-6TXFW7SC.mjs} +2 -6
- package/dist/chunk-73RTYZNL.mjs +9 -0
- package/dist/chunk-7E25WN6I.js +22 -0
- package/dist/chunk-7GCEJU5S.mjs +20 -0
- package/dist/{chunk-25I4OTUA.js → chunk-CSRGTGG7.js} +1 -1
- package/dist/chunk-CV4KQETB.mjs +11 -0
- package/dist/{chunk-3QG5RA46.mjs → chunk-DCSGUVTI.mjs} +6 -4
- package/dist/chunk-EPHUL35Z.js +87 -0
- package/dist/{chunk-XPHG4P4D.mjs → chunk-FIEU3WRH.mjs} +1 -1
- package/dist/chunk-FJ6UQH5F.mjs +9 -0
- package/dist/{chunk-ZBG3KB7B.mjs → chunk-GL6WU4QP.mjs} +10 -2
- package/dist/{chunk-PZ3FWTMB.mjs → chunk-GY65PGYR.mjs} +9 -4
- package/dist/{chunk-VAEPAW5L.js → chunk-HGT65KY2.js} +3 -7
- package/dist/chunk-HIY4N3LF.js +13 -0
- package/dist/chunk-JENUY5GL.js +11 -0
- package/dist/chunk-JOWWKLBU.js +11 -0
- package/dist/{chunk-UZFOWGVD.mjs → chunk-JXDPS6DY.mjs} +10 -6
- package/dist/{chunk-ADOYBPJS.mjs → chunk-KBG56PQD.mjs} +2 -9
- package/dist/{chunk-QQMHPZFI.js → chunk-L3BY6UPD.js} +10 -6
- package/dist/{chunk-QJPJVF7K.js → chunk-LF2XWR4S.js} +10 -2
- package/dist/{chunk-Q7JNDXDJ.mjs → chunk-MDYTJECN.mjs} +5 -1
- package/dist/chunk-MK2FKGWF.mjs +9 -0
- package/dist/chunk-MZPSV4QX.js +11 -0
- package/dist/{chunk-XBKQWS7J.js → chunk-N5V4HWT4.js} +2 -2
- package/dist/chunk-QD6L25T6.mjs +12 -0
- package/dist/chunk-QL3COLR6.js +20 -0
- package/dist/{chunk-PF36CKO7.mjs → chunk-SG2PPP7N.mjs} +3 -3
- package/dist/chunk-SOYKPBRO.mjs +9 -0
- package/dist/chunk-SWG7LAW5.mjs +9 -0
- package/dist/chunk-TF7YO6KP.mjs +9 -0
- package/dist/chunk-TOWQT55R.js +11 -0
- package/dist/{chunk-YOKGP5F7.js → chunk-UGCFQYE2.js} +9 -9
- package/dist/chunk-UY5QRJIG.mjs +18 -0
- package/dist/{chunk-TC4RAHDO.js → chunk-VI2VLWC6.js} +5 -1
- package/dist/{chunk-VSFCQCKQ.mjs → chunk-VYYH27HC.mjs} +1 -1
- package/dist/chunk-WZ6GCPO6.mjs +84 -0
- package/dist/chunk-X4ATCXSD.js +11 -0
- package/dist/{chunk-DWK23X7J.js → chunk-X6APNY5D.js} +9 -4
- package/dist/{chunk-NBG65POR.js → chunk-YKL2SFIC.js} +2 -9
- package/dist/{chunk-KAUA4ODT.mjs → chunk-ZKWN7MB4.mjs} +10 -2
- package/dist/chunk-ZLYXB2BN.js +11 -0
- package/dist/chunk-ZRS4RQCJ.mjs +18 -0
- package/dist/highlight-cursor/enhanced-components.d.mts +1 -1
- package/dist/highlight-cursor/enhanced-components.d.ts +1 -1
- 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/hooks/clientOnly.d.mts +1 -1
- package/dist/hooks/clientOnly.d.ts +1 -1
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/useDragSelect.d.mts +1 -1
- package/dist/hooks/useDragSelect.d.ts +1 -1
- package/dist/hooks/useDragSelect.js +2 -2
- package/dist/hooks/useDragSelect.mjs +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +114 -105
- package/dist/index.mjs +27 -26
- package/dist/ui/avatar.js +1 -1
- package/dist/ui/avatar.mjs +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/badge.mjs +1 -1
- package/dist/ui/button.d.mts +3 -1
- package/dist/ui/button.d.ts +3 -1
- package/dist/ui/button.js +4 -4
- package/dist/ui/button.mjs +2 -2
- package/dist/ui/card.js +1 -1
- package/dist/ui/card.mjs +1 -1
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/checkbox.mjs +1 -1
- package/dist/ui/collapsible.d.mts +3 -1
- package/dist/ui/collapsible.d.ts +3 -1
- package/dist/ui/collapsible.js +1 -1
- package/dist/ui/collapsible.mjs +1 -1
- package/dist/ui/drawer.js +1 -1
- package/dist/ui/drawer.mjs +1 -1
- package/dist/ui/dropdown.d.mts +12 -4
- package/dist/ui/dropdown.d.ts +12 -4
- package/dist/ui/dropdown.js +1 -1
- package/dist/ui/dropdown.mjs +1 -1
- package/dist/ui/form/CmInput.js +4 -4
- package/dist/ui/form/CmInput.mjs +3 -3
- package/dist/ui/form/DegInput.js +4 -4
- package/dist/ui/form/DegInput.mjs +3 -3
- package/dist/ui/form/EulerDegInput.js +5 -5
- package/dist/ui/form/EulerDegInput.mjs +4 -4
- package/dist/ui/form/EulerInput.js +4 -4
- package/dist/ui/form/EulerInput.mjs +3 -3
- package/dist/ui/form/EulerRadInput.js +5 -5
- package/dist/ui/form/EulerRadInput.mjs +4 -4
- package/dist/ui/form/InchInput.js +4 -4
- package/dist/ui/form/InchInput.mjs +3 -3
- package/dist/ui/form/IntInput.js +4 -4
- package/dist/ui/form/IntInput.mjs +3 -3
- package/dist/ui/form/KVectorInput.js +4 -4
- package/dist/ui/form/KVectorInput.mjs +3 -3
- package/dist/ui/form/NumberInput.js +3 -3
- package/dist/ui/form/NumberInput.mjs +2 -2
- package/dist/ui/form/QuaternionInput.js +4 -4
- package/dist/ui/form/QuaternionInput.mjs +3 -3
- package/dist/ui/form/RadInput.js +4 -4
- package/dist/ui/form/RadInput.mjs +3 -3
- package/dist/ui/form/TimeInput.js +4 -4
- package/dist/ui/form/TimeInput.mjs +3 -3
- package/dist/ui/form/Vec3Input.js +4 -4
- package/dist/ui/form/Vec3Input.mjs +3 -3
- package/dist/ui/form/VectorInput.js +3 -3
- package/dist/ui/form/VectorInput.mjs +2 -2
- package/dist/ui/form/index.js +29 -29
- package/dist/ui/form/index.mjs +15 -15
- package/dist/ui/index.d.mts +1 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +107 -98
- package/dist/ui/index.mjs +26 -25
- package/dist/ui/input-numbers.js +1 -1
- package/dist/ui/input-numbers.mjs +1 -1
- package/dist/ui/input.js +1 -1
- package/dist/ui/input.mjs +1 -1
- package/dist/ui/layout.js +1 -1
- package/dist/ui/layout.mjs +1 -1
- package/dist/ui/modal.d.mts +7 -3
- package/dist/ui/modal.d.ts +7 -3
- package/dist/ui/modal.js +12 -12
- package/dist/ui/modal.mjs +2 -2
- package/dist/ui/pagination.js +10 -10
- package/dist/ui/pagination.mjs +3 -3
- package/dist/ui/popover.d.mts +3 -1
- package/dist/ui/popover.d.ts +3 -1
- package/dist/ui/popover.js +6 -6
- package/dist/ui/popover.mjs +2 -2
- package/dist/ui/radio-group.js +1 -1
- package/dist/ui/radio-group.mjs +1 -1
- package/dist/ui/resizable.js +1 -1
- package/dist/ui/resizable.mjs +1 -1
- package/dist/ui/select.d.mts +1 -1
- package/dist/ui/select.d.ts +1 -1
- package/dist/ui/select.js +1 -1
- package/dist/ui/select.mjs +1 -1
- package/dist/ui/separator.js +1 -1
- package/dist/ui/separator.mjs +1 -1
- package/dist/ui/sheet.d.mts +6 -2
- package/dist/ui/sheet.d.ts +6 -2
- package/dist/ui/sheet.js +10 -10
- package/dist/ui/sheet.mjs +2 -2
- package/dist/ui/sidebar.js +28 -28
- package/dist/ui/sidebar.mjs +4 -4
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/skeleton.mjs +1 -1
- package/dist/ui/slider.d.mts +1 -1
- package/dist/ui/slider.d.ts +1 -1
- package/dist/ui/slider.js +1 -1
- package/dist/ui/slider.mjs +1 -1
- package/dist/ui/switch.js +1 -1
- package/dist/ui/switch.mjs +1 -1
- package/dist/ui/tabs.d.mts +4 -4
- package/dist/ui/tabs.d.ts +4 -4
- package/dist/ui/tabs.js +1 -1
- package/dist/ui/tabs.mjs +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/textarea.mjs +1 -1
- package/dist/ui/theme/ThemeProvider.d.mts +16 -1
- package/dist/ui/theme/ThemeProvider.d.ts +16 -1
- package/dist/ui/theme/ThemeProvider.js +44 -4
- package/dist/ui/theme/ThemeProvider.mjs +2 -2
- package/dist/ui/theme/ThemeToggles.d.mts +6 -0
- package/dist/ui/theme/ThemeToggles.d.ts +6 -0
- package/dist/ui/theme/ThemeToggles.js +25 -0
- package/dist/ui/theme/ThemeToggles.mjs +12 -0
- package/dist/ui/theme/index.d.mts +1 -0
- package/dist/ui/theme/index.d.ts +1 -0
- package/dist/ui/theme/index.js +24 -6
- package/dist/ui/theme/index.mjs +13 -3
- package/dist/ui/theme/themeScript.js +2 -2
- package/dist/ui/theme/themeScript.mjs +1 -1
- package/dist/ui/theme/types.d.mts +2 -0
- package/dist/ui/theme/types.d.ts +2 -0
- package/dist/ui/timeline.js +1 -1
- package/dist/ui/timeline.mjs +1 -1
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle-group.mjs +1 -1
- package/dist/ui/toggle.js +1 -1
- package/dist/ui/toggle.mjs +1 -1
- package/dist/ui/tooltip.js +1 -1
- package/dist/ui/tooltip.mjs +1 -1
- package/dist/ui/tree-view-v2.js +1 -1
- package/dist/ui/tree-view-v2.mjs +1 -1
- package/dist/ui/tree-view.js +1 -1
- package/dist/ui/tree-view.mjs +1 -1
- package/dist/ui/version-badge.js +3 -3
- package/dist/ui/version-badge.mjs +2 -2
- package/package.json +1 -1
- package/src/hooks/clientOnly.tsx +4 -4
- package/src/hooks/useDragSelect.ts +26 -19
- package/src/ui/avatar.tsx +8 -8
- package/src/ui/button.tsx +9 -3
- package/src/ui/drag-selectable/createSelectable.tsx +1 -0
- package/src/ui/dropdown.tsx +4 -4
- package/src/ui/form/CmInput.tsx +5 -12
- package/src/ui/form/DegInput.tsx +5 -12
- package/src/ui/form/EulerDegInput.tsx +4 -9
- package/src/ui/form/EulerInput.tsx +19 -17
- package/src/ui/form/EulerRadInput.tsx +4 -9
- package/src/ui/form/InchInput.tsx +5 -12
- package/src/ui/form/IntInput.tsx +5 -12
- package/src/ui/form/KVectorInput.tsx +11 -16
- package/src/ui/form/NumberInput.tsx +13 -15
- package/src/ui/form/QuaternionInput.tsx +18 -15
- package/src/ui/form/RadInput.tsx +5 -12
- package/src/ui/form/TimeInput.tsx +5 -12
- package/src/ui/form/Vec3Input.tsx +16 -14
- package/src/ui/form/VectorInput.tsx +8 -12
- package/src/ui/form/index.ts +1 -1
- package/src/ui/modal.tsx +10 -2
- package/src/ui/pagination.tsx +1 -5
- package/src/ui/popover.tsx +5 -1
- package/src/ui/sheet.tsx +10 -2
- package/src/ui/sidebar.tsx +1 -1
- package/src/ui/theme/ThemeProvider.tsx +14 -15
- package/src/ui/theme/ThemeToggles.tsx +105 -0
- package/src/ui/theme/index.ts +1 -0
- package/src/ui/theme/themeScript.tsx +4 -3
- package/src/ui/theme/types.ts +2 -0
- package/dist/chunk-2QBMOSVM.js +0 -22
- package/dist/chunk-3LJI6I2O.mjs +0 -20
- package/dist/chunk-43FK6CBY.mjs +0 -18
- package/dist/chunk-4PWIOKV6.mjs +0 -18
- package/dist/chunk-4UGXCXXM.mjs +0 -18
- package/dist/chunk-5UHOCEWC.mjs +0 -18
- package/dist/chunk-6AWSAY7A.js +0 -24
- package/dist/chunk-6N2Q4EQ2.js +0 -20
- package/dist/chunk-6N3UJ4AX.mjs +0 -20
- package/dist/chunk-7KVGTDDO.js +0 -20
- package/dist/chunk-AB4GGLJ5.mjs +0 -18
- package/dist/chunk-CPZIDU2J.js +0 -20
- package/dist/chunk-E2UGNYWU.js +0 -22
- package/dist/chunk-EGYK5FED.mjs +0 -18
- package/dist/chunk-EJ7D53ZF.js +0 -20
- package/dist/chunk-ICRVQLUS.mjs +0 -22
- package/dist/chunk-IOVNKUJ6.js +0 -16
- package/dist/chunk-JHHA2CGJ.mjs +0 -14
- package/dist/chunk-LCS67P4A.mjs +0 -18
- package/dist/chunk-LD32BCCX.js +0 -20
- package/dist/chunk-MYRZ2ZV5.mjs +0 -21
- package/dist/chunk-TPX5AJ7Z.js +0 -23
- package/dist/chunk-TWQSUO5Q.js +0 -20
- package/dist/chunk-UQQPHWTA.js +0 -20
- /package/dist/{chunk-AMB2H6WS.mjs → chunk-6NK7UMFP.mjs} +0 -0
- /package/dist/{chunk-Y2QBWXB4.js → chunk-EDJTVLBN.js} +0 -0
- /package/dist/{chunk-72PCXNEI.js → chunk-FRMG67QP.js} +0 -0
- /package/dist/{chunk-MS5G6UZ4.mjs → chunk-NSI47INE.mjs} +0 -0
|
@@ -36,7 +36,11 @@ var Sheet = chunkQG7ZF6TO_js.createClientOnlyComponent(SheetRoot, SheetFallback)
|
|
|
36
36
|
function SheetTriggerRoot({ ...props }) {
|
|
37
37
|
return /* @__PURE__ */ jsxRuntime.jsx(SheetPrimitive__namespace.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
38
38
|
}
|
|
39
|
-
function SheetTriggerFallback({
|
|
39
|
+
function SheetTriggerFallback({
|
|
40
|
+
asChild,
|
|
41
|
+
children,
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
40
44
|
if (asChild) {
|
|
41
45
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
42
46
|
}
|
|
@@ -53,7 +57,11 @@ function SheetCloseRoot({ ...props }) {
|
|
|
53
57
|
}
|
|
54
58
|
);
|
|
55
59
|
}
|
|
56
|
-
function SheetCloseFallback({
|
|
60
|
+
function SheetCloseFallback({
|
|
61
|
+
asChild,
|
|
62
|
+
children,
|
|
63
|
+
...props
|
|
64
|
+
}) {
|
|
57
65
|
if (asChild) {
|
|
58
66
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
59
67
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk6TMEH2MB_js = require('./chunk-6TMEH2MB.js');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var RadInput = react.forwardRef(function RadInput2(props, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk6TMEH2MB_js.NumberInput, { ref, unit: "rad", ...props });
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
exports.RadInput = RadInput;
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { EulerInput } from './chunk-
|
|
1
|
+
import { EulerInput } from './chunk-7GCEJU5S.mjs';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var EulerRadInput = forwardRef(
|
|
6
6
|
function EulerRadInput2(props, ref) {
|
|
7
|
-
return /* @__PURE__ */ jsx(
|
|
8
|
-
EulerInput,
|
|
9
|
-
{
|
|
10
|
-
ref,
|
|
11
|
-
unit: "rad",
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
);
|
|
7
|
+
return /* @__PURE__ */ jsx(EulerInput, { ref, unit: "rad", ...props });
|
|
15
8
|
}
|
|
16
9
|
);
|
|
17
10
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InputNumbers } from './chunk-LZE22ZNH.mjs';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var VectorInput = forwardRef(function VectorInput2({ labels, prefix, ...props }, ref) {
|
|
6
|
+
return /* @__PURE__ */ jsx(InputNumbers, { ref, prefix: labels || prefix, ...props });
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export { VectorInput };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkFRMG67QP_js = require('./chunk-FRMG67QP.js');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
7
|
+
var colorSchemes = ["light", "dark"];
|
|
7
8
|
var MEDIA = "(prefers-color-scheme: dark)";
|
|
8
9
|
var isServer = typeof window === "undefined";
|
|
9
10
|
var ThemeContext = react.createContext(void 0);
|
|
@@ -142,13 +143,14 @@ var Theme = ({
|
|
|
142
143
|
forcedTheme,
|
|
143
144
|
resolvedTheme: theme === "system" ? resolvedTheme : theme,
|
|
144
145
|
themes: enableSystem ? [...themes, "system"] : themes,
|
|
145
|
-
systemTheme: enableSystem ? resolvedTheme : void 0
|
|
146
|
+
systemTheme: enableSystem ? resolvedTheme : void 0,
|
|
147
|
+
storageKey
|
|
146
148
|
}),
|
|
147
|
-
[theme, setTheme, forcedTheme, resolvedTheme, enableSystem, themes]
|
|
149
|
+
[theme, setTheme, forcedTheme, resolvedTheme, enableSystem, themes, storageKey]
|
|
148
150
|
),
|
|
149
151
|
children: [
|
|
150
152
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
151
|
-
|
|
153
|
+
chunkFRMG67QP_js.ThemeScript,
|
|
152
154
|
{
|
|
153
155
|
...{
|
|
154
156
|
forcedTheme,
|
|
@@ -201,5 +203,15 @@ var getSystemTheme = (e) => {
|
|
|
201
203
|
return isDark ? "liquid-dark" : "liquid-light";
|
|
202
204
|
};
|
|
203
205
|
|
|
206
|
+
exports.MEDIA = MEDIA;
|
|
207
|
+
exports.Theme = Theme;
|
|
208
|
+
exports.ThemeContext = ThemeContext;
|
|
204
209
|
exports.ThemeProvider = ThemeProvider;
|
|
210
|
+
exports.colorSchemes = colorSchemes;
|
|
211
|
+
exports.defaultThemes = defaultThemes;
|
|
212
|
+
exports.disableAnimation = disableAnimation;
|
|
213
|
+
exports.getSystemTheme = getSystemTheme;
|
|
214
|
+
exports.getTheme = getTheme;
|
|
215
|
+
exports.isServer = isServer;
|
|
216
|
+
exports.saveToLS = saveToLS;
|
|
205
217
|
exports.useTheme = useTheme;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7E25WN6I_js = require('./chunk-7E25WN6I.js');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
|
|
7
7
|
var EulerDegInput = react.forwardRef(
|
|
8
8
|
function EulerDegInput2(props, ref) {
|
|
9
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10
|
-
chunk6AWSAY7A_js.EulerInput,
|
|
11
|
-
{
|
|
12
|
-
ref,
|
|
13
|
-
unit: "deg",
|
|
14
|
-
...props
|
|
15
|
-
}
|
|
16
|
-
);
|
|
9
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk7E25WN6I_js.EulerInput, { ref, unit: "deg", ...props });
|
|
17
10
|
}
|
|
18
11
|
);
|
|
19
12
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkJENUY5GL_js = require('./chunk-JENUY5GL.js');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var QuaternionInput = react.forwardRef(function QuaternionInput2({ value, onValuesChange, ...props }, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9
|
+
chunkJENUY5GL_js.VectorInput,
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
value,
|
|
13
|
+
onValuesChange,
|
|
14
|
+
labels: ["w", "x", "y", "z"],
|
|
15
|
+
...props
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
exports.QuaternionInput = QuaternionInput;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk3YODEBOY_js = require('./chunk-3YODEBOY.js');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var NumberInput = react.forwardRef(function NumberInput2({ unit, children, ...props }, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunk3YODEBOY_js.InputRoot, { ref, type: "number", ...props, children: [
|
|
9
|
+
children,
|
|
10
|
+
unit && /* @__PURE__ */ jsxRuntime.jsx(chunk3YODEBOY_js.InputSlot, { side: "right", children: unit })
|
|
11
|
+
] });
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
exports.NumberInput = NumberInput;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buttonVariants } from './chunk-
|
|
1
|
+
import { buttonVariants } from './chunk-GY65PGYR.mjs';
|
|
2
2
|
import { cn } from './chunk-WM2VP7MI.mjs';
|
|
3
3
|
import { useTabsCursor, TabsCursorProvider } from './chunk-XMG3IVGZ.mjs';
|
|
4
4
|
import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';
|
|
@@ -46,11 +46,7 @@ function PaginationItem({ ...props }) {
|
|
|
46
46
|
}
|
|
47
47
|
);
|
|
48
48
|
}
|
|
49
|
-
function PaginationLink({
|
|
50
|
-
className,
|
|
51
|
-
isActive,
|
|
52
|
-
...props
|
|
53
|
-
}) {
|
|
49
|
+
function PaginationLink({ className, isActive, ...props }) {
|
|
54
50
|
return /* @__PURE__ */ jsx(
|
|
55
51
|
"a",
|
|
56
52
|
{
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NumberInput } from './chunk-QD6L25T6.mjs';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var RadInput = forwardRef(function RadInput2(props, ref) {
|
|
6
|
+
return /* @__PURE__ */ jsx(NumberInput, { ref, unit: "rad", ...props });
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export { RadInput };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkJENUY5GL_js = require('./chunk-JENUY5GL.js');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var EulerInput = react.forwardRef(function EulerInput2({ value, onValuesChange, unit = "deg", ...props }, ref) {
|
|
8
|
+
const unitSymbol = unit === "deg" ? "\xB0" : "rad";
|
|
9
|
+
const labels = [`x${unitSymbol}`, `y${unitSymbol}`, `z${unitSymbol}`];
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
|
+
chunkJENUY5GL_js.VectorInput,
|
|
12
|
+
{
|
|
13
|
+
ref,
|
|
14
|
+
value,
|
|
15
|
+
onValuesChange,
|
|
16
|
+
labels,
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
exports.EulerInput = EulerInput;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { VectorInput } from './chunk-36Q5EL3V.mjs';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var EulerInput = forwardRef(function EulerInput2({ value, onValuesChange, unit = "deg", ...props }, ref) {
|
|
6
|
+
const unitSymbol = unit === "deg" ? "\xB0" : "rad";
|
|
7
|
+
const labels = [`x${unitSymbol}`, `y${unitSymbol}`, `z${unitSymbol}`];
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
VectorInput,
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
value,
|
|
13
|
+
onValuesChange,
|
|
14
|
+
labels,
|
|
15
|
+
...props
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export { EulerInput };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { VectorInput } from './chunk-36Q5EL3V.mjs';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var KVectorInput = forwardRef(function KVectorInput2({ value, dimensions, ...props }, ref) {
|
|
6
|
+
const k = dimensions || value.length;
|
|
7
|
+
const labels = Array.from({ length: k }, (_, i) => `${i}`);
|
|
8
|
+
return /* @__PURE__ */ jsx(VectorInput, { ref, value, labels, ...props });
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export { KVectorInput };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ThemeScript } from './chunk-
|
|
1
|
+
import { ThemeScript } from './chunk-NSI47INE.mjs';
|
|
2
2
|
import { createContext, useContext, useState, useCallback, useEffect, useMemo } from 'react';
|
|
3
3
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
+
var colorSchemes = ["light", "dark"];
|
|
5
6
|
var MEDIA = "(prefers-color-scheme: dark)";
|
|
6
7
|
var isServer = typeof window === "undefined";
|
|
7
8
|
var ThemeContext = createContext(void 0);
|
|
@@ -140,9 +141,10 @@ var Theme = ({
|
|
|
140
141
|
forcedTheme,
|
|
141
142
|
resolvedTheme: theme === "system" ? resolvedTheme : theme,
|
|
142
143
|
themes: enableSystem ? [...themes, "system"] : themes,
|
|
143
|
-
systemTheme: enableSystem ? resolvedTheme : void 0
|
|
144
|
+
systemTheme: enableSystem ? resolvedTheme : void 0,
|
|
145
|
+
storageKey
|
|
144
146
|
}),
|
|
145
|
-
[theme, setTheme, forcedTheme, resolvedTheme, enableSystem, themes]
|
|
147
|
+
[theme, setTheme, forcedTheme, resolvedTheme, enableSystem, themes, storageKey]
|
|
146
148
|
),
|
|
147
149
|
children: [
|
|
148
150
|
/* @__PURE__ */ jsx(
|
|
@@ -199,4 +201,4 @@ var getSystemTheme = (e) => {
|
|
|
199
201
|
return isDark ? "liquid-dark" : "liquid-light";
|
|
200
202
|
};
|
|
201
203
|
|
|
202
|
-
export { ThemeProvider, useTheme };
|
|
204
|
+
export { MEDIA, Theme, ThemeContext, ThemeProvider, colorSchemes, defaultThemes, disableAnimation, getSystemTheme, getTheme, isServer, saveToLS, useTheme };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk37WZTN4K_js = require('./chunk-37WZTN4K.js');
|
|
4
|
+
var chunkER6XHUS7_js = require('./chunk-ER6XHUS7.js');
|
|
5
|
+
var chunkX6APNY5D_js = require('./chunk-X6APNY5D.js');
|
|
6
|
+
var chunkQG7ZF6TO_js = require('./chunk-QG7ZF6TO.js');
|
|
7
|
+
var lucideReact = require('lucide-react');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
var LiquidToggleButton = () => {
|
|
11
|
+
const { theme, setTheme, storageKey } = chunk37WZTN4K_js.useTheme();
|
|
12
|
+
const handleLiquidToggle = () => {
|
|
13
|
+
let newTheme;
|
|
14
|
+
if (theme === "light") {
|
|
15
|
+
newTheme = "liquid-light";
|
|
16
|
+
} else if (theme === "liquid-light") {
|
|
17
|
+
newTheme = "light";
|
|
18
|
+
} else if (theme === "dark") {
|
|
19
|
+
newTheme = "liquid-dark";
|
|
20
|
+
} else if (theme === "liquid-dark") {
|
|
21
|
+
newTheme = "dark";
|
|
22
|
+
} else if (theme === "system") {
|
|
23
|
+
return;
|
|
24
|
+
} else {
|
|
25
|
+
newTheme = "liquid-light";
|
|
26
|
+
}
|
|
27
|
+
document.cookie = `${storageKey}=${newTheme}`;
|
|
28
|
+
setTheme(newTheme);
|
|
29
|
+
};
|
|
30
|
+
const isLiquid = theme === "liquid-light" || theme === "liquid-dark";
|
|
31
|
+
const isSystem = theme === "system";
|
|
32
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkER6XHUS7_js.Tooltip, { children: [
|
|
33
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkER6XHUS7_js.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
34
|
+
chunkX6APNY5D_js.Button,
|
|
35
|
+
{
|
|
36
|
+
icon: true,
|
|
37
|
+
onClick: handleLiquidToggle,
|
|
38
|
+
variant: "ghost",
|
|
39
|
+
value: isLiquid,
|
|
40
|
+
"aria-label": `Toggle liquid theme: ${isSystem ? "disabled (system mode)" : isLiquid ? "on" : "off"}`,
|
|
41
|
+
className: isSystem ? "cursor-not-allowed opacity-50" : "",
|
|
42
|
+
disabled: isSystem,
|
|
43
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Droplet, { size: 20 })
|
|
44
|
+
}
|
|
45
|
+
) }),
|
|
46
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkER6XHUS7_js.TooltipContent, { children: "Toggle liquid theme" })
|
|
47
|
+
] });
|
|
48
|
+
};
|
|
49
|
+
var ThemeToggleButton = () => {
|
|
50
|
+
const { theme, setTheme, storageKey } = chunk37WZTN4K_js.useTheme();
|
|
51
|
+
const handleThemeChange = () => {
|
|
52
|
+
let newTheme;
|
|
53
|
+
if (theme === "light") {
|
|
54
|
+
newTheme = "dark";
|
|
55
|
+
} else if (theme === "liquid-light") {
|
|
56
|
+
newTheme = "liquid-dark";
|
|
57
|
+
} else if (theme === "dark") {
|
|
58
|
+
newTheme = "system";
|
|
59
|
+
} else if (theme === "liquid-dark") {
|
|
60
|
+
newTheme = "system";
|
|
61
|
+
} else if (theme === "system") {
|
|
62
|
+
newTheme = "light";
|
|
63
|
+
} else {
|
|
64
|
+
newTheme = "light";
|
|
65
|
+
}
|
|
66
|
+
document.cookie = `${storageKey}=${newTheme}`;
|
|
67
|
+
setTheme(newTheme);
|
|
68
|
+
};
|
|
69
|
+
const isDark = theme === "dark" || theme === "liquid-dark";
|
|
70
|
+
const isSystem = theme === "system";
|
|
71
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
72
|
+
chunkX6APNY5D_js.Button,
|
|
73
|
+
{
|
|
74
|
+
icon: true,
|
|
75
|
+
onClick: handleThemeChange,
|
|
76
|
+
variant: "ghost",
|
|
77
|
+
value: !isSystem,
|
|
78
|
+
"aria-label": `Current theme: ${isSystem ? "system" : isDark ? "dark" : "light"}`,
|
|
79
|
+
children: isSystem ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SunMoon, { size: 20 }) : isDark ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Moon, { size: 20 }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { size: 20 })
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
var LiquidToggle = chunkQG7ZF6TO_js.createClientOnlyComponent(LiquidToggleButton, () => /* @__PURE__ */ jsxRuntime.jsx(chunkX6APNY5D_js.Button, { icon: true, variant: "ghost", "aria-label": "Liquid toggle loading...", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Droplet, { size: 20 }) }));
|
|
84
|
+
var ThemeToggle = chunkQG7ZF6TO_js.createClientOnlyComponent(ThemeToggleButton, () => /* @__PURE__ */ jsxRuntime.jsx(chunkX6APNY5D_js.Button, { icon: true, variant: "ghost", "aria-label": "Theme toggle loading...", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { size: 20 }) }));
|
|
85
|
+
|
|
86
|
+
exports.LiquidToggle = LiquidToggle;
|
|
87
|
+
exports.ThemeToggle = ThemeToggle;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NumberInput } from './chunk-QD6L25T6.mjs';
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var TimeInput = forwardRef(function TimeInput2(props, ref) {
|
|
6
|
+
return /* @__PURE__ */ jsx(NumberInput, { ref, unit: "s", ...props });
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export { TimeInput };
|
|
@@ -15,7 +15,11 @@ var Modal = createClientOnlyComponent(ModalRoot, ModalFallback);
|
|
|
15
15
|
function ModalTriggerRoot({ ...props }) {
|
|
16
16
|
return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, { "data-slot": "modal-trigger", ...props });
|
|
17
17
|
}
|
|
18
|
-
function ModalTriggerFallback({
|
|
18
|
+
function ModalTriggerFallback({
|
|
19
|
+
asChild,
|
|
20
|
+
children,
|
|
21
|
+
...props
|
|
22
|
+
}) {
|
|
19
23
|
if (asChild) {
|
|
20
24
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
21
25
|
}
|
|
@@ -28,7 +32,11 @@ function ModalPortal({ ...props }) {
|
|
|
28
32
|
function ModalCloseRoot({ ...props }) {
|
|
29
33
|
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { "data-slot": "modal-close", ...props });
|
|
30
34
|
}
|
|
31
|
-
function ModalCloseFallback({
|
|
35
|
+
function ModalCloseFallback({
|
|
36
|
+
asChild,
|
|
37
|
+
children,
|
|
38
|
+
...props
|
|
39
|
+
}) {
|
|
32
40
|
if (asChild) {
|
|
33
41
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
34
42
|
}
|
|
@@ -61,7 +61,11 @@ var buttonVariants = cva(
|
|
|
61
61
|
base: ["text-uk-md", "h-8 ", "gap-xs", " px-lg", "[&_svg:not([class*='size-'])]:size-4"],
|
|
62
62
|
lg: ["text-uk-lg", "h-9", " gap-xs", "px-xl", "[&_svg:not([class*='size-'])]:size-5"]
|
|
63
63
|
},
|
|
64
|
-
icon: { false: null, true: null }
|
|
64
|
+
icon: { false: null, true: null },
|
|
65
|
+
value: {
|
|
66
|
+
false: null,
|
|
67
|
+
true: ["text-brand-primary", "[&_svg]:text-brand-primary"]
|
|
68
|
+
}
|
|
65
69
|
},
|
|
66
70
|
compoundVariants: [
|
|
67
71
|
{ size: "sm", icon: true, class: ["px-xs", "py-xs", " size-6"] },
|
|
@@ -71,18 +75,19 @@ var buttonVariants = cva(
|
|
|
71
75
|
defaultVariants: {
|
|
72
76
|
variant: "primary",
|
|
73
77
|
size: "base",
|
|
74
|
-
icon: false
|
|
78
|
+
icon: false,
|
|
79
|
+
value: false
|
|
75
80
|
}
|
|
76
81
|
}
|
|
77
82
|
);
|
|
78
|
-
var Button = forwardRef(function Button2({ className, variant, size, icon, asChild = false, ...props }, ref) {
|
|
83
|
+
var Button = forwardRef(function Button2({ className, variant, size, icon, value, asChild = false, ...props }, ref) {
|
|
79
84
|
const Comp = asChild ? Slot : "button";
|
|
80
85
|
return /* @__PURE__ */ jsx(
|
|
81
86
|
Comp,
|
|
82
87
|
{
|
|
83
88
|
ref,
|
|
84
89
|
"data-slot": "button",
|
|
85
|
-
className: cn(buttonVariants({ variant, size, icon, className })),
|
|
90
|
+
className: cn(buttonVariants({ variant, size, icon, value, className })),
|
|
86
91
|
...props
|
|
87
92
|
}
|
|
88
93
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkX6APNY5D_js = require('./chunk-X6APNY5D.js');
|
|
4
4
|
var chunk7KYAICHB_js = require('./chunk-7KYAICHB.js');
|
|
5
5
|
var chunkOTPUWWEB_js = require('./chunk-OTPUWWEB.js');
|
|
6
6
|
var lucideReact = require('lucide-react');
|
|
@@ -48,11 +48,7 @@ function PaginationItem({ ...props }) {
|
|
|
48
48
|
}
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
|
-
function PaginationLink({
|
|
52
|
-
className,
|
|
53
|
-
isActive,
|
|
54
|
-
...props
|
|
55
|
-
}) {
|
|
51
|
+
function PaginationLink({ className, isActive, ...props }) {
|
|
56
52
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
57
53
|
"a",
|
|
58
54
|
{
|
|
@@ -60,7 +56,7 @@ function PaginationLink({
|
|
|
60
56
|
"data-slot": "pagination-link",
|
|
61
57
|
"data-active": isActive,
|
|
62
58
|
className: chunk7KYAICHB_js.cn(
|
|
63
|
-
|
|
59
|
+
chunkX6APNY5D_js.buttonVariants({
|
|
64
60
|
variant: isActive ? "secondary" : "ghost"
|
|
65
61
|
}),
|
|
66
62
|
"hover:bg-transparent",
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkJENUY5GL_js = require('./chunk-JENUY5GL.js');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var KVectorInput = react.forwardRef(function KVectorInput2({ value, dimensions, ...props }, ref) {
|
|
8
|
+
const k = dimensions || value.length;
|
|
9
|
+
const labels = Array.from({ length: k }, (_, i) => `${i}`);
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkJENUY5GL_js.VectorInput, { ref, value, labels, ...props });
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
exports.KVectorInput = KVectorInput;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk7TD2RBQJ_js = require('./chunk-7TD2RBQJ.js');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var VectorInput = react.forwardRef(function VectorInput2({ labels, prefix, ...props }, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk7TD2RBQJ_js.InputNumbers, { ref, prefix: labels || prefix, ...props });
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
exports.VectorInput = VectorInput;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk6TMEH2MB_js = require('./chunk-6TMEH2MB.js');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
var InchInput = react.forwardRef(function InchInput2(props, ref) {
|
|
8
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk6TMEH2MB_js.NumberInput, { ref, unit: "in", ...props });
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
exports.InchInput = InchInput;
|
|
@@ -5,6 +5,7 @@ function useDragSelect(options = {}) {
|
|
|
5
5
|
const [selectedItems, setSelectedItems] = useState(/* @__PURE__ */ new Set());
|
|
6
6
|
const [isDragging, setIsDragging] = useState(false);
|
|
7
7
|
const [dragMode, setDragMode] = useState("toggle");
|
|
8
|
+
const [dragStartItem, setDragStartItem] = useState(null);
|
|
8
9
|
useEffect(() => {
|
|
9
10
|
var _a;
|
|
10
11
|
(_a = options.onSelectionChange) == null ? void 0 : _a.call(options, selectedItems);
|
|
@@ -12,6 +13,7 @@ function useDragSelect(options = {}) {
|
|
|
12
13
|
const handleMouseDown = useCallback((id, e) => {
|
|
13
14
|
e.preventDefault();
|
|
14
15
|
setIsDragging(true);
|
|
16
|
+
setDragStartItem(id);
|
|
15
17
|
const mode = e.ctrlKey || e.metaKey ? "replace" : "toggle";
|
|
16
18
|
setDragMode(mode);
|
|
17
19
|
if (mode === "replace") {
|
|
@@ -31,6 +33,7 @@ function useDragSelect(options = {}) {
|
|
|
31
33
|
const handleMouseEnter = useCallback(
|
|
32
34
|
(id) => {
|
|
33
35
|
if (!isDragging) return;
|
|
36
|
+
if (id === dragStartItem) return;
|
|
34
37
|
if (dragMode === "replace") {
|
|
35
38
|
setSelectedItems((prev) => /* @__PURE__ */ new Set([...prev, id]));
|
|
36
39
|
} else {
|
|
@@ -45,18 +48,16 @@ function useDragSelect(options = {}) {
|
|
|
45
48
|
});
|
|
46
49
|
}
|
|
47
50
|
},
|
|
48
|
-
[isDragging, dragMode]
|
|
51
|
+
[isDragging, dragMode, dragStartItem]
|
|
49
52
|
);
|
|
50
53
|
useCallback(() => {
|
|
51
54
|
setIsDragging(false);
|
|
55
|
+
setDragStartItem(null);
|
|
52
56
|
}, []);
|
|
53
57
|
const clearSelection = useCallback(() => {
|
|
54
58
|
setSelectedItems(/* @__PURE__ */ new Set());
|
|
55
59
|
}, []);
|
|
56
|
-
const isSelected = useCallback(
|
|
57
|
-
(id) => selectedItems.has(id),
|
|
58
|
-
[selectedItems]
|
|
59
|
-
);
|
|
60
|
+
const isSelected = useCallback((id) => selectedItems.has(id), [selectedItems]);
|
|
60
61
|
const getItemProps = useCallback(
|
|
61
62
|
(id) => ({
|
|
62
63
|
"data-selected": selectedItems.has(id),
|
|
@@ -66,7 +67,10 @@ function useDragSelect(options = {}) {
|
|
|
66
67
|
[selectedItems, handleMouseDown, handleMouseEnter]
|
|
67
68
|
);
|
|
68
69
|
useEffect(() => {
|
|
69
|
-
const handleGlobalMouseUp = () =>
|
|
70
|
+
const handleGlobalMouseUp = () => {
|
|
71
|
+
setIsDragging(false);
|
|
72
|
+
setDragStartItem(null);
|
|
73
|
+
};
|
|
70
74
|
const handleEscape = (e) => {
|
|
71
75
|
if (e.key === "Escape") {
|
|
72
76
|
clearSelection();
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { EulerInput } from './chunk-
|
|
1
|
+
import { EulerInput } from './chunk-7GCEJU5S.mjs';
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
5
|
var EulerDegInput = forwardRef(
|
|
6
6
|
function EulerDegInput2(props, ref) {
|
|
7
|
-
return /* @__PURE__ */ jsx(
|
|
8
|
-
EulerInput,
|
|
9
|
-
{
|
|
10
|
-
ref,
|
|
11
|
-
unit: "deg",
|
|
12
|
-
...props
|
|
13
|
-
}
|
|
14
|
-
);
|
|
7
|
+
return /* @__PURE__ */ jsx(EulerInput, { ref, unit: "deg", ...props });
|
|
15
8
|
}
|
|
16
9
|
);
|
|
17
10
|
|