@vuer-ai/vuer-uikit 0.0.114 → 0.0.116

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.
Files changed (64) hide show
  1. package/dist/auth/components/index.cjs +24 -24
  2. package/dist/auth/components/index.mjs +23 -23
  3. package/dist/auth/components/user-avatar/index.cjs +24 -24
  4. package/dist/auth/components/user-avatar/index.mjs +23 -23
  5. package/dist/auth/hooks/use-sign-in.cjs +3 -3
  6. package/dist/auth/hooks/use-sign-in.mjs +2 -2
  7. package/dist/auth/hooks/use-vuer-sessions.cjs +3 -3
  8. package/dist/auth/hooks/use-vuer-sessions.mjs +2 -2
  9. package/dist/auth/index.cjs +36 -36
  10. package/dist/auth/index.mjs +27 -27
  11. package/dist/auth/vuer-user-provider.cjs +3 -3
  12. package/dist/auth/vuer-user-provider.mjs +2 -2
  13. package/dist/{chunk-EFTNQ5QB.mjs → chunk-4X3R5XBW.mjs} +2 -2
  14. package/dist/{chunk-YI25WVCY.cjs → chunk-APC2GIE7.cjs} +4 -4
  15. package/dist/{chunk-ZGMZHANJ.cjs → chunk-ASGWIU7V.cjs} +2 -2
  16. package/dist/{chunk-ONLVW7PV.mjs → chunk-EAOF6Y75.mjs} +24 -20
  17. package/dist/{chunk-V5YUFNEB.mjs → chunk-EO4GM3KH.mjs} +1 -1
  18. package/dist/{chunk-GE2OIKIH.mjs → chunk-JTJKIRFA.mjs} +2 -2
  19. package/dist/{chunk-FB5MYIVE.mjs → chunk-NRQJX772.mjs} +0 -1
  20. package/dist/{chunk-PFIP3ETQ.cjs → chunk-O5S6UXNN.cjs} +2 -2
  21. package/dist/{chunk-W3EUIFYU.cjs → chunk-OJZV4X7L.cjs} +28 -24
  22. package/dist/{chunk-RS5MEBRE.cjs → chunk-OQASTSIX.cjs} +2 -2
  23. package/dist/{chunk-SGKDHTQM.mjs → chunk-P3QGZWFW.mjs} +2 -2
  24. package/dist/{chunk-LPKVKTOK.cjs → chunk-UASPJ57U.cjs} +0 -1
  25. package/dist/dial/DialPanel.cjs +21 -21
  26. package/dist/dial/DialPanel.mjs +20 -20
  27. package/dist/dial/index.cjs +37 -37
  28. package/dist/dial/index.mjs +20 -20
  29. package/dist/dial/wrapped-inputs/ControlledInputs.cjs +25 -25
  30. package/dist/dial/wrapped-inputs/ControlledInputs.mjs +20 -20
  31. package/dist/dial/wrapped-inputs/DialInputs.cjs +34 -34
  32. package/dist/dial/wrapped-inputs/DialInputs.mjs +20 -20
  33. package/dist/dial/wrapped-inputs/DialPresetsInput.cjs +20 -20
  34. package/dist/dial/wrapped-inputs/DialPresetsInput.mjs +19 -19
  35. package/dist/dial/wrapped-inputs/DialVectorInput.cjs +21 -21
  36. package/dist/dial/wrapped-inputs/DialVectorInput.mjs +20 -20
  37. package/dist/dial/wrapped-inputs/index.cjs +41 -41
  38. package/dist/dial/wrapped-inputs/index.mjs +20 -20
  39. package/dist/index.cjs +94 -94
  40. package/dist/index.css +13 -13
  41. package/dist/index.mjs +20 -20
  42. package/dist/ui/DialBadge.cjs +5 -5
  43. package/dist/ui/DialBadge.mjs +1 -1
  44. package/dist/ui/UIKitBadge.cjs +5 -5
  45. package/dist/ui/UIKitBadge.mjs +1 -1
  46. package/dist/ui/index.cjs +75 -75
  47. package/dist/ui/index.mjs +18 -18
  48. package/dist/ui/inputs/index.cjs +33 -33
  49. package/dist/ui/inputs/index.mjs +7 -7
  50. package/dist/ui/inputs/number-inputs/index.cjs +23 -23
  51. package/dist/ui/inputs/number-inputs/index.mjs +5 -5
  52. package/dist/ui/layout.cjs +2 -2
  53. package/dist/ui/layout.mjs +1 -1
  54. package/dist/ui/layouts/index.cjs +2 -2
  55. package/dist/ui/layouts/index.mjs +2 -2
  56. package/package.json +1 -1
  57. package/src/dial/wrapped-inputs/ControlledInputs.tsx +18 -17
  58. package/src/ui/layout.tsx +0 -1
  59. package/dist/{chunk-EMXEFZEB.cjs → chunk-4JZOPZHB.cjs} +1 -1
  60. package/dist/{chunk-2ZK7JUAH.mjs → chunk-5OHAV55L.mjs} +1 -1
  61. package/dist/{chunk-EMVKGL5D.mjs → chunk-G6ATG2WV.mjs} +1 -1
  62. package/dist/{chunk-VXFUYV76.mjs → chunk-GUSUTH7D.mjs} +1 -1
  63. package/dist/{chunk-2YAC2EMY.cjs → chunk-I2YVC4AE.cjs} +1 -1
  64. package/dist/{chunk-GRQJN4D4.cjs → chunk-OOHCJIRV.cjs} +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vuer-ai/vuer-uikit",
3
3
  "author": "Ge Yang",
4
- "version": "0.0.114",
4
+ "version": "0.0.116",
5
5
  "files": [
6
6
  "/dist",
7
7
  "/src"
@@ -1,10 +1,9 @@
1
1
  import React, { PropsWithChildren, ReactElement, ReactNode, useCallback } from "react";
2
- import { LabelPositionT, useDialSchema } from "../DialProvider";
2
+
3
3
  import {
4
4
  ColorInput,
5
5
  FormLayout,
6
- Input,
7
- InputSlot,
6
+ InputNumbers,
8
7
  Label,
9
8
  type LayoutType,
10
9
  Select,
@@ -15,6 +14,7 @@ import {
15
14
  Slider,
16
15
  Switch,
17
16
  } from "../../index"; // Base input component that connects to the dial store
17
+ import { LabelPositionT, useDialSchema } from "../DialProvider";
18
18
 
19
19
  // Helper component for wrapping inputs with labels
20
20
  const DialInputWrapper: React.FC<{
@@ -46,7 +46,7 @@ export interface DialNumInputProps extends PropsWithChildren {
46
46
  size?: "sm" | "md" | "lg";
47
47
  }
48
48
 
49
- // Base input component that connects to the dial store
49
+ // Base input component that connects to the dial store using InputNumbers for drag support
50
50
  export const DialNumberInput: React.FC<DialNumInputProps> = ({
51
51
  name,
52
52
  min,
@@ -60,29 +60,32 @@ export const DialNumberInput: React.FC<DialNumInputProps> = ({
60
60
  const { getValue, setValue } = useDialSchema();
61
61
  const value = (getValue(name) ?? 0) as number;
62
62
 
63
- const handleChange = useCallback(
64
- (e: React.ChangeEvent<HTMLInputElement>) => setValue(name, parseFloat(e.target.value)),
65
- [name],
63
+ const handleValuesChange = useCallback(
64
+ (values: number[]) => {
65
+ const newValue = values[0];
66
+ if (!isNaN(newValue)) {
67
+ setValue(name, newValue);
68
+ }
69
+ },
70
+ [name, setValue],
66
71
  );
67
72
 
68
- const inputProps = {
69
- type: "number" as const,
70
- value,
73
+ const inputNumbersProps = {
74
+ value: [value],
75
+ onValuesChange: handleValuesChange,
71
76
  min,
72
77
  max,
73
78
  step,
74
- onChange: handleChange,
75
79
  size,
80
+ prefix: labelPosition === "inline" && label ? [label] : undefined,
76
81
  };
77
82
 
78
83
  if (labelPosition === "inline") {
79
- return (
80
- <Input {...inputProps}>{label ? <InputSlot side="left">{label}</InputSlot> : null}</Input>
81
- );
84
+ return <InputNumbers {...inputNumbersProps} />;
82
85
  } else {
83
86
  return (
84
87
  <DialInputWrapper label={label} labelPosition={labelPosition} {...props}>
85
- <Input {...inputProps} />
88
+ <InputNumbers {...inputNumbersProps} />
86
89
  </DialInputWrapper>
87
90
  );
88
91
  }
@@ -144,8 +147,6 @@ export const DialSelectInput: React.FC<DialNumInputProps> = ({
144
147
  const { getValue, setValue } = useDialSchema();
145
148
  const value = getValue(name);
146
149
 
147
- console.log("dial schema:", name, value);
148
-
149
150
  const handleValueChange = useCallback(
150
151
  (val: string) => {
151
152
  // Try to parse as number if possible
package/src/ui/layout.tsx CHANGED
@@ -23,7 +23,6 @@ export function FormLayout({
23
23
  children,
24
24
  }: FormLayoutProps) {
25
25
  const Com = asChild ? Slot : "div";
26
- console.log("layout", orientation);
27
26
 
28
27
  return (
29
28
  <Com
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkRSBVQ7SJ_cjs = require('./chunk-RSBVQ7SJ.cjs');
4
3
  var chunk7R5HY3IM_cjs = require('./chunk-7R5HY3IM.cjs');
4
+ var chunkRSBVQ7SJ_cjs = require('./chunk-RSBVQ7SJ.cjs');
5
5
  var react = require('react');
6
6
 
7
7
  var useSignIn = () => {
@@ -1,5 +1,5 @@
1
- import { getSessions } from './chunk-Z7BZFZEV.mjs';
2
1
  import { useUser } from './chunk-VSFPXAGN.mjs';
2
+ import { getSessions } from './chunk-Z7BZFZEV.mjs';
3
3
  import { useState, useEffect, useMemo } from 'react';
4
4
 
5
5
  var useVuerSessions = () => {
@@ -1,5 +1,5 @@
1
- import { signInHandler } from './chunk-V4KDK3BN.mjs';
2
1
  import { useUser } from './chunk-VSFPXAGN.mjs';
2
+ import { signInHandler } from './chunk-V4KDK3BN.mjs';
3
3
  import { useState, useCallback, useMemo } from 'react';
4
4
 
5
5
  var useSignIn = () => {
@@ -1,5 +1,5 @@
1
- import { getSession } from './chunk-SO2UTKSV.mjs';
2
1
  import { UserContext } from './chunk-FROQ45MN.mjs';
2
+ import { getSession } from './chunk-SO2UTKSV.mjs';
3
3
  import { bearerToken } from './chunk-UT7B4TLZ.mjs';
4
4
  import { useState, useCallback, useEffect, useMemo } from 'react';
5
5
  import { jsx } from 'react/jsx-runtime';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkMRMSCW3P_cjs = require('./chunk-MRMSCW3P.cjs');
4
3
  var chunk3WMO5QJJ_cjs = require('./chunk-3WMO5QJJ.cjs');
4
+ var chunkMRMSCW3P_cjs = require('./chunk-MRMSCW3P.cjs');
5
5
  var chunkF4Z5KATZ_cjs = require('./chunk-F4Z5KATZ.cjs');
6
6
  var react = require('react');
7
7
  var jsxRuntime = require('react/jsx-runtime');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ76WU4DL_cjs = require('./chunk-Q76WU4DL.cjs');
4
3
  var chunk7R5HY3IM_cjs = require('./chunk-7R5HY3IM.cjs');
4
+ var chunkQ76WU4DL_cjs = require('./chunk-Q76WU4DL.cjs');
5
5
  var react = require('react');
6
6
 
7
7
  var useVuerSessions = () => {