@dinachi/cli 1.0.0 → 1.3.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 (105) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/dist/index.js +244 -72
  3. package/package.json +5 -1
  4. package/templates/accordion/accordion.tsx +5 -1
  5. package/templates/agent/agent.tsx +35 -18
  6. package/templates/alert/alert.tsx +345 -0
  7. package/templates/alert/index.ts +16 -0
  8. package/templates/alert-dialog/alert-dialog.tsx +14 -3
  9. package/templates/animated-icon/animated-icon.tsx +1 -0
  10. package/templates/animated-list/animated-list.tsx +2 -1
  11. package/templates/animated-tabs/animated-tabs.tsx +4 -0
  12. package/templates/ask-bar/ask-bar.tsx +1061 -0
  13. package/templates/ask-bar/index.ts +1 -0
  14. package/templates/autocomplete/autocomplete.tsx +14 -4
  15. package/templates/avatar/avatar.tsx +3 -0
  16. package/templates/badge/badge.tsx +1 -0
  17. package/templates/breadcrumb/breadcrumb.tsx +606 -0
  18. package/templates/breadcrumb/index.ts +9 -0
  19. package/templates/button/button.tsx +1 -0
  20. package/templates/calendar/calendar.tsx +1155 -0
  21. package/templates/calendar/index.ts +15 -0
  22. package/templates/card/card.tsx +6 -1
  23. package/templates/carousel/carousel.tsx +7 -0
  24. package/templates/checkbox/checkbox.tsx +1 -0
  25. package/templates/checkbox-group/checkbox-group.tsx +1 -0
  26. package/templates/collapsible/collapsible.tsx +3 -1
  27. package/templates/combobox/combobox.tsx +15 -4
  28. package/templates/command-items/command-items.tsx +69 -0
  29. package/templates/command-items/index.ts +1 -0
  30. package/templates/command-palette/command-palette.tsx +954 -0
  31. package/templates/command-palette/index.ts +1 -0
  32. package/templates/compare-slider/compare-slider.tsx +1 -0
  33. package/templates/comparison-table/comparison-table.tsx +540 -0
  34. package/templates/comparison-table/index.ts +15 -0
  35. package/templates/context-menu/context-menu.tsx +61 -14
  36. package/templates/data-table/data-table.tsx +2077 -0
  37. package/templates/data-table/index.ts +14 -0
  38. package/templates/date-picker/date-picker.tsx +527 -0
  39. package/templates/date-picker/index.ts +2 -0
  40. package/templates/date-range-picker/date-range-picker.tsx +504 -0
  41. package/templates/date-range-picker/index.ts +2 -0
  42. package/templates/detail-list/detail-list.tsx +419 -0
  43. package/templates/detail-list/index.ts +12 -0
  44. package/templates/dialog/dialog.tsx +13 -3
  45. package/templates/drawer/drawer.tsx +19 -6
  46. package/templates/expandable-card/expandable-card.tsx +5 -1
  47. package/templates/field/field.tsx +5 -1
  48. package/templates/fieldset/fieldset.tsx +2 -0
  49. package/templates/form/form.tsx +1 -0
  50. package/templates/heat-table/heat-table.tsx +613 -0
  51. package/templates/heat-table/index.ts +9 -0
  52. package/templates/hold-to-confirm/hold-to-confirm.tsx +1 -0
  53. package/templates/input/input.tsx +1 -0
  54. package/templates/label/label.tsx +1 -0
  55. package/templates/link/link.tsx +1 -0
  56. package/templates/load-transition/load-transition.tsx +1 -0
  57. package/templates/marquee/marquee.tsx +1 -0
  58. package/templates/menu/menu.tsx +27 -6
  59. package/templates/menubar/menubar.tsx +15 -3
  60. package/templates/meter/meter.tsx +5 -1
  61. package/templates/month-picker/index.ts +1 -0
  62. package/templates/month-picker/month-picker.tsx +351 -0
  63. package/templates/navigation-menu/navigation-menu.tsx +13 -2
  64. package/templates/number-field/number-field.tsx +7 -1
  65. package/templates/number-ticker/number-ticker.tsx +3 -0
  66. package/templates/omnibar/index.ts +1 -0
  67. package/templates/omnibar/omnibar.tsx +1009 -0
  68. package/templates/otp-field/otp-field.tsx +4 -0
  69. package/templates/pagination/index.ts +8 -0
  70. package/templates/pagination/pagination.tsx +389 -0
  71. package/templates/popover/popover.tsx +19 -5
  72. package/templates/preview-card/preview-card.tsx +11 -3
  73. package/templates/progress/progress.tsx +5 -1
  74. package/templates/progress-ring/progress-ring.tsx +1 -0
  75. package/templates/radio/radio.tsx +3 -0
  76. package/templates/scroll-area/scroll-area.tsx +14 -4
  77. package/templates/scroll-progress/scroll-progress.tsx +1 -0
  78. package/templates/scroll-reveal/scroll-reveal.tsx +1 -0
  79. package/templates/select/select.tsx +18 -2
  80. package/templates/separator/separator.tsx +1 -0
  81. package/templates/skeleton/skeleton.tsx +1 -0
  82. package/templates/slider/slider.tsx +7 -0
  83. package/templates/sortable/sortable.tsx +3 -0
  84. package/templates/stagger-list/stagger-list.tsx +2 -0
  85. package/templates/streaming-text/streaming-text.tsx +1 -0
  86. package/templates/swipeable-row/swipeable-row.tsx +1 -0
  87. package/templates/switch/switch.tsx +2 -0
  88. package/templates/table/index.ts +13 -0
  89. package/templates/table/table.tsx +265 -0
  90. package/templates/tabs/tabs.tsx +5 -0
  91. package/templates/text/text.tsx +1 -0
  92. package/templates/text-morph/text-morph.tsx +2 -0
  93. package/templates/text-shimmer/text-shimmer.tsx +1 -0
  94. package/templates/textarea/textarea.tsx +1 -0
  95. package/templates/time-slots/index.ts +1 -0
  96. package/templates/time-slots/time-slots.tsx +589 -0
  97. package/templates/toast/toast.tsx +10 -1
  98. package/templates/toggle/toggle.tsx +1 -0
  99. package/templates/toggle-group/toggle-group.tsx +2 -0
  100. package/templates/toolbar/toolbar.tsx +6 -0
  101. package/templates/tooltip/tooltip.tsx +9 -3
  102. package/templates/week-strip/index.ts +1 -0
  103. package/templates/week-strip/week-strip.tsx +329 -0
  104. package/templates/year-view/index.ts +1 -0
  105. package/templates/year-view/year-view.tsx +362 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,74 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.0] - 2026-11-21
