@codefast/ui 0.11.0 → 0.12.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @codefast/ui
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1052](https://github.com/codefastlabs/codefast/pull/1052) The root entry, `@codefast/ui`, now re-exports `useHasHydrated` and `useLatest`, so every published hook is reachable
8
+ from it. The `@codefast/ui/hooks/use-message-scroller-commands`, `use-message-scroller-controller` and
9
+ `use-message-scroller-refs` subpaths are no longer published: they pass the message-scroller primitive's private ref
10
+ bags between its own parts and were never usable on their own — compose a scroller from
11
+ `@codefast/ui/primitives/message-scroller` or `@codefast/ui/message-scroller` instead.
12
+
13
+ ### Patch Changes
14
+
15
+ - [#1050](https://github.com/codefastlabs/codefast/pull/1050) The root entry, `@codefast/ui`, now re-exports `InputNumberField`, `InputNumberStepper`, `InputNumberIncrement` and
16
+ `InputNumberDecrement` with their prop types, which only `@codefast/ui/input-number` offered before, so an `InputNumber`
17
+ can be composed from the root import alone.
18
+
3
19
  ## 0.11.0
4
20
 
5
21
  ### Minor Changes
package/README.md CHANGED
@@ -96,7 +96,7 @@ All components, prop types, hooks, and variants are also re-exported from the ro
96
96
  Beyond the components, the package exposes:
97
97
 
98
98
  - `@codefast/ui/hooks/*` — standalone hooks such as `useMediaQuery` (`@codefast/ui/hooks/use-media-query`),
99
- `useIsMobile`, `useCopyToClipboard`, `useMutationObserver`, and `usePagination`.
99
+ `useIsMobile`, `useCopyToClipboard`, `useMutationObserver`, `usePagination`, `useHasHydrated`, and `useLatest`.
100
100
  - `@codefast/ui/variants/*` — the variant functions behind the styled components, such as `buttonVariants` from
101
101
  `@codefast/ui/variants/button`, for styling an element that isn't the component itself.
102
102
  - `@codefast/ui/primitives/*` — unstyled building blocks the styled components are composed from.
@@ -106,8 +106,8 @@ Beyond the components, the package exposes:
106
106
  For example, to style a link like a button:
107
107
 
108
108
  ```tsx
109
- import { buttonVariants } from "@codefast/ui/variants/button";
110
109
  import { cn } from "@codefast/ui/lib/utils";
110
+ import { buttonVariants } from "@codefast/ui/variants/button";
111
111
 
112
112
  export function DocsLink() {
113
113
  return (
@@ -1,4 +1,3 @@
1
- import type { MessageScrollerRefs } from "#hooks/use-message-scroller-refs";
2
1
  import type { MessageScrollerContextValue, MessageScrollerProviderProps, MessageScrollerRegisterMessage } from "#lib/message-scroller/types";
3
2
  /**
4
3
  * Orchestrator hook. Decides when to scroll and delegates the moves to
@@ -11,5 +10,4 @@ declare function useMessageScrollerController({ autoScroll, defaultScrollPositio
11
10
  context: MessageScrollerContextValue;
12
11
  registerMessage: MessageScrollerRegisterMessage;
13
12
  };
14
- export { useMessageScrollerController };
15
- export type { MessageScrollerRefs };
13
+ export { useMessageScrollerController };
package/dist/index.d.ts CHANGED
@@ -59,8 +59,8 @@ export { Input } from "#components/input";
59
59
  export type { InputProps } from "#components/input";
60
60
  export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, } from "#components/input-group";
61
61
  export type { InputGroupAddonProps, InputGroupButtonProps, InputGroupInputProps, InputGroupProps, InputGroupTextareaProps, InputGroupTextProps, } from "#components/input-group";
62
- export { InputNumber } from "#components/input-number";
63
- export type { InputNumberProps } from "#components/input-number";
62
+ export { InputNumber, InputNumberDecrement, InputNumberField, InputNumberIncrement, InputNumberStepper, } from "#components/input-number";
63
+ export type { InputNumberDecrementProps, InputNumberFieldProps, InputNumberIncrementProps, InputNumberProps, InputNumberStepperProps, } from "#components/input-number";
64
64
  export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS, } from "#components/input-otp";
65
65
  export type { InputOTPGroupProps, InputOTPProps, InputOTPSeparatorProps, InputOTPSlotProps, } from "#components/input-otp";
66
66
  export { InputPassword } from "#components/input-password";
@@ -135,7 +135,9 @@ export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger
135
135
  export type { TooltipArrowProps, TooltipContentProps, TooltipProps, TooltipProviderProps, TooltipTriggerProps, } from "#components/tooltip";
136
136
  export { useAnimatedValue } from "#hooks/use-animated-value";
137
137
  export { useCopyToClipboard } from "#hooks/use-copy-to-clipboard";
138
+ export { useHasHydrated } from "#hooks/use-has-hydrated";
138
139
  export { useIsMobile } from "#hooks/use-is-mobile";
140
+ export { useLatest } from "#hooks/use-latest";
139
141
  export { useMediaQuery } from "#hooks/use-media-query";
140
142
  export { useMutationObserver } from "#hooks/use-mutation-observer";
141
143
  export { ELLIPSIS, usePagination } from "#hooks/use-pagination";
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ export { createFormFieldScope, Form, FormControl, FormDescription, FormField, Fo
29
29
  export { HoverCard, HoverCardArrow, HoverCardContent, HoverCardTrigger } from "#components/hover-card";
30
30
  export { Input } from "#components/input";
31
31
  export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, } from "#components/input-group";
32
- export { InputNumber } from "#components/input-number";
32
+ export { InputNumber, InputNumberDecrement, InputNumberField, InputNumberIncrement, InputNumberStepper, } from "#components/input-number";
33
33
  export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, REGEXP_ONLY_CHARS, REGEXP_ONLY_DIGITS, REGEXP_ONLY_DIGITS_AND_CHARS, } from "#components/input-otp";
34
34
  export { InputPassword } from "#components/input-password";
35
35
  export { InputSearch } from "#components/input-search";
@@ -68,7 +68,9 @@ export { ToggleGroup, ToggleGroupItem } from "#components/toggle-group";
68
68
  export { Tooltip, TooltipArrow, TooltipContent, TooltipProvider, TooltipTrigger } from "#components/tooltip";
69
69
  export { useAnimatedValue } from "#hooks/use-animated-value";
70
70
  export { useCopyToClipboard } from "#hooks/use-copy-to-clipboard";
71
+ export { useHasHydrated } from "#hooks/use-has-hydrated";
71
72
  export { useIsMobile } from "#hooks/use-is-mobile";
73
+ export { useLatest } from "#hooks/use-latest";
72
74
  export { useMediaQuery } from "#hooks/use-media-query";
73
75
  export { useMutationObserver } from "#hooks/use-mutation-observer";
74
76
  export { ELLIPSIS, usePagination } from "#hooks/use-pagination";
@@ -58,7 +58,7 @@ function CheckboxGroup({ __scopeCheckboxGroup, defaultValue, dir, disabled = fal
58
58
  return currentValue.filter((inputValue) => inputValue !== itemValue);
59
59
  });
60
60
  }, [setValue, required]);
61
- return (_jsx(CheckboxGroupContextProvider, { disabled: disabled, name: name, required: required, scope: __scopeCheckboxGroup, value: value, onItemCheck: handleItemCheck, onItemUncheck: handleItemUncheck, children: _jsx(RovingFocus.Root, { asChild: true, ...rovingFocusGroupScope, dir: direction, loop: loop, orientation: orientation, children: _jsx("div", { "data-disabled": disabled ? "" : undefined, dir: direction, role: "group", ...props }) }) }));
61
+ return (_jsx(CheckboxGroupContextProvider, { disabled: disabled, name: name, required: required, scope: __scopeCheckboxGroup, value: value, onItemCheck: handleItemCheck, onItemUncheck: handleItemUncheck, children: _jsx(RovingFocus.Root, { asChild: true, ...rovingFocusGroupScope, dir: direction, loop: loop, ...(orientation === undefined ? {} : { orientation }), children: _jsx("div", { "data-disabled": disabled ? "" : undefined, dir: direction, role: "group", ...props }) }) }));
62
62
  }
63
63
  // ── Component: CheckboxGroupItem ─────────────────────────────────────────────────────────────────────────────────────
64
64
  const ITEM_NAME = "CheckboxGroupItem";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefast/ui",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "Core UI components library built with React and Tailwind CSS",
5
5
  "keywords": [
6
6
  "components",
@@ -345,18 +345,6 @@
345
345
  "types": "./dist/hooks/use-media-query.d.ts",
346
346
  "import": "./dist/hooks/use-media-query.js"
347
347
  },
348
- "./hooks/use-message-scroller-commands": {
349
- "types": "./dist/hooks/use-message-scroller-commands.d.ts",
350
- "import": "./dist/hooks/use-message-scroller-commands.js"
351
- },
352
- "./hooks/use-message-scroller-controller": {
353
- "types": "./dist/hooks/use-message-scroller-controller.d.ts",
354
- "import": "./dist/hooks/use-message-scroller-controller.js"
355
- },
356
- "./hooks/use-message-scroller-refs": {
357
- "types": "./dist/hooks/use-message-scroller-refs.d.ts",
358
- "import": "./dist/hooks/use-message-scroller-refs.js"
359
- },
360
348
  "./hooks/use-mutation-observer": {
361
349
  "types": "./dist/hooks/use-mutation-observer.d.ts",
362
350
  "import": "./dist/hooks/use-mutation-observer.js"
@@ -497,11 +485,11 @@
497
485
  "cmdk": "^1.1.1",
498
486
  "embla-carousel-react": "^8.6.0",
499
487
  "input-otp": "^1.5.0",
500
- "lucide-react": "^1.49.0",
488
+ "lucide-react": "^1.54.0",
501
489
  "next-themes": "^0.4.6",
502
- "radix-ui": "^1.6.7",
490
+ "radix-ui": "^1.7.0",
503
491
  "react-hook-form": "^7.89.0",
504
- "react-resizable-panels": "^4.14.1",
492
+ "react-resizable-panels": "^4.14.3",
505
493
  "recharts": "^3.10.1",
506
494
  "sonner": "^2.0.8",
507
495
  "tailwind-merge": "^3.7.0",