@dinachi/cli 0.8.2 → 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 (52) hide show
  1. package/CHANGELOG.md +144 -0
  2. package/README.md +36 -5
  3. package/dist/index.js +336 -62
  4. package/package.json +17 -14
  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/badge/badge.tsx +4 -4
  12. package/templates/carousel/carousel.tsx +492 -0
  13. package/templates/carousel/index.ts +1 -0
  14. package/templates/compare-slider/compare-slider.tsx +383 -0
  15. package/templates/compare-slider/index.ts +2 -0
  16. package/templates/expandable-card/expandable-card.tsx +509 -0
  17. package/templates/expandable-card/index.ts +1 -0
  18. package/templates/hold-to-confirm/hold-to-confirm.tsx +573 -0
  19. package/templates/hold-to-confirm/index.ts +2 -0
  20. package/templates/load-transition/index.ts +1 -0
  21. package/templates/load-transition/load-transition.tsx +163 -0
  22. package/templates/marquee/index.ts +2 -0
  23. package/templates/marquee/marquee.tsx +256 -0
  24. package/templates/number-ticker/index.ts +2 -0
  25. package/templates/number-ticker/number-ticker.tsx +470 -0
  26. package/templates/otp-field/index.ts +1 -0
  27. package/templates/otp-field/otp-field.tsx +72 -0
  28. package/templates/progress-ring/index.ts +1 -0
  29. package/templates/progress-ring/progress-ring.tsx +268 -0
  30. package/templates/scroll-progress/index.ts +2 -0
  31. package/templates/scroll-progress/scroll-progress.tsx +147 -0
  32. package/templates/scroll-reveal/index.ts +2 -0
  33. package/templates/scroll-reveal/scroll-reveal.tsx +198 -0
  34. package/templates/select/select.tsx +4 -2
  35. package/templates/slider/slider.tsx +1 -1
  36. package/templates/sortable/index.ts +1 -0
  37. package/templates/sortable/sortable.tsx +349 -0
  38. package/templates/stagger-list/index.ts +2 -0
  39. package/templates/stagger-list/stagger-list.tsx +204 -0
  40. package/templates/streaming-text/index.ts +2 -0
  41. package/templates/streaming-text/streaming-text.tsx +220 -0
  42. package/templates/swipeable-row/index.ts +2 -0
  43. package/templates/swipeable-row/swipeable-row.tsx +368 -0
  44. package/templates/text-morph/index.ts +2 -0
  45. package/templates/text-morph/text-morph.tsx +265 -0
  46. package/templates/text-shimmer/index.ts +2 -0
  47. package/templates/text-shimmer/text-shimmer.tsx +151 -0
  48. package/templates/textarea/textarea.tsx +1 -2
  49. package/templates/toast/toast.tsx +24 -19
  50. package/templates/tsconfig.json +1 -0
  51. package/LICENSE +0 -21
  52. package/templates/utils/variants.ts +0 -6
package/CHANGELOG.md ADDED
@@ -0,0 +1,144 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@dinachi/cli` will be documented in this file.
4
+
5
+ The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
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
+
64
+ ## [0.9.0] - 2026-05-27
65
+
66
+ First release with a CHANGELOG. Covers everything shipped since the last
67
+ npm-published version, `0.8.2`.
68
+
69
+ ### Added
70
+
71
+ - **OTP Field** component — a one-time password / verification code input
72
+ built on Base UI 1.4.0+'s preview `OTPField` primitive. Supports
73
+ auto-advance, paste handling, validation modes (numeric / alphanumeric /
74
+ alphabetic), masking, separators, and form integration. Install with
75
+ `dinachi add otp-field`.
76
+ - New `--info` / `--info-foreground` semantic color tokens, plus the missing
77
+ `--chart-*` and `--sidebar-*` tokens, are now seeded into `globals.css`
78
+ on `dinachi init` so theming covers every variant the components reference.
79
+
80
+ ### Changed
81
+
82
+ - Bumped `@base-ui/react` peer / template dependency from `1.3.0` to `1.5.0`
83
+ to pick up the new OTPField primitive plus upstream a11y, autocomplete,
84
+ combobox, dialog, and form-integration fixes from the 1.4.x and 1.5.x
85
+ release lines.
86
+
87
+ ### Fixed
88
+
89
+ - **Badge**: `success`, `warning`, and `info` variants now use semantic tokens
90
+ (`bg-success`, `bg-warning`, `bg-info`) instead of hardcoded
91
+ `bg-green-500` / `bg-yellow-500` / `bg-blue-500`, so they theme correctly in
92
+ light and dark mode and respect user palette overrides.
93
+ - **Select**: dropdown no longer renders behind `Drawer` or `Dialog` overlays,
94
+ and sibling form controls (checkboxes, switches, other inputs) no longer
95
+ paint on top of the open dropdown. Default `portal` is now `false`, and
96
+ `z-50` lives on the `Positioner` (the `position: fixed` element) instead of
97
+ the inner `Popup`. ([#29](https://github.com/raymond-UI/dinachiUI/issues/29))
98
+ - **Slider**: removed the static `z-10` from `SliderThumb`. Base UI manages
99
+ thumb stacking dynamically (active = `z:2`, last-used = `z:1` in range
100
+ sliders); the hardcoded class was floating idle thumbs above the dragging
101
+ one and could conflict with surrounding page elements.
102
+
103
+ ### Upgrading from 0.8.2
104
+
105
+ The `info` Badge variant now reads from a `--info` CSS variable. If you ran
106
+ `dinachi init` on an earlier version and add a Badge with `variant="info"`,
107
+ add the following to your `globals.css`:
108
+
109
+ ```css
110
+ :root {
111
+ --info: oklch(0.623 0.214 259.815);
112
+ --info-foreground: oklch(1 0 0);
113
+ }
114
+
115
+ .dark {
116
+ --info: oklch(0.707 0.165 254.624);
117
+ --info-foreground: oklch(0.1324 0.0033 145.3864);
118
+ }
119
+
120
+ /* Tailwind 4: @theme inline */
121
+ @theme inline {
122
+ --color-info: var(--info);
123
+ --color-info-foreground: var(--info-foreground);
124
+ }
125
+ ```
126
+
127
+ **Combobox**: Base UI 1.5.0 narrowed `Combobox.Label` to only label
128
+ `Combobox.Trigger`. If you currently pair `<ComboboxLabel>` with
129
+ `<ComboboxInput>` (input as the form control), switch to a native
130
+ `<label htmlFor>` or `<Field.Label>` to avoid the dev-mode warning.
131
+ `<ComboboxLabel>` is still correct for Trigger-driven (Select-style)
132
+ Comboboxes.
133
+
134
+ Re-run `dinachi add select`, `dinachi add slider`, and `dinachi add otp-field`
135
+ (or hand-apply the diffs) to pick everything up, and bump `@base-ui/react` to
136
+ `1.5.0` in your project to match the templates.
137
+
138
+ ## Earlier versions
139
+
140
+ See [git history](https://github.com/raymond-UI/dinachiUI/commits/main/packages/cli)
141
+ for changes prior to 0.9.0.
142
+
143
+ [0.10.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v0.10.0
144
+ [0.9.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v0.9.0
package/README.md CHANGED
@@ -4,6 +4,8 @@ A CLI for adding Dinachi UI components to your project. Just like shadcn/ui, thi
4
4
 
5
5
  Best fit: React projects using Tailwind CSS (Next.js, Vite, Remix, CRA, and similar layouts).
6
6
 
7
+ > **What's new?** See the [changelog](./CHANGELOG.md) or the [releases page](https://github.com/raymond-UI/dinachiUI/releases) for the latest fixes and additions.
8
+
7
9
  ## Installation
8
10
 
9
11
  ```bash
