@dinachi/cli 0.9.0 → 0.10.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.
Files changed (47) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +34 -5
  3. package/dist/index.js +283 -61
  4. package/package.json +8 -6
  5. package/templates/animated-icon/animated-icon.tsx +145 -0
  6. package/templates/animated-icon/index.ts +1 -0
  7. package/templates/animated-list/animated-list.tsx +161 -0
  8. package/templates/animated-list/index.ts +2 -0
  9. package/templates/animated-tabs/animated-tabs.tsx +244 -0
  10. package/templates/animated-tabs/index.ts +13 -0
  11. package/templates/carousel/carousel.tsx +492 -0
  12. package/templates/carousel/index.ts +1 -0
  13. package/templates/compare-slider/compare-slider.tsx +383 -0
  14. package/templates/compare-slider/index.ts +2 -0
  15. package/templates/expandable-card/expandable-card.tsx +509 -0
  16. package/templates/expandable-card/index.ts +1 -0
  17. package/templates/hold-to-confirm/hold-to-confirm.tsx +573 -0
  18. package/templates/hold-to-confirm/index.ts +2 -0
  19. package/templates/load-transition/index.ts +1 -0
  20. package/templates/load-transition/load-transition.tsx +163 -0
  21. package/templates/marquee/index.ts +2 -0
  22. package/templates/marquee/marquee.tsx +256 -0
  23. package/templates/number-ticker/index.ts +2 -0
  24. package/templates/number-ticker/number-ticker.tsx +470 -0
  25. package/templates/otp-field/otp-field.tsx +1 -1
  26. package/templates/progress-ring/index.ts +1 -0
  27. package/templates/progress-ring/progress-ring.tsx +268 -0
  28. package/templates/scroll-progress/index.ts +2 -0
  29. package/templates/scroll-progress/scroll-progress.tsx +147 -0
  30. package/templates/scroll-reveal/index.ts +2 -0
  31. package/templates/scroll-reveal/scroll-reveal.tsx +198 -0
  32. package/templates/sortable/index.ts +1 -0
  33. package/templates/sortable/sortable.tsx +349 -0
  34. package/templates/stagger-list/index.ts +2 -0
  35. package/templates/stagger-list/stagger-list.tsx +204 -0
  36. package/templates/streaming-text/index.ts +2 -0
  37. package/templates/streaming-text/streaming-text.tsx +220 -0
  38. package/templates/swipeable-row/index.ts +2 -0
  39. package/templates/swipeable-row/swipeable-row.tsx +368 -0
  40. package/templates/text-morph/index.ts +2 -0
  41. package/templates/text-morph/text-morph.tsx +265 -0
  42. package/templates/text-shimmer/index.ts +2 -0
  43. package/templates/text-shimmer/text-shimmer.tsx +151 -0
  44. package/templates/textarea/textarea.tsx +1 -2
  45. package/templates/toast/toast.tsx +24 -19
  46. package/templates/tsconfig.json +1 -0
  47. package/templates/utils/variants.ts +0 -6
package/CHANGELOG.md CHANGED
@@ -5,6 +5,62 @@ 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.10.0] - 2026-08-10
9
+
10
+ ### Added
11
+
12
+ - **Motion tier**: nineteen opt-in animated components, installable
13
+ individually like any other. `animated-icon`, `animated-list`,
14
+ `animated-tabs`, `carousel`, `compare-slider`, `expandable-card`,
15
+ `hold-to-confirm`, `load-transition`, `marquee`, `number-ticker`,
16
+ `progress-ring`, `scroll-progress`, `scroll-reveal`, `sortable`,
17
+ `stagger-list`, `streaming-text`, `swipeable-row`, `text-morph`,
18
+ `text-shimmer`. They pull in `motion` as a dependency, and no core component
19
+ depends on them, so nothing installs `motion` unless you ask for it. All of
20
+ them respect `prefers-reduced-motion`.
21
+ - `dinachi add --motion` installs the whole motion tier, and with `--all`
22
+ installs everything. Given component names it asks for their motion build,
23
+ which today only the motion tier has, so `dinachi add button --motion`
24
+ reports that no motion build exists rather than quietly installing the core
25
+ one.
26
+ - `motion` is pinned at `^12.23.6` in the version map, so `dinachi add marquee`
27
+ installs the version the components are tested against rather than whatever
28
+ `latest` is that day.
29
+ - **A shadow scale in `dinachi init`**: `--shadow-2xs` through `--shadow-2xl`,
30
+ mapped under `@theme inline` for Tailwind 4 and `boxShadow` for Tailwind 3.
31
+ They are softer than Tailwind's defaults, which is what every component's
32
+ `shadow-sm`, `shadow-md` and `shadow-lg` picks up.
33
+
34
+ ### Changed
35
+
36
+ - `dinachi add --all` now installs the core tier only, not the motion tier.
37
+ Bulk-installing everything should not quietly add an animation library to
38
+ a project that never asked for one. Run `add --all --motion` for the
39
+ previous behaviour.
40
+ - `--radius` is now `1.05rem`, up from `0.625rem`. `init` writes the theme
41
+ once, so an existing project keeps its current value until you change it.
42
+ - Version-map pins: `@base-ui/react` from `^1.3.0` to `^1.7.0` for upstream
43
+ a11y and form-integration fixes, and `tailwind-merge` from `^3.3.1` to
44
+ `^3.5.0`.
45
+ - **Toast**: a wider corner radius, and a content row that keeps clear of the
46
+ close button instead of running underneath it. `ToastViewportProps` is now
47
+ exported, for typing a wrapper around the viewport.
48
+
49
+ ### Fixed
50
+
51
+ - **Hold to Confirm**: `onConfirm` now reads from the end of the hold rather
52
+ than the start, so a handler swapped mid-hold fires the current one. The
53
+ progress ring also no longer clips against a filled track.
54
+ - **Animated Tabs**: the selected tab styles off `data-active`, the attribute
55
+ Base UI actually sets. The previous `data-selected` selector matched
56
+ nothing.
57
+ - **Dark theme**: `--destructive` sat at 1.18:1 against `--background`, so
58
+ anything using it as a foreground was effectively invisible in dark mode:
59
+ field error text, invalid input borders, destructive ghost buttons, Hold to
60
+ Confirm. It is now `oklch(0.585 0.15 20.8317)`, which clears WCAG AA both as
61
+ text on the background and under white. Projects that already ran
62
+ `dinachi init` need to update the `.dark` block in their own `globals.css`.
63
+
8
64
  ## [0.9.0] - 2026-05-27
9
65
 
10
66
  First release with a CHANGELOG. Covers everything shipped since the last
@@ -84,4 +140,5 @@ Re-run `dinachi add select`, `dinachi add slider`, and `dinachi add otp-field`
84
140
  See [git history](https://github.com/raymond-UI/dinachiUI/commits/main/packages/cli)
85
141
  for changes prior to 0.9.0.
86
142
 
143
+ [0.10.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v0.10.0
87
144
  [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 all registered components
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: