alinea 2.0.0-preview.12 → 2.0.0-preview.13

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.
Files changed (264) hide show
  1. package/dist/.init/content/pages/welcome.json +1 -1
  2. package/dist/.mcp/later/dev.json +1 -1
  3. package/dist/.mcp/online/dev.json +1 -1
  4. package/dist/adapter/next/cms.js +16 -8
  5. package/dist/adapter/next/dashboardUrl.d.ts +6 -0
  6. package/dist/adapter/next/dashboardUrl.js +13 -0
  7. package/dist/adapter/next/syncCheck.d.ts +15 -2
  8. package/dist/adapter/next/syncCheck.js +26 -9
  9. package/dist/backend/Handler.js +5 -1
  10. package/dist/backend/api/BlobStore.d.ts +21 -0
  11. package/dist/backend/api/BlobStore.js +63 -0
  12. package/dist/backend/api/CreateBackend.js +10 -8
  13. package/dist/backend/api/DatabaseApi.d.ts +4 -1
  14. package/dist/backend/api/DatabaseApi.js +88 -4
  15. package/dist/backend/api/GithubApi.js +47 -24
  16. package/dist/backend/api/database.js +6 -6
  17. package/dist/bundled.d.ts +676 -280
  18. package/dist/chunks/{bun-sqlite-5SHXN3AT.js → bun-sqlite-RI6BYU5S.js} +3 -3
  19. package/dist/chunks/{chunk-OHGAVV4G.js → chunk-3QFSGTGF.js} +2 -3
  20. package/dist/chunks/{chunk-QJGGYF6E.js → chunk-4ZA6KZHS.js} +5 -5
  21. package/dist/chunks/{chunk-ASYKC6IE.js → chunk-5H4D5JQL.js} +1 -1
  22. package/dist/chunks/{chunk-ETWOY4AL.js → chunk-A2I6MCCS.js} +1 -1
  23. package/dist/chunks/{chunk-W5AXN7GH.js → chunk-CYVOGRSD.js} +1 -2
  24. package/dist/chunks/{chunk-TIJTT5ZI.js → chunk-G43W7AME.js} +1 -0
  25. package/dist/chunks/{chunk-RE523BQ7.js → chunk-HOETF6HN.js} +5829 -5830
  26. package/dist/chunks/{chunk-AIU6CMVT.js → chunk-PTYZMV5G.js} +1 -1
  27. package/dist/chunks/{chunk-JOF663EG.js → chunk-QHHMKJUO.js} +1 -1
  28. package/dist/chunks/{chunk-66YZ47TY.js → chunk-RAR44T5O.js} +1 -1
  29. package/dist/chunks/{chunk-QSN6RH6X.js → chunk-VA6NC3MI.js} +1 -1
  30. package/dist/chunks/{node-sqlite-XVNTNMCY.js → node-sqlite-C7VJ2NSN.js} +3 -3
  31. package/dist/cli/Mcp.js +1 -1
  32. package/dist/cli/Serve.js +1 -1
  33. package/dist/cli/bin.js +2 -3
  34. package/dist/cli/serve/mcp/DevMcp.js +1 -1
  35. package/dist/cli/serve/mcp/McpTools.js +29 -1
  36. package/dist/cloud/CloudRemote.js +1 -1
  37. package/dist/components/Alert.js +2 -2
  38. package/dist/components/AppShell.js +2 -2
  39. package/dist/components/Badge.d.ts +3 -1
  40. package/dist/components/Badge.js +5 -3
  41. package/dist/components/Breadcrumbs.js +7 -7
  42. package/dist/components/Button.d.ts +6 -1
  43. package/dist/components/Button.js +16 -7
  44. package/dist/components/Calendar.js +20 -20
  45. package/dist/components/Checkbox.js +7 -7
  46. package/dist/components/CheckboxGroup.js +4 -4
  47. package/dist/components/Code.js +2 -2
  48. package/dist/components/Collapsible.js +3 -3
  49. package/dist/components/ColorSwatch.js +2 -2
  50. package/dist/components/ColorSwatchPicker.js +2 -2
  51. package/dist/components/ComboBox.js +7 -7
  52. package/dist/components/Command.js +14 -13
  53. package/dist/components/ContentCard.d.ts +3 -1
  54. package/dist/components/ContentCard.js +46 -24
  55. package/dist/components/ContentGrid.js +17 -17
  56. package/dist/components/DataList.js +2 -2
  57. package/dist/components/DateField.js +2 -2
  58. package/dist/components/DatePicker.js +2 -2
  59. package/dist/components/DateRangePicker.js +2 -2
  60. package/dist/components/Dialog.js +7 -7
  61. package/dist/components/DropZone.js +6 -6
  62. package/dist/components/DropdownMenu.js +9 -9
  63. package/dist/components/Empty.js +5 -5
  64. package/dist/components/Field.js +8 -8
  65. package/dist/components/List.js +27 -27
  66. package/dist/components/MediaPreview.js +5 -5
  67. package/dist/components/MultipleSelect.js +22 -22
  68. package/dist/components/NavRail.js +4 -4
  69. package/dist/components/NumberField.js +4 -4
  70. package/dist/components/Page.js +3 -3
  71. package/dist/components/Popover.js +2 -2
  72. package/dist/components/PreviewFrame.js +9 -9
  73. package/dist/components/RadioGroup.js +9 -9
  74. package/dist/components/Resizable.js +4 -4
  75. package/dist/components/SearchField.d.ts +6 -1
  76. package/dist/components/SearchField.js +5 -3
  77. package/dist/components/Select.js +13 -13
  78. package/dist/components/Sheet.d.ts +50 -0
  79. package/dist/components/Sheet.js +202 -0
  80. package/dist/components/Sidebar.js +4 -4
  81. package/dist/components/SortableList.d.ts +34 -30
  82. package/dist/components/SortableList.js +161 -264
  83. package/dist/components/Spinner.js +2 -2
  84. package/dist/components/Surface.js +2 -2
  85. package/dist/components/Switch.js +8 -8
  86. package/dist/components/Table.d.ts +3 -1
  87. package/dist/components/Table.js +57 -46
  88. package/dist/components/Tabs.js +5 -5
  89. package/dist/components/TagGroup.js +8 -8
  90. package/dist/components/TextField.js +10 -10
  91. package/dist/components/TimeField.js +6 -6
  92. package/dist/components/Timestamp.js +1 -1
  93. package/dist/components/ToggleGroup.js +2 -2
  94. package/dist/components/Toolbar.js +2 -2
  95. package/dist/components/Tooltip.js +5 -5
  96. package/dist/components/Tree.js +24 -24
  97. package/dist/components/internal/DateControl.js +12 -12
  98. package/dist/components/internal/ListBoxOption.js +6 -6
  99. package/dist/components/internal/Locale.js +2 -2
  100. package/dist/components/internal/PopoverSurface.js +4 -4
  101. package/dist/components/internal/SelectionCheckbox.js +5 -5
  102. package/dist/components/internal/Slot.js +1 -1
  103. package/dist/components/internal/ToggleButton.js +3 -3
  104. package/dist/components/internal/Trigger.js +2 -2
  105. package/dist/components/internal/sortableDrag.d.ts +19 -0
  106. package/dist/components/internal/sortableDrag.js +175 -0
  107. package/dist/components/internal/useDragDrop.js +2 -2
  108. package/dist/components.d.ts +1 -0
  109. package/dist/components.js +1 -0
  110. package/dist/core/Config.d.ts +6 -1
  111. package/dist/core/Document.d.ts +9 -1
  112. package/dist/core/Document.js +31 -6
  113. package/dist/core/Overview.d.ts +2 -4
  114. package/dist/core/TextDoc.d.ts +4 -0
  115. package/dist/core/Validation.d.ts +0 -1
  116. package/dist/core/Validation.js +0 -6
  117. package/dist/core/field/RichTextField.js +23 -4
  118. package/dist/core/media/MediaTypes.js +1 -1
  119. package/dist/core/source/GithubSource.d.ts +4 -0
  120. package/dist/core/source/GithubSource.js +127 -25
  121. package/dist/core/source/GithubUsage.d.ts +21 -0
  122. package/dist/core/source/GithubUsage.js +47 -0
  123. package/dist/dashboard/App.d.ts +2 -2
  124. package/dist/dashboard/App.js +5 -3
  125. package/dist/dashboard/ViewKeys.d.ts +1 -0
  126. package/dist/dashboard/ViewKeys.js +1 -0
  127. package/dist/dashboard/app/ActivityStatus.js +7 -7
  128. package/dist/dashboard/app/AuthView.js +5 -5
  129. package/dist/dashboard/app/BlockSheet.d.ts +50 -0
  130. package/dist/dashboard/app/BlockSheet.js +207 -0
  131. package/dist/dashboard/app/BlockSheetStoryFrame.d.ts +6 -0
  132. package/dist/dashboard/app/BlockSheetStoryFrame.js +29 -0
  133. package/dist/dashboard/app/CompactField.js +16 -16
  134. package/dist/dashboard/app/DashboardLayout.js +3 -1
  135. package/dist/dashboard/app/EntryFields.js +2 -2
  136. package/dist/dashboard/app/EntryHeader.js +33 -34
  137. package/dist/dashboard/app/EntryReferences.js +7 -7
  138. package/dist/dashboard/app/EntrySidebar.js +15 -15
  139. package/dist/dashboard/app/EntrySidebarPreview.js +3 -3
  140. package/dist/dashboard/app/EntryStatusIcon.d.ts +23 -0
  141. package/dist/dashboard/app/EntryStatusIcon.js +58 -0
  142. package/dist/dashboard/app/EntryValidationModal.d.ts +6 -5
  143. package/dist/dashboard/app/EntryValidationModal.js +20 -20
  144. package/dist/dashboard/app/Explorer.d.ts +3 -1
  145. package/dist/dashboard/app/Explorer.js +48 -44
  146. package/dist/dashboard/app/ExplorerBatchActions.d.ts +3 -1
  147. package/dist/dashboard/app/ExplorerBatchActions.js +68 -43
  148. package/dist/dashboard/app/ExplorerCards.js +7 -1
  149. package/dist/dashboard/app/ExplorerControls.js +6 -6
  150. package/dist/dashboard/app/ExplorerList.js +5 -5
  151. package/dist/dashboard/app/ExplorerModal.js +2 -2
  152. package/dist/dashboard/app/ExplorerTable.js +11 -8
  153. package/dist/dashboard/app/ImageEditor.js +28 -28
  154. package/dist/dashboard/app/ImagePicker.js +3 -13
  155. package/dist/dashboard/app/LinkPicker.js +28 -26
  156. package/dist/dashboard/app/LocaleMenu.js +4 -4
  157. package/dist/dashboard/app/MediaPreviewCell.js +1 -1
  158. package/dist/dashboard/app/MoveConfirmDialog.d.ts +5 -0
  159. package/dist/dashboard/app/MoveConfirmDialog.js +79 -0
  160. package/dist/dashboard/app/OverviewCell.js +8 -13
  161. package/dist/dashboard/app/PendingUploadsView.js +3 -3
  162. package/dist/dashboard/app/ReadOnlyBadge.d.ts +1 -1
  163. package/dist/dashboard/app/RemoveDialog.d.ts +17 -0
  164. package/dist/dashboard/app/{DeleteDialog.js → RemoveDialog.js} +67 -27
  165. package/dist/dashboard/app/RemoveRedirect.d.ts +7 -0
  166. package/dist/dashboard/app/RemoveRedirect.js +123 -0
  167. package/dist/dashboard/app/SearchBar.d.ts +9 -0
  168. package/dist/dashboard/app/SearchBar.js +31 -0
  169. package/dist/dashboard/app/SidebarTree.js +27 -72
  170. package/dist/dashboard/app/WorkspaceMenu.js +7 -7
  171. package/dist/dashboard/app/WorkspaceRoots.js +12 -12
  172. package/dist/dashboard/app/editor/FileEditor.js +14 -14
  173. package/dist/dashboard/app/modals/CreateEntry.js +3 -3
  174. package/dist/dashboard/app/pages/EntryPage.d.ts +2 -1
  175. package/dist/dashboard/app/pages/EntryPage.js +34 -15
  176. package/dist/dashboard/app/pages/SplashPage.js +37 -37
  177. package/dist/dashboard/app/pages/UsersPage.js +12 -12
  178. package/dist/dashboard/app/ui/DashboardModal.js +15 -14
  179. package/dist/dashboard/atoms/dashboard.js +1 -1
  180. package/dist/dashboard/atoms/entry.js +1 -14
  181. package/dist/dashboard/atoms/entryTable.js +1 -0
  182. package/dist/dashboard/atoms/explorer.d.ts +4 -0
  183. package/dist/dashboard/atoms/explorer.js +19 -7
  184. package/dist/dashboard/atoms/graph.js +1 -1
  185. package/dist/dashboard/atoms/link.js +5 -2
  186. package/dist/dashboard/atoms/move.d.ts +5 -0
  187. package/dist/dashboard/atoms/move.js +29 -3
  188. package/dist/dashboard/atoms/moveConfirmation.d.ts +34 -0
  189. package/dist/dashboard/atoms/moveConfirmation.js +95 -0
  190. package/dist/dashboard/atoms/nav.d.ts +9 -5
  191. package/dist/dashboard/atoms/nav.js +120 -45
  192. package/dist/dashboard/atoms/overview.d.ts +6 -5
  193. package/dist/dashboard/atoms/overview.js +2 -16
  194. package/dist/dashboard/atoms/remove.d.ts +112 -0
  195. package/dist/dashboard/atoms/remove.js +268 -0
  196. package/dist/dashboard/atoms/root.d.ts +2 -2
  197. package/dist/dashboard/atoms/root.js +41 -26
  198. package/dist/dashboard/atoms/user.js +1 -1
  199. package/dist/dashboard/atoms/utils.js +1 -1
  200. package/dist/dashboard/boot/Boot.js +25 -17
  201. package/dist/dashboard/boot/DashboardWorker.d.ts +1 -0
  202. package/dist/dashboard/boot/DashboardWorker.js +10 -46
  203. package/dist/dashboard/boot/LoadWorker.js +17 -10
  204. package/dist/dashboard/cms/EntryTable.js +8 -5
  205. package/dist/database/BrowserEntryStore.d.ts +12 -62
  206. package/dist/database/BrowserEntryStore.js +97 -196
  207. package/dist/database/DatabaseTables.js +2 -2
  208. package/dist/database/EntryDatabase.js +21 -1
  209. package/dist/database/EntryTransaction.js +0 -35
  210. package/dist/database/EntryUrlAliases.d.ts +4 -0
  211. package/dist/database/EntryUrlAliases.js +16 -10
  212. package/dist/database/driver/RuntimeDatabase.js +3 -3
  213. package/dist/database/driver/WasmDatabase.d.ts +5 -18
  214. package/dist/database/driver/WasmDatabase.js +15 -16
  215. package/dist/database/entry/EntryTable.js +2 -2
  216. package/dist/database/query/EntryQuery.js +1 -1
  217. package/dist/database/query/Relation.js +1 -1
  218. package/dist/database/query/Search.js +2 -2
  219. package/dist/field/code/CodeField.view.js +16 -16
  220. package/dist/field/link/EntryLink.d.ts +4 -4
  221. package/dist/field/link/FileLink.d.ts +4 -4
  222. package/dist/field/link/ImageLink.d.ts +4 -4
  223. package/dist/field/link/Link.d.ts +1 -1
  224. package/dist/field/link/LinkField.d.ts +5 -0
  225. package/dist/field/link/LinkField.view.js +244 -370
  226. package/dist/field/link/UrlLink.d.ts +4 -4
  227. package/dist/field/list/ListField.d.ts +2 -0
  228. package/dist/field/list/ListField.view.d.ts +15 -0
  229. package/dist/field/list/ListField.view.js +343 -301
  230. package/dist/field/metadata/MetadataField.d.ts +17 -7
  231. package/dist/field/metadata/MetadataField.js +14 -3
  232. package/dist/field/metadata/MetadataField.view.d.ts +1 -0
  233. package/dist/field/metadata/MetadataField.view.js +25 -21
  234. package/dist/field/richtext/RichTextBlock.d.ts +3 -1
  235. package/dist/field/richtext/RichTextBlock.js +177 -74
  236. package/dist/field/richtext/RichTextBlockHost.js +1 -1
  237. package/dist/field/richtext/RichTextExtensions.js +31 -31
  238. package/dist/field/richtext/RichTextField.view.js +14 -8
  239. package/dist/field/richtext/RichTextInsertMenu.js +43 -27
  240. package/dist/field/views.js +2 -0
  241. package/dist/index.css +490 -309
  242. package/dist/picker/url/UrlPicker.js +1 -0
  243. package/docs/components/badge.md +1 -0
  244. package/docs/components/button.md +1 -0
  245. package/docs/components/content-card.md +1 -0
  246. package/docs/components/search-field.md +1 -0
  247. package/docs/components/sortable-list.md +5 -20
  248. package/docs/components/table.md +1 -0
  249. package/docs/configuration.md +1 -1
  250. package/docs/deploy/self-host.md +1 -1
  251. package/docs/deploy.md +5 -4
  252. package/docs/fields.md +1 -1
  253. package/docs/index.md +1 -1
  254. package/docs/instant-publishing.md +7 -22
  255. package/docs/overviews.md +3 -4
  256. package/docs/upgrading.md +3 -2
  257. package/llms-full.txt +31 -55
  258. package/package.json +2 -3
  259. package/dist/core/db/EntryValidationError.d.ts +0 -13
  260. package/dist/core/db/EntryValidationError.js +0 -23
  261. package/dist/dashboard/app/DeleteDialog.d.ts +0 -11
  262. package/dist/dashboard/atoms/delete.d.ts +0 -68
  263. package/dist/dashboard/atoms/delete.js +0 -143
  264. package/dist/chunks/{chunk-MOWR65LM.js → chunk-PYDOMKJZ.js} +71 -71
