@protobase/cli 0.96.3 → 0.96.5
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.96.
|
|
3
|
+
"version": "0.96.5",
|
|
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.96.
|
|
47
|
-
"@protobase/layout": "0.96.
|
|
48
|
-
"@protobase/query": "0.96.
|
|
49
|
-
"@protobase/schema": "0.96.
|
|
50
|
-
"@protobase/server": "0.96.
|
|
51
|
-
"@protobase/ui": "0.96.
|
|
52
|
-
"@protobase/workflows": "0.96.
|
|
46
|
+
"@protobase/config": "0.96.5",
|
|
47
|
+
"@protobase/layout": "0.96.5",
|
|
48
|
+
"@protobase/query": "0.96.5",
|
|
49
|
+
"@protobase/schema": "0.96.5",
|
|
50
|
+
"@protobase/server": "0.96.5",
|
|
51
|
+
"@protobase/ui": "0.96.5",
|
|
52
|
+
"@protobase/workflows": "0.96.5",
|
|
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",
|
|
@@ -15,6 +15,7 @@ Pages of your own, built from blocks in a JSX layout.
|
|
|
15
15
|
- [Tailwind classes](../reference/layouts.md#tailwind-classes) (experimental): Layouts can carry Tailwind classes, on plain elements and on blocks, for pages too custom for blocks.
|
|
16
16
|
- [Full-width pages](../reference/blocks.md#page): A page fills the whole area beside the sidebar instead of a centred column, for a dashboard with many blocks.
|
|
17
17
|
- [Data blocks](../reference/blocks.md#data): Counts, tables, single records, rows of cards, field values and progress bars.
|
|
18
|
+
- [Table columns on a phone](../reference/blocks.md#columns-on-a-phone): Table blocks choose which columns show at mobile width by priority, with a sensible default, and fall back to a Markdown table.
|
|
18
19
|
- [Row buttons](../reference/blocks.md#row-buttons) (experimental): A table's rows carry a button labelled by a field of the row, such as its next step; the row decides where it goes: a record tab a field names, a list with a filter built from its fields, or an outside https link a field holds. On mobile width the button sits under the row's first cell.
|
|
19
20
|
- [Record rows](../reference/blocks.md#recordrow): A sideways row of cards for a filter, favorites or saved searches, with a count and new-record marks.
|
|
20
21
|
- [Record cards](../reference/blocks.md#recordcards): Full-width cards with fields and buttons, stacked or in a carousel.
|
|
@@ -225,7 +225,7 @@ The first records of a list, drawn the way the resource's list page draws them:
|
|
|
225
225
|
| Prop | |
|
|
226
226
|
| --- | --- |
|
|
227
227
|
| `resource`, `filter`, `sort` | Which records, in which order. `resource` is required; `sort` defaults to the list's. |
|
|
228
|
-
| `columns` | Field names for the table; default the view's list columns. |
|
|
228
|
+
| `columns` | Field names for the table, or `{ name, priority }` for a column that matters on a phone, 1 the most important; default the view's list columns. See [Columns on a phone](#columns-on-a-phone). |
|
|
229
229
|
| `button` | A [button on each row](#row-buttons) to an address the row's fields name, or to the outside page a field holds; a list of these gives each row the first whose fields it holds. |
|
|
230
230
|
| `bulk` | `true`: rows can be selected, and the view's `bulk` actions run on the selected rows, as on the list page; see [signing several records off](#signing-several-records-off). |
|
|
231
231
|
| `limit` | How many records it shows; default 10. It has no pages: the rest are in the list. Before 0.13 this was `pageSize`, rows per page; rename it. |
|
|
@@ -238,6 +238,16 @@ The first records of a list, drawn the way the resource's list page draws them:
|
|
|
238
238
|
<Table title="Overdue invoices" resource="invoices" filter="status = 'overdue'" sort="issued_at" columns={['number', 'company_id', 'due_at', 'total']} limit={5} empty="Nothing is overdue." />
|
|
239
239
|
```
|
|
240
240
|
|
|
241
|
+
#### Columns on a phone
|
|
242
|
+
|
|
243
|
+
At mobile width, below the `sm` breakpoint (640px), a table shows at most three of its columns, so the ones that matter fit on screen without scrolling sideways; at wider widths it shows them all. Give a column a `priority` to choose it: when any column has one, a phone shows only the columns with a priority, the three lowest numbers. Without priorities, the default comes from the columns themselves: the record's title first, then badge columns such as enums, then the others in the table's order. The columns keep their order in the table.
|
|
244
|
+
|
|
245
|
+
```tsx
|
|
246
|
+
<Table title="Objectives" resource="objectives" columns={['rank', { name: 'title', priority: 2 }, 'points', { name: 'verdict', priority: 1 }]} />
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
On a phone this table shows Title and Verdict; on a wider screen Rank, Title, Points and Verdict. Its [text form](layouts.md#text-form) is a Markdown table with its columns in the same order of importance.
|
|
250
|
+
|
|
241
251
|
#### Row buttons
|
|
242
252
|
|
|
243
253
|
:::caution[Experimental]
|
|
@@ -73,10 +73,11 @@ renderText(<Page title="Order"><Field name="status" /></Page>, {
|
|
|
73
73
|
| --- | --- |
|
|
74
74
|
| `record` | The record around the tree. `Field`, `Stat field`, `Progress`, `Show` conditions and the `{field}`s of addresses read it, through relations as nested objects (`plan.name`); a count a condition names, such as `billing_profiles.count`, is a key of its own. Without it, a field reads as its label alone, a `Show` reads as all it holds, and addresses keep their `{field}`s. |
|
|
75
75
|
| `fields` | Per field path, its `label` and the `valueLabels` its enum values read as; a field without a label reads under its path. |
|
|
76
|
+
| `tables` | Per `Table` element, the records it shows and its columns (`{ columns: [{ name, label, title?, badge?, valueLabels? }], rows }`), which you loaded; the table then reads as its heading and a Markdown table. Without it, a table reads as its heading. |
|
|
76
77
|
| `basePath` | What links start with, such as `https://example.com/admin`. |
|
|
77
78
|
| `forms` | Text forms by block type, over the built-in ones. |
|
|
78
79
|
|
|
79
|
-
A heading reads at its level: a `Page` title as `#`, a `Tab` label as `##`, and the title of a `Card` and of a data block as `###`, the data block's linked to its records' list as it filters them. A field's value reads as its enum label, a list as its items, and JSON as a code block.
|
|
80
|
+
A heading reads at its level: a `Page` title as `#`, a `Tab` label as `##`, and the title of a `Card` and of a data block as `###`, the data block's linked to its records' list as it filters them. A field's value reads as its enum label, a list as its items, and JSON as a code block. A table's records read as a Markdown table: a header row of labels, a separator row and a row per record, its columns most important first by the same rule a [phone](blocks.md#columns-on-a-phone) uses, each cell on one line with its pipes escaped. `tableMarkdown` gives the same table for records you hold yourself.
|
|
80
81
|
|
|
81
82
|
A text form of your own is a function from its element and its children's text to Markdown. It can use the default as it is (`childrenText`), wrap a built-in form from `textForms`, or rework the children's text, such as a horizontal line between them:
|
|
82
83
|
|
|
@@ -91,7 +92,7 @@ renderText(tree, { forms: { Grid: ruled, Card: noted, SeatChart: childrenText }
|
|
|
91
92
|
|
|
92
93
|
A custom component reads as its [fallback](custom-components.md#fallbacks) when it declares one, and otherwise as what it holds, unless `forms` names it.
|
|
93
94
|
|
|
94
|
-
<gap>A data block's text form cannot
|
|
95
|
+
<gap>A data block's text form cannot read its records itself, such as a table's rows, because reading records for the text form is not implemented.</gap> <gap>A data block other than a `Table` cannot list records you pass because its text form for records is not implemented.</gap> <gap>A field's text form cannot apply its `format`, such as a relative time, because formatting in the text form is not implemented.</gap> <gap>MCP clients cannot read a page's text form because a tool that serves it is not implemented.</gap>
|
|
95
96
|
|
|
96
97
|
## What a layout may hold
|
|
97
98
|
|