@dinachi/cli 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
@@ -5,6 +5,33 @@ All notable changes to `@dinachi/cli` will be documented in this file.
5
5
  The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.12.0] - 2026-10-09
9
+
10
+ ### Added
11
+
12
+ - **Menu**: filtering. Wrap a menu in `MenuFilter`, add `MenuInput` (with
13
+ `MenuClear` inside it) to the popup, and put the items in `MenuList`.
14
+ `MenuEmpty` shows when nothing matches. A submenu takes its own
15
+ `MenuFilter`. Also works in a Menubar menu. Filtering is a Base UI preview
16
+ API and may change.
17
+ - **Avatar**: `keepMounted` on `AvatarImage` renders the image right away, for
18
+ `next/image` and `loading="lazy"`. The fallback shows beneath it until the
19
+ image loads, and stays if it fails.
20
+ - **Combobox**: `createComboboxItems` builds `items` from objects with
21
+ `getValue` and `getLabel`, so selection uses IDs while the list renders the
22
+ full objects.
23
+
24
+ ### Changed
25
+
26
+ - `@base-ui/react` is now installed at `^1.9.0`, up from `^1.7.0`. It brings
27
+ fixes across Drawer swipes, Dialog and Popover outside clicks, Field
28
+ validation, and Select and Combobox `readOnly`.
29
+ - **Avatar**: the image and fallback are stacked in the same box, and the
30
+ image uses `object-cover`, so a non-square source crops instead of
31
+ stretching.
32
+ - **Collapsible**: with a native button, the trigger now gets the `disabled`
33
+ attribute instead of `aria-disabled` (a Base UI 1.9 change).
34
+
8
35
  ## [0.11.0] - 2026-08-10
9
36
 
10
37
  ### Added
