@protobase/cli 0.112.0 → 0.112.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
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/cli",
|
|
3
|
-
"version": "0.112.
|
|
3
|
+
"version": "0.112.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.112.
|
|
47
|
-
"@protobase/layout": "0.112.
|
|
48
|
-
"@protobase/query": "0.112.
|
|
49
|
-
"@protobase/schema": "0.112.
|
|
50
|
-
"@protobase/server": "0.112.
|
|
51
|
-
"@protobase/ui": "0.112.
|
|
52
|
-
"@protobase/workflows": "0.112.
|
|
46
|
+
"@protobase/config": "0.112.2",
|
|
47
|
+
"@protobase/layout": "0.112.2",
|
|
48
|
+
"@protobase/query": "0.112.2",
|
|
49
|
+
"@protobase/schema": "0.112.2",
|
|
50
|
+
"@protobase/server": "0.112.2",
|
|
51
|
+
"@protobase/ui": "0.112.2",
|
|
52
|
+
"@protobase/workflows": "0.112.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",
|
|
@@ -53,3 +53,7 @@ The app keeps what someone signed in last saw, from the moment they sign in, and
|
|
|
53
53
|
- When the refresh fails, such as without a network, the cached data stays muted and a warning replaces the spinner.
|
|
54
54
|
|
|
55
55
|
The start cache holds who is signed in, the app's `/meta` and the latest answer of each query the app read. It has no time limit, only a soft limit of 4 MB: once the answers pass it, those used least recently are dropped, oldest first, until they are back under it. Who is signed in, `/meta` and the answers of the page on screen when it saves are never dropped, so the next start draws that page whole: the cache can pass 4 MB by that one page. A table embedded in a page reads only the fields it shows, which keeps the page small, unless its actions run on selected rows: those get whole records. It lives in the browser's IndexedDB for the app's origin, or in the app's own storage on a phone. It is emptied when someone signs out, when the session ends and the API answers 401, and when a new Protobase version of the app opens. Visitors and staff signed in as someone keep nothing.
|
|
56
|
+
|
|
57
|
+
### A host's snapshot of the page
|
|
58
|
+
|
|
59
|
+
A host that serves the app's `index.html` itself, such as Protobase's official app on a switch back to an app, can show the page someone saw last before the app has drawn anything. The page's start screen, which covers the app from the first paint until it has drawn its first page, carries one empty placeholder, `<div id="pb-snapshot"></div>` (`snapshotPlaceholder`). The host replaces exactly that text with the markup it kept of the page, a plain string replace. The snapshot then shows in place of the spinner, inert, and the start screen also waits until the first page has its first data, at most 4 seconds, so the screen changes once, from the snapshot to the page as it stays. With the placeholder empty, the start is as before. The host decides when a snapshot no longer fits, such as after a sign-out, for another user or another Protobase version, and then leaves the placeholder empty.
|
|
@@ -41,7 +41,7 @@ Each place a plugin can fill is an extension point. The config names it, or a pl
|
|
|
41
41
|
| Widget part (the [assistant](assistant.md#widget-parts)) | A widget part's name | A PascalCase export | The part's props | The part's fallback card |
|
|
42
42
|
| [File viewer](#file-viewers) | A file's media type | `fileViewers: { 'type': { component } }` | `{ file, siblings }` | The file's link downloads it; a viewer that throws leaves a Download button |
|
|
43
43
|
| [Action handler](custom-components.md#action-handlers) | `a.action('name')` in a view | `actions: { name }` | `ActionContext` | The button is disabled |
|
|
44
|
-
| [Shell slot](custom-components.md#shell-slots) | Nothing: drawn on every page | `shell: { actions, rightPanel, logo, bell }` | Nothing; `logo` gets `compact`, `workspace`, `appName` and `appIcon` | Not drawn; Protobase's logo for `logo`, its notification bell for `bell` |
|
|
44
|
+
| [Shell slot](custom-components.md#shell-slots) | Nothing: drawn on every page | `shell: { actions, rightPanel, logo, bell }` | Nothing; `logo` gets `compact`, `workspace`, `appName` and `appIcon`, and a tap on it is the [`protobase:logo-tap` event](sidebar.md#the-logo) | Not drawn; Protobase's logo for `logo`, its notification bell for `bell` |
|
|
45
45
|
| [Before sign-in](#before-sign-in) | `beforeSignIn: true` where the plugin is listed | `beforeSignIn` | `children`, `params`, `removeParams`, `signedIn` | The pages as they are without it |
|
|
46
46
|
| Rules and hooks a view names | A [drop rule](ui-config.md#drop-rules), [board drop](ui-config.md#board-drops), [title rule](ui-config.md#titles-per-reader) or [marks hook](sidebar.md#marks-per-reader) by name in a view | `dropRules`, `boardDrops`, `titles`, `marks` | What its page says | What its page says |
|
|
47
47
|
| [Presence](status.md#in-the-app) | Nothing: read on the members page and the sidebar | `presence` | Nothing; a hook | No one shows as online or away |
|
|
@@ -8,6 +8,17 @@ The admin's sidebar has one entry per resource view, grouped by `nav.group` (def
|
|
|
8
8
|
|
|
9
9
|
Below the `md` breakpoint (768px) the sidebar is a drawer, which the top bar's menu button opens, or **More** on a [bottom bar](bottom-bar.md).
|
|
10
10
|
|
|
11
|
+
## The logo
|
|
12
|
+
|
|
13
|
+
The sidebar's top shows the app's logo, Protobase's or a plugin's [`shell.logo`](custom-components.md#shell-slots). It has no action of its own. A tap on it dispatches a cancelable `protobase:logo-tap` event on `window` (`logoTapEvent` of `@protobase/ui`), so a plugin, or a host app that embeds the shell, can take the tap: it calls `preventDefault()` and does its own thing, such as opening a switcher. When the page is shown in a frame, the shell also posts `{ type: 'protobase:logo-tap' }` to the page that frames it.
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
window.addEventListener('protobase:logo-tap', (event) => {
|
|
17
|
+
event.preventDefault()
|
|
18
|
+
openSwitcher()
|
|
19
|
+
})
|
|
20
|
+
```
|
|
21
|
+
|
|
11
22
|
## Sidebar icons
|
|
12
23
|
|
|
13
24
|
Each resource shows the icon its view names, in the sidebar, the [bottom bar](bottom-bar.md) and the [user menu](user-menu.md), and its [named lists](ui-config.md#more-than-one-list) show the same icon:
|