@protobase/cli 0.94.10 → 0.94.11
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
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.94.
|
|
3
|
+
"version": "0.94.11",
|
|
4
4
|
"description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@better-auth/core": "^1.7.12",
|
|
45
45
|
"@hono/node-server": "^2.1.3",
|
|
46
|
-
"@protobase/config": "0.94.
|
|
47
|
-
"@protobase/layout": "0.94.
|
|
48
|
-
"@protobase/query": "0.94.
|
|
49
|
-
"@protobase/schema": "0.94.
|
|
50
|
-
"@protobase/server": "0.94.
|
|
51
|
-
"@protobase/ui": "0.94.
|
|
52
|
-
"@protobase/workflows": "0.94.
|
|
46
|
+
"@protobase/config": "0.94.11",
|
|
47
|
+
"@protobase/layout": "0.94.11",
|
|
48
|
+
"@protobase/query": "0.94.11",
|
|
49
|
+
"@protobase/schema": "0.94.11",
|
|
50
|
+
"@protobase/server": "0.94.11",
|
|
51
|
+
"@protobase/ui": "0.94.11",
|
|
52
|
+
"@protobase/workflows": "0.94.11",
|
|
53
53
|
"@react-email/render": "^2.1.0",
|
|
54
54
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
55
55
|
"@sentry/vite-plugin": "^11.10.0",
|
|
@@ -19,6 +19,7 @@ The page of one record, with its sections, related records, galleries, charts an
|
|
|
19
19
|
- [Save feedback](../reference/ui-config.md#the-record-page): A view shows saving on the Save button instead of in a toast.
|
|
20
20
|
- [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.
|
|
21
21
|
- [Groups and tabs](../reference/ui-config.md#groups): Parts of a record page sit under headings that open on click, or in tabs, and the open ones are kept in the address.
|
|
22
|
+
- [Read-only values and a title badge](../reference/ui-config.md#read-only-values-and-a-title-badge) (experimental): Read-only fields show as values, and one field can show as a badge beside the title.
|
|
22
23
|
- [Key facts](../reference/ui-config.md#key-facts): A section shows its values side by side with icons.
|
|
23
24
|
- [Confirming a change](../reference/ui-config.md#confirming-a-change): A field that is easy to set by mistake asks a question before a person changes it in a form or a list cell, and Cancel keeps its value.
|
|
24
25
|
- [Fields only once a record exists](../reference/ui-config.md#names-and-columns): A view leaves a field off the create form, such as a choice among records added after it, and the record page shows it as usual.
|
|
@@ -670,7 +670,7 @@ export const repairsView = filtered
|
|
|
670
670
|
|
|
671
671
|
A custom component draws only its part: the page around it stays the record page, at `/<resource>/<key>`, with its breadcrumbs, Save, the action rail with Edit and Delete, and the related records, and a layout may hold only custom components. The repairs above list the customer's earlier repairs under the bike:
|
|
672
672
|
|
|
673
|
-
Without a layout the record page shows one section with every field the user may change; its [read view](#read-view-and-edit), which is what a user who may change none gets, shows every field. A section or sidebar card with no field the user may see is left out. On a wide screen the sidebar cards stay in view beside the main column as the page scrolls, below the top bar. The record's title is the page's heading, above the sections, with an enum `status` as a badge beside it unless the sidebar shows it already. `.saveFeedback('button')` shows saving on the Save button instead of a toast (`'toast'`, the default). A [sensitive field](data-config.md#sensitive-fields) in a section is masked, with an eye button that reveals it. A [write-only field](access.md#write-only-fields) is on the form only where a section names it, never in the section without a layout, and shows as an empty input to set a new value in.
|
|
673
|
+
Without a layout the record page shows one section with every field the user may change; its [read view](#read-view-and-edit), which is what a user who may change none gets, shows every field. A section or sidebar card with no field the user may see is left out. On a wide screen the sidebar cards stay in view beside the main column as the page scrolls, below the top bar. The record's title is the page's heading, above the sections, with an enum `status` as a badge beside it unless the sidebar shows it already, or the field [`.titleBadge(...)`](#read-only-values-and-a-title-badge) names. `.saveFeedback('button')` shows saving on the Save button instead of a toast (`'toast'`, the default). A [sensitive field](data-config.md#sensitive-fields) in a section is masked, with an eye button that reveals it. A [write-only field](access.md#write-only-fields) is on the form only where a section names it, never in the section without a layout, and shows as an empty input to set a new value in.
|
|
674
674
|
|
|
675
675
|
A record opened from a list, by its row or its card, shows the fields the list loaded at once, with placeholders for the others, and takes input once the whole record has loaded; actions, custom components, maps and galleries wait for it. What the page shows is read again whenever the browser tab or window regains focus, as are the lists, unless the record has unsaved changes, which keep the version they were made to.
|
|
676
676
|
|
|
@@ -682,6 +682,24 @@ The record page sits in a centred column about 1100px wide. `.recordWidth('full'
|
|
|
682
682
|
view<typeof objectives>('objectives').recordWidth('full')
|
|
683
683
|
```
|
|
684
684
|
|
|
685
|
+
### Read-only values and a title badge
|
|
686
|
+
|
|
687
|
+
:::caution[Experimental]
|
|
688
|
+
How read-only values and the title badge look may change in any release.
|
|
689
|
+
:::
|
|
690
|
+
|
|
691
|
+
On the form, a field nobody may change there, such as a `.readOnly()` field or one the user may only read, shows as its value rather than a greyed input, as the read view shows it: at full text contrast, an enum or a field with `.format('badge')` as a badge in the view's `valueLabels` and `valueColors`, a timestamp with `.format('relative')` as "3 hours ago" with the exact time on hover, and a missing value as a dash that screen readers read as "No value". Its label is text rather than a form label, since there is no control for it to name.
|
|
692
|
+
|
|
693
|
+
<gap>A relative time on an open record page cannot count up by itself because refreshing it on a timer is not implemented; it updates when the record loads again, such as when the tab regains focus.</gap>
|
|
694
|
+
|
|
695
|
+
`.titleBadge(...)` shows one field as a badge beside the record's title, in its `valueLabels` and `valueColors`, such as an objective's verdict, in place of the enum `status` the page shows there otherwise. It shows even when the sidebar lists the field, changes as the record does, and is left out while the field has no value or for a reader who cannot read it. `.titleBadge(...)` throws when the field does not exist, or is neither an enum nor shown with `.format('badge')`, so a long text never fills the header.
|
|
696
|
+
|
|
697
|
+
```ts
|
|
698
|
+
view<typeof objectives>('objectives')
|
|
699
|
+
.fields((r) => ({ verdict: r.verdict.label('Verdict').valueColors({ moving: 'green', stuck: 'red' }) }))
|
|
700
|
+
.titleBadge((r) => r.verdict)
|
|
701
|
+
```
|
|
702
|
+
|
|
685
703
|
### A record page that opens another
|
|
686
704
|
|
|
687
705
|
`.recordOpens(to)` sends a record's page to another address in its place, its `{field}`s, in the resource, the key and `run`, filled from the record, replacing the record's address in the history so Back skips it: a workflow run's page opens its workflow's page with the run on the graph. A caller who cannot follow it, such as one who may not read the resource it names or open the page it names, gets the record's own page. The record's own page stays at its address with `?standard=true`.
|