11
+
12
+ ### Added
13
+
14
+ - Five navigation and feedback components, each registered with the agent
15
+ bridge:
16
+ - **Alert**: an inline message with variants, an action and dismiss.
17
+ - **Breadcrumb**: a trail that folds what does not fit, measured, and opens
18
+ a sheet on phones.
19
+ - **Command Palette**: Cmd+K search over pages, actions and records, with
20
+ sub-lists.
21
+ - **Omnibar**: a header search that grows into scoped results.
22
+ - **Ask Bar**: a docked bar that turns a request into a plan to review.
23
+ - **Agent**: registered components carry a hint, so an agent reading the
24
+ snapshot knows what each control takes before it acts.
25
+ - Six table components:
26
+ - **Table**: styled native table parts, with numeric columns, density,
27
+ dividers and a stacked layout for phones.
28
+ - **Pagination**: previous, next and seven fixed page slots, with gaps that
29
+ open a go-to-page field and a compact "Page 6 of 25" form. Registers with
30
+ the agent bridge.
31
+ - **Data Table**: TanStack Table with sorting, search, status filters,
32
+ selection across pages, column visibility, resizing, reordering and
33
+ pinning, loading, empty and error states, expandable rows, row actions,
34
+ a keyboard grid, server mode, virtualization and its own phone layout.
35
+ Registers with the agent bridge. It is the only component that installs
36
+ `@tanstack/react-table` and `@tanstack/react-virtual`.
37
+ - **Comparison Table**: plans against grouped features, with billing and an
38
+ "Only differences" switch. Registers with the agent bridge.
39
+ - **Heat Table**: values shaded by size, as a keyboard grid, with squares
40
+ and a readout on phones.
41
+ - **Detail List**: labelled values with copy and inline edit per row.
42
+ Registers with the agent bridge.
43
+
44
+ ### Changed
45
+
46
+ - **Menu**: `MenuContent` takes `side`, `align`, `sideOffset` and
47
+ `alignOffset`.
48
+ - **Theme**: the light `--info` is darker, so it passes contrast as text.
49
+
50
+ ## [1.2.0] - 2026-11-17
51
+
52
+ ### Added
53
+
54
+ - Seven date and time components, each registered with the agent bridge:
55
+ - **Calendar**: a month grid for one day, several days or a range, with months
56
+ that scroll as one column or page side by side.
57
+ - **Date Picker** and **Date Range Picker**: a field that opens the calendar in
58
+ a popover, or a drawer on narrow screens.
59
+ - **Month Picker**: twelve months a year, for one month or a span.
60
+ - **Week Strip**: a scrolling row of days with counts.
61
+ - **Year View**: a year of daily counts, as weeks or stacked months.
62
+ - **Time Slots**: a day as a track to drag a booking across, around busy and
63
+ past time, with rows on phones.
64
+
65
+ ## [1.1.0] - 2026-11-17
66
+
67
+ ### Added
68
+
69
+ - Every exported part that renders an element carries `data-slot` with its
70
+ kebab-case name (`select-trigger`, `slider-thumb`), so styles, tests and agents
71
+ can target a part without a class name.
72
+
73
+ ### Changed
74
+
75
+ - `SelectGroup` and `SelectValue` are thin wrappers instead of re-exports of the
76
+ Base UI parts, so they can carry `data-slot`. Props are unchanged.
77
+
10
78
  ## [1.0.0] - 2026-11-15
11
79
 
12
80
  ### Added
