@spree/dashboard-ui 1.0.0-rc.5 → 6.0.0-rc.7

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 (2) hide show
  1. package/package.json +8 -8
  2. package/src/ui/field.tsx +13 -2
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spree/dashboard-ui",
3
3
  "license": "MIT",
4
- "version": "1.0.0-rc.5",
4
+ "version": "6.0.0-rc.7",
5
5
  "description": "Spree Dashboard design system — shadcn primitives, headless composed components, and design tokens. Source-only package; consumers compile via their own Vite/Tailwind setup. Developer Preview.",
6
6
  "author": "Vendo Connect Inc.",
7
7
  "homepage": "https://spreecommerce.org",
@@ -47,21 +47,21 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@base-ui/react": "1.8.0",
50
- "@codemirror/autocomplete": "6.20.3",
50
+ "@codemirror/autocomplete": "6.20.4",
51
51
  "@codemirror/commands": "6.11.1",
52
52
  "@codemirror/lang-html": "6.4.12",
53
53
  "@codemirror/lang-liquid": "6.3.3",
54
- "@codemirror/language": "6.12.4",
54
+ "@codemirror/language": "6.13.1",
55
55
  "@codemirror/lint": "6.9.7",
56
56
  "@codemirror/search": "6.7.2",
57
57
  "@codemirror/state": "6.7.6",
58
- "@codemirror/view": "6.43.13",
58
+ "@codemirror/view": "6.43.15",
59
59
  "@dnd-kit/core": "6.3.1",
60
60
  "@dnd-kit/sortable": "10.0.0",
61
61
  "@dnd-kit/utilities": "3.2.2",
62
62
  "@fontsource-variable/geist": "5.3.0",
63
63
  "@fontsource-variable/geist-mono": "5.3.0",
64
- "@tanstack/react-hotkeys": "^0.14.3",
64
+ "@tanstack/react-hotkeys": "^0.16.0",
65
65
  "@tanstack/react-table": "9.3.1",
66
66
  "@tiptap/core": "3.32.0",
67
67
  "@tiptap/extension-bubble-menu": "3.32.0",
@@ -79,14 +79,14 @@
79
79
  "date-fns": "4.4.0",
80
80
  "date-fns-tz": "3.2.0",
81
81
  "flag-icons": "7.6.0",
82
- "lucide-react": "1.58.0",
82
+ "lucide-react": "1.60.0",
83
83
  "react-colorful": "5.8.1",
84
84
  "react-day-picker": "10.0.2",
85
85
  "recharts": "3.10.1",
86
- "shadcn": "4.22.0",
86
+ "shadcn": "4.22.1",
87
87
  "tailwind-merge": "3.7.0",
88
88
  "tw-animate-css": "1.4.0",
89
- "@spree/core": "^0.2.0"
89
+ "@spree/core": "^6.0.0-rc.7"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@types/react": "^19.2.14",
package/src/ui/field.tsx CHANGED
@@ -186,9 +186,20 @@ function FieldError({
186
186
  return null
187
187
  }
188
188
 
189
- const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()]
189
+ // `filter` also closes the holes react-hook-form leaves in a per-item
190
+ // error array (`[ <empty>, { message } ]`), which `map` would keep and
191
+ // `new Map` would choke on.
192
+ const uniqueErrors = [
193
+ ...new Map(
194
+ errors.filter((error) => error?.message).map((error) => [error?.message, error]),
195
+ ).values(),
196
+ ]
197
+
198
+ if (!uniqueErrors.length) {
199
+ return null
200
+ }
190
201
 
191
- if (uniqueErrors?.length == 1) {
202
+ if (uniqueErrors.length == 1) {
192
203
  return uniqueErrors[0]?.message
193
204
  }
194
205