@protobase/cli 0.118.1 → 0.119.1
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 +8 -8
- package/skills/protobase/references/features/record-pages.md +1 -0
- package/skills/protobase/references/features/sign-in-and-accounts.md +1 -1
- package/skills/protobase/references/reference/auth.md +2 -2
- package/skills/protobase/references/reference/custom-components.md +1 -1
- package/skills/protobase/references/reference/ui-config.md +22 -1
package/dist/cli/package.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.119.1",
|
|
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.
|
|
47
|
-
"@protobase/layout": "0.
|
|
48
|
-
"@protobase/query": "0.
|
|
49
|
-
"@protobase/schema": "0.
|
|
50
|
-
"@protobase/server": "0.
|
|
51
|
-
"@protobase/ui": "0.
|
|
52
|
-
"@protobase/workflows": "0.
|
|
46
|
+
"@protobase/config": "0.119.1",
|
|
47
|
+
"@protobase/layout": "0.119.1",
|
|
48
|
+
"@protobase/query": "0.119.1",
|
|
49
|
+
"@protobase/schema": "0.119.1",
|
|
50
|
+
"@protobase/server": "0.119.1",
|
|
51
|
+
"@protobase/ui": "0.119.1",
|
|
52
|
+
"@protobase/workflows": "0.119.1",
|
|
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",
|
|
@@ -9,6 +9,7 @@ The page of one record, with its sections, related records, galleries, charts an
|
|
|
9
9
|
- [Focus pages](../reference/ui-config.md#focus-pages) (beta): A record whose page is one big surface, such as a graph or a board, fills the page under a thin bar with its Save, actions and panels, its form a link away.
|
|
10
10
|
- [A create address that opens a page](../reference/ui-config.md#focus-pages) (beta): `.createOpens(to)` sends a resource's create address to a page in place of its form, such as a record's focus page with a panel open, filled from the address's values.
|
|
11
11
|
- [Record pages that open another](../reference/ui-config.md#a-record-page-that-opens-another): A record's page opens another address built from its fields in its place, such as a workflow run opening its workflow's page with the run shown.
|
|
12
|
+
- [Record page opens elsewhere](../reference/ui-config.md#open-elsewhere) (beta): A view can send its record's address to another page its fields name, such as a message opening in its conversation, so search results and links land where the record is read.
|
|
12
13
|
- [Full-area record pages](../reference/ui-config.md#full-area-record-pages) (beta): A view draws its record pages with a component of its own that fills the area beside the sidebar and under the top bar, such as a chat channel, and links to the standard page.
|
|
13
14
|
- [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.
|
|
14
15
|
- [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.
|
|
@@ -38,7 +38,7 @@ Sign-in methods, users, roles, organizations and tokens.
|
|
|
38
38
|
- [Staff sign-in](../reference/auth.md#staff-sign-in): The team that runs an app signs in as a person to help them, with a reason and a log entry.
|
|
39
39
|
- [Roles](../reference/auth.md#roles): A user holds one or more roles and switches between them without signing in again.
|
|
40
40
|
- [Organizations](../reference/auth.md#organizations): People work in one organization at a time, see only its records, and are invited with their own roles.
|
|
41
|
-
- [First organization](../reference/auth.md#first-organization-and-start-address) (beta): People outside any organization name their first one in one step, or join one they are invited to, and land on the start address your app sets.
|
|
41
|
+
- [First organization](../reference/auth.md#first-organization-and-start-address) (beta): People outside any organization name their first one, called by your app's word such as workspace, in one step, or join one they are invited to, and land on the start address your app sets. The screen says what it is doing while it creates or joins, and lets them try again after a network failure.
|
|
42
42
|
- [Status](../reference/status.md) (beta): People set themselves busy or do not disturb, with a text of their own such as "Having lunch" and a time it clears, from the user menu; the people they share an organization with see it beside their name, with your app's online or away mark on the members page and in the sidebar.
|
|
43
43
|
- [API tokens](../reference/auth.md#tokens-and-roles): A signed-in session gets short-lived tokens for the API.
|
|
44
44
|
- [Immediate revocation](../reference/auth.md#when-a-token-stops-working): A ban, removed role or ended session takes effect on the next request.
|
|
@@ -259,7 +259,7 @@ export default { send: async ({ to, subject, text }) => { /* deliver it */ retur
|
|
|
259
259
|
|
|
260
260
|
## Name, password and devices
|
|
261
261
|
|
|
262
|
-
The signed-in person changes their own name and password, and signs out their other devices, with Better Auth's own endpoints. The client has them in `session.account`, each rejecting with `AuthError
|
|
262
|
+
The signed-in person changes their own name and password, and signs out their other devices, with Better Auth's own endpoints. The client has them in `session.account`, each rejecting with `AuthError`, or with `NetworkError` when the server cannot be reached:
|
|
263
263
|
|
|
264
264
|
| Client | Endpoint |
|
|
265
265
|
| --- | --- |
|
|
@@ -761,7 +761,7 @@ The app's own pages are under the profile menu: the switcher, "Manage organizati
|
|
|
761
761
|
The start address is the same for everyone in an app; it does not yet remember where each person was last.
|
|
762
762
|
:::
|
|
763
763
|
|
|
764
|
-
Someone signed in who works in no organization, such as the first person in a new app, sees one screen before anything else, whatever address they opened: at `/-/first-organization`, with the app's mark and no sidebar entries, they name their first organization in one field and press Create. With invitations waiting for their address, the screen lists those first, each with Join, and "Create a new organization instead" leads to the form at `/-/first-organization/new`. Someone who may not create one (`create: 'admins'`) and has no invitation is told to ask for one. The screen names who is signed in, with Sign out, and for someone with a global role links to every organization. Creating or joining opens the app at its start address. Until they work in one, the shell shows none of the app's resources, on the account pages and the organizations page too.
|
|
764
|
+
Someone signed in who works in no organization, such as the first person in a new app, sees one screen before anything else, whatever address they opened: at `/-/first-organization`, with the app's mark and no sidebar entries, they name their first organization in one field and press Create. With invitations waiting for their address, the screen lists those first, each with Join, and "Create a new organization instead" leads to the form at `/-/first-organization/new`. Someone who may not create one (`create: 'admins'`) and has no invitation is told to ask for one. The screen names who is signed in, with Sign out, and for someone with a global role links to every organization. While it creates or joins, the button says so, such as "Creating workspace…" or "Joining Acme…"; when the server cannot be reached, the screen says so and the button works again. <gap>A request the server takes but never answers keeps the button busy until the browser gives up because a time limit on sign-in and organization calls is not implemented.</gap> Creating or joining opens the app at its start address. Until they work in one, the shell shows none of the app's resources, on the account pages and the organizations page too.
|
|
765
765
|
|
|
766
766
|
The word the screens use for an organization is yours: `names` takes it as a view's names are written, and `createDescription` adds a line under the screen's title. The built-in texts around the word come in English and Dutch, on this screen, the organization pages and the profile menu:
|
|
767
767
|
|
|
@@ -360,7 +360,7 @@ A component that asks for input looks like the app's own forms when it is built
|
|
|
360
360
|
| `Choices` | One of a few options, each a card in a row of its own with a `description`: `name`, `label`, `options`, `value`, `onChange`. A `disabled` option shows and cannot be chosen. |
|
|
361
361
|
| `RecordPicker` | Records of another resource, picked as the create form picks a relation: type to narrow them by their search fields or title, scroll for more, or use the keyboard. `resource` names the resource, whose model it reads from the app; `value` is the chosen record's key as text and `onChange` gets the new one. With `multiple`, `value` and `onChange` hold several keys, such as the objectives a task serves through a join resource: each shows as a token that can be taken off. |
|
|
362
362
|
| `Segmented`, `MenuSelect` | A switch between a few short options in a row (`size`, `iconOnly`), and the same options in a menu. |
|
|
363
|
-
| `Button`, `buttonClass` | A button (`variant` `primary`, `secondary`, `ghost` or `danger`, `size` `sm`, `md` or `icon`, a square for an icon alone, and `loading
|
|
363
|
+
| `Button`, `buttonClass` | A button (`variant` `primary`, `secondary`, `ghost` or `danger`, `size` `sm`, `md` or `icon`, a square for an icon alone, `loading`, and `busyLabel`, what it says while loading, as a status a screen reader announces), and its classes for a link that looks like one. |
|
|
364
364
|
| `Dialog`, `ResponsiveDialog` | A modal with a `title`, `description`, `actions` and a body, which Escape and a click outside close with `onClose`; the responsive one becomes a sheet from the bottom of a phone, which follows a finger dragging it down by its header, or by its content once that is scrolled to its top, and closes when flung or let go past a third of its height. |
|
|
365
365
|
|
|
366
366
|
```tsx
|
|
@@ -729,7 +729,7 @@ view<typeof objectives>('objectives')
|
|
|
729
729
|
|
|
730
730
|
### A record page that opens another
|
|
731
731
|
|
|
732
|
-
`.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, and so does a record
|
|
732
|
+
`.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, and so does a record without a value for a field it names, such as a custom step's test run, which has no workflow. A list of addresses [opens the first the record fits](#open-elsewhere). The record's own page stays at its address with `?standard=true`.
|
|
733
733
|
|
|
734
734
|
```ts
|
|
735
735
|
view<typeof workflowRuns>('workflow_runs').recordOpens({ kind: 'record', resource: 'workflows', key: '{{workflow_id}}', run: '{{id}}' })
|
|
@@ -737,6 +737,27 @@ view<typeof workflowRuns>('workflow_runs').recordOpens({ kind: 'record', resourc
|
|
|
737
737
|
|
|
738
738
|
A record address can also carry `version`, an earlier saved version of the record shown by a field type that keeps versions, such as the `workflow` field type: the record page then shows its read view, without Save or Edit.
|
|
739
739
|
|
|
740
|
+
### Open elsewhere
|
|
741
|
+
|
|
742
|
+
:::caution[Beta]
|
|
743
|
+
The target page opens as it would from a link: opening at the record's place inside it, such as scrolled to a message, is not built yet.
|
|
744
|
+
:::
|
|
745
|
+
|
|
746
|
+
A record that is read and used on another page, such as a chat message in its channel, can open there wherever it is found. Give `.recordOpens(...)` a list of addresses built from the record's fields: the first whose `{{field}}`s all have a value in the record opens in place of the record's own page, as a [row button](blocks.md#row-buttons) picks its choice. A record that fits none shows its own page.
|
|
747
|
+
|
|
748
|
+
```ts
|
|
749
|
+
view<typeof messages>('messages').recordOpens([
|
|
750
|
+
{ kind: 'record', resource: 'channels', key: '{{channel_id}}' },
|
|
751
|
+
{ kind: 'record', resource: 'direct_messages', key: '{{direct_message_id}}' },
|
|
752
|
+
])
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
- The record is read first, with the reader's own access: a record they may not read shows the usual not-found notice, and the page it opens applies its own access rules. A choice the reader cannot follow, such as one naming a resource or field they may not read, is skipped.
|
|
756
|
+
- The top bar's search results link straight to the address their record opens, so the link preview shows where it goes. Any other link to `/<resource>/<key>` opens the record's address first and then replaces it in the history with the target, so Back returns to the page before.
|
|
757
|
+
- The record's own page stays at its address with `?standard=true`.
|
|
758
|
+
|
|
759
|
+
<gap>A record page that opens elsewhere cannot open at the record's place inside the target page, such as scrolled to a message, because passing the record to the target page is not implemented.</gap>
|
|
760
|
+
|
|
740
761
|
### Full-area record pages
|
|
741
762
|
|
|
742
763
|
`.record({ component })` makes the record page at `/<resource>/<key>` a [custom component](custom-components.md#full-area-record-pages) of the app's own, for a record that is used rather than filled in, such as a chat channel. The component fills the content area, at full width beside the sidebar and down to the bottom bar on a phone, and the page does not scroll, so the component scrolls its own parts, such as messages above a box that stays at the bottom. The sidebar, the top bar with its breadcrumb naming the record, since the page has no heading, the bottom bar and a right panel stay; the heading, Save, the action rail, the sections, the related records and the Details card are not drawn. A record that does not exist, or that the user may not read, shows the record page's usual notice, and the component is never drawn.
|