@@ -34,8 +36,8 @@ dinachi add button
34
36
 
35
37
  ```bash
36
38
  # Always use the full package name
37
- npx @dinachi/cli init
38
- npx @dinachi/cli add button
39
+ npx @dinachi/cli@latest init
40
+ npx @dinachi/cli@latest add button
39
41
  ```
40
42
 
41
43
  ### Initialize Dinachi UI in your project
@@ -43,7 +45,7 @@ npx @dinachi/cli add button
43
45
  ```bash
44
46
  dinachi init
45
47
  # or
46
- npx @dinachi/cli init
48
+ npx @dinachi/cli@latest init
47
49
  ```
48
50
 
49
51
  This will:
@@ -57,7 +59,7 @@ This will:
57
59
  ```bash
58
60
  dinachi add button
59
61
  # or
60
- npx @dinachi/cli add button
62
+ npx @dinachi/cli@latest add button
61
63
  ```
62
64
 
63
65
  This will:
@@ -71,16 +73,25 @@ This will:
71
73
  - `dinachi init --skip-install` - Initialize without package installation
72
74
  - `dinachi add <component>` - Add a component to your project
73
75
  - `dinachi add <component> --overwrite` - Overwrite existing component files
74
- - `dinachi add --all` - Install all registered components
76
+ - `dinachi add --all` - Install every core component
77
+ - `dinachi add --motion` - Install every motion component
75
78
  - `dinachi add <component> --skip-install` - Add files without installing packages
76
79
 
77
80
  ### Available Components
78
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
+
79
88
  - `accordion` - Collapsible content sections
80
89
  - `alert-dialog` - Modal dialogs for important actions
81
90
  - `autocomplete` - Text input with dynamic suggestions
82
91
  - `avatar` - User profile images with fallbacks
92
+ - `badge` - Small status indicator
83
93
  - `button` - Clickable buttons with variants
94
+ - `card` - Container with header, body, and footer
84
95
  - `checkbox` - Checkbox inputs
85
96
  - `checkbox-group` - Grouped checkboxes
86
97
  - `collapsible` - Collapsible content panels
@@ -92,11 +103,15 @@ This will:
92
103
  - `fieldset` - Group related form controls
93
104
  - `form` - Form component with validation
94
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
95
109
  - `menu` - Button-triggered action menu
96
110
  - `menubar` - Desktop-style menu bars
97
111
  - `meter` - Scalar measurement indicator
98
112
  - `navigation-menu` - Navigation menu systems
99
113
  - `number-field` - Numeric input with steppers
114
+ - `otp-field` - Verification code input with paste handling
100
115
  - `popover` - Anchored floating panel
101
116
  - `preview-card` - Hover preview cards
102
117
  - `progress` - Task completion indicator
@@ -104,15 +119,31 @@ This will:
104
119
  - `scroll-area` - Custom scroll container
105
120
  - `select` - Dropdown select inputs
106
121
  - `separator` - Visual content divider
122
+ - `skeleton` - Placeholder loading animation
107
123
  - `slider` - Range slider inputs
108
124
  - `switch` - On/off toggle control
109
125
  - `tabs` - Tabbed interfaces
126
+ - `text` - Typography for headings and paragraphs
127
+ - `textarea` - Multi-line text input
110
128
  - `toast` - Notification toasts
111
129
  - `toggle` - Toggle switches
112
130
  - `toggle-group` - Grouped toggles
113
131
  - `toolbar` - Tool button groups
114
132
  - `tooltip` - Hover tooltips
115
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
+
116
147
  ## How it works
117
148
 
118
149
  Unlike traditional component libraries, Dinachi UI copies the actual source code into your project. This means: