@protobase/cli 0.94.0 → 0.94.2
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/reference/blocks.md +1 -1
- package/skills/protobase/references/reference/custom-components.md +13 -1
- package/skills/protobase/references/reference/ui-config.md +1 -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.94.
|
|
3
|
+
"version": "0.94.2",
|
|
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.2",
|
|
47
|
+
"@protobase/layout": "0.94.2",
|
|
48
|
+
"@protobase/query": "0.94.2",
|
|
49
|
+
"@protobase/schema": "0.94.2",
|
|
50
|
+
"@protobase/server": "0.94.2",
|
|
51
|
+
"@protobase/ui": "0.94.2",
|
|
52
|
+
"@protobase/workflows": "0.94.2",
|
|
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",
|
|
@@ -27,6 +27,7 @@ The page of one record, with its sections, related records, galleries, charts an
|
|
|
27
27
|
- [Galleries](../reference/ui-config.md#galleries): A record's photos show as tiles that open a full-screen lightbox, with keyboard and swipe navigation.
|
|
28
28
|
- [Related records](../reference/ui-config.md#related-records): Every record page shows how many records point at it, and can list related records, also through a join resource, as a table, another display or cards with buttons, each row or card with a button to an address its fields name.
|
|
29
29
|
- [Record lines](../reference/ui-config.md#record-lines): The related table a record's view marks as its lines, such as an invoice's, shows all of them on its page, where you edit, add, remove and reorder them, and Save writes the record and its lines together.
|
|
30
|
+
- [Custom section fallbacks](../reference/custom-components.md#record-section-fallbacks) (experimental): Where your own component on a record page cannot be drawn, such as on a watch, any record page item shows in its place, conversations included.
|
|
30
31
|
- [Conversations](../reference/ui-config.md#conversations): A record page holds a chat about the record, such as a task's, with its messages in markdown and a box that sends one, declared in its layout with no component of the app's own.
|
|
31
32
|
- [Charts of samples](../reference/ui-config.md#charts-of-related-records): A record page graphs numeric samples over the last hour, day or week, such as a server's CPU use.
|
|
32
33
|
- [Fresh data on return](../reference/ui-config.md#the-record-page): Records and lists reload when the browser tab is focused again, keeping unsaved edits.
|
|
@@ -142,7 +142,7 @@ A box with a heading. Text and `Link`s inside it run together as paragraphs.
|
|
|
142
142
|
|
|
143
143
|
### Link
|
|
144
144
|
|
|
145
|
-
A link in text: `to` an address in the app, or an `href` that leaves it (`https:` opens in a new tab, `mailto:` in the mail app).
|
|
145
|
+
A link in text: `to` an address in the app, or an `href` that leaves it (`https:` opens in a new tab, `mailto:` in the mail app). It shows its children inline, text and `Text as="span"`s, or without them where it leads. With [`className`](layouts.md#tailwind-classes) it drops its own look for those classes.
|
|
146
146
|
|
|
147
147
|
```tsx
|
|
148
148
|
<Link to={{ kind: 'list', resource: 'invoices', filter: "status = 'overdue'" }}>Overdue invoices</Link>
|
|
@@ -154,10 +154,22 @@ export const CustomerRepairs = ({ limit }: { limit: number }) => {
|
|
|
154
154
|
|
|
155
155
|
A list that should stay live polls: `useList('repairs', { refetchInterval: 5000 })` refetches every 5 seconds. It is TanStack Query's `refetchInterval`, so it also takes `false` to stop, or a function of the query, and pauses while the tab is in the background.
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
### Record section fallbacks
|
|
158
|
+
|
|
159
|
+
:::caution[Experimental]
|
|
160
|
+
A sidebar section falls back only to sidebar maps and other sidebar custom components. This may change in any release.
|
|
161
|
+
:::
|
|
162
|
+
|
|
163
|
+
`fallback` gives what shows in the section's place, its title included, where the component cannot be drawn, such as on a watch: any item of the main column, conversations and other custom components included, sidebar maps and sidebar custom components in the sidebar, or `[]` for nothing. Each item is checked and left out per user as it is elsewhere on the page, so `/api/meta` sends the fallback without a thread the user cannot read or a composer that cannot create their messages, as [fallbacks](#fallbacks) of composed pages. <gap>A sidebar section cannot fall back to sections or related tables because drawing those in the sidebar is not implemented.</gap> <gap>A sidebar section cannot fall back to an `l.sidebar` summary card because merging a fallback's fields into the page's one summary is not implemented.</gap>
|
|
158
164
|
|
|
159
165
|
```ts
|
|
160
166
|
l.custom(CustomerRepairs, { title: 'Earlier repairs', props: { limit: 5 }, fallback: [l.section('Customer', [r.customer_id])] })
|
|
167
|
+
l.custom(RepairChat, {
|
|
168
|
+
fallback: [
|
|
169
|
+
l.thread('Chat', { resource: 'repair_messages', field: 'repair_id', sender: 'author_id', time: 'sent_at', text: 'body' }),
|
|
170
|
+
l.composer({ resource: 'repair_messages', field: 'repair_id', text: 'body' }),
|
|
171
|
+
],
|
|
172
|
+
})
|
|
161
173
|
```
|
|
162
174
|
|
|
163
175
|
## Full-area record pages
|
|
@@ -659,7 +659,7 @@ export const repairsView = filtered
|
|
|
659
659
|
| `l.tab(title, items)` | A tab holding main-column items; a view's tabs show as one strip on the read view and the form. See [Tabs](#tabs). |
|
|
660
660
|
| `l.sidebar(fields, { when? })` | A summary card beside it, read-only, each value on one line, cut off with an ellipsis when it does not fit and shown whole on hover. The record's created and updated times show in a Details card below it, but for those the summary lists. `when` also takes a [condition](#form-and-read-view). |
|
|
661
661
|
| `l.related(title, { ... })` | A table or cards of the records of another resource that point at this one, in the main column. See [Related records](#related-records). |
|
|
662
|
-
| `l.custom(Component, { title?, props?, sidebar?, when?, fallback? })` | A [custom component](custom-components.md#record-sections) where it is listed: in the main column under `title`, or with `sidebar: true` as a sidebar card. `fallback` shows in its place where it cannot be drawn. |
|
|
662
|
+
| `l.custom(Component, { title?, props?, sidebar?, when?, fallback? })` | A [custom component](custom-components.md#record-sections) where it is listed: in the main column under `title`, or with `sidebar: true` as a sidebar card. [`fallback`](custom-components.md#record-section-fallbacks) shows in its place where it cannot be drawn. |
|
|
663
663
|
| `l.map(title, { latitude, longitude, zoom?, sidebar?, when? })` | A map with a pin at the record's position, in the main column or with `sidebar: true` as a sidebar card. See [Maps](#maps). |
|
|
664
664
|
| `l.chart(title, { resource, field, at, series, range?, help?, when? })` | Line graphs of numbers of the records that point at this one, such as a machine's samples, over the last hour, day or week. See [Charts of related records](#charts-of-related-records). |
|
|
665
665
|
| `l.thread(title, { resource, field, sender, time, text, limit?, empty?, help?, when? })` | The record's conversation: the latest messages that point at it, oldest first, under each sender's name and time. See [Conversations](#conversations). |
|