@carbonid1/design-system 5.7.0 → 5.7.2

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/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { HotkeysProvider as HotkeysProviderHook, isHotkeyPressed as isHotkeyPressedHook, useHotkeys as useHotkeysHook, useRecordHotkeys as useRecordHotkeysHook } from 'react-hotkeys-hook';
1
2
  export { Badge, badgeVariants } from './Badge/Badge';
2
3
  export type { BadgeProps } from './Badge/Badge.types';
3
4
  export { Button, buttonVariants } from './Button/Button';
@@ -19,7 +20,11 @@ export { ThemeCycler } from './ThemeCycler/ThemeCycler';
19
20
  export { Toaster } from './Toaster/Toaster';
20
21
  export { toast } from 'sonner';
21
22
  export { useTheme } from 'next-themes';
22
- export { useHotkeys, useRecordHotkeys, useHotkeysContext, isHotkeyPressed, HotkeysProvider, } from 'react-hotkeys-hook';
23
+ export declare const useHotkeys: typeof useHotkeysHook;
24
+ export declare const useRecordHotkeys: typeof useRecordHotkeysHook;
25
+ export declare const useHotkeysContext: () => import("react-hotkeys-hook/dist/HotkeysProvider").HotkeysContextType;
26
+ export declare const isHotkeyPressed: typeof isHotkeyPressedHook;
27
+ export declare const HotkeysProvider: typeof HotkeysProviderHook;
23
28
  export type { Options, Keys, HotkeyCallback } from 'react-hotkeys-hook';
24
29
  export { cn } from './helpers/cn/cn';
25
30
  export { getModKey } from './helpers/getModKey/getModKey';
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { HotkeysProvider as HotkeysProviderHook, isHotkeyPressed as isHotkeyPressedHook, useHotkeys as useHotkeysHook, useHotkeysContext as useHotkeysContextHook, useRecordHotkeys as useRecordHotkeysHook, } from 'react-hotkeys-hook';
1
2
  export { Badge, badgeVariants } from './Badge/Badge';
2
3
  export { Button, buttonVariants } from './Button/Button';
3
4
  export { Kbd, kbdVariants } from './Kbd/Kbd';
@@ -13,7 +14,20 @@ export { ThemeCycler } from './ThemeCycler/ThemeCycler';
13
14
  export { Toaster } from './Toaster/Toaster';
14
15
  export { toast } from 'sonner';
15
16
  export { useTheme } from 'next-themes';
16
- export { useHotkeys, useRecordHotkeys, useHotkeysContext, isHotkeyPressed, HotkeysProvider, } from 'react-hotkeys-hook';
17
+ // Bind react-hotkeys-hook's exports to local consts instead of re-exporting them.
18
+ // Turbopack's dev module-graph analysis can't reliably follow a transitive
19
+ // `export … from 'react-hotkeys-hook'` across the package boundary, so it logs a
20
+ // spurious "Export useHotkeys doesn't exist" for every consumer and degrades Fast
21
+ // Refresh to full reloads. A local binding terminates the re-export here and
22
+ // resolves directly. Types are erased at build time, so the type re-export below
23
+ // is unaffected.
24
+ export const useHotkeys = useHotkeysHook;
25
+ export const useRecordHotkeys = useRecordHotkeysHook;
26
+ export const useHotkeysContext = useHotkeysContextHook;
27
+ export const isHotkeyPressed = isHotkeyPressedHook;
28
+ // Annotated with `typeof` because the component's props type isn't exported by
29
+ // react-hotkeys-hook, so tsc can't name it in the emitted declaration (TS4023).
30
+ export const HotkeysProvider = HotkeysProviderHook;
17
31
  export { cn } from './helpers/cn/cn';
18
32
  export { getModKey } from './helpers/getModKey/getModKey';
19
33
  export { cva } from 'class-variance-authority';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbonid1/design-system",
3
- "version": "5.7.0",
3
+ "version": "5.7.2",
4
4
  "description": "Shared React UI primitives + design tokens (themes, postcss config)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,6 +11,7 @@ Primitives live in `@carbonid1/design-system`. **Check the package's exports and
11
11
  import {
12
12
  Badge,
13
13
  Button,
14
+ buttonVariants,
14
15
  Kbd,
15
16
  ProgressRing,
16
17
  Slider,
@@ -50,9 +51,11 @@ If you're editing `@carbonid1/design-system` itself (adding a primitive, changin
50
51
  href={href}
51
52
  aria-current={active ? 'page' : undefined}
52
53
  className={cn(buttonVariants({ variant: 'ghost', size: 'small', selected: active }))}
53
- />
54
+ >
55
+ {label}
56
+ </Link>
54
57
  ```
55
- Wrap in `cn(...)` so the `selected` hover tint resolves against the variant's own hover background.
58
+ The `cn(...)` wrap is load-bearing, not cosmetic: `buttonVariants` is cva, which concatenates without merging, so only `cn` (tailwind-merge) drops the variant's own `hover:bg-accent` in favor of the `selected` tint.
56
59
 
57
60
  ## Visual Language
58
61