@protobase/cli 0.94.10 → 0.94.12

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.94.10";
2
+ var version = "0.94.12";
3
3
  //#endregion
4
4
  export { version };
@@ -1,6 +1,6 @@
1
1
  //#region ../mobile/package.json
2
2
  var name = "@protobase/mobile";
3
- var nativeContract = 10;
3
+ var nativeContract = 11;
4
4
  var dependencies = {
5
5
  "@capacitor/android": "8.5.3",
6
6
  "@capacitor/app": "8.1.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/cli",
3
- "version": "0.94.10",
3
+ "version": "0.94.12",
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.10",
47
- "@protobase/layout": "0.94.10",
48
- "@protobase/query": "0.94.10",
49
- "@protobase/schema": "0.94.10",
50
- "@protobase/server": "0.94.10",
51
- "@protobase/ui": "0.94.10",
52
- "@protobase/workflows": "0.94.10",
46
+ "@protobase/config": "0.94.12",
47
+ "@protobase/layout": "0.94.12",
48
+ "@protobase/query": "0.94.12",
49
+ "@protobase/schema": "0.94.12",
50
+ "@protobase/server": "0.94.12",
51
+ "@protobase/ui": "0.94.12",
52
+ "@protobase/workflows": "0.94.12",
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",
@@ -12,4 +12,9 @@ The app's colours, name, icon, language and installation.
12
12
  - [Named icons](../reference/layouts.md#named-actions): Actions, key facts and card meta show an icon picked by name from a set, such as `play`, `bed` or `cpu`.
13
13
  - [English and Dutch](../reference/languages.md): The built-in screens come in English and Dutch, with numbers and dates written to match.
14
14
  - [Installable app](../reference/installable-app.md): The admin installs as an app on phones and computers, and says when the server cannot be reached.
15
+
16
+ ## Accessibility
17
+
15
18
  - Reduced motion: When the system asks for less motion, animations and pulsing dots stop.
19
+ - [Text size](../reference/theme.md#text-size): All text grows with the reader's text size, in the browser and with the phone's text size in the iOS and Android app.
20
+ - Screen readers: Sidebar groups are headings to jump between, each list card reads as one link named by its title, filters read their values' labels, and each page has one main area with headings in order.
@@ -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.
@@ -121,6 +121,12 @@ What they color:
121
121
 
122
122
  The list is `packages/ui/src/tokens.css`, and a test fails when one of its tokens disappears.
123
123
 
124
+ ## Text size
125
+
126
+ The app's text follows the reader's text size: every size is in `rem`, so all of it grows with the root size. In a browser that is the browser's own text size; in the [iOS app](../guides/mobile-app.md) the phone's text size, Dynamic Type included, and in the Android app the phone's font size. The base size is 0.875rem, 14px at a browser's default. A plugin's text follows it too when its sizes are in `rem`, such as Tailwind's `text-xs`, rather than pixels.
127
+
128
+ <gap>The phone's top bar cannot fit its buttons at the largest accessibility text sizes, about three times the default, because its icons and buttons grow with the text and the bar neither wraps nor shrinks them.</gap>
129
+
124
130
  ## Logo and favicon
125
131
 
126
132
  The sidebar's logo is the project's own favicon, or without one the app's initial when it has a name of its own and Protobase's mark when it keeps Protobase's, beside the app's [name](app-identity.md#the-name), with the organization the user works in under it, and the icon alone when the sidebar shows only icons. An app that keeps Protobase's name and has no favicon of its own shows Protobase's wordmark beside the mark. A project draws something else with `shell.logo` in `protobase.ui.tsx`, a component drawn in its place ([Shell slots](custom-components.md#shell-slots)); it draws with these tokens like the rest of the app.
@@ -129,4 +135,4 @@ The browser tab shows a neutral mark. A project shows its own with a `protobase.
129
135
 
130
136
  ## In a plugin
131
137
 
132
- A plugin's utilities read the same tokens, with Tailwind's default as the fallback where an app sets none: `bg-primary` is `var(--primary)`, `rounded-md` is `var(--radius, 6px)` and `font-sans` is `var(--font, ...)`. So a plugin follows the theme of every app that loads it, without knowing it. Write classes such as `bg-primary`, `text-muted-foreground` and `border-border` rather than fixed colors, and the plugin looks at home in light and dark alike. Text takes the app's base size, 14px, without a class; `text-body` restates it where a parent sets another. Where a plugin needs a value of its own for dark, a `dark:` class such as `dark:bg-muted` follows the theme the user picked, not only their system's.
138
+ A plugin's utilities read the same tokens, with Tailwind's default as the fallback where an app sets none: `bg-primary` is `var(--primary)`, `rounded-md` is `var(--radius, 6px)` and `font-sans` is `var(--font, ...)`. So a plugin follows the theme of every app that loads it, without knowing it. Write classes such as `bg-primary`, `text-muted-foreground` and `border-border` rather than fixed colors, and the plugin looks at home in light and dark alike. Text takes the app's base size, 0.875rem, without a class; `text-body` restates it where a parent sets another. Where a plugin needs a value of its own for dark, a `dark:` class such as `dark:bg-muted` follows the theme the user picked, not only their system's.
@@ -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`.