@protobase/cli 0.55.1 → 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.
- package/dist/cli/package.js +1 -1
- package/package.json +7 -7
- package/skills/protobase/references/features/navigation.md +1 -0
- package/skills/protobase/references/features/record-pages.md +1 -1
- package/skills/protobase/references/reference/sidebar.md +19 -1
- package/skills/protobase/references/reference/ui-config.md +2 -2
package/dist/cli/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.55.
|
|
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.
|
|
46
|
-
"@protobase/layout": "0.55.
|
|
47
|
-
"@protobase/query": "0.55.
|
|
48
|
-
"@protobase/schema": "0.55.
|
|
49
|
-
"@protobase/server": "0.55.
|
|
50
|
-
"@protobase/ui": "0.55.
|
|
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.
|
|
@@ -8,7 +8,7 @@ The page of one record, with its sections, related records, galleries, charts an
|
|
|
8
8
|
- [Read view and edit](../reference/ui-config.md#read-view-and-edit): A record opens as a read-only fact sheet or a form, and Edit opens the form at its own address.
|
|
9
9
|
- [Unsaved edits](../reference/ui-config.md#editing-a-record): Unsaved changes to a record stay in the browser and can be resumed, and leaving a form, a dialog or a comment with changes asks first.
|
|
10
10
|
- [Record forms](../reference/ui-config.md#editing-a-record): Relations are picked from a list that narrows as you type, numbers are read as the browser's language writes them, and a refused save says under each field what is wrong.
|
|
11
|
-
- [Titles per reader](../reference/ui-config.md#titles-per-reader): A record without a name of its own, such as a direct message, is titled for each reader from its fields, such as after the other members, in the sidebar, breadcrumbs, heading, browser tab, relation links and search.
|
|
11
|
+
- [Titles per reader](../reference/ui-config.md#titles-per-reader): A record without a name of its own, such as a direct message, is titled for each reader from its fields, such as after the other members, in the sidebar, breadcrumbs, heading, browser tab, relation links, list columns, relation pickers, filters and search.
|
|
12
12
|
- [Member fields](../reference/plugins.md#members): A field that holds a list of people, such as a private channel's members, picks the organization's members by name on forms and shows them by avatar and name.
|
|
13
13
|
- [Save feedback](../reference/ui-config.md#the-record-page): A view shows saving on the Save button instead of in a toast.
|
|
14
14
|
- [Save conflicts](../reference/ui-config.md#editing-a-record): When someone else changed a record while you edited it, Save shows their value beside yours for each field you both changed, and you keep yours or take theirs.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Sidebar
|
|
4
4
|
|
|
5
|
-
How sidebar entries are grouped,
|
|
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:
|
|
@@ -81,9 +81,9 @@ export default defineUi({
|
|
|
81
81
|
})
|
|
82
82
|
```
|
|
83
83
|
|
|
84
|
-
The derived title names the record wherever `.title` would: the sidebar's [recent records](sidebar.md#recent-records), whose list request reads the picked fields too, the breadcrumb, the record page's heading, the browser tab, the links of a record page's relation fields, related cards
|
|
84
|
+
The derived title names the record wherever `.title` would: the sidebar's [recent records](sidebar.md#recent-records), whose list request reads the picked fields too, the breadcrumb, the record page's heading, the browser tab, the links of a record page's relation fields, related cards, the global search, unless the view's `.searchResult` gives a title, and every relation that points at such a record: a list's relation column and a card's relation field, which read the picked fields of a page's records in one request, the relation picker's options and a relation filter's values. The picker's typed text still matches the resource's search fields, or, without any, the derived titles of the records it loads. The record's key shows while the function returns nothing, such as while the members' names load, and when the reader cannot read a field it picks, or the UI config registers no function of that name. It is presentation only: no field, filter or sort reads it, and the search does not match it. Other members' names come only with organizations; without them, `member` finds no one.
|
|
85
85
|
|
|
86
|
-
<gap>
|
|
86
|
+
<gap>An export of shown values and a chart grouped by a relation cannot name a record by its derived title because titling them per reader is not implemented.</gap>
|
|
87
87
|
|
|
88
88
|
A click on a row of a list's table opens its record. Its title cell, the `.title` column or else the first, is a link to the record, so Cmd- or Ctrl-click, a middle click and the browser's link menu open it in a new tab or copy its address; embedded lists and the table of a list sorted by hand do the same.
|
|
89
89
|
|