@tc96/cli 0.0.0-stage → 0.28.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 (248) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +213 -2
  3. package/cli.js +1450 -0
  4. package/package.json +35 -4
  5. package/registry/agenda-1.json +1297 -0
  6. package/registry/aggregate.json +4 -0
  7. package/registry/ai-chat-1.json +91 -0
  8. package/registry/app-shell-1.json +81 -0
  9. package/registry/app-shell-2.json +89 -0
  10. package/registry/app-shell-3.json +109 -0
  11. package/registry/app-shell-4.json +104 -0
  12. package/registry/card-1.json +104 -0
  13. package/registry/card-2.json +97 -0
  14. package/registry/card-3.json +104 -0
  15. package/registry/card-4.json +98 -0
  16. package/registry/card-5.json +85 -0
  17. package/registry/card-6.json +98 -0
  18. package/registry/card-7.json +104 -0
  19. package/registry/card-8.json +106 -0
  20. package/registry/card-9.json +92 -0
  21. package/registry/charts.json +30 -0
  22. package/registry/chat-assistant.json +110 -0
  23. package/registry/chats-panel.json +97 -0
  24. package/registry/checklist.json +321 -0
  25. package/registry/collection.json +1104 -0
  26. package/registry/crm-1.json +1317 -0
  27. package/registry/crm-2.json +1400 -0
  28. package/registry/dashboard-1.json +160 -0
  29. package/registry/dashboard-2.json +153 -0
  30. package/registry/dashboard-3.json +154 -0
  31. package/registry/dashboard-4.json +168 -0
  32. package/registry/dashboard-5.json +167 -0
  33. package/registry/dashboard-6.json +143 -0
  34. package/registry/dashboard-7.json +188 -0
  35. package/registry/documents-1.json +1322 -0
  36. package/registry/editable.json +36 -0
  37. package/registry/empty-state-1.json +40 -0
  38. package/registry/empty-state-2.json +39 -0
  39. package/registry/empty-state-3.json +61 -0
  40. package/registry/empty-state-4.json +39 -0
  41. package/registry/empty-state-5.json +47 -0
  42. package/registry/empty-state-6.json +40 -0
  43. package/registry/finance-1.json +845 -0
  44. package/registry/finance-2.json +973 -0
  45. package/registry/finance-3.json +1436 -0
  46. package/registry/flow-1.json +460 -0
  47. package/registry/flow-2.json +503 -0
  48. package/registry/flow-3.json +198 -0
  49. package/registry/flow-4.json +75 -0
  50. package/registry/flow-canvas.json +198 -0
  51. package/registry/flow-inspector.json +151 -0
  52. package/registry/flow-step-library.json +112 -0
  53. package/registry/forgot-password-1.json +73 -0
  54. package/registry/forgot-password-2.json +73 -0
  55. package/registry/inbox-1.json +1184 -0
  56. package/registry/inventory-1.json +828 -0
  57. package/registry/inventory-2.json +956 -0
  58. package/registry/legal-1.json +1345 -0
  59. package/registry/legal-2.json +1279 -0
  60. package/registry/legal-3.json +1273 -0
  61. package/registry/legal-4.json +1273 -0
  62. package/registry/legal-5.json +1393 -0
  63. package/registry/legal-6.json +1309 -0
  64. package/registry/legal-7.json +1315 -0
  65. package/registry/legal-8.json +1358 -0
  66. package/registry/legal-9.json +1381 -0
  67. package/registry/list-1.json +129 -0
  68. package/registry/list-2.json +117 -0
  69. package/registry/list-3.json +129 -0
  70. package/registry/list-4.json +105 -0
  71. package/registry/list-5.json +98 -0
  72. package/registry/list-6.json +92 -0
  73. package/registry/list.json +52 -0
  74. package/registry/login-1.json +89 -0
  75. package/registry/login-10.json +88 -0
  76. package/registry/login-2.json +81 -0
  77. package/registry/login-3.json +90 -0
  78. package/registry/login-4.json +81 -0
  79. package/registry/login-5.json +82 -0
  80. package/registry/login-6.json +88 -0
  81. package/registry/login-7.json +83 -0
  82. package/registry/login-8.json +81 -0
  83. package/registry/login-9.json +88 -0
  84. package/registry/magic-link-6.json +79 -0
  85. package/registry/marketing-1.json +833 -0
  86. package/registry/marketing-2.json +961 -0
  87. package/registry/navbar-1.json +66 -0
  88. package/registry/navbar-10.json +50 -0
  89. package/registry/navbar-11.json +48 -0
  90. package/registry/navbar-12.json +48 -0
  91. package/registry/navbar-2.json +48 -0
  92. package/registry/navbar-3.json +50 -0
  93. package/registry/navbar-4.json +39 -0
  94. package/registry/navbar-5.json +50 -0
  95. package/registry/navbar-6.json +48 -0
  96. package/registry/navbar-7.json +72 -0
  97. package/registry/navbar-8.json +50 -0
  98. package/registry/navbar-9.json +54 -0
  99. package/registry/onboarding-1.json +114 -0
  100. package/registry/onboarding-2.json +78 -0
  101. package/registry/onboarding-3.json +71 -0
  102. package/registry/otp-1.json +73 -0
  103. package/registry/projects-1.json +865 -0
  104. package/registry/projects-2.json +993 -0
  105. package/registry/projects-3.json +1346 -0
  106. package/registry/properties.json +530 -0
  107. package/registry/record-dialog.json +88 -0
  108. package/registry/record-group.json +194 -0
  109. package/registry/record-preview.json +70 -0
  110. package/registry/record-status-list.json +70 -0
  111. package/registry/reset-password-1.json +92 -0
  112. package/registry/reset-password-2.json +98 -0
  113. package/registry/reset-password-6.json +91 -0
  114. package/registry/revenue-1.json +834 -0
  115. package/registry/revenue-2.json +968 -0
  116. package/registry/revenue-3.json +821 -0
  117. package/registry/revenue-4.json +949 -0
  118. package/registry/rich-text-editor-1.json +172 -0
  119. package/registry/rich-text-editor-2.json +158 -0
  120. package/registry/rich-text-editor-3.json +198 -0
  121. package/registry/rich-text-editor-4.json +200 -0
  122. package/registry/rich-text-editor-5.json +237 -0
  123. package/registry/rich-text-editor.json +113 -0
  124. package/registry/settings-account-1.json +119 -0
  125. package/registry/settings-account-2.json +118 -0
  126. package/registry/settings-catalog-1.json +128 -0
  127. package/registry/settings-catalog-10.json +129 -0
  128. package/registry/settings-catalog-2.json +116 -0
  129. package/registry/settings-catalog-3.json +118 -0
  130. package/registry/settings-catalog-4.json +227 -0
  131. package/registry/settings-catalog-5.json +129 -0
  132. package/registry/settings-catalog-6.json +130 -0
  133. package/registry/settings-catalog-7.json +130 -0
  134. package/registry/settings-catalog-8.json +183 -0
  135. package/registry/settings-catalog-9.json +159 -0
  136. package/registry/settings-integration-1.json +125 -0
  137. package/registry/settings-integration-2.json +122 -0
  138. package/registry/settings-integration-3.json +118 -0
  139. package/registry/settings-integration-4.json +129 -0
  140. package/registry/settings-integration-5.json +122 -0
  141. package/registry/settings-integration-6.json +92 -0
  142. package/registry/settings-integration-7.json +122 -0
  143. package/registry/settings-integration-8.json +593 -0
  144. package/registry/settings-notification-channel-1.json +112 -0
  145. package/registry/settings-preference-1.json +123 -0
  146. package/registry/settings-preference-2.json +123 -0
  147. package/registry/settings-preference-3.json +116 -0
  148. package/registry/settings-role-permission-1.json +117 -0
  149. package/registry/settings-security-1.json +117 -0
  150. package/registry/settings-workspace-1.json +119 -0
  151. package/registry/settings-workspace-2.json +125 -0
  152. package/registry/settings.json +82 -0
  153. package/registry/signup-1.json +100 -0
  154. package/registry/signup-2.json +93 -0
  155. package/registry/signup-3.json +83 -0
  156. package/registry/signup-6.json +99 -0
  157. package/registry/state-surface.json +58 -0
  158. package/registry/stats-1.json +116 -0
  159. package/registry/stats-2.json +115 -0
  160. package/registry/stats-3.json +97 -0
  161. package/registry/stats-4.json +92 -0
  162. package/registry/stats-5.json +103 -0
  163. package/registry/stats-6.json +105 -0
  164. package/registry/stats-7.json +103 -0
  165. package/registry/stats.json +64 -0
  166. package/registry/support-1.json +853 -0
  167. package/registry/support-2.json +981 -0
  168. package/registry/support-3.json +762 -0
  169. package/registry/support-4.json +538 -0
  170. package/registry/team-1.json +829 -0
  171. package/registry/team-2.json +957 -0
  172. package/registry/timeline-1.json +97 -0
  173. package/registry/timeline-2.json +102 -0
  174. package/registry/timeline-3.json +68 -0
  175. package/registry/timeline-4.json +86 -0
  176. package/registry/ui/accordion.json +15 -0
  177. package/registry/ui/alert-dialog.json +14 -0
  178. package/registry/ui/alert.json +50 -0
  179. package/registry/ui/autocomplete.json +18 -0
  180. package/registry/ui/avatar.json +14 -0
  181. package/registry/ui/badge.json +51 -0
  182. package/registry/ui/breadcrumb.json +15 -0
  183. package/registry/ui/button.json +25 -0
  184. package/registry/ui/calendar.json +15 -0
  185. package/registry/ui/card.json +14 -0
  186. package/registry/ui/chat.json +115 -0
  187. package/registry/ui/checkbox-group.json +14 -0
  188. package/registry/ui/checkbox.json +14 -0
  189. package/registry/ui/collapsible.json +14 -0
  190. package/registry/ui/combobox.json +18 -0
  191. package/registry/ui/command.json +17 -0
  192. package/registry/ui/composer-clipboard.json +14 -0
  193. package/registry/ui/composer-document.json +14 -0
  194. package/registry/ui/composer-editor.json +16 -0
  195. package/registry/ui/composer-query.json +12 -0
  196. package/registry/ui/composer.json +17 -0
  197. package/registry/ui/context-menu.json +23 -0
  198. package/registry/ui/dialog.json +18 -0
  199. package/registry/ui/drawer.json +18 -0
  200. package/registry/ui/empty.json +14 -0
  201. package/registry/ui/field.json +22 -0
  202. package/registry/ui/fieldset.json +14 -0
  203. package/registry/ui/form.json +14 -0
  204. package/registry/ui/frame.json +12 -0
  205. package/registry/ui/gauge.json +31 -0
  206. package/registry/ui/group.json +17 -0
  207. package/registry/ui/icon-frame.json +31 -0
  208. package/registry/ui/input-group.json +17 -0
  209. package/registry/ui/input.json +14 -0
  210. package/registry/ui/kbd.json +12 -0
  211. package/registry/ui/label.json +14 -0
  212. package/registry/ui/menu.json +39 -0
  213. package/registry/ui/meter.json +14 -0
  214. package/registry/ui/number-field.json +17 -0
  215. package/registry/ui/otp-field.json +31 -0
  216. package/registry/ui/pagination.json +17 -0
  217. package/registry/ui/popover.json +14 -0
  218. package/registry/ui/preview-card.json +14 -0
  219. package/registry/ui/progress.json +14 -0
  220. package/registry/ui/property-meta.json +16 -0
  221. package/registry/ui/property-tone.json +12 -0
  222. package/registry/ui/radio-group.json +14 -0
  223. package/registry/ui/render-anchor.json +12 -0
  224. package/registry/ui/scroll-area.json +14 -0
  225. package/registry/ui/segmented-control.json +14 -0
  226. package/registry/ui/select.json +16 -0
  227. package/registry/ui/separator.json +14 -0
  228. package/registry/ui/sheet.json +18 -0
  229. package/registry/ui/sidebar.json +25 -0
  230. package/registry/ui/skeleton.json +24 -0
  231. package/registry/ui/slider.json +14 -0
  232. package/registry/ui/spinner.json +14 -0
  233. package/registry/ui/switch.json +14 -0
  234. package/registry/ui/table.json +14 -0
  235. package/registry/ui/tabs.json +16 -0
  236. package/registry/ui/text.json +31 -0
  237. package/registry/ui/textarea.json +14 -0
  238. package/registry/ui/toast.json +89 -0
  239. package/registry/ui/toggle-group.json +18 -0
  240. package/registry/ui/toggle.json +15 -0
  241. package/registry/ui/toolbar.json +14 -0
  242. package/registry/ui/tooltip.json +14 -0
  243. package/registry/ui/use-composer-editor.json +17 -0
  244. package/registry/ui/use-copy-to-clipboard.json +12 -0
  245. package/registry/ui/use-media-query.json +12 -0
  246. package/registry/view.json +1104 -0
  247. package/registry/widgets.json +319 -0
  248. package/registry/wizard.json +89 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Gabriel Melo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,214 @@
1
- # Temporary Holding Version
2
1
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
2
+ <div align="center">
3
+
4
+ # tc96 ui
5
+ COSS components, React patterns and blocks without business rules, installed as source into the `@tc96/ui` package of your monorepo
6
+
7
+ [![npm version](https://img.shields.io/npm/v/@tc96/cli?style=flat&colorA=18181B&colorB=0EA5E9)](https://www.npmjs.com/package/@tc96/cli)
8
+ [![npm downloads](https://img.shields.io/npm/dm/@tc96/cli?style=flat&colorA=18181B&colorB=0EA5E9)](https://www.npmjs.com/package/@tc96/cli)
9
+ [![License](https://img.shields.io/github/license/gblsmlo/tc96-ui?style=flat&colorA=18181B&colorB=0EA5E9)](https://github.com/gblsmlo/tc96-ui/blob/main/LICENSE)
10
+
11
+ ![React](https://img.shields.io/badge/React-19-61DAFB?style=flat&logo=react&logoColor=white&labelColor=18181B)
12
+ ![TypeScript](https://img.shields.io/badge/TypeScript-5-3178C6?style=flat&logo=typescript&logoColor=white&labelColor=18181B)
13
+ ![Tailwind CSS](https://img.shields.io/badge/Tailwind_CSS-v4-06B6D4?style=flat&logo=tailwindcss&logoColor=white&labelColor=18181B)
14
+ ![shadcn](https://img.shields.io/badge/shadcn-registry-FFFFFF?style=flat&logo=shadcnui&logoColor=white&labelColor=18181B)
15
+ ![Storybook](https://img.shields.io/badge/Storybook-stories-FF4785?style=flat&logo=storybook&logoColor=white&labelColor=18181B)
16
+ ![Bun](https://img.shields.io/badge/Bun-tests-FBF0DF?style=flat&logo=bun&logoColor=white&labelColor=18181B)
17
+ </div>
18
+
19
+ <img width="1337" height="754" alt="Screenshot 2026-10-12 at 14 18 51" src="https://github.com/user-attachments/assets/7f2e0024-8ffe-46e1-a0a6-145c56a8ee96" />
20
+
21
+ ## Overview
22
+
23
+ - **Source, not a dependency**: the CLI copies the pattern source into your workspace. You own it and change it as you like
24
+ - **Built on COSS**: patterns import `Button`, `Menu`, `Popover` and the rest from your project's own UI alias
25
+ - **Themeable**: tc96 ships no CSS, tokens or theme, only layout classes on top of your components
26
+ - **No business rules**: your app provides prepared data and handles events. Filtering, sorting, persistence and API calls stay with you
27
+ - **Layered**: imports only go down a layer (`blocks` → `patterns` → `ui` → `utils`), checked by a boundaries script
28
+ - **Tested**: Storybook stories, bun tests, consumer install checks and a view benchmark
29
+
30
+ ## Get Started
31
+
32
+ In a monorepo with the tc96-mono layout (`packages/ui` as `@tc96/ui`, `packages/utils` as `@tc96/utils`), prepare it once at the root:
33
+
34
+ ```bash
35
+ npx @tc96/cli init
36
+ ```
37
+
38
+ `init` writes `components.json` with every layer in `packages/ui/src` and adds the layer exports `packages/ui/package.json` lacks. Edit the aliases in `components.json` to install a layer elsewhere; `init` keeps an existing `components.json`.
39
+
40
+ Install one or more patterns by name:
41
+
42
+ ```bash
43
+ npx @tc96/cli add collection properties
44
+ ```
45
+
46
+ The Record family has three items: `record-dialog`, `record-preview` and `record-group`.
47
+
48
+ ```bash
49
+ npx @tc96/cli add record-dialog record-preview record-group
50
+ ```
51
+
52
+ Preview what would change before writing anything, or compare installed files with the current version:
53
+
54
+ ```bash
55
+ npx @tc96/cli add record-dialog --dry-run
56
+ npx @tc96/cli add record-dialog --diff
57
+ ```
58
+
59
+ If the repo blocks `npx`, use `bunx @tc96/cli add ...` or `pnpm dlx @tc96/cli add ...`.
60
+
61
+ Before copying anything, the CLI type-checks the patterns against your own `ui` components. If they do not type-check, it stops with exit code 1, in a `--dry-run` too. Fix the diagnostics it prints, or pass `--force` to install anyway.
62
+
63
+ **Quick Start:**
64
+
65
+ ```tsx
66
+ import { CollectionLayoutOutlet, TextProperty } from '@tc96/ui/patterns'
67
+ ```
68
+
69
+ ### Blocks
70
+
71
+ A block is a numbered variation of a page, a page frame or a page section that you install and then edit, such as an application shell. Blocks consume patterns; a pattern never imports a block. They live in categories: Application, Auth, Data, Charts, Solutions, AI & Agents, eCommerce and Marketing. The first ones are application shells, `app-shell-1` to `app-shell-4`, followed by the auth pages and the flow editors:
72
+
73
+ ```bash
74
+ npx @tc96/cli add app-shell-1
75
+ ```
76
+
77
+ The CLI writes a block where the `blocks` alias resolves (`packages/ui/src/blocks` in the default layout), and you import it from its folder:
78
+
79
+ ```tsx
80
+ import { AppShell1 } from '@tc96/ui/blocks/application/shell/app-shell-1'
81
+ ```
82
+
83
+ The `blocks` alias needs to resolve only when you install a block; a consumer that still uses `aliases.templates` or the `templates` entry keeps working with a warning. The Blocks page in Storybook lists every block and its options.
84
+
85
+ #### Auth pages
86
+
87
+ `login-1`, `login-2`, `otp-1`, `signup-1`, `signup-2`, `reset-password-1`, `reset-password-2`, `forgot-password-1` and `forgot-password-2` are the pages of the sign in flow. Each one is a whole page (the `main`, the centered card and your `logo` above it), so you only mount it on the route:
88
+
89
+ ```bash
90
+ npx @tc96/cli add login-1
91
+ npx @tc96/cli add forgot-password-1
92
+ ```
93
+
94
+ ```tsx
95
+ import { Login1 } from '@tc96/ui/blocks/application/auth/login-1'
96
+ ```
97
+
98
+ The pages are controlled: you pass `pending`, `error` and `fieldErrors` and receive `onSubmit(values)`, after the native constraints pass. They never fetch, keep a session or import an auth provider; links go through `renderLink` and only appear when you pass their `href`, every text is in `labels` (pt-BR by default), and the resend and link validity countdowns are numbers you count down and pass in. `login-2`, `signup-2` and `forgot-password-2` are the minimal `login-1`, `signup-1` and `forgot-password-1`, with only the fields and the submit button (no logo, links or providers). `reset-password-2` is `reset-password-1` with a validity timer for the reset link, and `forgot-password-1` and `forgot-password-2` swap their form for a confirmation when you pass `sent`.
99
+
100
+ #### Application: flow editors
101
+
102
+ `flow-1` and `flow-2` are two editor pages with the same anatomy: a page header (name, shortcuts, ask the AI, add step, run, actions menu), a step library on the left, a canvas on React Flow in the middle, an inspector with Build, Status and Logs on the right and an AI assistant card over the canvas. `flow-1` lays the steps out horizontally, with undo, redo, lock and a minimap; `flow-2` lays them out as a vertical tree, with edge controls and an "Organizar árvore" button.
103
+
104
+ ```bash
105
+ npx @tc96/cli add flow-1
106
+ npx @tc96/cli add flow-2
107
+ ```
108
+
109
+ Both bring `@xyflow/react` and `d3-hierarchy`, the `tabs`, `context-menu`, `progress` and `alert` COSS components and the `flow-canvas`, `flow-step-library`, `flow-inspector` and `chat-assistant` pattern files they import. Import the React Flow stylesheet once in your global CSS; without it the canvas does not place nodes or edges:
110
+
111
+ ```css
112
+ @import '@xyflow/react/dist/base.css';
113
+ ```
114
+
115
+ The block is controlled: you pass the steps, the connections, the selection, the run state and the logs, and receive `onStepAdd`, `onStepChange`, `onStepsChange`, `onConnect`, `onRun` and the other callbacks. It never fetches, saves, keeps a history or calls a model; every text is in `labels`, in pt-BR by default.
116
+
117
+ ### How it works
118
+
119
+ - **Your COSS components:** if a `ui` component is missing, the CLI installs it from its own package. If you already have it, yours is reused, customizations included
120
+ - **Your aliases:** imports are rewritten to the aliases in your root `components.json`; each alias resolves through the exports of the workspace package that owns it, or through the root `tsconfig` `paths`
121
+ - **Your files:** existing files are kept. shadcn asks before overwriting anything
122
+
123
+ ### Requirements
124
+
125
+ - React 19, TypeScript and Tailwind CSS 4
126
+ - A Bun monorepo with the tc96-mono layout, or any workspace with a `components.json` at its root
127
+ - Node and npm to run the CLI. Bun is not required
128
+
129
+ ### Consumer structure
130
+
131
+ The default is the tc96-mono layout: one `@tc96/ui` workspace package holds every layer, and `@tc96/utils` holds `cn`. Packages resolve through their `exports`, with no `tsconfig` `paths`:
132
+
133
+ ```text
134
+ components.json written by tc96 init
135
+ packages/
136
+ ui/ @tc96/ui
137
+ package.json exports ./*, ./hooks/*, ./lib/*, ./helpers/*, ./patterns, ./patterns/*, ./blocks/*
138
+ src/
139
+ components/ COSS components and the ones COSS does not have, such as Text and IconFrame (@tc96/ui/<component>)
140
+ hooks/ lib/ hooks and modules of the components (@tc96/ui/hooks/*, @tc96/ui/lib/*)
141
+ helpers/ React-free functions, such as amount formatting and rich text helpers (@tc96/ui/helpers/*)
142
+ patterns/ tc96 patterns (@tc96/ui/patterns)
143
+ blocks/ tc96 blocks (@tc96/ui/blocks/<category>/<group>/<block>)
144
+ utils/ @tc96/utils, exports cn
145
+ apps/
146
+ web/ routes and pages
147
+ ```
148
+
149
+ ```json
150
+ {
151
+ "aliases": {
152
+ "components": "@tc96/ui",
153
+ "ui": "@tc96/ui",
154
+ "utils": "@tc96/utils",
155
+ "lib": "@tc96/ui/lib",
156
+ "hooks": "@tc96/ui/hooks",
157
+ "helpers": "@tc96/ui/helpers",
158
+ "patterns": "@tc96/ui/patterns",
159
+ "blocks": "@tc96/ui/blocks"
160
+ }
161
+ }
162
+ ```
163
+
164
+ To install elsewhere, change these aliases. Each one must resolve through the exports of the workspace package that owns it (`"./patterns/*": "./src/patterns/*.tsx"`) or through the root `tsconfig` `paths` (`"@acme/ui/patterns/*": ["./packages/ui/src/patterns/*"]`). Without `hooks` and `lib`, hooks and lib files go under the `ui` directory; without `helpers`, `patterns` or `blocks`, the alias replaces the last segment of `ui`. Imports only go down a layer: `patterns` can import `ui` and `utils`. `Text` and `IconFrame` are ui components: the CLI installs them with the COSS ones when a pattern needs them, and adds their folder export to the ui package. The CLI adds the npm dependencies to the workspace package that holds the `patterns` path, `packages/ui/package.json` here.
165
+
166
+ ### Install with an AI agent
167
+
168
+ Paste this into your coding agent, replacing the pattern names:
169
+
170
+ ````text
171
+ Install the tc96 patterns `collection` and `properties` in this project.
172
+
173
+ 1. Find the root `components.json`. If it is missing and the repo has `packages/ui` (`@tc96/ui`) and `packages/utils` (`@tc96/utils`), run `npx @tc96/cli init` and show me what it wrote. Otherwise stop and ask me; do not run `shadcn init --force`, which rewrites it.
174
+ 2. Check that each alias in `components.json` resolves, through the exports of the workspace package that owns it or through the root `tsconfig.json` `paths`. If something is missing, show me the change and wait for my approval before editing.
175
+ 3. Preview first, from any directory inside the repo (the CLI searches upward for `components.json`; use `--cwd` to override):
176
+ npx @tc96/cli add collection properties --dry-run
177
+ Read the output. If it lists files that already exist or a destination I did not expect, such as a legacy folder with the same name, stop and ask me. If it stops with "do not type-check against your components", report the diagnostics and wait; do not add `--force`.
178
+ 4. Install:
179
+ npx @tc96/cli add collection properties
180
+ Answer no to any shadcn prompt that would overwrite a file I own. If the repo blocks npx, use `bunx` or `pnpm dlx`.
181
+ 5. Do not edit the installed files or the COSS components in `ui`. Import from the `patterns` alias (`import { CollectionLayoutOutlet } from '@tc96/ui/patterns'`).
182
+ 6. Run the typecheck and lint scripts of the workspace that received the files, and report what was installed, where, and any errors.
183
+ ````
184
+
185
+ ## Patterns
186
+
187
+ | Pattern | Contents |
188
+ | --- | --- |
189
+ | `collection` | List, Kanban, Data Grid and Calendar layouts, toolbar, pagination, selection |
190
+ | `properties` | Text, Date, Select, Person and other property displays, plus property groups |
191
+ | `editable` | Inline editing compound |
192
+ | `checklist` | Controlled item creation, completion, renaming, ordering, deletion and progress |
193
+ | `record-dialog` | `RecordDialog` for create and edit; the handler returns `boolean \| Promise<boolean>` and the pattern settles the dialog. `RecordDialogHeadline` (borderless title and description) and `RecordDialogCreateMore` (the switch for `footerStart` + `keepOpenOnSuccess`) are optional parts of the same item |
194
+ | `record-preview` | `RecordPreview`, a right-side sheet that previews a record with header actions, a close button and an optional footer, and `RecordPreviewAction`, its icon action; open state and content belong to the consumer |
195
+ | `record-group` | `RecordGroup`, a collapsible group of label and value rows with optional header actions and footer, `RecordGroupRow`, its row, and `RecordGroupAction`, an icon action for the header; collapse state is optional and rows belong to the consumer |
196
+ | `widgets` | Dashboard widgets in four groups: finance (market share, asset stats, risk score, balance, budget, cash flow, transactions, invoices), productivity (task progress, upcoming event, project card, agenda, world clock), CRM (pipeline, deals, activity feed, contact card) and gamification (level, streak, achievements, quests, progress HUD and footer), plus shared metric, stat list, avatar stack, progress ring, metric pill and the IconFrame element |
197
+ | `rich-text-editor` | Notion-style block editor on headless Plate: paragraphs, headings, quote, nested lists, five marks, floating toolbar, `/` menu and a separate editable title |
198
+ | `state-surface` | `StateSurface` for empty, no-result, error, permission and not-found, and `StateGuard`, which mounts its children only when the state is `data` |
199
+ | `settings` | `SettingsSection`, a divided card of settings with an optional title, and `SettingsRow`, a row with title, description, an optional `startSlot` and the control in `endSlot`; values and controls belong to the consumer |
200
+ | `chats-panel` | `ChatsPanel`, a titled list of conversations for an inbox in a `plain`, `card` or `inset` shell, `ChatsPanelItem`, a row with avatar, unread count, channel mark (an `@thesvg/icons` icon, a peer dependency), time and preview, `ChatsPanelList`, its list, and `ChatsPanelSkeleton`, a loading list in the shape of the rows; sorting, filtering and selection belong to the consumer |
201
+ | `wizard` | `Wizard`, a multi-step flow in a card with the steps in a side nav (an `IconFrame` with the icon, a check or the number, title and description) and the current step in a panel, `WizardFooter`, its row of actions, and `WizardPrevious` and `WizardNext`, which move to the adjacent step and let the consumer cancel the move to validate; the step, its data and the submission belong to the consumer |
202
+ | `list` | `List`, a row with an `IconFrame` holding the icon, a title, an optional description clamped to two lines and an optional `actions` slot at the end, `outline` or `plain`; through `render` it is a static row with actions, a whole-row link or button, or the `label` of a `Radio` or `Checkbox` in a list of choices; texts, handlers and the group state belong to the consumer |
203
+
204
+ Filter Builder and responsive layouts are out of scope for the first version.
205
+
206
+ ## Updating
207
+
208
+ There is no package to update. To compare your installed files with the current version, run:
209
+
210
+ ```bash
211
+ npx @tc96/cli add collection --diff
212
+ ```
213
+
214
+ Then apply the changes you want by hand.