@@ -184,5 +211,7 @@ Re-run `dinachi add select`, `dinachi add slider`, and `dinachi add otp-field`
184
211
  See [git history](https://github.com/raymond-UI/dinachiUI/commits/main/packages/cli)
185
212
  for changes prior to 0.9.0.
186
213
 
214
+ [0.12.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v0.12.0
215
+ [0.11.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v0.11.0
187
216
  [0.10.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v0.10.0
188
217
  [0.9.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v0.9.0
package/dist/index.js CHANGED
@@ -697,7 +697,7 @@ function parseJsonWithComments(content) {
697
697
 
698
698
  // src/utils/dependencies.ts
699
699
  var DEPENDENCY_VERSION_MAP = {
700
- "@base-ui/react": "^1.7.0",
700
+ "@base-ui/react": "^1.9.0",
701
701
  "lucide-react": "^0.552.0",
702
702
  "motion": "^12.23.6",
703
703
  "class-variance-authority": "^0.7.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dinachi/cli",
3
- "version": "0.11.0",
3
+ "version": "0.12.0",
4
4
  "description": "CLI for adding Dinachi UI components to your project",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -44,7 +44,7 @@
44
44
  "ts-morph": "^27.0.2"
45
45
  },
46
46
  "devDependencies": {
47
- "@base-ui/react": "1.7.0",
47
+ "@base-ui/react": "1.9.0",
48
48
  "@json-render/core": "^0.14.0",
49
49
  "@json-render/react": "^0.14.0",
50
50
  "@types/fs-extra": "^11.0.4",
@@ -38,7 +38,10 @@ const AvatarImage = React.forwardRef<
38
38
  >(({ className, ...props }, ref) => (
39
39
  <BaseAvatar.Image
40
40
  ref={ref}
41
- className={cn("aspect-square h-full w-full", className)}
41
+ className={cn(
42
+ "absolute inset-0 z-[1] aspect-square h-full w-full object-cover data-[error]:invisible data-[loading]:invisible",
43
+ className
44
+ )}
42
45
  {...props}
43
46
  />
44
47
  ));
@@ -51,7 +54,7 @@ const AvatarFallback = React.forwardRef<
51
54
  <BaseAvatar.Fallback
52
55
  ref={ref}
53
56
  className={cn(
54
- "flex h-full w-full items-center justify-center rounded-full bg-muted",
57
+ "absolute inset-0 flex h-full w-full items-center justify-center rounded-full bg-muted",
55
58
  className
56
59
  )}
57
60
  {...props}
@@ -10,6 +10,7 @@ const ComboboxValue = ComboboxPrimitive.Value
10
10
  const ComboboxCollection = ComboboxPrimitive.Collection
11
11
  const ComboboxPortal = ComboboxPrimitive.Portal
12
12
  const ComboboxInputGroup = ComboboxPrimitive.InputGroup
13
+ const createComboboxItems = ComboboxPrimitive.createItems
13
14
 
14
15
  const ComboboxInput = React.forwardRef<
15
16
  React.ComponentRef<typeof ComboboxPrimitive.Input>,
@@ -209,6 +210,7 @@ export {
209
210
  ComboboxCollection,
210
211
  ComboboxPortal,
211
212
  ComboboxInputGroup,
213
+ createComboboxItems,
212
214
  ComboboxInput,
213
215
  ComboboxTrigger,
214
216
  ComboboxClear,
@@ -4,6 +4,7 @@ export {
4
4
  ComboboxCollection,
5
5
  ComboboxPortal,
6
6
  ComboboxInputGroup,
7
+ createComboboxItems,
7
8
  ComboboxInput,
8
9
  ComboboxTrigger,
9
10
  ComboboxClear,
@@ -16,4 +16,9 @@ export {
16
16
  MenuSub,
17
17
  MenuSubTrigger,
18
18
  MenuSubContent,
19
+ MenuFilter,
20
+ MenuInput,
21
+ MenuClear,
22
+ MenuEmpty,
23
+ MenuList,
19
24
  } from "./menu"
@@ -2,7 +2,7 @@
2
2
 
3
3
  import * as React from "react"
4
4
  import { Menu as MenuPrimitive } from "@base-ui/react/menu"
5
- import { Check, ChevronRight, Circle } from "lucide-react"
5
+ import { Check, ChevronRight, Circle, Search, X } from "lucide-react"
6
6
  import { cn } from "@/lib/utils"
7
7
 
8
8
  const Menu: React.FC<React.ComponentProps<typeof MenuPrimitive.Root>> = (props) => (
@@ -262,6 +262,79 @@ const MenuSubContent = React.forwardRef<
262
262
  ))
263
263
  MenuSubContent.displayName = "MenuSubContent"
264
264
 
265
+ const MenuFilter: React.FC<React.ComponentProps<typeof MenuPrimitive.FilterProvider>> = (props) => (
266
+ <MenuPrimitive.FilterProvider {...props} />
267
+ )
268
+ MenuFilter.displayName = "MenuFilter"
269
+
270
+ const MenuInput = React.forwardRef<
271
+ React.ComponentRef<typeof MenuPrimitive.Input>,
272
+ React.ComponentProps<typeof MenuPrimitive.Input>
273
+ >(({ className, children, ...props }, ref) => (
274
+ <div className="-mx-1 -mt-1 mb-1 flex items-center gap-2 border-b px-2">
275
+ <Search className="h-4 w-4 shrink-0 text-muted-foreground" />
276
+ <MenuPrimitive.Input
277
+ ref={ref}
278
+ className={cn(
279
+ "flex h-9 w-full bg-transparent py-2 text-sm outline-none",
280
+ "placeholder:text-muted-foreground",
281
+ "disabled:cursor-not-allowed disabled:opacity-50",
282
+ className
283
+ )}
284
+ {...props}
285
+ />
286
+ {children}
287
+ </div>
288
+ ))
289
+ MenuInput.displayName = "MenuInput"
290
+
291
+ const MenuClear = React.forwardRef<
292
+ React.ComponentRef<typeof MenuPrimitive.Clear>,
293
+ React.ComponentProps<typeof MenuPrimitive.Clear>
294
+ >(({ className, children, ...props }, ref) => (
295
+ <MenuPrimitive.Clear
296
+ ref={ref}
297
+ className={cn(
298
+ "inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-sm text-muted-foreground",
299
+ "hover:text-foreground",
300
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
301
+ className
302
+ )}
303
+ {...props}
304
+ >
305
+ {children ?? <X className="h-4 w-4" />}
306
+ </MenuPrimitive.Clear>
307
+ ))
308
+ MenuClear.displayName = "MenuClear"
309
+
310
+ const MenuEmpty = React.forwardRef<
311
+ React.ComponentRef<typeof MenuPrimitive.Empty>,
312
+ React.ComponentProps<typeof MenuPrimitive.Empty>
313
+ >(({ className, ...props }, ref) => (
314
+ <MenuPrimitive.Empty
315
+ ref={ref}
316
+ className={cn("py-6 text-center text-sm text-muted-foreground", className)}
317
+ {...props}
318
+ />
319
+ ))
320
+ MenuEmpty.displayName = "MenuEmpty"
321
+
322
+ const MenuList = React.forwardRef<
323
+ React.ComponentRef<typeof MenuPrimitive.List>,
324
+ React.ComponentProps<typeof MenuPrimitive.List>
325
+ >(({ className, ...props }, ref) => (
326
+ <MenuPrimitive.List
327
+ ref={ref}
328
+ className={cn(
329
+ "max-h-[min(22rem,var(--available-height))] overflow-y-auto scroll-py-1 outline-none",
330
+ "[&>[data-filter-section]:not([hidden])~[data-filter-section]:not([hidden])>[data-filter-separator]]:block",
331
+ className
332
+ )}
333
+ {...props}
334
+ />
335
+ ))
336
+ MenuList.displayName = "MenuList"
337
+
265
338
  export {
266
339
  Menu,
267
340
  MenuTrigger,
@@ -280,4 +353,9 @@ export {
280
353
  MenuSub,
281
354
  MenuSubTrigger,
282
355
  MenuSubContent,
356
+ MenuFilter,
357
+ MenuInput,
358
+ MenuClear,
359
+ MenuEmpty,
360
+ MenuList,
283
361
  }