@leitware/composables 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "@leitware/composables",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/rowanhen/composables"
8
+ },
5
9
  "publishConfig": {
6
10
  "access": "public"
7
11
  },
@@ -40,6 +44,7 @@
40
44
  "class-variance-authority": "^0.7.1",
41
45
  "clsx": "^2.1.1",
42
46
  "lucide-react": "^1.23.0",
47
+ "radix-ui": "^1.0.0",
43
48
  "tailwind-merge": "^3.6.0"
44
49
  },
45
50
  "peerDependencies": {
@@ -72,8 +77,7 @@
72
77
  "sonner": "^2.0.0",
73
78
  "cmdk": "^1.0.0",
74
79
  "react-colorful": "^5.0.0",
75
- "motion": "^12.0.0",
76
- "radix-ui": "^1.0.0"
80
+ "motion": "^12.0.0"
77
81
  },
78
82
  "peerDependenciesMeta": {
79
83
  "@fontsource-variable/inter": {
@@ -159,9 +163,6 @@
159
163
  },
160
164
  "motion": {
161
165
  "optional": true
162
- },
163
- "radix-ui": {
164
- "optional": true
165
166
  }
166
167
  },
167
168
  "devDependencies": {
@@ -195,7 +196,6 @@
195
196
  "nanoid": "^5.1.16",
196
197
  "oxfmt": "^0.57.0",
197
198
  "oxlint": "^1.72.0",
198
- "radix-ui": "^1.6.1",
199
199
  "react": "^19.2.7",
200
200
  "react-colorful": "^5.7.0",
201
201
  "react-day-picker": "^10.0.1",
@@ -1,5 +1,3 @@
1
- import * as React from 'react'
2
-
3
1
  import {
4
2
  Combobox as ComboboxPrimitive,
5
3
  ComboboxChip,
@@ -1,4 +1,3 @@
1
- import * as React from 'react'
2
1
  import { TokenConfigPanel } from './token-config-panel'
3
2
 
4
3
  /**
@@ -11,7 +11,15 @@ import { getResolvedColor } from './helpers'
11
11
  export const colorTokens: FlatToken[] = semanticColorTokens
12
12
 
13
13
  export const colorCategories = [...new Set(colorTokens.map((t) => t.category))]
14
- export const colorTokensByCategory = Object.groupBy(colorTokens, (t: FlatToken) => t.category)
14
+ export const colorTokensByCategory = colorTokens.reduce<Record<string, FlatToken[]>>(
15
+ (groups, token) => {
16
+ const group = groups[token.category] ?? []
17
+ group.push(token)
18
+ groups[token.category] = group
19
+ return groups
20
+ },
21
+ {},
22
+ )
15
23
 
16
24
  /* ------------------------------------------------------------------ */
17
25
  /* ColorTokenRow */