@object-ui/cli 3.0.3 → 4.0.7

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 ADDED
@@ -0,0 +1,316 @@
1
+ # @object-ui/cli
2
+
3
+ ## 4.0.7
4
+
5
+ ### Patch Changes
6
+
7
+ - fd15918: Comprehensive i18n refactor + CI test fix.
8
+
9
+ **i18n (`@object-ui/i18n`)**
10
+ - Added ~130 new keys under 12 new top-level namespaces: `layout`, `search`,
11
+ `empty`, `renderer`, `actionDialog`, `rowAction`, `navigationSync`,
12
+ `objectActions`, `objectViewActions`, `dashboardActions`, `recordDetail`,
13
+ `cellRender`, plus `grid.{empty,yes,no,systemFields,openMenu}`.
14
+ - Mirrored all new top-level namespaces to all 10 built-in locales
15
+ (en, zh, ja, ko, de, fr, es, pt, ru, ar) to maintain key parity required
16
+ by the locale-structure test. Non-en/zh locales seed with English values
17
+ and rely on `fallbackLng: 'en'` until human translation lands.
18
+
19
+ **App shell (`@object-ui/app-shell`)** — replaced hardcoded English in 14
20
+ files with `useObjectTranslation`:
21
+ - Layout: `AppSidebar`, `ActivityFeed` (locale-aware relative time),
22
+ `MetadataInspector`.
23
+ - Views: `SearchResultsPage`, `ActionParamDialog`, `RecordFormPage`,
24
+ `RecordDetailView`, `PageView`, `DashboardView` (PDF / forecast toasts),
25
+ `ReportView`, `ObjectView` (rename / delete view toasts).
26
+ - Console: `AppContent` (no-apps empty state).
27
+ - Components: `PageRenderer`, `FormRenderer`, `DashboardRenderer`.
28
+ - Hooks: `useNavigationSync` (16 toasts incl. Undo label),
29
+ `useObjectActions` (delete confirm + success / failure toasts).
30
+
31
+ **Plugin grid (`@object-ui/plugin-grid`)**
32
+ - `ObjectGrid` record-detail panel now translates Empty / Yes / No / System
33
+ via the existing `useGridTranslation` safe-fallback wrapper.
34
+ - `RowActionMenu` adopts a local safe-fallback i18n wrapper for
35
+ `Open menu` / `Edit` / `Delete`, preserving standalone-usage guarantees.
36
+
37
+ **CLI test fix (`@object-ui/cli`)**
38
+ - `cli-bin.test.ts` auto-builds the package on first run when `dist/cli.js`
39
+ is missing, instead of throwing. This unbreaks `pnpm test:coverage` in CI
40
+ (root vitest run does not honor turbo's `^build` deps) and removes the
41
+ manual `pnpm --filter @object-ui/cli build` requirement for local dev.
42
+
43
+ - Updated dependencies [7c9b85c]
44
+ - @object-ui/react@4.0.7
45
+ - @object-ui/components@4.0.7
46
+ - @object-ui/types@4.0.7
47
+
48
+ ## 4.0.6
49
+
50
+ ### Patch Changes
51
+
52
+ - 925051d: fix: convert Tailwind v3 `[--var]` arbitrary value syntax to v4 `(--var)`
53
+
54
+ Shadcn `Sidebar`, `Calendar`, `Chart`, `Popover`, `Tooltip`, `HoverCard`,
55
+ `Menubar`, `Select`, `Dropdown`, `Context-Menu`, and `AppSidebar` used the
56
+ Tailwind v3 syntax `w-[--sidebar-width]`, `origin-[--radix-...]`, etc.
57
+ Tailwind v4 no longer interprets the bare `--xxx` inside arbitrary values
58
+ as `var(--xxx)`, so the rule emits empty CSS — the sidebar collapses to
59
+ 0 width and overlays the main content, dropdown/popover positions fall
60
+ back to the wrong origin, and the calendar cells lose their fixed size.
61
+
62
+ Replaced all such occurrences with the v4 CSS-variable shorthand
63
+ `w-(--sidebar-width)`, `origin-(--radix-...)`, etc. Existing
64
+ `[calc(var(--xxx)*-1)]` arbitrary expressions are unaffected.
65
+
66
+ - Updated dependencies [925051d]
67
+ - Updated dependencies [1b6dc64]
68
+ - @object-ui/components@4.0.6
69
+ - @object-ui/types@4.0.6
70
+ - @object-ui/react@4.0.6
71
+
72
+ ## 4.0.5
73
+
74
+ ### Patch Changes
75
+
76
+ - Updated dependencies [1dc6061]
77
+ - @object-ui/components@4.0.5
78
+ - @object-ui/types@4.0.5
79
+ - @object-ui/react@4.0.5
80
+
81
+ ## 4.0.4
82
+
83
+ ### Patch Changes
84
+
85
+ - Updated dependencies [d2b6ece]
86
+ - @object-ui/components@4.0.4
87
+ - @object-ui/types@4.0.4
88
+ - @object-ui/react@4.0.4
89
+
90
+ ## 4.0.3
91
+
92
+ ### Patch Changes
93
+
94
+ - 4be43e2: **Page-mode record forms (`editMode: 'page'`).** New per-object metadata flag that opts a record's create/edit form into a dedicated full-screen route (`/apps/:appName/:objectName/new`, `/apps/:appName/:objectName/record/:recordId/edit`). Two new declarative actions `navigate_create` and `navigate_edit` open these routes from JSON action buttons. Default modal behavior is preserved for objects that do not set `editMode`.
95
+
96
+ **`@object-ui/plugin-list` & `@object-ui/plugin-detail`: `ComponentRegistry` singleton fix.** Both plugins' Vite configs now mark all `@object-ui/*` packages as external so each plugin no longer bundles its own private copy of `@object-ui/core`. Cross-plugin component lookups now resolve correctly from the same singleton registry. `plugin-list` dist shrank from multi-MB to 67 kB (gzip 16 kB); `plugin-detail` to 124 kB (gzip 28 kB).
97
+
98
+ **`@object-ui/app-shell` `CreateViewDialog` churn fix.** `existingSet` is now memoised on the joined string key of `existingLabels` rather than the raw array reference, preventing the name-suggest `useEffect` from re-firing on every parent render.
99
+
100
+ **CI fixes.** `ReportViewer` conditional-formatting test now accepts both `rgb(...)` and hex color representations. `ObjectView` i18n mocks rewritten to mirror the real hook shapes (`useObjectTranslation`, `useObjectLabel`).
101
+
102
+ - Updated dependencies [4be43e2]
103
+ - @object-ui/types@4.0.3
104
+ - @object-ui/react@4.0.3
105
+ - @object-ui/components@4.0.3
106
+
107
+ ## 4.0.1
108
+
109
+ ### Patch Changes
110
+
111
+ - @object-ui/types@4.0.1
112
+ - @object-ui/react@4.0.1
113
+ - @object-ui/components@4.0.1
114
+
115
+ ## 4.0.0
116
+
117
+ ### Patch Changes
118
+
119
+ - Updated dependencies
120
+ - @object-ui/types@4.0.0
121
+ - @object-ui/components@4.0.0
122
+ - @object-ui/react@4.0.0
123
+
124
+ ## 3.4.0
125
+
126
+ ### Patch Changes
127
+
128
+ - Updated dependencies [a2d7023]
129
+ - Updated dependencies [f1ca238]
130
+ - Updated dependencies [de881ef]
131
+ - @object-ui/components@3.4.0
132
+ - @object-ui/types@3.4.0
133
+ - @object-ui/react@3.4.0
134
+
135
+ ## 3.3.2
136
+
137
+ ### Patch Changes
138
+
139
+ - @object-ui/types@3.3.2
140
+ - @object-ui/react@3.3.2
141
+ - @object-ui/components@3.3.2
142
+
143
+ ## 3.3.1
144
+
145
+ ### Patch Changes
146
+
147
+ - Updated dependencies [b429568]
148
+ - @object-ui/components@3.3.1
149
+ - @object-ui/types@3.3.1
150
+ - @object-ui/react@3.3.1
151
+
152
+ ## 3.3.0
153
+
154
+ ### Patch Changes
155
+
156
+ - @object-ui/types@3.3.0
157
+ - @object-ui/react@3.3.0
158
+ - @object-ui/components@3.3.0
159
+
160
+ ## 3.2.0
161
+
162
+ ### Patch Changes
163
+
164
+ - @object-ui/types@3.2.0
165
+ - @object-ui/react@3.2.0
166
+ - @object-ui/components@3.2.0
167
+
168
+ ## 3.1.5
169
+
170
+ ### Patch Changes
171
+
172
+ - @object-ui/react@3.1.5
173
+ - @object-ui/components@3.1.5
174
+ - @object-ui/types@3.1.5
175
+
176
+ ## 3.1.4
177
+
178
+ ### Patch Changes
179
+
180
+ - @object-ui/types@3.1.4
181
+ - @object-ui/react@3.1.4
182
+ - @object-ui/components@3.1.4
183
+
184
+ ## 3.1.3
185
+
186
+ ### Patch Changes
187
+
188
+ - @object-ui/types@3.1.3
189
+ - @object-ui/react@3.1.3
190
+ - @object-ui/components@3.1.3
191
+
192
+ ## 3.1.2
193
+
194
+ ### Patch Changes
195
+
196
+ - @object-ui/types@3.1.2
197
+ - @object-ui/react@3.1.2
198
+ - @object-ui/components@3.1.2
199
+
200
+ ## 3.1.1
201
+
202
+ ### Patch Changes
203
+
204
+ - Updated dependencies
205
+ - @object-ui/types@3.1.1
206
+ - @object-ui/components@3.1.1
207
+ - @object-ui/react@3.1.1
208
+
209
+ ## 3.0.3
210
+
211
+ ### Patch Changes
212
+
213
+ - @object-ui/types@3.0.3
214
+ - @object-ui/react@3.0.3
215
+ - @object-ui/components@3.0.3
216
+
217
+ ## 3.0.2
218
+
219
+ ### Patch Changes
220
+
221
+ - @object-ui/types@3.0.2
222
+ - @object-ui/react@3.0.2
223
+ - @object-ui/components@3.0.2
224
+
225
+ ## 3.0.1
226
+
227
+ ### Patch Changes
228
+
229
+ - Updated dependencies [adf2cc0]
230
+ - @object-ui/react@3.0.1
231
+ - @object-ui/components@3.0.1
232
+ - @object-ui/types@3.0.1
233
+
234
+ ## 3.0.0
235
+
236
+ ### Minor Changes
237
+
238
+ - 87979c3: Upgrade to @objectstack v3.0.0 and console bundle optimization
239
+ - Upgraded all @objectstack/\* packages from ^2.0.7 to ^3.0.0
240
+ - Breaking change migrations: Hub → Cloud namespace, definePlugin removed, PaginatedResult.value → .records, PaginatedResult.count → .total, client.meta.getObject() → client.meta.getItem()
241
+ - Console bundle optimization: split monolithic 3.7 MB chunk into 17 granular cacheable chunks (95% main entry reduction)
242
+ - Added gzip + brotli pre-compression via vite-plugin-compression2
243
+ - Lazy MSW loading for build:server (~150 KB gzip saved)
244
+ - Added bundle analysis with rollup-plugin-visualizer
245
+
246
+ ### Patch Changes
247
+
248
+ - Updated dependencies [87979c3]
249
+ - @object-ui/types@3.0.0
250
+ - @object-ui/react@3.0.0
251
+ - @object-ui/components@3.0.0
252
+
253
+ ## 2.0.0
254
+
255
+ ### Major Changes
256
+
257
+ - b859617: Release v1.0.0 — unify all package versions to 1.0.0
258
+
259
+ ### Patch Changes
260
+
261
+ - Updated dependencies [b859617]
262
+ - @object-ui/types@2.0.0
263
+ - @object-ui/react@2.0.0
264
+ - @object-ui/components@2.0.0
265
+
266
+ ## 0.3.1
267
+
268
+ ### Patch Changes
269
+
270
+ - Maintenance release - Documentation and build improvements
271
+ - Updated dependencies
272
+ - @object-ui/react@0.3.1
273
+ - @object-ui/components@0.3.1
274
+
275
+ ## 0.3.0
276
+
277
+ ### Minor Changes
278
+
279
+ - Unified version across all packages to 0.3.0 for consistent versioning
280
+
281
+ ## 0.2.2
282
+
283
+ ### Patch Changes
284
+
285
+ - New plugin-object and ObjectQL SDK updates
286
+
287
+ **Added:**
288
+ - New Plugin: @object-ui/plugin-object - ObjectQL plugin for automatic table and form generation
289
+ - ObjectTable: Auto-generates tables from ObjectQL object schemas
290
+ - ObjectForm: Auto-generates forms from ObjectQL object schemas with create/edit/view modes
291
+ - Full TypeScript support with comprehensive type definitions
292
+ - Type Definitions: Added ObjectTableSchema and ObjectFormSchema to @object-ui/types
293
+ - ObjectQL Integration: Enhanced ObjectQLDataSource with getObjectSchema() method using MetadataApiClient
294
+
295
+ **Changed:**
296
+ - Updated @objectql/sdk from ^1.8.3 to ^1.9.1
297
+ - Updated @objectql/types from ^1.8.3 to ^1.9.1
298
+
299
+ - Updated dependencies
300
+ - @object-ui/react@0.2.2
301
+ - @object-ui/components@0.2.2
302
+
303
+ ## 0.2.1
304
+
305
+ ### Patch Changes
306
+
307
+ - Patch release: Add automated changeset workflow and CI/CD improvements
308
+
309
+ This release includes infrastructure improvements:
310
+ - Added changeset-based version management
311
+ - Enhanced CI/CD workflows with GitHub Actions
312
+ - Improved documentation for contributing and releasing
313
+
314
+ - Updated dependencies
315
+ - @object-ui/react@0.2.1
316
+ - @object-ui/components@0.2.1
package/README.md CHANGED
@@ -1,18 +1,23 @@
1
- # Object UI CLI
1
+ # @object-ui/cli
2
2
 
3
- CLI tool for Object UI - Build applications from JSON schemas.
4
-
5
- ## Installation
3
+ > Standalone CLI for **Object UI** scaffold, develop, build, lint, test and validate
4
+ > JSON/YAML schema-driven applications.
6
5
 
7
6
  ```bash
8
7
  npm install -g @object-ui/cli
8
+ # or one-shot:
9
+ npx @object-ui/cli dev app.json
9
10
  ```
10
11
 
11
- Or use with npx:
12
+ ## Why standalone?
12
13
 
13
- ```bash
14
- npx @object-ui/cli serve app.json
15
- ```
14
+ ObjectUI is a **protocol-agnostic** rendering engine (Rule #1). Its CLI is a
15
+ self-contained frontend toolchain — like `vite`, `next`, or `astro` — and is
16
+ **not** distributed as a plugin of any meta-CLI.
17
+
18
+ If you want to aggregate it under another host CLI (e.g. an `os` umbrella),
19
+ write a thin wrapper in that host's repo that shells out to `objectui`. Don't
20
+ re-shape this package to its conventions.
16
21
 
17
22
  ## Commands
18
23
 
@@ -26,17 +31,12 @@ objectui init my-app --template form
26
31
  objectui init . --template dashboard
27
32
  ```
28
33
 
29
- **Options:**
30
- - `-t, --template <template>` - Template to use: `simple`, `form`, or `dashboard` (default: `dashboard`)
31
-
32
- **Templates:**
33
- - **simple**: A minimal getting started template
34
- - **form**: A contact form with validation
35
- - **dashboard**: A full dashboard with metrics and charts
34
+ **Options**
35
+ - `-t, --template <template>` `simple`, `form`, or `dashboard` (default: `dashboard`)
36
36
 
37
37
  ### `objectui dev [schema]`
38
38
 
39
- Start a development server with hot reload. Opens browser automatically.
39
+ Start a development server with hot reload. Opens the browser automatically.
40
40
 
41
41
  ```bash
42
42
  objectui dev app.json
@@ -44,17 +44,14 @@ objectui dev my-schema.json --port 8080
44
44
  objectui dev --no-open
45
45
  ```
46
46
 
47
- **Arguments:**
48
- - `[schema]` - Path to JSON/YAML schema file (default: `app.json`)
49
-
50
- **Options:**
51
- - `-p, --port <port>` - Port to run the server on (default: `3000`)
52
- - `-h, --host <host>` - Host to bind the server to (default: `localhost`)
53
- - `--no-open` - Do not open browser automatically
47
+ **Options**
48
+ - `-p, --port <port>` default `3000`
49
+ - `-h, --host <host>` — default `localhost`
50
+ - `--no-open` — do not open browser
54
51
 
55
52
  ### `objectui build [schema]`
56
53
 
57
- Build your application for production deployment.
54
+ Build the application for production.
58
55
 
59
56
  ```bash
60
57
  objectui build app.json
@@ -62,12 +59,9 @@ objectui build --out-dir build
62
59
  objectui build --clean
63
60
  ```
64
61
 
65
- **Arguments:**
66
- - `[schema]` - Path to JSON/YAML schema file (default: `app.json`)
67
-
68
- **Options:**
69
- - `-o, --out-dir <dir>` - Output directory (default: `dist`)
70
- - `--clean` - Clean output directory before build
62
+ **Options**
63
+ - `-o, --out-dir <dir>` default `dist`
64
+ - `--clean` — clean output directory before build
71
65
 
72
66
  ### `objectui start`
73
67
 
@@ -75,121 +69,84 @@ Serve the production build locally.
75
69
 
76
70
  ```bash
77
71
  objectui start
78
- objectui start --port 8080
79
- objectui start --dir build
72
+ objectui start --port 8080 --dir build
80
73
  ```
81
74
 
82
- **Options:**
83
- - `-p, --port <port>` - Port to run the server on (default: `3000`)
84
- - `-h, --host <host>` - Host to bind the server to (default: `0.0.0.0`)
85
- - `-d, --dir <dir>` - Directory to serve (default: `dist`)
75
+ **Options**
76
+ - `-p, --port <port>` default `3000`
77
+ - `-h, --host <host>` default `0.0.0.0`
78
+ - `-d, --dir <dir>` default `dist`
86
79
 
87
80
  ### `objectui serve [schema]`
88
81
 
89
- Start a development server (legacy command, use `dev` instead).
90
-
91
- ```bash
92
- objectui serve app.json
93
- objectui serve my-schema.json --port 8080
94
- ```
95
-
96
- **Arguments:**
97
- - `[schema]` - Path to JSON schema file (default: `app.json`)
98
-
99
- **Options:**
100
- - `-p, --port <port>` - Port to run the server on (default: `3000`)
101
- - `-h, --host <host>` - Host to bind the server to (default: `localhost`)
82
+ Legacy alias of `dev` (kept for older scripts).
102
83
 
103
84
  ### `objectui lint`
104
85
 
105
- Lint the generated application code using ESLint.
86
+ Lint the generated application code via ESLint.
106
87
 
107
88
  ```bash
108
- objectui lint
109
89
  objectui lint --fix
110
90
  ```
111
91
 
112
- **Options:**
113
- - `--fix` - Automatically fix linting issues
114
-
115
- **Note:** Run `objectui dev` first to generate the application before linting.
116
-
117
92
  ### `objectui test`
118
93
 
119
- Run tests for the application using Vitest.
94
+ Run the application's tests via Vitest.
120
95
 
121
96
  ```bash
122
- objectui test
123
97
  objectui test --watch
124
98
  objectui test --coverage
125
99
  objectui test --ui
126
100
  ```
127
101
 
128
- **Options:**
129
- - `-w, --watch` - Run tests in watch mode
130
- - `-c, --coverage` - Generate test coverage report
131
- - `--ui` - Run tests with Vitest UI
132
-
133
- **Note:** Run `objectui dev` first to generate the application before testing.
134
-
135
- ## Quick Start
136
-
137
- 1. Create a new application:
138
- ```bash
139
- objectui init my-dashboard --template dashboard
140
- cd my-dashboard
141
- ```
142
-
143
- 2. Start the development server:
144
- ```bash
145
- objectui dev app.json
146
- ```
147
-
148
- 3. Lint your code (optional):
149
- ```bash
150
- objectui lint
151
- ```
152
-
153
- 4. Run tests (optional):
154
- ```bash
155
- objectui test
156
- ```
157
-
158
- 5. Build for production:
159
- ```bash
160
- objectui build app.json
161
- ```
162
-
163
- 6. Serve the production build:
164
- ```bash
165
- objectui start
166
- ```
167
-
168
- Your app will be running at http://localhost:3000!
169
-
170
- ## Example Schema
171
-
172
- ```json
173
- {
174
- "type": "div",
175
- "className": "min-h-screen flex items-center justify-center",
176
- "body": {
177
- "type": "card",
178
- "title": "Hello World",
179
- "body": {
180
- "type": "text",
181
- "content": "Welcome to Object UI!"
182
- }
183
- }
184
- }
102
+ ### `objectui generate <type> <name>` (alias `g`)
103
+
104
+ Generate new resources (`resource`/`object`, `page`, `plugin`).
105
+
106
+ ### `objectui add <component>`
107
+
108
+ Add a new component renderer to your project.
109
+
110
+ ### `objectui validate [schema]`
111
+
112
+ Validate a schema file against the ObjectUI specification.
113
+
114
+ ### `objectui check`, `objectui doctor`, `objectui studio`, `objectui analyze`, `objectui create plugin <name>`
115
+
116
+ Utility commands — see `objectui --help`.
117
+
118
+ ## Quick start
119
+
120
+ ```bash
121
+ objectui init my-dashboard --template dashboard
122
+ cd my-dashboard
123
+ objectui dev app.json
185
124
  ```
186
125
 
187
- ## Learn More
126
+ ## Programmatic API
127
+
128
+ ```ts
129
+ import { serve, init } from '@object-ui/cli';
130
+
131
+ await serve('app.json', { port: '3000', host: 'localhost' });
132
+ await init('my-app', { template: 'dashboard' });
133
+ ```
134
+
135
+ ## Compatibility
136
+
137
+ - **Node.js** ≥ 18
138
+ - **TypeScript** ≥ 5.0 (strict mode)
139
+ - **`@objectstack/spec`** ^3.3.0
140
+ - **`@objectstack/client`** ^3.3.0
141
+ - **Tailwind CSS** ≥ 3.4
142
+
143
+ ## Links
188
144
 
189
- - [Object UI Documentation](https://www.objectui.org)
190
- - [Schema Reference](https://www.objectui.org/docs/protocol/overview)
191
- - [Component Library](https://www.objectui.org/docs/api/components)
145
+ - 📚 [Documentation](https://www.objectui.org/docs/utilities/cli)
146
+ - 📦 [npm package](https://www.npmjs.com/package/@object-ui/cli)
147
+ - 📝 [Changelog](./CHANGELOG.md)
148
+ - 🐛 [Report an issue](https://github.com/objectstack-ai/objectui/issues)
192
149
 
193
150
  ## License
194
151
 
195
- MIT
152
+ MIT — see [LICENSE](./LICENSE).
@@ -548,7 +548,7 @@ export function ModeToggle() {
548
548
  <LucideIcons.ChevronsUpDown className="ml-auto size-4" />
549
549
  </SidebarMenuButton>
550
550
  </DropdownMenuTrigger>
551
- <DropdownMenuContent className="w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg" side="bottom" align="end" sideOffset={4}>
551
+ <DropdownMenuContent className="w-(--radix-dropdown-menu-trigger-width) min-w-56 rounded-lg" side="bottom" align="end" sideOffset={4}>
552
552
  <DropdownMenuItem onClick={() => setTheme("light")}>
553
553
  <LucideIcons.Sun className="mr-2 size-4" />
554
554
  Light
@@ -1534,4 +1534,4 @@ export {
1534
1534
  serve,
1535
1535
  init
1536
1536
  };
1537
- //# sourceMappingURL=chunk-LWXDPPSW.js.map
1537
+ //# sourceMappingURL=chunk-RQRLHH6V.js.map