@protobase/cli 0.93.1 → 0.94.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.
@@ -9,11 +9,19 @@ const extensionName = async (extension) => {
9
9
  return (existsSync(path.join(extension.dir, "package.json")) ? await readPackageJson(extension.dir) : {}).name ?? path.basename(extension.dir);
10
10
  };
11
11
  const folderOf = (name) => name.replace(/^@/, "").replace(/[^\w.-]+/g, "-");
12
- const sources = async (projectDir, extensions) => {
13
- const own = existsSync(projectUiFile(projectDir)) ? [{
12
+ const ownSource = (projectDir, styles) => {
13
+ if (existsSync(projectUiFile(projectDir))) return [{
14
14
  dir: projectDir,
15
15
  name: "app"
16
+ }];
17
+ return styles ? [{
18
+ dir: projectDir,
19
+ name: "app",
20
+ stylesOnly: true
16
21
  }] : [];
22
+ };
23
+ const sources = async (projectDir, extensions, styles) => {
24
+ const own = ownSource(projectDir, styles);
17
25
  const all = [...await Promise.all(extensions.filter((extension) => extension.ui).map(async (extension) => ({
18
26
  dir: extension.dir,
19
27
  name: await extensionName(extension)
@@ -28,11 +36,12 @@ const sources = async (projectDir, extensions) => {
28
36
  };
29
37
  /**
30
38
  * Builds the project's protobase.ui.tsx and each extension's as a plugin under `publicDir`/plugins/<name>/, as
31
- * `protobase build-plugin` builds one: the app loads them like any other, from what `/meta` names.
39
+ * `protobase build-plugin` builds one: the app loads them like any other, from what `/meta` names. With `styles`, a
40
+ * project without a protobase.ui.tsx gets a plugin too, of its stylesheet alone, for the Tailwind classes in its files.
32
41
  */
33
- const buildBundlePlugins = async ({ projectDir, publicDir, extensions, ignore, sourceMaps }) => {
42
+ const buildBundlePlugins = async ({ projectDir, publicDir, extensions, styles = false, ignore, sourceMaps }) => {
34
43
  const plugins = [];
35
- for (const source of await sources(projectDir, extensions)) {
44
+ for (const source of await sources(projectDir, extensions, styles)) {
36
45
  const folder = path.join(pluginsFolder, folderOf(source.name));
37
46
  const manifest = await buildPlugin({
38
47
  pluginDir: source.dir,
@@ -40,7 +49,8 @@ const buildBundlePlugins = async ({ projectDir, publicDir, extensions, ignore, s
40
49
  name: source.name,
41
50
  projectDir,
42
51
  ignore,
43
- sourceMaps
52
+ sourceMaps,
53
+ stylesOnly: source.stylesOnly
44
54
  });
45
55
  plugins.push({
46
56
  name: manifest.name,
@@ -12,6 +12,7 @@ import { buildTheme } from "./theme.js";
12
12
  import { shellForBuild, shellManifestFile } from "./shell.js";
13
13
  import { checkUi } from "./ui-check.js";
14
14
  import { checkViews } from "./view-check.js";
15
+ import { pagesCarryClasses } from "./page-classes.js";
15
16
  import { existsSync } from "node:fs";
16
17
  import path from "node:path";
17
18
  import { cp, readFile, rm, writeFile } from "node:fs/promises";
@@ -59,7 +60,7 @@ const buildDeployBundle = async ({ projectDir, outDir, bun, extensions = [], sou
59
60
  components
60
61
  });
61
62
  const mobileSection = bundleMobile(mobile, notifications);
62
- await checkViews(projectDir);
63
+ const pages = await checkViews(projectDir);
63
64
  await checkUi(projectDir, extensions, components);
64
65
  const packages = native.length > 0 ? await copyPackages(native, path.join(outDir, bundleNodeModules)) : [];
65
66
  const publicDir = path.join(outDir, bundleLayout.public);
@@ -72,6 +73,7 @@ const buildDeployBundle = async ({ projectDir, outDir, bun, extensions = [], sou
72
73
  projectDir,
73
74
  publicDir,
74
75
  extensions,
76
+ styles: pagesCarryClasses(pages),
75
77
  ignore: [outDir, path.join(projectDir, protobaseFolder)],
76
78
  sourceMaps
77
79
  });
@@ -0,0 +1,12 @@
1
+ import { walkTree } from "@protobase/layout";
2
+ //#region src/build/page-classes.ts
3
+ /** Whether any element of the pages carries Tailwind classes, which then need a stylesheet of the project's. */
4
+ const pagesCarryClasses = (pages) => pages.some((page) => {
5
+ let found = false;
6
+ walkTree(page.tree, (node) => {
7
+ if (typeof node.props.className === "string" && node.props.className.trim() !== "") found = true;
8
+ });
9
+ return found;
10
+ });
11
+ //#endregion
12
+ export { pagesCarryClasses };
@@ -95,9 +95,9 @@ const checkOutDir = (pluginDir, outDir) => {
95
95
  * shared modules by name, its stylesheet, and plugin.json naming both and the field types it registers. The app loads
96
96
  * it from the plugin.json's URL.
97
97
  */
98
- const buildPlugin = async ({ pluginDir, outDir, name, projectDir, ignore = [], sourceMaps = false }) => {
98
+ const buildPlugin = async ({ pluginDir, outDir, name, projectDir, ignore = [], sourceMaps = false, stylesOnly = false }) => {
99
99
  const entry = path.join(pluginDir, pluginEntryFile);
100
- if (!existsSync(entry)) throw new Error(`There is no ${pluginEntryFile} in ${pluginDir}; a plugin exports its components and action handlers from it`);
100
+ if (!stylesOnly && !existsSync(entry)) throw new Error(`There is no ${pluginEntryFile} in ${pluginDir}; a plugin exports its components and action handlers from it`);
101
101
  checkOutDir(pluginDir, outDir);
102
102
  const own = existsSync(path.join(pluginDir, "package.json")) ? await readPackageJson(pluginDir) : {};
103
103
  const pluginName = (name ?? own.name ?? path.basename(pluginDir)).trim();
@@ -119,6 +119,7 @@ const buildPlugin = async ({ pluginDir, outDir, name, projectDir, ignore = [], s
119
119
  ...bundled ? [bundledImports([projectDir, pluginDir])] : [],
120
120
  ...projectDir === void 0 ? [] : [extensionImports(projectDir, [{ dir: pluginDir }])],
121
121
  pluginStyles(styles, styleCode(pluginDir, target.theme, [outDir, ...ignore])),
122
+ ...stylesOnly ? [pluginStyles(entry, "export {}\n")] : [],
122
123
  react(),
123
124
  tailwindcss(),
124
125
  layeredStyles(),
@@ -152,7 +153,7 @@ const buildPlugin = async ({ pluginDir, outDir, name, projectDir, ignore = [], s
152
153
  const module = output.find((file) => file.type === "chunk" && file.isEntry && file.facadeModuleId === entry);
153
154
  const css = output.find((file) => file.type === "asset" && file.fileName.endsWith(".css"));
154
155
  if (!module || !css) throw new Error("The plugin build wrote no module or no stylesheet");
155
- const fields = await pluginFieldTypes({
156
+ const fields = stylesOnly ? {} : await pluginFieldTypes({
156
157
  pluginDir,
157
158
  entry,
158
159
  uiDir: target.uiDir,
@@ -6,13 +6,15 @@ import { checkViewQueries } from "@protobase/server";
6
6
  /**
7
7
  * Fails the build, instead of a page once it asks, when a view filters, counts, sorts or searches by a field that its
8
8
  * resource does not mark for it. It loads the config folder once in Node, config/index.ts and config/<dir>/ui.ts with
9
- * what they import; protobase.config.ts does not run, so the build still needs no secrets and no database.
9
+ * what they import; protobase.config.ts does not run, so the build still needs no secrets and no database. Returns the
10
+ * folder's pages, which the build reads too.
10
11
  */
11
12
  const checkViews = async (projectDir) => {
12
13
  const configDir = path.join(projectDir, "config");
13
- if (!existsSync(path.join(configDir, "index.ts"))) return;
14
- const { models, views } = await loadDataConfig(configDir, projectDir);
14
+ if (!existsSync(path.join(configDir, "index.ts"))) return [];
15
+ const { models, views, pages } = await loadDataConfig(configDir, projectDir);
15
16
  checkViewQueries(models, views);
17
+ return pages;
16
18
  };
17
19
  //#endregion
18
20
  export { checkViews };
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.93.1";
2
+ var version = "0.94.1";
3
3
  //#endregion
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/cli",
3
- "version": "0.93.1",
3
+ "version": "0.94.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.93.1",
47
- "@protobase/layout": "0.93.1",
48
- "@protobase/query": "0.93.1",
49
- "@protobase/schema": "0.93.1",
50
- "@protobase/server": "0.93.1",
51
- "@protobase/ui": "0.93.1",
52
- "@protobase/workflows": "0.93.1",
46
+ "@protobase/config": "0.94.1",
47
+ "@protobase/layout": "0.94.1",
48
+ "@protobase/query": "0.94.1",
49
+ "@protobase/schema": "0.94.1",
50
+ "@protobase/server": "0.94.1",
51
+ "@protobase/ui": "0.94.1",
52
+ "@protobase/workflows": "0.94.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",
@@ -11,6 +11,7 @@ Pages of your own, built from blocks in a JSX layout.
11
11
  - [Component fallbacks](../reference/custom-components.md#fallbacks): A custom component declares what a client that cannot draw it shows instead, or nothing, and the web shows it too when the component is missing or throws.
12
12
  - [Per-user pages](../reference/layouts.md#access): Each user gets the page without the parts, fields and actions they cannot use.
13
13
  - [Layout blocks](../reference/blocks.md#layout): Pages, responsive grids, cards and links.
14
+ - [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.
14
15
  - [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.
15
16
  - [Data blocks](../reference/blocks.md#data): Counts, tables, single records, rows of cards, field values and progress bars.
16
17
  - [Row buttons](../reference/blocks.md#row-buttons): A table's rows carry a button to an address their fields name, such as a task's tab, labelled by a field of the row, such as its next step.
@@ -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.
@@ -4,7 +4,7 @@
4
4
 
5
5
  Every built-in layout block, its props and what it does, with examples from the ERP's sales overview.
6
6
 
7
- Blocks are imported from `@protobase/layout`. "Record" below means the record of the `RecordCard` or `CardRow` card around a block (see [Data](layouts.md#data)); `filter` is AIP-160 and `sort` AIP-132, as in the list API. The ERP example's sales overview uses `Page`, `Grid`, `Card`, `Stat`, `Table`, `RecordCard`, `CardRow`, `Field`, `Chart`, `Action`, `ModalForm` and `Show`; of the others, the property portal's home uses `RecordRow`, and the [Users page](auth.md#users-page) `Users`:
7
+ Blocks are imported from `@protobase/layout`. Every block also takes [`className`](layouts.md#tailwind-classes), Tailwind classes for its outer element. "Record" below means the record of the `RecordCard` or `CardRow` card around a block (see [Data](layouts.md#data)); `filter` is AIP-160 and `sort` AIP-132, as in the list API. The ERP example's sales overview uses `Page`, `Grid`, `Card`, `Stat`, `Table`, `RecordCard`, `CardRow`, `Field`, `Chart`, `Action`, `ModalForm` and `Show`; of the others, the property portal's home uses `RecordRow`, and the [Users page](auth.md#users-page) `Users`:
8
8
 
9
9
  ```tsx title="tests/apps/erp/config/overview/page.tsx"
10
10
  /** @jsxImportSource @protobase/layout */
@@ -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). Its text is its children.
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). Its text is its children. 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>
@@ -152,9 +152,28 @@ A link in text: `to` an address in the app, or an `href` that leaves it (`https:
152
152
  | --- | --- |
153
153
  | `to` | An [address](layouts.md#addresses). Inside a record, `{field}` in its key, filter or order is the record's value. |
154
154
  | `href` | A link that leaves the app. A path in the app is refused when the config loads: give it as `to`. |
155
+ | `variant` | `primary`, `secondary`, `danger` or `ghost`: drawn as a button of that variant, still a link. `className` adds to it, such as `w-full`. |
155
156
 
156
157
  One of the two is required. A link to a resource or field the user cannot see is left out of their page.
157
158
 
159
+ ### Box, Row, Column and Text
160
+
161
+ Plain elements for a page too custom for the blocks, drawn by their [Tailwind classes](layouts.md#tailwind-classes) alone.
162
+
163
+ | Element | |
164
+ | --- | --- |
165
+ | `Box` | An element of its own, such as a panel or a banner. No look of its own. |
166
+ | `Row` | Its children side by side: `flex`. |
167
+ | `Column` | Its children one under another: `flex flex-col`. |
168
+ | `Text` | Text, `Link`s and `Text as="span"`s in it, nothing else, run as one line. `as` makes it `p` (the default), `span`, or a heading `h1` to `h4`. |
169
+
170
+ ```tsx
171
+ <Row className="items-center gap-3">
172
+ <Box className="size-3 rounded-full bg-success" />
173
+ <Text as="span" className="font-medium">All systems running</Text>
174
+ </Row>
175
+ ```
176
+
158
177
  ### Tabs and Tab
159
178
 
160
179
  `Tabs` splits a page into tabs, each at its own address: the first at the page's (`/<page>`), each other at its name below it (`/<page>/<name>`). Only the shown tab's elements are drawn, so the others load nothing. On a phone the tabs are a select. `Tabs` takes no props and holds only `Tab`s; it sits directly in the `Page`, once per page, with other elements before or after it if you like.
@@ -334,7 +353,15 @@ A bar for `value` out of `max`, with both numbers. It turns amber from 90%.
334
353
 
335
354
  ### Image
336
355
 
337
- A picture an [API function](../guides/api-functions.md) draws, such as a system map: the block calls `GET /api/functions/<function>` with the reader's token, and draws the image it answers with, such as a PNG. The query says what to draw:
356
+ A fixed picture at `src`, or one an [API function](../guides/api-functions.md) draws.
357
+
358
+ A fixed picture is an `https:` URL or a path on the app's own origin, such as `/logo.svg`, with an `alt` it needs: what it shows, or `alt=""` when it only decorates. It is drawn as a plain image at its `width` and `height`, never wider than its space; with [`className`](layouts.md#tailwind-classes) its classes are its whole look instead. Every reader gets it, and it takes no `refresh`.
359
+
360
+ ```tsx
361
+ <Image src="/logo.svg" alt="Acme" className="size-12 rounded-full" />
362
+ ```
363
+
364
+ A function's picture, such as a system map: the block calls `GET /api/functions/<function>` with the reader's token, and draws the image it answers with, such as a PNG. The query says what to draw:
338
365
 
339
366
  | Query | |
340
367
  | --- | --- |
@@ -344,7 +371,8 @@ A picture an [API function](../guides/api-functions.md) draws, such as a system
344
371
 
345
372
  | Prop | |
346
373
  | --- | --- |
347
- | `function` | The function's name, as in `functions/<function>.ts`. Required; the server stops at startup when the app has no such function. |
374
+ | `function` | The function's name, as in `functions/<function>.ts`; the server stops at startup when the app has no such function. |
375
+ | `src` | A fixed picture instead. One of `function` and `src` is required. |
348
376
  | `alt` | What the picture shows, for screen readers and for clients that draw no images. |
349
377
  | `width`, `height` | The size it is drawn at, in CSS pixels. |
350
378
  | `refresh` | Every how many seconds the client asks for the picture again, keeping the last one on screen while the next loads; once when omitted. Regaining window focus never asks again. |
@@ -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
- `fallback` gives what shows in the section's place, its title included, where the component cannot be drawn: sections and related tables in the main column, sidebar maps in the sidebar, or `[]` for nothing. `/api/meta` sends it with what the user cannot see left out, 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>
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
@@ -116,6 +116,35 @@ a.link('open_table', { label: 'Open table', to: { kind: 'list', resource: '{name
116
116
 
117
117
  The button shows only while the app gives the user a resource of that name: on a record whose field is empty, or names a resource the user cannot see or the app does not serve yet, it is left out, and it shows once `/meta` names it. As the resource is known only when the link is followed, such an address takes no filter, order or create values, which the server refuses when it starts; a record's `key` may still be a `{field}`.
118
118
 
119
+ ## Tailwind classes
120
+
121
+ :::caution[Experimental]
122
+ Only the web draws the classes: a client that draws natively draws each element without them. A page built while the app runs, such as a bot's card or an assistant's page, takes no classes yet. This may change in any release.
123
+ :::
124
+
125
+ Some pages are too custom for the blocks, such as a welcome page in the app's own style. For those, every built-in element takes `className`, Tailwind classes as in your components, and the plain elements [`Box`, `Row`, `Column` and `Text`](blocks.md#box-row-column-and-text) build the page from the ground up, with [`Link`](blocks.md#link) and a fixed [`Image`](blocks.md#image) for links and pictures. Blocks stay the better choice where one fits: they bring data, access and every client along.
126
+
127
+ ```tsx
128
+ <Page title="Welcome">
129
+ <Column className="gap-6 rounded-2xl bg-primary/10 p-8">
130
+ <Text as="h2" className="text-3xl font-semibold tracking-tight">
131
+ Good to see you, <Text as="span" className="text-primary-text">team</Text>
132
+ </Text>
133
+ <Row className="flex-wrap items-center gap-3">
134
+ <Image src="/logo.svg" alt="" className="size-10" />
135
+ <Text className="text-muted-foreground">Start with the orders that wait for you.</Text>
136
+ <Link to={{ kind: 'list', resource: 'orders' }} variant="primary">Open orders</Link>
137
+ </Row>
138
+ </Column>
139
+ <Table resource="orders" className="shadow-sm" />
140
+ </Page>
141
+ ```
142
+
143
+ - **Where the CSS comes from.** The classes get CSS where those of your components do: Tailwind scans the project's files, layouts included, in `protobase dev` and in `protobase build`, which gives an app without a `protobase.ui.tsx` a stylesheet of its own when its pages carry classes. Write each class out in full, such as `bg-primary`, never pieced together from parts, since the scan reads the files as text. Theme tokens such as `bg-primary` and `text-muted-foreground` follow the app's [theme](theme.md). <gap>A layout of an `--extend` folder without its own `protobase.ui.tsx` cannot get CSS for its classes in a built app because building a stylesheet for such a folder is not implemented.</gap>
144
+ - **On a plain element** the classes are its whole look: a `Row` is only `flex`, a `Column` only `flex flex-col`, and a `Box` and a `Text` nothing. A `Link` or a fixed `Image` with classes drops its own look for them; a `Link` with a `variant` looks like a button of the app, hover and focus included, and its classes add to that.
145
+ - **On a block** they go on its outer element, such as a `Card`'s box, and add to its look. An `Action` puts them on its button, and a `Show` on a `div` around its children while it shows them; an [account block](blocks.md#account-blocks), which draws no element of its own, gets a `div` around it that carries them. <gap>A class cannot change what a block's own look already sets, such as its padding, because ordering layout classes after the framework's own is not implemented.</gap>
146
+ - **In `/api/meta`** each `className` arrives as written, a prop like any other. A client that cannot use Tailwind classes draws the element without them, so a page reads everywhere when its words are in `Text` and its data in blocks.
147
+
119
148
  ## Addresses
120
149
 
121
150
  Every place in the app has an address, and the app writes and reads them in one way, so no link or component spells out a path:
@@ -140,6 +169,6 @@ Every block reads the regular API with the user's token, so the access rules app
140
169
  - `Field`, `Progress` and `Stat field` on a field they cannot read are left out, and table columns are narrowed;
141
170
  - `ModalForm` needs create or update permission and keeps only the fields they may write;
142
171
  - an `Action` missing from their view of the resource is left out, and so is a `Show` that names something they cannot see.
143
- - an `Image` whose function they may not call is left out.
172
+ - an `Image` whose function they may not call is left out; a fixed one (`src`) is kept.
144
173
 
145
174
  Custom components are kept: they get only their props, and fetch through the same API. A custom component's fallback loses what the user cannot use like the rest of the tree, and a fallback left with nothing is sent as `[]`, so a client still draws nothing in the component's place.
@@ -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). |