@@ -38,6 +38,7 @@ function urlPicker(options) {
38
38
  row.url = url;
39
39
  row.href = url;
40
40
  row.title = title;
41
+ if (label === void 0 && title) row[ListRow.label] = title;
41
42
  row.target = target;
42
43
  row.fields = fields;
43
44
  }
@@ -79,6 +79,7 @@ export function BadgeIconsExample() {
79
79
  | --- | --- | --- | --- |
80
80
  | icon | `IconType \| ReactElement` | | |
81
81
  | size | `'default' \| 'sm'` | `'default'` | |
82
+ | color | `'default' \| 'primary'` | | `primary` tints the badge with the accent color, eg. to name a type |
82
83
  | status | `ContentStatus` | | Colors the badge like the matching entry status |
83
84
  | title | `string` | | |
84
85
  Also accepts `className` and `style`, `id` and `aria-*` labelling attributes, `data-*` attributes.
@@ -132,6 +132,7 @@ export function ButtonIconsExample() {
132
132
  | aria-controls | `string` | | |
133
133
  | aria-current | `boolean \| 'page' \| 'step' \| 'location' \| 'date' \| 'time'` | | |
134
134
  | aria-keyshortcuts | `string` | | Keyboard shortcuts that activate the button, eg. `Meta+K Control+K` |
135
+ | draggable | `boolean` | | Lets a press on the button start a native drag, eg. of the draggable element it is in: browsers do not drag from a button otherwise |
135
136
  | onClick | `(event: MouseEvent<HTMLButtonElement>) => void` | | |
136
137
  | ref | `Ref<HTMLButtonElement>` | | |
137
138
  Also accepts `className` and `style`, `id` and `aria-*` labelling attributes, `data-*` attributes.
@@ -48,6 +48,7 @@ The contents of a ContentGridItem, mirroring the dashboard explorer cards
48
48
  | Prop | Type | Default | Description |
49
49
  | --- | --- | --- | --- |
50
50
  | title (required) | `ReactNode` | | |
51
+ | suffix | `ReactNode` | | Shown right after the title, eg. a status icon |
51
52
  | variant | `'icon' \| 'media'` | `'icon'` | `icon` (the default) shows the icon on a neutral background, `media` previews a file: its image on the `color` placeholder, or a file icon |
52
53
  | icon | `IconType` | | The large icon on top of the card |
53
54
  | iconColor | `string` | | The color of the icon, eg. of the kind of file |
@@ -31,6 +31,7 @@ A text input for search queries with a clear button. The `icon` is shown inside
31
31
  | onClear | `() => void` | | Called when the user clears the field with the clear button or escape |
32
32
  | placeholder | `string` | | |
33
33
  | loading | `boolean` | | Shows a spinner while results are being loaded |
34
+ | variant | `'default' \| 'inline'` | `'default'` | `inline` drops the box so the field reads as the top row of the results it searches, like a command palette. The row draws its own border. |
34
35
  | name | `string` | | |
35
36
  | autoFocus | `boolean` | | |
36
37
  | onBlur | `(event: FocusEvent<HTMLInputElement>) => void` | | |
@@ -8,7 +8,6 @@ import {
8
8
  Badge,
9
9
  type DragMoveEvent,
10
10
  SortableList,
11
- SortableListHandle,
12
11
  SortableListItem,
13
12
  SortableListItemDescription,
14
13
  SortableListItemHeader,
@@ -40,7 +39,6 @@ export function SortableListExample() {
40
39
  {sections.map(section => (
41
40
  <SortableListItem key={section.id} id={section.id} role="listitem">
42
41
  <SortableListItemHeader>
43
- <SortableListHandle aria-label={`Drag ${section.label}`} />
44
42
  <SortableListItemTitle>
45
43
  <Badge size="sm">{section.type}</Badge>
46
44
  <SortableListItemDescription>
@@ -60,25 +58,20 @@ export function SortableListExample() {
60
58
  `SortableList`
61
59
  | Prop | Type | Default | Description |
62
60
  | --- | --- | --- | --- |
63
- | onReorder | `(event: DragMoveEvent) => void` | | Enables reordering: items with an `id` can be dragged by their `SortableListHandle`, with a pointer or with the keyboard (Enter on the handle, Tab to an item, Enter to drop). Called with the key of the dragged item and the item it was dropped before or after. Items only drop within the list they were dragged from. |
64
- | dragType | `string` | | Mime type the dragged items carry, defaults to `alinea/sortable-list-item` |
65
- Also accepts every prop of `Surface`.
61
+ | onReorder | `(event: DragMoveEvent) => void` | | Enables reordering: items with an `id` follow the pointer when their `SortableListItemHeader` is dragged, the other items move aside as it passes them. With focus in the header, Alt+ArrowUp and Alt+ArrowDown move an item. Called with the key of the moved item and the item it was dropped before or after. Update the order synchronously: the dropped item glides into the place it renders in right after this returns. |
62
+ Also accepts every prop of a `<div>` element.
66
63
 
67
64
  `SortableListItem`
68
65
  | Prop | Type | Default | Description |
69
66
  | --- | --- | --- | --- |
70
67
  | id | `Key` | | Identifies the item within its list. Items with an id can be dragged when the list has `onReorder`. The id is not rendered as a DOM id. |
71
- | dragPreview | `ReactNode` | | Rendered under the pointer while dragging, eg. a `SortableListDragPreview` |
68
+ | current | `boolean` | | Highlights the item, eg. while its settings are open next to the list |
72
69
  Also accepts every prop of a `<div>` element.
73
70
 
74
71
  `SortableListItemHeader`
75
- Top bar of an item, holds its handle, title and actions
72
+ Top bar of an item, holds its title and actions. Drags the item when the list has `onReorder`, a press that does not move still clicks.
76
73
  Accepts every prop of a `<div>` element.
77
74
 
78
- `SortableListHandle`
79
- Drags its `SortableListItem` when the list has `onReorder`. Focusable in that case: press Enter to start a keyboard drag. Place it in the `SortableListItemHeader`, it shows while the header is hovered or focused.
80
- Accepts every prop of a `<span>` element.
81
-
82
75
  `SortableListItemTitle`
83
76
  Row of the toggle, badges and description of an item, fills the header
84
77
  Accepts every prop of a `<div>` element.
@@ -94,7 +87,7 @@ Accepts every prop of a `<div>` element.
94
87
  Folds the content of an item
95
88
  | Prop | Type | Default | Description |
96
89
  | --- | --- | --- | --- |
97
- | expanded (required) | `boolean` | | Whether the item content is shown, rotates the fold icon |
90
+ | expanded (required) | `boolean` | | Whether the item content is shown, picks the unfold icon |
98
91
  Also accepts every prop of `Button`.
99
92
 
100
93
  `SortableListItemContent`
@@ -112,14 +105,6 @@ A group of settings or actions in the popover of an item
112
105
  | variant | `'default' \| 'actions'` | `'default'` | `actions` removes the padding around a group of ghost buttons |
113
106
  Also accepts every prop of a `<div>` element.
114
107
 
115
- `SortableListDragPreview`
116
- Card shown under the pointer while dragging an item
117
- | Prop | Type | Default | Description |
118
- | --- | --- | --- | --- |
119
- | icon | `IconType` | | |
120
- | label (required) | `ReactNode` | | |
121
- Also accepts every prop of a `<div>` element.
122
-
123
108
  `SortableListAdd`
124
109
  Last row of the list holding the buttons that add items
125
110
  Accepts every prop of a `<div>` element.
@@ -171,6 +171,7 @@ Also accepts `className` and `style`.
171
171
  | icon | `IconType` | | Doubles as the drag handle of the row when rows can be dragged |
172
172
  | title (required) | `ReactNode` | | |
173
173
  | label | `ReactNode` | | A small caption above the title, eg. the parent path |
174
+ | suffix | `ReactNode` | | Shown right after the title, eg. a status icon |
174
175
  Also accepts `className` and `style`.
175
176
 
176
177
  ## Accessibility
@@ -96,7 +96,7 @@ Scale down JPEG, PNG and WebP uploads larger than `maxWidth` or `maxHeight` pixe
96
96
 
97
97
  ### `syncInterval`
98
98
 
99
- How your deployed site keeps its content fresh. The site checks the content revision of the repository and syncs right away when it changed; `syncInterval` is the fallback interval in seconds when that revision can't be determined. Defaults to `60`.
99
+ How your deployed site keeps its content fresh. The site checks the content revision of the repository and syncs right away when it changed; `syncInterval` is the fallback interval in seconds when that revision can't be determined. Defaults to `60`. In Next.js a value you set also controls how long renders share the latest revision, which bounds how soon content pushed without the dashboard shows up; without one that is five minutes.
100
100
 
101
101
  - `0` syncs on every query.
102
102
  - `Infinity` never syncs: the site only serves the content it was built with, and new content goes live with the next deploy.
@@ -111,7 +111,7 @@ Register `https://<your site><handlerUrl>?auth=login` as the redirect URL with y
111
111
 
112
112
  ## Database
113
113
 
114
- `database({driver, client})` stores the users and roles you manage on the Manage users screen of the dashboard, see [Roles and permissions](../roles-permissions.md). Without an `uploads` part it also stores uploaded files until they are committed. Alinea creates its tables (`alinea_user`, `alinea_user_role` and `alinea_upload`) on first use. On PostgreSQL it enables row level security on them, so they are not exposed through Supabase's API.
114
+ `database({driver, client})` stores the users and roles you manage on the Manage users screen of the dashboard, see [Roles and permissions](../roles-permissions.md). Without an `uploads` part it also stores uploaded files until they are committed. It keeps the content files fetched from or committed to GitHub, so every server instance reads them from the database instead of fetching them from GitHub again; files no instance used for 30 days are removed. Alinea creates its tables (`alinea_user`, `alinea_user_role`, `alinea_upload` and `alinea_blob`) on first use. On PostgreSQL it enables row level security on them, so they are not exposed through Supabase's API.
115
115
 
116
116
  Pass the client of one of these packages as `client`, with its name as `driver`:
117
117
 
package/docs/deploy.md CHANGED
@@ -74,17 +74,17 @@ export const GET = handler
74
74
  export const POST = handler
75
75
  ```
76
76
 
77
- Without a `backend` option the handler connects to Alinea Cloud. Pass `backend` to [host it yourself](deploy/self-host.md). Use the `afterCommit` hook to revalidate pages after editors publish, see [Instant publishing](instant-publishing.md).
77
+ Without a `backend` option the handler connects to Alinea Cloud. Pass `backend` to [host it yourself](deploy/self-host.md). Static pages are revalidated in the background after editors publish, see [Instant publishing](instant-publishing.md).
78
78
 
79
79
  ### Commit hooks
80
80
 
81
- Two hooks on the handler run for every commit, whatever it contains. `beforeCommit` receives the changes before they are committed: inspect or rewrite them and return the mutations to commit, or return nothing to keep them as they are. `afterCommit` runs once the commit is made, with the mutations and the `sha` of the new commit: revalidate pages, notify your team or trigger a deploy.
81
+ Two hooks on the handler run for every commit, whatever it contains. `beforeCommit` receives the changes before they are committed: inspect or rewrite them and return the mutations to commit, or return nothing to keep them as they are. `afterCommit` runs once the commit is made, with the mutations and the `sha` of the new commit: revalidate caches of your own, notify your team or trigger a deploy.
82
82
 
83
83
  File: app/(alinea)/api/cms/route.ts
84
84
  ```tsx
85
85
  import {cms} from '@/cms'
86
86
  import {createHandler} from 'alinea/next'
87
- import {revalidatePath} from 'next/cache'
87
+ import {revalidateTag} from 'next/cache'
88
88
 
89
89
  const handler = createHandler({
90
90
  cms,
@@ -93,7 +93,8 @@ const handler = createHandler({
93
93
  return mutations
94
94
  },
95
95
  afterCommit({sha}) {
96
- revalidatePath('/', 'layout')
96
+ // Pages that query content refresh on their own, revalidate your own caches
97
+ revalidateTag('products', 'max')
97
98
  }
98
99
  })
99
100
 
package/docs/fields.md CHANGED
@@ -137,7 +137,7 @@ Field.text('Discount code', {
137
137
  })
138
138
  ```
139
139
 
140
- Required fields and validation messages are shown on the field while an editor works on the entry. An entry can't be published while a field fails these checks: the dashboard lists the invalid fields, and publishing through the API or the MCP server is rejected with the field paths and messages. Drafts can be saved with errors, and hidden or read-only fields are not checked.
140
+ Required fields and validation messages are shown on the field while an editor works on the entry. When an editor publishes an entry with fields that fail these checks, the dashboard lists them so they can be fixed first, or published anyway. Writes through the API are not checked, so importers can publish content that is still incomplete. The MCP server refuses to publish invalid entries and tells the agent which fields to fix. Drafts can be saved with errors, and hidden or read-only fields are not checked.
141
141
 
142
142
  ### Shared fields
143
143
 
package/docs/index.md CHANGED
@@ -129,7 +129,7 @@ The documentation of this version of Alinea, one Markdown file per page of https
129
129
  - [Tooltip](components/tooltip.md): A short description that appears when its trigger is hovered or focused. Use it to name icon-only buttons, not for information editors need to do their work.
130
130
  - [Tree](components/tree.md)
131
131
  - [Custom fields](custom-fields.md): When the built-in fields don't fit your content, create your own.
132
- - [Overviews](overviews.md): When an entry has children, or a root holds entries, the dashboard lists them in an overview: a table, or cards, with the title of each entry and, when they…
132
+ - [Overviews](overviews.md): When an entry has children, or a root holds entries, the dashboard lists them in an overview: a table, or cards, with the title and status of each entry and,…
133
133
 
134
134
  ## Reference
135
135
 
@@ -6,38 +6,23 @@ Content goes live on every commit, without a rebuild. When an editor publishes,
6
6
 
7
7
  Every publish in the dashboard is a git commit. After the commit, the site syncs the new content sha from its own handler, so the next request that renders content reads the latest version. No build or redeploy has to finish before editors see their changes on the live site.
8
8
 
9
+ Diagram: Publish flow: the dashboard publishes to your site's handler, which commits to git and revalidates your running site. The CI build is skipped for commits that only touch content.
10
+
9
11
  ## Skip builds for content-only commits
10
12
 
11
- Because content is synced at runtime, a commit that only changes content does not need a new deployment. On Vercel you can skip those builds with an `ignoreCommand` in `vercel.json`. The command exits successfully, which tells Vercel to skip the build, when nothing outside the `content` directory changed:
13
+ Because content is synced at runtime, a commit that only changes content does not need a new deployment. On Vercel you can skip those builds with an `ignoreCommand` in `vercel.json`. The command exits successfully, which tells Vercel to skip the build, when nothing outside the `content` directory changed since the last deployment. Comparing against `VERCEL_GIT_PREVIOUS_SHA` covers every commit in a push, not only the last one; on the first deployment of a branch it falls back to the previous commit:
12
14
 
13
15
  File: vercel.json
14
16
  ```json
15
17
  {
16
- "ignoreCommand": "git diff --quiet HEAD^ HEAD -- . ':!content'"
18
+ "ignoreCommand": "git diff --quiet ${VERCEL_GIT_PREVIOUS_SHA:-HEAD^} HEAD -- . ':!content' || exit 1"
17
19
  }
18
20
  ```
19
21
 
20
22
  Note (info): Adjust `content` if your content lives in a different directory.
21
23
 
22
- ## Revalidate pages after a commit
23
-
24
- Pages that are rendered at request time pick up new content immediately. Static pages were rendered ahead of time and keep serving the old content until they are revalidated. Use the handler's `afterCommit` hook to revalidate them whenever content is published:
24
+ ## Static pages
25
25
 
26
- File: app/api/cms/route.ts
27
- ```
28
- import {cms} from '@/cms'
29
- import {createHandler} from 'alinea/next'
30
- import {revalidatePath} from 'next/cache'
31
-
32
- const handler = createHandler({
33
- cms,
34
- afterCommit() {
35
- revalidatePath('/', 'layout')
36
- }
37
- })
38
-
39
- export const GET = handler
40
- export const POST = handler
41
- ```
26
+ Static pages are revalidated for you. Every page that queries content is tagged, and after each commit the handler marks those pages as stale. The next visit is still answered from the cache while Next.js rebuilds the page in the background, and the visit after that gets the new content. No visitor waits for a render, and no `revalidatePath` call is needed.
42
27
 
43
- `revalidatePath('/', 'layout')` marks every page as stale, so the next visit to any page renders it with the new content. Narrow it down to specific paths if you only want to revalidate the pages that changed.
28
+ Pages rendered at request time sync on their next render. The first one after a commit can still show the previous version while the shared content sha refreshes. Content pushed to your repository without the dashboard, for example a local edit, skips the handler: pages pick it up within five minutes, or within `syncInterval` seconds when your config sets it. Use the handler's `afterCommit` hook if other caches in your app depend on content, for example your own `fetch` tags.
package/docs/overviews.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Overviews
2
2
 
3
- When an entry has children, or a root holds entries, the dashboard lists them in an overview: a table, or cards, with the title of each entry and, when they tell the entries apart, its type, status and who edited it last. The `overview` option of a container [type](schema/type.md) or a [root](workspaces/root.md) adds your own columns, a default order, a card image and toolbar actions.
3
+ When an entry has children, or a root holds entries, the dashboard lists them in an overview: a table, or cards, with the title and status of each entry and, when they tell the entries apart, its type and who edited it last. The `overview` option of a container [type](schema/type.md) or a [root](workspaces/root.md) adds your own columns, a default order, a card image and toolbar actions.
4
4
 
5
5
  Image: The products overview of the Oak & Loom demo, with its own columns for price, material and stock, sorted by price. (https://v2.alineacms.com/admin/file/screenshots/dashboard-overview.webp)
6
6
 
@@ -173,17 +173,16 @@ Like other views, `view` takes a component or a path to one. Use a path to keep
173
173
 
174
174
  ## Built-in columns
175
175
 
176
- The title is always the first column. The built-in columns follow, then the columns you define. Columns with `position: 'start'` go between the title and the built-in columns.
176
+ The title is always the first column. The built-in columns follow, then the columns you define. Columns with `position: 'start'` go between the title and the built-in columns. Like in the sidebar, an icon after the title marks entries that are not plainly published: drafts, unpublished and archived entries.
177
177
 
178
178
  A built-in column only shows when it tells the listed entries apart. The dashboard decides this from all children of the parent, not only those on screen, so the columns don't change while scrolling or sorting:
179
179
 
180
180
  - `type`: the type of the entry. Shown when the children have more than one type, and in search results and filtered lists.
181
- - `status`: the publication status. Shown when the children differ in status, for example when some are drafts. A list of published entries has no status column.
182
181
  - `updated` and `author`: when the entry was last edited and by whom, read from the audit fields of the metadata field (under the key `metadata`, which `Config.document` and `Field.metadata()` add). Shown when at least one child stores that audit data, so lists of entries created before audit data was recorded don't show empty columns.
183
182
 
184
183
  The columns follow the types of the children that are there. A parent without `contains` accepts any type, but its overview only shows the columns of the types it holds.
185
184
 
186
- Force them on or off with `builtins`, for example `{status: true}` to always show the status, or `{type: false, updated: false, author: false}` to never show those. A column keyed `type`, `status`, `updated` or `author` replaces that built-in column in place, for example to show the writer of an article instead of the last editor. The `title` key is reserved.
185
+ Force them on or off with `builtins`, for example `{type: true}` to always show the type, or `{type: false, updated: false, author: false}` to never show those. A column keyed `type`, `updated` or `author` replaces that built-in column in place, for example to show the writer of an article instead of the last editor. The `title` key is reserved.
187
186
 
188
187
  ## Sorting
189
188
 
package/docs/upgrading.md CHANGED
@@ -149,7 +149,7 @@ File: app/(alinea)/api/cms/route.ts
149
149
  ```tsx
150
150
  import {cms} from '@/cms'
151
151
  import {createHandler} from 'alinea/next'
152
- import {revalidatePath} from 'next/cache'
152
+ import {revalidateTag} from 'next/cache'
153
153
 
154
154
  const handler = createHandler({
155
155
  cms,
@@ -158,7 +158,8 @@ const handler = createHandler({
158
158
  return mutations
159
159
  },
160
160
  afterCommit({sha}) {
161
- revalidatePath('/', 'layout')
161
+ // Pages that query content refresh on their own, revalidate your own caches
162
+ revalidateTag('products', 'max')
162
163
  }
163
164
  })
164
165
 
package/llms-full.txt CHANGED
@@ -2093,7 +2093,7 @@ File: app/(alinea)/api/cms/route.ts
2093
2093
  ```tsx
2094
2094
  import {cms} from '@/cms'
2095
2095
  import {createHandler} from 'alinea/next'
2096
- import {revalidatePath} from 'next/cache'
2096
+ import {revalidateTag} from 'next/cache'
2097
2097
 
2098
2098
  const handler = createHandler({
2099
2099
  cms,
@@ -2102,7 +2102,8 @@ const handler = createHandler({
2102
2102
  return mutations
2103
2103
  },
2104
2104
  afterCommit({sha}) {
2105
- revalidatePath('/', 'layout')
2105
+ // Pages that query content refresh on their own, revalidate your own caches
2106
+ revalidateTag('products', 'max')
2106
2107
  }
2107
2108
  })
2108
2109
 
@@ -2749,7 +2750,7 @@ Field.text('Discount code', {
2749
2750
  })
2750
2751
  ```
2751
2752
 
2752
- Required fields and validation messages are shown on the field while an editor works on the entry. An entry can't be published while a field fails these checks: the dashboard lists the invalid fields, and publishing through the API or the MCP server is rejected with the field paths and messages. Drafts can be saved with errors, and hidden or read-only fields are not checked.
2753
+ Required fields and validation messages are shown on the field while an editor works on the entry. When an editor publishes an entry with fields that fail these checks, the dashboard lists them so they can be fixed first, or published anyway. Writes through the API are not checked, so importers can publish content that is still incomplete. The MCP server refuses to publish invalid entries and tells the agent which fields to fix. Drafts can be saved with errors, and hidden or read-only fields are not checked.
2753
2754
 
2754
2755
  ### Shared fields
2755
2756
 
@@ -5785,41 +5786,26 @@ Content goes live on every commit, without a rebuild. When an editor publishes,
5785
5786
 
5786
5787
  Every publish in the dashboard is a git commit. After the commit, the site syncs the new content sha from its own handler, so the next request that renders content reads the latest version. No build or redeploy has to finish before editors see their changes on the live site.
5787
5788
 
5789
+ Diagram: Publish flow: the dashboard publishes to your site's handler, which commits to git and revalidates your running site. The CI build is skipped for commits that only touch content.
5790
+
5788
5791
  ## Skip builds for content-only commits
5789
5792
 
5790
- Because content is synced at runtime, a commit that only changes content does not need a new deployment. On Vercel you can skip those builds with an `ignoreCommand` in `vercel.json`. The command exits successfully, which tells Vercel to skip the build, when nothing outside the `content` directory changed:
5793
+ Because content is synced at runtime, a commit that only changes content does not need a new deployment. On Vercel you can skip those builds with an `ignoreCommand` in `vercel.json`. The command exits successfully, which tells Vercel to skip the build, when nothing outside the `content` directory changed since the last deployment. Comparing against `VERCEL_GIT_PREVIOUS_SHA` covers every commit in a push, not only the last one; on the first deployment of a branch it falls back to the previous commit:
5791
5794
 
5792
5795
  File: vercel.json
5793
5796
  ```json
5794
5797
  {
5795
- "ignoreCommand": "git diff --quiet HEAD^ HEAD -- . ':!content'"
5798
+ "ignoreCommand": "git diff --quiet ${VERCEL_GIT_PREVIOUS_SHA:-HEAD^} HEAD -- . ':!content' || exit 1"
5796
5799
  }
5797
5800
  ```
5798
5801
 
5799
5802
  Note (info): Adjust `content` if your content lives in a different directory.
5800
5803
 
5801
- ## Revalidate pages after a commit
5802
-
5803
- Pages that are rendered at request time pick up new content immediately. Static pages were rendered ahead of time and keep serving the old content until they are revalidated. Use the handler's `afterCommit` hook to revalidate them whenever content is published:
5804
+ ## Static pages
5804
5805
 
5805
- File: app/api/cms/route.ts
5806
- ```
5807
- import {cms} from '@/cms'
5808
- import {createHandler} from 'alinea/next'
5809
- import {revalidatePath} from 'next/cache'
5806
+ Static pages are revalidated for you. Every page that queries content is tagged, and after each commit the handler marks those pages as stale. The next visit is still answered from the cache while Next.js rebuilds the page in the background, and the visit after that gets the new content. No visitor waits for a render, and no `revalidatePath` call is needed.
5810
5807
 
5811
- const handler = createHandler({
5812
- cms,
5813
- afterCommit() {
5814
- revalidatePath('/', 'layout')
5815
- }
5816
- })
5817
-
5818
- export const GET = handler
5819
- export const POST = handler
5820
- ```
5821
-
5822
- `revalidatePath('/', 'layout')` marks every page as stale, so the next visit to any page renders it with the new content. Narrow it down to specific paths if you only want to revalidate the pages that changed.
5808
+ Pages rendered at request time sync on their next render. The first one after a commit can still show the previous version while the shared content sha refreshes. Content pushed to your repository without the dashboard, for example a local edit, skips the handler: pages pick it up within five minutes, or within `syncInterval` seconds when your config sets it. Use the handler's `afterCommit` hook if other caches in your app depend on content, for example your own `fetch` tags.
5823
5809
 
5824
5810
  ### Editing content (https://v2.alineacms.com/docs/editing-content)
5825
5811
  Your `cms` instance can create, update, publish and delete entries from code, for example to import content from another system or to seed a new project. Changes go through your handler, like saves in the dashboard: during development they are written to your content files.
@@ -6641,17 +6627,17 @@ export const GET = handler
6641
6627
  export const POST = handler
6642
6628
  ```
6643
6629
 
6644
- Without a `backend` option the handler connects to Alinea Cloud. Pass `backend` to [host it yourself](https://v2.alineacms.com/docs/deploy/self-host). Use the `afterCommit` hook to revalidate pages after editors publish, see [Instant publishing](https://v2.alineacms.com/docs/instant-publishing).
6630
+ Without a `backend` option the handler connects to Alinea Cloud. Pass `backend` to [host it yourself](https://v2.alineacms.com/docs/deploy/self-host). Static pages are revalidated in the background after editors publish, see [Instant publishing](https://v2.alineacms.com/docs/instant-publishing).
6645
6631
 
6646
6632
  ### Commit hooks
6647
6633
 
6648
- Two hooks on the handler run for every commit, whatever it contains. `beforeCommit` receives the changes before they are committed: inspect or rewrite them and return the mutations to commit, or return nothing to keep them as they are. `afterCommit` runs once the commit is made, with the mutations and the `sha` of the new commit: revalidate pages, notify your team or trigger a deploy.
6634
+ Two hooks on the handler run for every commit, whatever it contains. `beforeCommit` receives the changes before they are committed: inspect or rewrite them and return the mutations to commit, or return nothing to keep them as they are. `afterCommit` runs once the commit is made, with the mutations and the `sha` of the new commit: revalidate caches of your own, notify your team or trigger a deploy.
6649
6635
 
6650
6636
  File: app/(alinea)/api/cms/route.ts
6651
6637
  ```tsx
6652
6638
  import {cms} from '@/cms'
6653
6639
  import {createHandler} from 'alinea/next'
6654
- import {revalidatePath} from 'next/cache'
6640
+ import {revalidateTag} from 'next/cache'
6655
6641
 
6656
6642
  const handler = createHandler({
6657
6643
  cms,
@@ -6660,7 +6646,8 @@ const handler = createHandler({
6660
6646
  return mutations
6661
6647
  },
6662
6648
  afterCommit({sha}) {
6663
- revalidatePath('/', 'layout')
6649
+ // Pages that query content refresh on their own, revalidate your own caches
6650
+ revalidateTag('products', 'max')
6664
6651
  }
6665
6652
  })
6666
6653
 
@@ -6801,7 +6788,7 @@ Register `https://<your site><handlerUrl>?auth=login` as the redirect URL with y
6801
6788
 
6802
6789
  ## Database
6803
6790
 
6804
- `database({driver, client})` stores the users and roles you manage on the Manage users screen of the dashboard, see [Roles and permissions](https://v2.alineacms.com/docs/roles-permissions). Without an `uploads` part it also stores uploaded files until they are committed. Alinea creates its tables (`alinea_user`, `alinea_user_role` and `alinea_upload`) on first use. On PostgreSQL it enables row level security on them, so they are not exposed through Supabase's API.
6791
+ `database({driver, client})` stores the users and roles you manage on the Manage users screen of the dashboard, see [Roles and permissions](https://v2.alineacms.com/docs/roles-permissions). Without an `uploads` part it also stores uploaded files until they are committed. It keeps the content files fetched from or committed to GitHub, so every server instance reads them from the database instead of fetching them from GitHub again; files no instance used for 30 days are removed. Alinea creates its tables (`alinea_user`, `alinea_user_role`, `alinea_upload` and `alinea_blob`) on first use. On PostgreSQL it enables row level security on them, so they are not exposed through Supabase's API.
6805
6792
 
6806
6793
  Pass the client of one of these packages as `client`, with its name as `driver`:
6807
6794
 
@@ -8137,6 +8124,7 @@ export function BadgeIconsExample() {
8137
8124
  | --- | --- | --- | --- |
8138
8125
  | icon | `IconType \| ReactElement` | | |
8139
8126
  | size | `'default' \| 'sm'` | `'default'` | |
8127
+ | color | `'default' \| 'primary'` | | `primary` tints the badge with the accent color, eg. to name a type |
8140
8128
  | status | `ContentStatus` | | Colors the badge like the matching entry status |
8141
8129
  | title | `string` | | |
8142
8130
  Also accepts `className` and `style`, `id` and `aria-*` labelling attributes, `data-*` attributes.
@@ -8385,6 +8373,7 @@ export function ButtonIconsExample() {
8385
8373
  | aria-controls | `string` | | |
8386
8374
  | aria-current | `boolean \| 'page' \| 'step' \| 'location' \| 'date' \| 'time'` | | |
8387
8375
  | aria-keyshortcuts | `string` | | Keyboard shortcuts that activate the button, eg. `Meta+K Control+K` |
8376
+ | draggable | `boolean` | | Lets a press on the button start a native drag, eg. of the draggable element it is in: browsers do not drag from a button otherwise |
8388
8377
  | onClick | `(event: MouseEvent<HTMLButtonElement>) => void` | | |
8389
8378
  | ref | `Ref<HTMLButtonElement>` | | |
8390
8379
  Also accepts `className` and `style`, `id` and `aria-*` labelling attributes, `data-*` attributes.
@@ -8868,6 +8857,7 @@ The contents of a ContentGridItem, mirroring the dashboard explorer cards
8868
8857
  | Prop | Type | Default | Description |
8869
8858
  | --- | --- | --- | --- |
8870
8859
  | title (required) | `ReactNode` | | |
8860
+ | suffix | `ReactNode` | | Shown right after the title, eg. a status icon |
8871
8861
  | variant | `'icon' \| 'media'` | `'icon'` | `icon` (the default) shows the icon on a neutral background, `media` previews a file: its image on the `color` placeholder, or a file icon |
8872
8862
  | icon | `IconType` | | The large icon on top of the card |
8873
8863
  | iconColor | `string` | | The color of the icon, eg. of the kind of file |
@@ -10628,6 +10618,7 @@ A text input for search queries with a clear button. The `icon` is shown inside
10628
10618
  | onClear | `() => void` | | Called when the user clears the field with the clear button or escape |
10629
10619
  | placeholder | `string` | | |
10630
10620
  | loading | `boolean` | | Shows a spinner while results are being loaded |
10621
+ | variant | `'default' \| 'inline'` | `'default'` | `inline` drops the box so the field reads as the top row of the results it searches, like a command palette. The row draws its own border. |
10631
10622
  | name | `string` | | |
10632
10623
  | autoFocus | `boolean` | | |
10633
10624
  | onBlur | `(event: FocusEvent<HTMLInputElement>) => void` | | |
@@ -10900,7 +10891,6 @@ import {
10900
10891
  Badge,
10901
10892
  type DragMoveEvent,
10902
10893
  SortableList,
10903
- SortableListHandle,
10904
10894
  SortableListItem,
10905
10895
  SortableListItemDescription,
10906
10896
  SortableListItemHeader,
@@ -10932,7 +10922,6 @@ export function SortableListExample() {
10932
10922
  {sections.map(section => (
10933
10923
  <SortableListItem key={section.id} id={section.id} role="listitem">
10934
10924
  <SortableListItemHeader>
10935
- <SortableListHandle aria-label={`Drag ${section.label}`} />
10936
10925
  <SortableListItemTitle>
10937
10926
  <Badge size="sm">{section.type}</Badge>
10938
10927
  <SortableListItemDescription>
@@ -10952,25 +10941,20 @@ export function SortableListExample() {
10952
10941
  `SortableList`
10953
10942
  | Prop | Type | Default | Description |
10954
10943
  | --- | --- | --- | --- |
10955
- | onReorder | `(event: DragMoveEvent) => void` | | Enables reordering: items with an `id` can be dragged by their `SortableListHandle`, with a pointer or with the keyboard (Enter on the handle, Tab to an item, Enter to drop). Called with the key of the dragged item and the item it was dropped before or after. Items only drop within the list they were dragged from. |
10956
- | dragType | `string` | | Mime type the dragged items carry, defaults to `alinea/sortable-list-item` |
10957
- Also accepts every prop of `Surface`.
10944
+ | onReorder | `(event: DragMoveEvent) => void` | | Enables reordering: items with an `id` follow the pointer when their `SortableListItemHeader` is dragged, the other items move aside as it passes them. With focus in the header, Alt+ArrowUp and Alt+ArrowDown move an item. Called with the key of the moved item and the item it was dropped before or after. Update the order synchronously: the dropped item glides into the place it renders in right after this returns. |
10945
+ Also accepts every prop of a `<div>` element.
10958
10946
 
10959
10947
  `SortableListItem`
10960
10948
  | Prop | Type | Default | Description |
10961
10949
  | --- | --- | --- | --- |
10962
10950
  | id | `Key` | | Identifies the item within its list. Items with an id can be dragged when the list has `onReorder`. The id is not rendered as a DOM id. |
10963
- | dragPreview | `ReactNode` | | Rendered under the pointer while dragging, eg. a `SortableListDragPreview` |
10951
+ | current | `boolean` | | Highlights the item, eg. while its settings are open next to the list |
10964
10952
  Also accepts every prop of a `<div>` element.
10965
10953
 
10966
10954
  `SortableListItemHeader`
10967
- Top bar of an item, holds its handle, title and actions
10955
+ Top bar of an item, holds its title and actions. Drags the item when the list has `onReorder`, a press that does not move still clicks.
10968
10956
  Accepts every prop of a `<div>` element.
10969
10957
 
10970
- `SortableListHandle`
10971
- Drags its `SortableListItem` when the list has `onReorder`. Focusable in that case: press Enter to start a keyboard drag. Place it in the `SortableListItemHeader`, it shows while the header is hovered or focused.
10972
- Accepts every prop of a `<span>` element.
10973
-
10974
10958
  `SortableListItemTitle`
10975
10959
  Row of the toggle, badges and description of an item, fills the header
10976
10960
  Accepts every prop of a `<div>` element.
@@ -10986,7 +10970,7 @@ Accepts every prop of a `<div>` element.
10986
10970
  Folds the content of an item
10987
10971
  | Prop | Type | Default | Description |
10988
10972
  | --- | --- | --- | --- |
10989
- | expanded (required) | `boolean` | | Whether the item content is shown, rotates the fold icon |
10973
+ | expanded (required) | `boolean` | | Whether the item content is shown, picks the unfold icon |
10990
10974
  Also accepts every prop of `Button`.
10991
10975
 
10992
10976
  `SortableListItemContent`
@@ -11004,14 +10988,6 @@ A group of settings or actions in the popover of an item
11004
10988
  | variant | `'default' \| 'actions'` | `'default'` | `actions` removes the padding around a group of ghost buttons |
11005
10989
  Also accepts every prop of a `<div>` element.
11006
10990
 
11007
- `SortableListDragPreview`
11008
- Card shown under the pointer while dragging an item
11009
- | Prop | Type | Default | Description |
11010
- | --- | --- | --- | --- |
11011
- | icon | `IconType` | | |
11012
- | label (required) | `ReactNode` | | |
11013
- Also accepts every prop of a `<div>` element.
11014
-
11015
10991
  `SortableListAdd`
11016
10992
  Last row of the list holding the buttons that add items
11017
10993
  Accepts every prop of a `<div>` element.
@@ -11323,6 +11299,7 @@ Also accepts `className` and `style`.
11323
11299
  | icon | `IconType` | | Doubles as the drag handle of the row when rows can be dragged |
11324
11300
  | title (required) | `ReactNode` | | |
11325
11301
  | label | `ReactNode` | | A small caption above the title, eg. the parent path |
11302
+ | suffix | `ReactNode` | | Shown right after the title, eg. a status icon |
11326
11303
  Also accepts `className` and `style`.
11327
11304
 
11328
11305
  ## Accessibility
@@ -12321,7 +12298,7 @@ Field views from 1.x keep working, with deprecated APIs:
12321
12298
  See [Upgrading from 1.x](https://v2.alineacms.com/docs/upgrading) for the other dashboard changes.
12322
12299
 
12323
12300
  ### Overviews (https://v2.alineacms.com/docs/overviews)
12324
- When an entry has children, or a root holds entries, the dashboard lists them in an overview: a table, or cards, with the title of each entry and, when they tell the entries apart, its type, status and who edited it last. The `overview` option of a container [type](https://v2.alineacms.com/docs/schema/type) or a [root](https://v2.alineacms.com/docs/workspaces/root) adds your own columns, a default order, a card image and toolbar actions.
12301
+ When an entry has children, or a root holds entries, the dashboard lists them in an overview: a table, or cards, with the title and status of each entry and, when they tell the entries apart, its type and who edited it last. The `overview` option of a container [type](https://v2.alineacms.com/docs/schema/type) or a [root](https://v2.alineacms.com/docs/workspaces/root) adds your own columns, a default order, a card image and toolbar actions.
12325
12302
 
12326
12303
  Image: The products overview of the Oak & Loom demo, with its own columns for price, material and stock, sorted by price. (https://v2.alineacms.com/admin/file/screenshots/dashboard-overview.webp)
12327
12304
 
@@ -12494,17 +12471,16 @@ Like other views, `view` takes a component or a path to one. Use a path to keep
12494
12471
 
12495
12472
  ## Built-in columns
12496
12473
 
12497
- The title is always the first column. The built-in columns follow, then the columns you define. Columns with `position: 'start'` go between the title and the built-in columns.
12474
+ The title is always the first column. The built-in columns follow, then the columns you define. Columns with `position: 'start'` go between the title and the built-in columns. Like in the sidebar, an icon after the title marks entries that are not plainly published: drafts, unpublished and archived entries.
12498
12475
 
12499
12476
  A built-in column only shows when it tells the listed entries apart. The dashboard decides this from all children of the parent, not only those on screen, so the columns don't change while scrolling or sorting:
12500
12477
 
12501
12478
  - `type`: the type of the entry. Shown when the children have more than one type, and in search results and filtered lists.
12502
- - `status`: the publication status. Shown when the children differ in status, for example when some are drafts. A list of published entries has no status column.
12503
12479
  - `updated` and `author`: when the entry was last edited and by whom, read from the audit fields of the metadata field (under the key `metadata`, which `Config.document` and `Field.metadata()` add). Shown when at least one child stores that audit data, so lists of entries created before audit data was recorded don't show empty columns.
12504
12480
 
12505
12481
  The columns follow the types of the children that are there. A parent without `contains` accepts any type, but its overview only shows the columns of the types it holds.
12506
12482
 
12507
- Force them on or off with `builtins`, for example `{status: true}` to always show the status, or `{type: false, updated: false, author: false}` to never show those. A column keyed `type`, `status`, `updated` or `author` replaces that built-in column in place, for example to show the writer of an article instead of the last editor. The `title` key is reserved.
12483
+ Force them on or off with `builtins`, for example `{type: true}` to always show the type, or `{type: false, updated: false, author: false}` to never show those. A column keyed `type`, `updated` or `author` replaces that built-in column in place, for example to show the writer of an article instead of the last editor. The `title` key is reserved.
12508
12484
 
12509
12485
  ## Sorting
12510
12486
 
@@ -12876,7 +12852,7 @@ Scale down JPEG, PNG and WebP uploads larger than `maxWidth` or `maxHeight` pixe
12876
12852
 
12877
12853
  ### `syncInterval`
12878
12854
 
12879
- How your deployed site keeps its content fresh. The site checks the content revision of the repository and syncs right away when it changed; `syncInterval` is the fallback interval in seconds when that revision can't be determined. Defaults to `60`.
12855
+ How your deployed site keeps its content fresh. The site checks the content revision of the repository and syncs right away when it changed; `syncInterval` is the fallback interval in seconds when that revision can't be determined. Defaults to `60`. In Next.js a value you set also controls how long renders share the latest revision, which bounds how soon content pushed without the dashboard shows up; without one that is five minutes.
12880
12856
 
12881
12857
  - `0` syncs on every query.
12882
12858
  - `Infinity` never syncs: the site only serves the content it was built with, and new content goes live with the next deploy.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alinea",
3
- "version": "2.0.0-preview.12",
3
+ "version": "2.0.0-preview.13",
4
4
  "description": "Open source, Git-based headless CMS for Next.js",
5
5
  "keywords": [
6
6
  "cms",
@@ -84,7 +84,6 @@
84
84
  "stories": "bunx --bun ladle serve",
85
85
  "tag": "bun tag.js",
86
86
  "spec": "playwright test -c .playwright/playwright.config.ts",
87
- "spec:visual": "playwright test -c .playwright/playwright.visual.config.ts",
88
87
  "trace": "tsc --diagnostics --generateTrace private/trace && analyze-trace private/trace & speedscope private/trace/trace.json",
89
88
  "type": "tsc --diagnostics",
90
89
  "web": "run-p dev:check web:run",
@@ -92,7 +91,7 @@
92
91
  },
93
92
  "dependencies": {
94
93
  "@alinea/iso": "^0.3.3",
95
- "@alinea/sqlite-wasm": "0.3.1",
94
+ "@alinea/sqlite-wasm": "0.8.1",
96
95
  "esbuild": "^0.28.0"
97
96
  },
98
97
  "peerDependencies": {
@@ -1,13 +0,0 @@
1
- import { HttpError } from '../HttpError.js';
2
- import { type FieldValidationError } from '../Validation.js';
3
- export interface EntryValidationErrorInfo {
4
- entryId: string;
5
- title?: string;
6
- errors: Array<FieldValidationError>;
7
- }
8
- /** A published version would contain fields which fail validation */
9
- export declare class EntryValidationError extends HttpError {
10
- info: EntryValidationErrorInfo;
11
- name: string;
12
- constructor(info: EntryValidationErrorInfo);
13
- }