@dinachi/cli 0.9.0 → 0.11.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 +101 -0
- package/README.md +34 -5
- package/dist/index.js +294 -63
- package/package.json +8 -6
- package/templates/accordion/accordion.tsx +4 -5
- package/templates/alert-dialog/alert-dialog.tsx +9 -2
- package/templates/animated-icon/animated-icon.tsx +145 -0
- package/templates/animated-icon/index.ts +1 -0
- package/templates/animated-list/animated-list.tsx +161 -0
- package/templates/animated-list/index.ts +2 -0
- package/templates/animated-tabs/animated-tabs.tsx +244 -0
- package/templates/animated-tabs/index.ts +13 -0
- package/templates/autocomplete/autocomplete.tsx +6 -4
- package/templates/button/button.tsx +19 -2
- package/templates/carousel/carousel.tsx +492 -0
- package/templates/carousel/index.ts +1 -0
- package/templates/collapsible/collapsible.tsx +3 -7
- package/templates/combobox/combobox.tsx +6 -4
- package/templates/compare-slider/compare-slider.tsx +383 -0
- package/templates/compare-slider/index.ts +2 -0
- package/templates/context-menu/context-menu.tsx +10 -6
- package/templates/dialog/dialog.tsx +9 -2
- package/templates/drawer/drawer.tsx +24 -2
- package/templates/expandable-card/expandable-card.tsx +509 -0
- package/templates/expandable-card/index.ts +1 -0
- package/templates/hold-to-confirm/hold-to-confirm.tsx +580 -0
- package/templates/hold-to-confirm/index.ts +2 -0
- package/templates/load-transition/index.ts +1 -0
- package/templates/load-transition/load-transition.tsx +163 -0
- package/templates/marquee/index.ts +2 -0
- package/templates/marquee/marquee.tsx +256 -0
- package/templates/menu/menu.tsx +10 -6
- package/templates/menubar/menubar.tsx +10 -6
- package/templates/meter/meter.tsx +1 -1
- package/templates/navigation-menu/navigation-menu.tsx +9 -6
- package/templates/number-ticker/index.ts +2 -0
- package/templates/number-ticker/number-ticker.tsx +470 -0
- package/templates/otp-field/otp-field.tsx +3 -2
- package/templates/popover/popover.tsx +7 -6
- package/templates/preview-card/preview-card.tsx +2 -1
- package/templates/progress/progress.tsx +1 -1
- package/templates/progress-ring/index.ts +1 -0
- package/templates/progress-ring/progress-ring.tsx +268 -0
- package/templates/scroll-progress/index.ts +2 -0
- package/templates/scroll-progress/scroll-progress.tsx +147 -0
- package/templates/scroll-reveal/index.ts +2 -0
- package/templates/scroll-reveal/scroll-reveal.tsx +198 -0
- package/templates/select/select.tsx +18 -4
- package/templates/slider/slider.tsx +3 -2
- package/templates/sortable/index.ts +1 -0
- package/templates/sortable/sortable.tsx +349 -0
- package/templates/stagger-list/index.ts +2 -0
- package/templates/stagger-list/stagger-list.tsx +204 -0
- package/templates/streaming-text/index.ts +2 -0
- package/templates/streaming-text/streaming-text.tsx +220 -0
- package/templates/swipeable-row/index.ts +2 -0
- package/templates/swipeable-row/swipeable-row.tsx +368 -0
- package/templates/switch/switch.tsx +4 -2
- package/templates/tabs/tabs.tsx +10 -2
- package/templates/text-morph/index.ts +2 -0
- package/templates/text-morph/text-morph.tsx +265 -0
- package/templates/text-shimmer/index.ts +2 -0
- package/templates/text-shimmer/text-shimmer.tsx +151 -0
- package/templates/textarea/textarea.tsx +1 -2
- package/templates/toast/toast.tsx +24 -19
- package/templates/toggle/toggle.tsx +1 -1
- package/templates/tooltip/tooltip.tsx +10 -4
- package/templates/tsconfig.json +1 -0
- package/templates/utils/variants.ts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,106 @@ 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.11.0] - 2026-08-10
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Motion tokens**: `dinachi init` now writes `--motion-ease-out`,
|
|
13
|
+
`--motion-ease-in-out`, `--motion-ease-drawer`, `--motion-duration-fast` and
|
|
14
|
+
`--motion-duration-base` into `:root`. Change a duration there and every
|
|
15
|
+
installed component retimes together. Components inline the same values as
|
|
16
|
+
`var()` fallbacks, so this is a tuning surface, not a requirement: a project
|
|
17
|
+
that never runs `init` still animates correctly. Projects already on 0.10.0
|
|
18
|
+
can copy the block out of `dinachi init` to get the same control.
|
|
19
|
+
- **Select**: a `positionMethod` prop, defaulting to the existing `"fixed"`.
|
|
20
|
+
See the fix below for when to set `"absolute"`.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **Button**: presses now give way slightly, `scale(0.97)` going down in 100ms
|
|
25
|
+
and back up in 150ms. The `link` variant is excluded.
|
|
26
|
+
- **Drawer**: a swipe dismissal now finishes at the speed it was thrown, and
|
|
27
|
+
the backdrop dims with the finger instead of holding full strength until the
|
|
28
|
+
drawer lets go.
|
|
29
|
+
- Popups, menus, tooltips and selects scale from their trigger rather than
|
|
30
|
+
from their own centre. Dialogs stay centred.
|
|
31
|
+
- Every animated component now has a `prefers-reduced-motion` path. Movement
|
|
32
|
+
is dropped, the fade that signals arrival is kept.
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- **Select on Safari**: the dropdown could open far from its trigger when any
|
|
37
|
+
ancestor had a `filter`, `backdrop-filter` or `transform`. Those make the
|
|
38
|
+
ancestor the containing block for a fixed-positioned element, which the
|
|
39
|
+
positioning library accounts for everywhere except WebKit. Pass
|
|
40
|
+
`positionMethod="absolute"` if you hit this; it resolves against the nearest
|
|
41
|
+
positioned ancestor, which no filter can move.
|
|
42
|
+
- Motion classes across nine components used Tailwind 4 only syntax, which
|
|
43
|
+
emits no CSS at all on Tailwind 3 rather than erroring. Those animations
|
|
44
|
+
never ran on a v3 project.
|
|
45
|
+
- **Autocomplete** and **Combobox**: the popup had no anchor width on
|
|
46
|
+
Tailwind 3, so it did not match its input.
|
|
47
|
+
- Arbitrary transition lists now name `scale` alongside `transform`. Tailwind
|
|
48
|
+
4 compiles `scale-*` into its own property, so the scale was silently
|
|
49
|
+
excluded from the transition and snapped instead of animating.
|
|
50
|
+
- No component uses `ease-in` for an entrance any more.
|
|
51
|
+
|
|
52
|
+
## [0.10.0] - 2026-08-10
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- **Motion tier**: nineteen opt-in animated components, installable
|
|
57
|
+
individually like any other. `animated-icon`, `animated-list`,
|
|
58
|
+
`animated-tabs`, `carousel`, `compare-slider`, `expandable-card`,
|
|
59
|
+
`hold-to-confirm`, `load-transition`, `marquee`, `number-ticker`,
|
|
60
|
+
`progress-ring`, `scroll-progress`, `scroll-reveal`, `sortable`,
|
|
61
|
+
`stagger-list`, `streaming-text`, `swipeable-row`, `text-morph`,
|
|
62
|
+
`text-shimmer`. They pull in `motion` as a dependency, and no core component
|
|
63
|
+
depends on them, so nothing installs `motion` unless you ask for it. All of
|
|
64
|
+
them respect `prefers-reduced-motion`.
|
|
65
|
+
- `dinachi add --motion` installs the whole motion tier, and with `--all`
|
|
66
|
+
installs everything. Given component names it asks for their motion build,
|
|
67
|
+
which today only the motion tier has, so `dinachi add button --motion`
|
|
68
|
+
reports that no motion build exists rather than quietly installing the core
|
|
69
|
+
one.
|
|
70
|
+
- `motion` is pinned at `^12.23.6` in the version map, so `dinachi add marquee`
|
|
71
|
+
installs the version the components are tested against rather than whatever
|
|
72
|
+
`latest` is that day.
|
|
73
|
+
- **A shadow scale in `dinachi init`**: `--shadow-2xs` through `--shadow-2xl`,
|
|
74
|
+
mapped under `@theme inline` for Tailwind 4 and `boxShadow` for Tailwind 3.
|
|
75
|
+
They are softer than Tailwind's defaults, which is what every component's
|
|
76
|
+
`shadow-sm`, `shadow-md` and `shadow-lg` picks up.
|
|
77
|
+
|
|
78
|
+
### Changed
|
|
79
|
+
|
|
80
|
+
- `dinachi add --all` now installs the core tier only, not the motion tier.
|
|
81
|
+
Bulk-installing everything should not quietly add an animation library to
|
|
82
|
+
a project that never asked for one. Run `add --all --motion` for the
|
|
83
|
+
previous behaviour.
|
|
84
|
+
- `--radius` is now `1.05rem`, up from `0.625rem`. `init` writes the theme
|
|
85
|
+
once, so an existing project keeps its current value until you change it.
|
|
86
|
+
- Version-map pins: `@base-ui/react` from `^1.3.0` to `^1.7.0` for upstream
|
|
87
|
+
a11y and form-integration fixes, and `tailwind-merge` from `^3.3.1` to
|
|
88
|
+
`^3.5.0`.
|
|
89
|
+
- **Toast**: a wider corner radius, and a content row that keeps clear of the
|
|
90
|
+
close button instead of running underneath it. `ToastViewportProps` is now
|
|
91
|
+
exported, for typing a wrapper around the viewport.
|
|
92
|
+
|
|
93
|
+
### Fixed
|
|
94
|
+
|
|
95
|
+
- **Hold to Confirm**: `onConfirm` now reads from the end of the hold rather
|
|
96
|
+
than the start, so a handler swapped mid-hold fires the current one. The
|
|
97
|
+
progress ring also no longer clips against a filled track.
|
|
98
|
+
- **Animated Tabs**: the selected tab styles off `data-active`, the attribute
|
|
99
|
+
Base UI actually sets. The previous `data-selected` selector matched
|
|
100
|
+
nothing.
|
|
101
|
+
- **Dark theme**: `--destructive` sat at 1.18:1 against `--background`, so
|
|
102
|
+
anything using it as a foreground was effectively invisible in dark mode:
|
|
103
|
+
field error text, invalid input borders, destructive ghost buttons, Hold to
|
|
104
|
+
Confirm. It is now `oklch(0.585 0.15 20.8317)`, which clears WCAG AA both as
|
|
105
|
+
text on the background and under white. Projects that already ran
|
|
106
|
+
`dinachi init` need to update the `.dark` block in their own `globals.css`.
|
|
107
|
+
|
|
8
108
|
## [0.9.0] - 2026-05-27
|
|
9
109
|
|
|
10
110
|
First release with a CHANGELOG. Covers everything shipped since the last
|
|
@@ -84,4 +184,5 @@ Re-run `dinachi add select`, `dinachi add slider`, and `dinachi add otp-field`
|
|
|
84
184
|
See [git history](https://github.com/raymond-UI/dinachiUI/commits/main/packages/cli)
|
|
85
185
|
for changes prior to 0.9.0.
|
|
86
186
|
|
|
187
|
+
[0.10.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v0.10.0
|
|
87
188
|
[0.9.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v0.9.0
|
package/README.md
CHANGED
|
@@ -36,8 +36,8 @@ dinachi add button
|
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
38
|
# Always use the full package name
|
|
39
|
-
npx @dinachi/cli init
|
|
40
|
-
npx @dinachi/cli add button
|
|
39
|
+
npx @dinachi/cli@latest init
|
|
40
|
+
npx @dinachi/cli@latest add button
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
### Initialize Dinachi UI in your project
|
|
@@ -45,7 +45,7 @@ npx @dinachi/cli add button
|
|
|
45
45
|
```bash
|
|
46
46
|
dinachi init
|
|
47
47
|
# or
|
|
48
|
-
npx @dinachi/cli init
|
|
48
|
+
npx @dinachi/cli@latest init
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
This will:
|
|
@@ -59,7 +59,7 @@ This will:
|
|
|
59
59
|
```bash
|
|
60
60
|
dinachi add button
|
|
61
61
|
# or
|
|
62
|
-
npx @dinachi/cli add button
|
|
62
|
+
npx @dinachi/cli@latest add button
|
|
63
63
|
```
|
|
64
64
|
|
|
65
65
|
This will:
|
|
@@ -73,16 +73,25 @@ This will:
|
|
|
73
73
|
- `dinachi init --skip-install` - Initialize without package installation
|
|
74
74
|
- `dinachi add <component>` - Add a component to your project
|
|
75
75
|
- `dinachi add <component> --overwrite` - Overwrite existing component files
|
|
76
|
-
- `dinachi add --all` - Install
|
|
76
|
+
- `dinachi add --all` - Install every core component
|
|
77
|
+
- `dinachi add --motion` - Install every motion component
|
|
77
78
|
- `dinachi add <component> --skip-install` - Add files without installing packages
|
|
78
79
|
|
|
79
80
|
### Available Components
|
|
80
81
|
|
|
82
|
+
Components come in two tiers. `add --all` installs the core tier; the motion tier is
|
|
83
|
+
separate because it depends on [motion](https://motion.dev). Naming a motion component
|
|
84
|
+
installs it on its own, whichever tier flag you use or skip.
|
|
85
|
+
|
|
86
|
+
#### Core (45)
|
|
87
|
+
|
|
81
88
|
- `accordion` - Collapsible content sections
|
|
82
89
|
- `alert-dialog` - Modal dialogs for important actions
|
|
83
90
|
- `autocomplete` - Text input with dynamic suggestions
|
|
84
91
|
- `avatar` - User profile images with fallbacks
|
|
92
|
+
- `badge` - Small status indicator
|
|
85
93
|
- `button` - Clickable buttons with variants
|
|
94
|
+
- `card` - Container with header, body, and footer
|
|
86
95
|
- `checkbox` - Checkbox inputs
|
|
87
96
|
- `checkbox-group` - Grouped checkboxes
|
|
88
97
|
- `collapsible` - Collapsible content panels
|
|
@@ -94,11 +103,15 @@ This will:
|
|
|
94
103
|
- `fieldset` - Group related form controls
|
|
95
104
|
- `form` - Form component with validation
|
|
96
105
|
- `input` - Text input fields
|
|
106
|
+
- `json-render` - Renders DinachiUI components from JSON specs
|
|
107
|
+
- `label` - Styled form label
|
|
108
|
+
- `link` - Semantic anchor with variants and router composition
|
|
97
109
|
- `menu` - Button-triggered action menu
|
|
98
110
|
- `menubar` - Desktop-style menu bars
|
|
99
111
|
- `meter` - Scalar measurement indicator
|
|
100
112
|
- `navigation-menu` - Navigation menu systems
|
|
101
113
|
- `number-field` - Numeric input with steppers
|
|
114
|
+
- `otp-field` - Verification code input with paste handling
|
|
102
115
|
- `popover` - Anchored floating panel
|
|
103
116
|
- `preview-card` - Hover preview cards
|
|
104
117
|
- `progress` - Task completion indicator
|
|
@@ -106,15 +119,31 @@ This will:
|
|
|
106
119
|
- `scroll-area` - Custom scroll container
|
|
107
120
|
- `select` - Dropdown select inputs
|
|
108
121
|
- `separator` - Visual content divider
|
|
122
|
+
- `skeleton` - Placeholder loading animation
|
|
109
123
|
- `slider` - Range slider inputs
|
|
110
124
|
- `switch` - On/off toggle control
|
|
111
125
|
- `tabs` - Tabbed interfaces
|
|
126
|
+
- `text` - Typography for headings and paragraphs
|
|
127
|
+
- `textarea` - Multi-line text input
|
|
112
128
|
- `toast` - Notification toasts
|
|
113
129
|
- `toggle` - Toggle switches
|
|
114
130
|
- `toggle-group` - Grouped toggles
|
|
115
131
|
- `toolbar` - Tool button groups
|
|
116
132
|
- `tooltip` - Hover tooltips
|
|
117
133
|
|
|
134
|
+
#### Motion (10)
|
|
135
|
+
|
|
136
|
+
- `animated-tabs` - Tabs whose active pill travels between triggers
|
|
137
|
+
- `compare-slider` - Draggable divider for comparing two layers
|
|
138
|
+
- `hold-to-confirm` - Destructive action gated behind a press-and-hold
|
|
139
|
+
- `marquee` - Seamless ticker that pauses on hover and focus
|
|
140
|
+
- `number-ticker` - Number that springs to its value
|
|
141
|
+
- `scroll-progress` - Bar tracking how far a container has been scrolled
|
|
142
|
+
- `scroll-reveal` - Content that wipes into view as it enters the viewport
|
|
143
|
+
- `stagger-list` - List whose items rise into place one after another
|
|
144
|
+
- `text-morph` - Text that swaps with a blur-bridged crossfade
|
|
145
|
+
- `text-shimmer` - Highlight sweeping across text for pending states
|
|
146
|
+
|
|
118
147
|
## How it works
|
|
119
148
|
|
|
120
149
|
Unlike traditional component libraries, Dinachi UI copies the actual source code into your project. This means:
|