@@ -327,6 +395,7 @@ Re-run `dinachi add select`, `dinachi add slider`, and `dinachi add otp-field`
327
395
  See [git history](https://github.com/raymond-UI/dinachiUI/commits/main/packages/cli)
328
396
  for changes prior to 0.9.0.
329
397
 
398
+ [1.1.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v1.1.0
330
399
  [1.0.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v1.0.0
331
400
  [0.12.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v0.12.0
332
401
  [0.11.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v0.11.0
package/dist/index.js CHANGED
@@ -85,6 +85,14 @@ function getComponentRegistry() {
85
85
  files: [{ name: "agent.tsx" }, { name: "index.ts" }],
86
86
  dependencies: []
87
87
  },
88
+ alert: {
89
+ name: "alert",
90
+ description: "An inline message that stays on the page, with an optional action and dismiss.",
91
+ files: [{ name: "alert.tsx" }, { name: "index.ts" }],
92
+ dependencies: ["class-variance-authority", "lucide-react"],
93
+ componentDependencies: ["agent", "button"],
94
+ utilityDependencies: ["cn"]
95
+ },
88
96
  "alert-dialog": {
89
97
  name: "alert-dialog",
90
98
  description: "A modal dialog that interrupts the user with important content and expects a response.",
@@ -93,6 +101,14 @@ function getComponentRegistry() {
93
101
  componentDependencies: ["agent"],
94
102
  utilityDependencies: ["cn"]
95
103
  },
104
+ "ask-bar": {
105
+ name: "ask-bar",
106
+ description: "A bar docked at the bottom of the page that turns a request into a plan, read back as one editable sentence and run on a press.",
107
+ files: [{ name: "ask-bar.tsx" }, { name: "index.ts" }],
108
+ dependencies: ["@base-ui/react", "lucide-react"],
109
+ componentDependencies: ["agent", "command-items"],
110
+ utilityDependencies: ["cn"]
111
+ },
96
112
  autocomplete: {
97
113
  name: "autocomplete",
98
114
  description: "A text input with dynamic suggestions that helps users find and select values quickly.",
@@ -115,6 +131,14 @@ function getComponentRegistry() {
115
131
  dependencies: ["class-variance-authority"],
116
132
  utilityDependencies: ["cn"]
117
133
  },
134
+ breadcrumb: {
135
+ name: "breadcrumb",
136
+ description: "A trail of links to the current page that folds its middle into a menu, and a back link with the trail in a sheet on phones.",
137
+ files: [{ name: "breadcrumb.tsx" }, { name: "index.ts" }],
138
+ dependencies: ["@base-ui/react", "lucide-react"],
139
+ componentDependencies: ["agent", "drawer", "link", "menu"],
140
+ utilityDependencies: ["cn"]
141
+ },
118
142
  button: {
119
143
  name: "button",
120
144
  description: "A customizable button component with multiple variants.",
@@ -161,6 +185,28 @@ function getComponentRegistry() {
161
185
  componentDependencies: ["agent"],
162
186
  utilityDependencies: ["cn"]
163
187
  },
188
+ "command-items": {
189
+ name: "command-items",
190
+ description: "The item, action and filter types a command palette, omnibar or assistant list share.",
191
+ files: [{ name: "command-items.tsx" }, { name: "index.ts" }],
192
+ dependencies: []
193
+ },
194
+ "command-palette": {
195
+ name: "command-palette",
196
+ description: "A Cmd+K search over pages, actions and records, with groups, recents, a preview pane and sub-lists.",
197
+ files: [{ name: "command-palette.tsx" }, { name: "index.ts" }],
198
+ dependencies: ["@base-ui/react", "lucide-react"],
199
+ componentDependencies: ["agent", "command-items"],
200
+ utilityDependencies: ["cn"]
201
+ },
202
+ "comparison-table": {
203
+ name: "comparison-table",
204
+ description: "Plans as columns and features as rows, with a sticky plan row, billing period and only-differences filter.",
205
+ files: [{ name: "comparison-table.tsx" }, { name: "index.ts" }],
206
+ dependencies: ["@base-ui/react", "lucide-react"],
207
+ componentDependencies: ["agent", "button", "select", "switch", "table"],
208
+ utilityDependencies: ["cn"]
209
+ },
164
210
  "context-menu": {
165
211
  name: "context-menu",
166
212
  description: "A menu that appears at the pointer on right click or long press.",
@@ -169,6 +215,22 @@ function getComponentRegistry() {
169
215
  componentDependencies: ["agent"],
170
216
  utilityDependencies: ["cn"]
171
217
  },
218
+ "data-table": {
219
+ name: "data-table",
220
+ description: "A sortable, filterable, selectable table on TanStack Table, with its own phone layout.",
221
+ files: [{ name: "data-table.tsx" }, { name: "index.ts" }],
222
+ dependencies: ["@tanstack/react-table", "@tanstack/react-virtual", "lucide-react"],
223
+ componentDependencies: ["agent", "button", "checkbox", "drawer", "input", "menu", "pagination", "select", "skeleton", "table", "toggle-group"],
224
+ utilityDependencies: ["cn"]
225
+ },
226
+ "detail-list": {
227
+ name: "detail-list",
228
+ description: "Labelled values in a dl, with copy and inline edit per row.",
229
+ files: [{ name: "detail-list.tsx" }, { name: "index.ts" }],
230
+ dependencies: ["lucide-react"],
231
+ componentDependencies: ["agent", "button"],
232
+ utilityDependencies: ["cn"]
233
+ },
172
234
  dialog: {
173
235
  name: "dialog",
174
236
  description: "A popup that opens on top of the entire page, providing a modal interface for user interactions.",
@@ -206,6 +268,14 @@ function getComponentRegistry() {
206
268
  dependencies: ["@base-ui/react"],
207
269
  utilityDependencies: ["cn"]
208
270
  },
271
+ "heat-table": {
272
+ name: "heat-table",
273
+ description: "A grid of values shaded by size, with the row and column lit for the cell in focus.",
274
+ files: [{ name: "heat-table.tsx" }, { name: "index.ts" }],
275
+ dependencies: ["@tanstack/react-virtual"],
276
+ componentDependencies: ["table"],
277
+ utilityDependencies: ["cn"]
278
+ },
209
279
  input: {
210
280
  name: "input",
211
281
  description: "A customizable input field component with variants and sizes.",
@@ -267,6 +337,14 @@ function getComponentRegistry() {
267
337
  componentDependencies: ["agent"],
268
338
  utilityDependencies: ["cn"]
269
339
  },
340
+ "omnibar": {
341
+ name: "omnibar",
342
+ description: "A header search field that grows into scoped results with inline actions, and a full-screen search on a phone.",
343
+ files: [{ name: "omnibar.tsx" }, { name: "index.ts" }],
344
+ dependencies: ["@base-ui/react", "lucide-react"],
345
+ componentDependencies: ["agent", "command-items", "drawer"],
346
+ utilityDependencies: ["cn"]
347
+ },
270
348
  "otp-field": {
271
349
  name: "otp-field",
272
350
  description: "A one-time password / verification code input with auto-focus, paste handling, and validation.",
@@ -275,6 +353,14 @@ function getComponentRegistry() {
275
353
  componentDependencies: ["agent"],
276
354
  utilityDependencies: ["cn"]
277
355
  },
356
+ pagination: {
357
+ name: "pagination",
358
+ description: "Pages of a list, in seven fixed slots, with gaps that open a go-to-page field.",
359
+ files: [{ name: "pagination.tsx" }, { name: "index.ts" }],
360
+ dependencies: ["lucide-react"],
361
+ componentDependencies: ["agent", "button"],
362
+ utilityDependencies: ["cn"]
363
+ },
278
364
  popover: {
279
365
  name: "popover",
280
366
  description: "An anchored floating panel for contextual information and lightweight interactions.",
@@ -335,6 +421,62 @@ function getComponentRegistry() {
335
421
  dependencies: [],
336
422
  utilityDependencies: ["cn"]
337
423
  },
424
+ calendar: {
425
+ name: "calendar",
426
+ description: "A month grid for picking a day, several days or a range, scrolled or paged.",
427
+ files: [{ name: "calendar.tsx" }, { name: "index.ts" }],
428
+ dependencies: ["@base-ui/react", "react-day-picker", "date-fns", "lucide-react"],
429
+ componentDependencies: ["agent"],
430
+ utilityDependencies: ["cn"]
431
+ },
432
+ "date-picker": {
433
+ name: "date-picker",
434
+ description: "A date field that reads what you type, with a calendar in a popover or a phone drawer.",
435
+ files: [{ name: "date-picker.tsx" }, { name: "index.ts" }],
436
+ dependencies: ["@base-ui/react", "date-fns", "lucide-react"],
437
+ componentDependencies: ["agent", "button", "calendar", "drawer", "popover"],
438
+ utilityDependencies: ["cn"]
439
+ },
440
+ "date-range-picker": {
441
+ name: "date-range-picker",
442
+ description: "A trigger naming a range, opening presets beside a calendar, applied on Apply.",
443
+ files: [{ name: "date-range-picker.tsx" }, { name: "index.ts" }],
444
+ dependencies: ["date-fns", "lucide-react"],
445
+ componentDependencies: ["agent", "button", "calendar", "drawer", "popover"],
446
+ utilityDependencies: ["cn"]
447
+ },
448
+ "month-picker": {
449
+ name: "month-picker",
450
+ description: "Twelve months a year at a time, for a billing month or a span of months.",
451
+ files: [{ name: "month-picker.tsx" }, { name: "index.ts" }],
452
+ dependencies: ["date-fns", "lucide-react"],
453
+ componentDependencies: ["agent", "calendar"],
454
+ utilityDependencies: ["cn"]
455
+ },
456
+ "time-slots": {
457
+ name: "time-slots",
458
+ description: "A day as a track to drag a booking across, held off busy and past time.",
459
+ files: [{ name: "time-slots.tsx" }, { name: "index.ts" }],
460
+ dependencies: ["date-fns"],
461
+ componentDependencies: ["agent"],
462
+ utilityDependencies: ["cn"]
463
+ },
464
+ "week-strip": {
465
+ name: "week-strip",
466
+ description: "Days in a row that snap a week at a time, with a dot for each booking.",
467
+ files: [{ name: "week-strip.tsx" }, { name: "index.ts" }],
468
+ dependencies: ["date-fns", "lucide-react"],
469
+ componentDependencies: ["agent", "calendar"],
470
+ utilityDependencies: ["cn"]
471
+ },
472
+ "year-view": {
473
+ name: "year-view",
474
+ description: "A year of days shaded by count, that turns a day into a filter.",
475
+ files: [{ name: "year-view.tsx" }, { name: "index.ts" }],
476
+ dependencies: ["date-fns"],
477
+ componentDependencies: ["agent", "calendar"],
478
+ utilityDependencies: ["cn"]
479
+ },
338
480
  slider: {
339
481
  name: "slider",
340
482
  description: "An input where the user selects a value from within a given range.",
@@ -351,6 +493,13 @@ function getComponentRegistry() {
351
493
  componentDependencies: ["agent"],
352
494
  utilityDependencies: ["cn"]
353
495
  },
496
+ table: {
497
+ name: "table",
498
+ description: "Styled native table parts, with numeric columns and a stacked phone layout.",
499
+ files: [{ name: "table.tsx" }, { name: "index.ts" }],
500
+ dependencies: [],
501
+ utilityDependencies: ["cn"]
502
+ },
354
503
  tabs: {
355
504
  name: "tabs",
356
505
  description: "A component for toggling between related panels on the same page.",
@@ -642,25 +791,35 @@ var LOCK_FILE_MAP = [
642
791
  { file: "yarn.lock", manager: "yarn" },
643
792
  { file: "package-lock.json", manager: "npm" }
644
793
  ];
645
- function detectPackageManager(startDir = process.cwd()) {
646
- for (const entry of LOCK_FILE_MAP) {
647
- if (fs2.existsSync(path2.join(startDir, entry.file))) {
648
- return entry.manager;
649
- }
794
+ function fromPackageManagerField(dir) {
795
+ const packageJsonPath = path2.join(dir, "package.json");
796
+ if (!fs2.existsSync(packageJsonPath)) return null;
797
+ try {
798
+ const value = JSON.parse(fs2.readFileSync(packageJsonPath, "utf-8")).packageManager ?? "";
799
+ for (const pm of ["pnpm", "yarn", "bun", "npm"]) if (value.startsWith(`${pm}@`)) return pm;
800
+ } catch {
650
801
  }
651
- const packageJsonPath = path2.join(startDir, "package.json");
652
- if (fs2.existsSync(packageJsonPath)) {
653
- try {
654
- const packageJson = JSON.parse(fs2.readFileSync(packageJsonPath, "utf-8"));
655
- const value = packageJson.packageManager ?? "";
656
- if (value.startsWith("pnpm@")) return "pnpm";
657
- if (value.startsWith("yarn@")) return "yarn";
658
- if (value.startsWith("bun@")) return "bun";
659
- if (value.startsWith("npm@")) return "npm";
660
- } catch {
802
+ return null;
803
+ }
804
+ function fromUserAgent() {
805
+ const agent = process.env.npm_config_user_agent ?? "";
806
+ for (const pm of ["pnpm", "yarn", "bun"]) if (agent.startsWith(`${pm}/`)) return pm;
807
+ return null;
808
+ }
809
+ function detectPackageManager(startDir = process.cwd()) {
810
+ let dir = path2.resolve(startDir);
811
+ while (true) {
812
+ for (const entry of LOCK_FILE_MAP) {
813
+ if (fs2.existsSync(path2.join(dir, entry.file))) return entry.manager;
661
814
  }
662
- }
663
- return "npm";
815
+ if (fs2.existsSync(path2.join(dir, "pnpm-workspace.yaml"))) return "pnpm";
816
+ const field = fromPackageManagerField(dir);
817
+ if (field) return field;
818
+ const parent = path2.dirname(dir);
819
+ if (parent === dir) break;
820
+ dir = parent;
821
+ }
822
+ return fromUserAgent() ?? "npm";
664
823
  }
665
824
  function getInstallCommand(pm, deps) {
666
825
  const depsStr = deps.join(" ");
@@ -745,7 +904,11 @@ var DEPENDENCY_VERSION_MAP = {
745
904
  "tailwind-merge": "^3.5.0",
746
905
  "@json-render/core": "^0.14.0",
747
906
  "@json-render/react": "^0.14.0",
748
- "zod": "^4.3.6"
907
+ "zod": "^4.3.6",
908
+ "react-day-picker": "^9.14.0",
909
+ "date-fns": "^4.4.0",
910
+ "@tanstack/react-table": "^8.21.3",
911
+ "@tanstack/react-virtual": "^3.14.26"
749
912
  };
750
913
  function toInstallSpec(dep) {
751
914
  const version = DEPENDENCY_VERSION_MAP[dep];
@@ -1238,6 +1401,12 @@ var addCommand = new Command("add").description("Add a component to your project
1238
1401
  continue;
1239
1402
  }
1240
1403
  if (fs3.existsSync(targetPath) && !options.overwrite) {
1404
+ if (options.yes) {
1405
+ spinner.stop();
1406
+ console.log(` ${chalk.yellow("\u2298")} Kept existing ${file.name} (pass --overwrite to replace it)`);
1407
+ spinner.start();
1408
+ continue;
1409
+ }
1241
1410
  spinner.stop();
1242
1411
  const { overwrite } = await prompts({
1243
1412
  type: "confirm",
@@ -1425,33 +1594,34 @@ function extractPreservedThemeVars(css) {
1425
1594
  return line.startsWith("--") && !DINACHI_THEME_PREFIXES.some((p) => line.startsWith(p));
1426
1595
  });
1427
1596
  }
1597
+ var DARK_VARIANT = "@custom-variant dark (&:where(.dark, .dark *));";
1428
1598
  function getThemeCSS(tailwindMajor, mode, preservedThemeVars = []) {
1429
1599
  const lightVars = `:root {
1430
- --background: oklch(0.986 0.0034 145.5499);
1431
- --foreground: oklch(0.1459 0.0497 142.4953);
1432
- --card: oklch(0.9781 0.0017 145.5621);
1433
- --card-foreground: oklch(0.1459 0.0497 142.4953);
1600
+ --background: oklch(0.986 0 0);
1601
+ --foreground: oklch(0.1459 0 0);
1602
+ --card: oklch(0.9781 0 0);
1603
+ --card-foreground: oklch(0.1459 0 0);
1434
1604
  --popover: oklch(1 0 0);
1435
- --popover-foreground: oklch(0.1324 0.0033 145.3864);
1436
- --primary: oklch(0.1324 0.0033 145.3864);
1437
- --primary-foreground: oklch(0.9729 0.0101 145.4971);
1438
- --secondary: oklch(0.9248 0.0051 145.5339);
1439
- --secondary-foreground: oklch(0.1324 0.0033 145.3864);
1440
- --muted: oklch(0.9631 0.0017 145.5619);
1441
- --muted-foreground: oklch(0.1849 0.0629 142.4953);
1442
- --accent: oklch(0.9248 0.0051 145.5339);
1443
- --accent-foreground: oklch(0.1459 0.0497 142.4953);
1605
+ --popover-foreground: oklch(0.1324 0 0);
1606
+ --primary: oklch(0.1324 0 0);
1607
+ --primary-foreground: oklch(0.9729 0 0);
1608
+ --secondary: oklch(0.9248 0 0);
1609
+ --secondary-foreground: oklch(0.1324 0 0);
1610
+ --muted: oklch(0.9631 0 0);
1611
+ --muted-foreground: oklch(0.5 0 0);
1612
+ --accent: oklch(0.9248 0 0);
1613
+ --accent-foreground: oklch(0.1459 0 0);
1444
1614
  --destructive: oklch(0.5248 0.1368 20.8317);
1445
1615
  --destructive-foreground: oklch(1 0 0);
1446
1616
  --success: oklch(0.5882 0.1655 145.39);
1447
1617
  --success-foreground: oklch(1 0 0);
1448
1618
  --warning: oklch(0.6365 0.1639 55.49);
1449
1619
  --warning-foreground: oklch(1 0 0);
1450
- --info: oklch(0.623 0.214 259.815);
1620
+ --info: oklch(0.546 0.214 259.815);
1451
1621
  --info-foreground: oklch(1 0 0);
1452
- --border: oklch(0.9239 0.0017 145.5613);
1453
- --input: oklch(0.8481 0.0105 145.4823);
1454
- --ring: oklch(0.1459 0.0497 142.4953);
1622
+ --border: oklch(0.9239 0 0);
1623
+ --input: oklch(0.8481 0 0);
1624
+ --ring: oklch(0.1459 0 0);
1455
1625
  --chart-1: oklch(0.6038 0.2363 344.4657);
1456
1626
  --chart-2: oklch(0.4445 0.2251 300.6246);
1457
1627
  --chart-3: oklch(0.379 0.0438 226.1538);
@@ -1460,14 +1630,14 @@ function getThemeCSS(tailwindMajor, mode, preservedThemeVars = []) {
1460
1630
  /* A panel surface, distinct from the page. The docs site points --sidebar at
1461
1631
  --background instead, because its nav is part of the page rather than docked beside
1462
1632
  it \u2014 that is a choice about that layout, not a value this theme is drifting from. */
1463
- --sidebar: oklch(0.972 0.0068 145.5233);
1464
- --sidebar-foreground: oklch(0.2284 0.023 134.3921);
1465
- --sidebar-primary: oklch(0.1324 0.0033 145.3864);
1466
- --sidebar-primary-foreground: oklch(0.9742 0.0101 131.3574);
1467
- --sidebar-accent: oklch(0.9248 0.0051 145.5339);
1468
- --sidebar-accent-foreground: oklch(0.1459 0.0497 142.4953);
1469
- --sidebar-border: oklch(0.9407 0.0045 134.8505);
1470
- --sidebar-ring: oklch(0.5916 0.218 0.5844);
1633
+ --sidebar: oklch(0.972 0 0);
1634
+ --sidebar-foreground: oklch(0.2284 0 0);
1635
+ --sidebar-primary: oklch(0.1324 0 0);
1636
+ --sidebar-primary-foreground: oklch(0.9742 0 0);
1637
+ --sidebar-accent: oklch(0.9248 0 0);
1638
+ --sidebar-accent-foreground: oklch(0.1459 0 0);
1639
+ --sidebar-border: oklch(0.9407 0 0);
1640
+ --sidebar-ring: oklch(0.5916 0 0);
1471
1641
  --radius: 1.05rem;
1472
1642
  /* Every component inlines these same values as a var() fallback, so motion works
1473
1643
  without them. Declaring them here is what lets a project retune the feel of every
@@ -1497,19 +1667,19 @@ function getThemeCSS(tailwindMajor, mode, preservedThemeVars = []) {
1497
1667
  }`;
1498
1668
  const darkVars = `.dark {
1499
1669
  --background: oklch(0.1149 0 0);
1500
- --foreground: oklch(0.7999 0.0218 134.1191);
1501
- --card: oklch(0.133 0.0021 196.9098);
1502
- --card-foreground: oklch(0.7996 0.023 132.5769);
1503
- --popover: oklch(0.1663 0.0138 135.2766);
1504
- --popover-foreground: oklch(0.9742 0.0101 131.3574);
1505
- --primary: oklch(0.9729 0.0101 145.4971);
1506
- --primary-foreground: oklch(0.1324 0.0033 145.3864);
1507
- --secondary: oklch(0.1844 0.0062 122.0354);
1508
- --secondary-foreground: oklch(0.8009 0.0399 133.2927);
1509
- --muted: oklch(0.1579 0.0017 196.9874);
1510
- --muted-foreground: oklch(0.7897 0.0171 133.8518);
1511
- --accent: oklch(0.1391 0.0113 136.9894);
1512
- --accent-foreground: oklch(0.9742 0.0101 131.3574);
1670
+ --foreground: oklch(0.7999 0 0);
1671
+ --card: oklch(0.133 0 0);
1672
+ --card-foreground: oklch(0.7996 0 0);
1673
+ --popover: oklch(0.14 0 0);
1674
+ --popover-foreground: oklch(0.9742 0 0);
1675
+ --primary: oklch(0.9729 0 0);
1676
+ --primary-foreground: oklch(0.1324 0 0);
1677
+ --secondary: oklch(0.1844 0 0);
1678
+ --secondary-foreground: oklch(0.8009 0 0);
1679
+ --muted: oklch(0.1579 0 0);
1680
+ --muted-foreground: oklch(0.62 0 0);
1681
+ --accent: oklch(0.1391 0 0);
1682
+ --accent-foreground: oklch(0.9742 0 0);
1513
1683
  --destructive: oklch(0.585 0.15 20.8317);
1514
1684
  --destructive-foreground: oklch(1 0 0);
1515
1685
  --success: oklch(0.5484 0.1497 145.39);
@@ -1517,29 +1687,30 @@ function getThemeCSS(tailwindMajor, mode, preservedThemeVars = []) {
1517
1687
  --warning: oklch(0.5966 0.1499 55.49);
1518
1688
  --warning-foreground: oklch(1 0 0);
1519
1689
  --info: oklch(0.707 0.165 254.624);
1520
- --info-foreground: oklch(0.1324 0.0033 145.3864);
1521
- --border: oklch(0.1811 0.0128 129.2819);
1522
- --input: oklch(0.2213 0.0193 135.2915);
1523
- --ring: oklch(0.9248 0.0051 145.5339);
1690
+ --info-foreground: oklch(0.1324 0 0);
1691
+ --border: oklch(0.192 0 0);
1692
+ --input: oklch(0.2213 0 0);
1693
+ --ring: oklch(0.9248 0 0);
1524
1694
  --chart-1: oklch(0.5316 0.1409 355.1999);
1525
1695
  --chart-2: oklch(0.5633 0.1912 306.8561);
1526
1696
  --chart-3: oklch(0.7227 0.1502 60.5799);
1527
1697
  --chart-4: oklch(0.6193 0.2029 312.7422);
1528
1698
  --chart-5: oklch(0.6118 0.2093 6.1387);
1529
- --sidebar: oklch(0.1495 0.0139 121.7627);
1530
- --sidebar-foreground: oklch(0.8942 0.0315 133.3174);
1531
- --sidebar-primary: oklch(0.9729 0.0101 145.4971);
1532
- --sidebar-primary-foreground: oklch(0.1324 0.0033 145.3864);
1533
- --sidebar-accent: oklch(0.2163 0.0025 145.4898);
1534
- --sidebar-accent-foreground: oklch(0.9699 0.0013 106.4238);
1535
- --sidebar-border: oklch(0.2757 0.0116 128.9395);
1536
- --sidebar-ring: oklch(0.9248 0.0051 145.5339);
1699
+ --sidebar: oklch(0.1495 0 0);
1700
+ --sidebar-foreground: oklch(0.8942 0 0);
1701
+ --sidebar-primary: oklch(0.9729 0 0);
1702
+ --sidebar-primary-foreground: oklch(0.1324 0 0);
1703
+ --sidebar-accent: oklch(0.2163 0 0);
1704
+ --sidebar-accent-foreground: oklch(0.9699 0 0);
1705
+ --sidebar-border: oklch(0.2757 0 0);
1706
+ --sidebar-ring: oklch(0.9248 0 0);
1537
1707
  }`;
1538
1708
  const parts = [];
1539
1709
  if (tailwindMajor >= 4) {
1540
1710
  if (mode === "full") {
1541
1711
  parts.push('@import "tailwindcss";');
1542
1712
  }
1713
+ parts.push(DARK_VARIANT);
1543
1714
  parts.push(lightVars, darkVars);
1544
1715
  const preservedLines = preservedThemeVars.length > 0 ? "\n" + preservedThemeVars.map((v) => ` ${v}`).join("\n") : "";
1545
1716
  parts.push(`@theme inline {
@@ -1637,7 +1808,10 @@ async function injectThemeCSS(cssFilePath, tailwindMajor) {
1637
1808
  }
1638
1809
  const preservedVars = tailwindMajor >= 4 ? extractPreservedThemeVars(existing) : [];
1639
1810
  const cleaned = stripConflictingCSS(existing);
1640
- const theme2 = getThemeCSS(tailwindMajor, "append", preservedVars);
1811
+ let theme2 = getThemeCSS(tailwindMajor, "append", preservedVars);
1812
+ if (/@custom-variant\s+dark\b/.test(cleaned)) theme2 = theme2.replace(`${DARK_VARIANT}
1813
+
1814
+ `, "");
1641
1815
  const result = cleaned.length > 0 ? cleaned + "\n\n" + theme2 : getThemeCSS(tailwindMajor, "full", preservedVars);
1642
1816
  await fs4.writeFile(cssFilePath, result);
1643
1817
  return { path: cssFilePath, updated: true };
@@ -2010,9 +2184,7 @@ var initCommand = new Command2("init").description("Initialize Dinachi UI in you
2010
2184
  if (options.skipInstall) {
2011
2185
  console.log();
2012
2186
  console.log("Dependencies to install manually:");
2013
- deps.forEach((dep) => {
2014
- console.log(` ${chalk2.yellow("\u2022")} ${toInstallSpec(dep)}`);
2015
- });
2187
+ console.log(` ${chalk2.cyan(getInstallCommand(detectPackageManager(projectRoot), deps.map(toInstallSpec)))}`);
2016
2188
  }
2017
2189
  console.log();
2018
2190
  console.log("\u{1F4A1} Tip: Install globally for shorter commands:");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dinachi/cli",
3
- "version": "1.0.0",
3
+ "version": "1.3.0",
4
4
  "description": "CLI for adding Dinachi UI components to your project",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -47,14 +47,18 @@
47
47
  "@base-ui/react": "1.9.0",
48
48
  "@json-render/core": "^0.14.0",
49
49
  "@json-render/react": "^0.14.0",
50
+ "@tanstack/react-table": "^8.21.3",
51
+ "@tanstack/react-virtual": "^3.14.26",
50
52
  "@types/fs-extra": "^11.0.4",
51
53
  "@types/prompts": "^2.4.9",
52
54
  "@types/react": "^19.2.18",
53
55
  "class-variance-authority": "^0.7.1",
54
56
  "clsx": "^2.1.1",
57
+ "date-fns": "^4.4.0",
55
58
  "lucide-react": "0.552.0",
56
59
  "motion": "^12.23.6",
57
60
  "react": "19.2.8",
61
+ "react-day-picker": "^9.14.0",
58
62
  "tailwind-merge": "^3.5.0",
59
63
  "tsup": "^8.5.1",
60
64
  "typescript": "^6.0.3",
@@ -29,7 +29,7 @@ const Accordion = React.forwardRef<
29
29
  const agent = { value, multiple: Boolean(props.multiple), change };
30
30
  return (
31
31
  <AccordionAgentContext.Provider value={useHasAgent() ? agent : null}>
32
- <BaseAccordion.Root ref={ref} data-agent-in={props["aria-label"]} className={cn(className)} {...props} value={value} onValueChange={change} />
32
+ <BaseAccordion.Root data-slot="accordion" ref={ref} data-agent-in={props["aria-label"]} className={cn(className)} {...props} value={value} onValueChange={change} />
33
33
  </AccordionAgentContext.Provider>
34
34
  );
35
35
  });
@@ -67,6 +67,7 @@ const AccordionItem = React.forwardRef<
67
67
  return (
68
68
  <AccordionPartsContext.Provider value={root ? parts : null}>
69
69
  <BaseAccordion.Item
70
+ data-slot="accordion-item"
70
71
  ref={ref}
71
72
  className={cn("border-b", className)}
72
73
  value={value}
@@ -82,6 +83,7 @@ const AccordionHeader = React.forwardRef<
82
83
  React.ComponentProps<typeof BaseAccordion.Header>
83
84
  >(({ className, ...props }, ref) => (
84
85
  <BaseAccordion.Header
86
+ data-slot="accordion-header"
85
87
  ref={ref}
86
88
  className={cn("flex", className)}
87
89
  {...props}
@@ -96,6 +98,7 @@ const AccordionTrigger = React.forwardRef<
96
98
  }
97
99
  >(({ className, children, ...props }, ref) => (
98
100
  <BaseAccordion.Trigger
101
+ data-slot="accordion-trigger"
99
102
  ref={useMergedRef(ref, React.useContext(AccordionPartsContext)?.trigger)}
100
103
  className={cn(
101
104
  "flex flex-1 items-center justify-between py-4 font-medium transition-colors hover:underline",
@@ -116,6 +119,7 @@ const AccordionPanel = React.forwardRef<
116
119
  React.ComponentProps<typeof BaseAccordion.Panel>
117
120
  >(({ className, children, ...props }, ref) => (
118
121
  <BaseAccordion.Panel
122
+ data-slot="accordion-panel"
119
123
  ref={useMergedRef(ref, React.useContext(AccordionPartsContext)?.panel)}
120
124
  className={cn(
121
125
  "overflow-hidden text-sm h-[var(--accordion-panel-height)]",