@protobase/cli 0.55.2 → 0.55.3

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.
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.55.2";
2
+ var version = "0.55.3";
3
3
  //#endregion
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/cli",
3
- "version": "0.55.2",
3
+ "version": "0.55.3",
4
4
  "description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -42,12 +42,12 @@
42
42
  "dependencies": {
43
43
  "@better-auth/core": "^1.7.12",
44
44
  "@hono/node-server": "^2.1.3",
45
- "@protobase/config": "0.55.2",
46
- "@protobase/layout": "0.55.2",
47
- "@protobase/query": "0.55.2",
48
- "@protobase/schema": "0.55.2",
49
- "@protobase/server": "0.55.2",
50
- "@protobase/ui": "0.55.2",
45
+ "@protobase/config": "0.55.3",
46
+ "@protobase/layout": "0.55.3",
47
+ "@protobase/query": "0.55.3",
48
+ "@protobase/schema": "0.55.3",
49
+ "@protobase/server": "0.55.3",
50
+ "@protobase/ui": "0.55.3",
51
51
  "@react-email/render": "^2.1.0",
52
52
  "@scalar/hono-api-reference": "^0.12.10",
53
53
  "@tailwindcss/vite": "^4.3.3",
@@ -6,6 +6,7 @@ The sidebar, the user menu, the bottom bar on phones and the global search.
6
6
 
7
7
  - [Sidebar](../reference/sidebar.md): Resources and pages in groups, in the order you set.
8
8
  - [Recent records](../reference/sidebar.md#recent-records): A sidebar entry lists a few records under it, with status dots or as titles alone.
9
+ - [Create link](../reference/sidebar.md#create-link): A sidebar entry links to its create form, such as "New message" under Direct messages, for whoever may create.
9
10
  - [The current organization](../reference/sidebar.md#the-current-organization): A sidebar entry opens its list on the organization you work in, which you can clear to see every organization you are a member of.
10
11
  - [User menu](../reference/user-menu.md): Account pages, help links, security settings, the theme switch and Sign out.
11
12
  - [Bottom bar](../reference/bottom-bar.md): On phones, tabs along the bottom for each role's main screens.
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Sidebar
4
4
 
5
- How sidebar entries are grouped, and how an entry lists recent records, with status dots or without.
5
+ How sidebar entries are grouped, how an entry lists recent records, with status dots or without, and how it links to its create form.
6
6
 
7
7
  The admin's sidebar has one entry per resource view, grouped by `nav.group` (default: the database schema, with no group name for `public`) and sorted by `nav.order`, then by the order `config/index.ts` exports them, in `protobase dev` and in a built bundle alike. The app opens on the first entry. A view's [named lists](ui-config.md#more-than-one-list) are entries of their own, placed by their own `nav`. `nav({ hidden: true })` leaves a resource out, for line and link tables; a resource in the [user menu](user-menu.md) is left out too. [Composed pages](layouts.md#setup) have entries of their own, and groups that hold pages come first. A [remote resource](remote-resources.md) has its entry where its source's view places it; while its source cannot be reached, it sits under the source's label, marked "Cannot reach" with the source's name.
8
8
 
@@ -19,6 +19,24 @@ view<typeof apps>('apps')
19
19
 
20
20
  `/meta` writes the session's organization into the list's opening filter, here `isNull(parent_id) AND organization_id = "<id>"`, and into the filter of its [recent records](#recent-records). Like any opening filter it applies when the address names no filter: the facet shows the organization chosen, and the person picks others or clears it, which lists every organization they are a member of. A link with its own filter replaces it, and switching organization opens the app again on the new one. A [named list](ui-config.md#more-than-one-list) takes `tenant` in its own `nav`. `createAdmin` refuses to start when the view has no `.list(...)`, or the resource has no `.tenant()` on a `.filterable()` field.
21
21
 
22
+ ## Create link
23
+
24
+ `nav({ create: true })` puts a link to the resource's create form under its entry, reading "New <singular>" after the view's `names`; `create: { label }` gives it its own text. A chat's direct messages, with the conversations under the entry and a link to start one:
25
+
26
+ ```ts
27
+ export const directMessagesView = view<typeof directMessages>('direct_messages')
28
+ .names({ singular: 'Message', plural: 'Direct messages' })
29
+ .nav({ recent: { orderBy: 'updated_at desc', limit: 10 }, create: { label: 'New message' } })
30
+ ```
31
+
32
+ - It is a link to `/<resource>/new`, so open-in-new-tab and copy-link work; a view with a [create page](ui-config.md#create-pages) opens that page there.
33
+ - It shows only where the list offers New: to a caller `/meta` lets create the resource, or, for a view with a create page, a caller who gets that page.
34
+ - It stays in view when the entry's recent records are hidden, after them when they show.
35
+ - Only text sidebars (`text-large`, `text-small`, and the phone drawer) show it, as with recent records; icon sidebars keep a plain entry.
36
+ - A [named list](ui-config.md#more-than-one-list) takes `create` in its own `nav`, reading "New <singular>" after its own `names`.
37
+
38
+ `createAdmin` refuses an empty `label`.
39
+
22
40
  ## Recent records
23
41
 
24
42
  An entry can list a few of its records under it, each with a status dot, so the ones that need attention are one click away: