@protobase/cli 0.46.1 → 0.46.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.46.
|
|
3
|
+
"version": "0.46.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": {
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"@better-auth/core": "^1.7.12",
|
|
37
37
|
"@hono/node-server": "^2.1.3",
|
|
38
38
|
"@hono/vite-dev-server": "^0.26.1",
|
|
39
|
-
"@protobase/layout": "0.46.
|
|
40
|
-
"@protobase/query": "0.46.
|
|
41
|
-
"@protobase/schema": "0.46.
|
|
42
|
-
"@protobase/server": "0.46.
|
|
43
|
-
"@protobase/ui": "0.46.
|
|
39
|
+
"@protobase/layout": "0.46.2",
|
|
40
|
+
"@protobase/query": "0.46.2",
|
|
41
|
+
"@protobase/schema": "0.46.2",
|
|
42
|
+
"@protobase/server": "0.46.2",
|
|
43
|
+
"@protobase/ui": "0.46.2",
|
|
44
44
|
"@react-email/render": "^2.1.0",
|
|
45
45
|
"@scalar/hono-api-reference": "^0.12.10",
|
|
46
46
|
"@tailwindcss/vite": "^4.3.3",
|
|
@@ -11,6 +11,7 @@ React components, field types, pages and handlers of your own, loaded as plugins
|
|
|
11
11
|
- [Custom field types](../reference/plugins.md#field-types): Register how a kind of value is shown and edited, and pick it per field in a view.
|
|
12
12
|
- [Custom create pages](../reference/custom-components.md#create-pages): Replace a resource's create form with your own page, such as a booking flow.
|
|
13
13
|
- [Form parts](../reference/custom-components.md#form-parts): Build your own forms from the app's fields, pickers, switches, buttons and dialogs.
|
|
14
|
+
- [Image carousel](../reference/custom-components.md#image-carousel): Step through screenshots or a record's files in your own components by swiping or with arrows, as cards step through photos.
|
|
14
15
|
- [Assistant parts](../reference/assistant.md#in-the-ui): The assistant's panel, chat messages, composer and action cards for your own components, with a frameless action card for a page that is already framed.
|
|
15
16
|
- [Action handlers](../reference/custom-components.md#action-handlers): Your own code for a named action, with the record, the API client and the action's inputs.
|
|
16
17
|
- [Shell slots](../reference/custom-components.md#shell-slots): Your own components in the top bar, in a panel beside every page, or as the sidebar logo.
|
|
@@ -240,6 +240,34 @@ export const BookRepair = () => {
|
|
|
240
240
|
}
|
|
241
241
|
```
|
|
242
242
|
|
|
243
|
+
## Image carousel
|
|
244
|
+
|
|
245
|
+
`Carousel` from `@protobase/ui` steps through images the way a card steps through a record's [photos](ui-config.md#card-photos), outside a card too: a row that snaps image by image, swiped on a touch screen or moved by arrows that show on hover, with dots marking the image in view. One image shows without arrows or dots.
|
|
246
|
+
|
|
247
|
+
| | |
|
|
248
|
+
| --- | --- |
|
|
249
|
+
| `images` | The images in order: `{ src, alt }`, a link with what it shows, or a file field's value as records carry it, with an optional `alt`. A file's smallest [variant](files.md#image-variants-and-placeholders) that is sharp enough is drawn; a missing file or one that is no raster image is left out. |
|
|
250
|
+
| `label` | What the images are, read out with the carousel. |
|
|
251
|
+
| `fit` | `cover`, the default, fills the frame and crops what overflows it; `contain` shows each image whole. |
|
|
252
|
+
| `swipe` | Off, a swipe scrolls what the carousel sits in, such as a row that scrolls sideways, and the arrows always show on a touch screen. On by default. |
|
|
253
|
+
| `className` | The frame's classes, such as its aspect ratio, border and rounding; it has none of its own. |
|
|
254
|
+
|
|
255
|
+
```tsx
|
|
256
|
+
import { Carousel } from '@protobase/ui'
|
|
257
|
+
|
|
258
|
+
export const PresetShots = () => (
|
|
259
|
+
<Carousel
|
|
260
|
+
label="Bike repairs"
|
|
261
|
+
fit="contain"
|
|
262
|
+
className="aspect-[8/5] rounded-lg border border-border"
|
|
263
|
+
images={[
|
|
264
|
+
{ src: '/shots/repairs-board.png', alt: 'The repairs board' },
|
|
265
|
+
{ src: '/shots/repair.png', alt: 'A repair' },
|
|
266
|
+
]}
|
|
267
|
+
/>
|
|
268
|
+
)
|
|
269
|
+
```
|
|
270
|
+
|
|
243
271
|
## Components in the chat
|
|
244
272
|
|
|
245
273
|
The same components draw the assistant's [widget parts](assistant.md#widget-parts): a part names a component, and the dock draws it with the part's props, so one component can sit on a page and in the chat. In the chat there is no record around it, so a component that needs `useLayoutRecord()` works only on pages; take ids as props instead. Besides the API hooks, a widget can read the assistant backend with [`useBackendData`](assistant.md#reading-the-backend-from-a-widget).
|