alinea 2.0.0-preview.13 → 2.0.0-preview.14

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 (323) 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 +6 -2
  5. package/dist/adapter/next/context.js +1 -4
  6. package/dist/adapter/next/handler.js +12 -1
  7. package/dist/backend/CommitEntries.d.ts +17 -0
  8. package/dist/backend/CommitEntries.js +39 -0
  9. package/dist/backend/Handler.d.ts +9 -0
  10. package/dist/backend/Handler.js +80 -20
  11. package/dist/backend/api/BasicAuth.js +5 -1
  12. package/dist/backend/api/CreateBackend.js +2 -2
  13. package/dist/backend/api/DatabaseApi.js +18 -5
  14. package/dist/backend/api/GithubApi.d.ts +13 -0
  15. package/dist/backend/api/GithubApi.js +170 -30
  16. package/dist/backend/api/database.js +2 -2
  17. package/dist/backend/util/Syncable.d.ts +6 -0
  18. package/dist/backend/util/Syncable.js +3 -1
  19. package/dist/bundled.d.ts +911 -151
  20. package/dist/chunks/{chunk-5H4D5JQL.js → chunk-2PP7WJUJ.js} +1 -11
  21. package/dist/chunks/{chunk-QHHMKJUO.js → chunk-7DDPSWRY.js} +465 -2
  22. package/dist/chunks/{chunk-HOETF6HN.js → chunk-PMGIIYDD.js} +1 -0
  23. package/dist/chunks/{chunk-3QFSGTGF.js → chunk-SCV3TEXM.js} +1 -1
  24. package/dist/chunks/{chunk-UPY2RUZF.js → chunk-TWBREZWC.js} +30 -0
  25. package/dist/cli/Generate.js +20 -7
  26. package/dist/cli/Mcp.js +1 -1
  27. package/dist/cli/Serve.js +1 -1
  28. package/dist/cli/bin.js +1 -1
  29. package/dist/cli/build/BuildEmitter.d.ts +5 -1
  30. package/dist/cli/build/BuildEmitter.js +8 -3
  31. package/dist/cli/generate/CompileConfig.js +10 -6
  32. package/dist/cli/generate/DevDB.d.ts +4 -1
  33. package/dist/cli/generate/DevDB.js +15 -7
  34. package/dist/cli/generate/GenerateDashboard.js +1 -0
  35. package/dist/cli/generate/MediaLocations.d.ts +18 -0
  36. package/dist/cli/generate/MediaLocations.js +69 -0
  37. package/dist/cli/serve/CreateLocalServer.js +1 -0
  38. package/dist/cli/serve/mcp/DevMcp.js +1 -1
  39. package/dist/cloud/CloudRemote.js +21 -7
  40. package/dist/cms.d.ts +4 -2
  41. package/dist/components/Alert.js +2 -2
  42. package/dist/components/AppShell.js +2 -2
  43. package/dist/components/AsyncList.d.ts +52 -0
  44. package/dist/components/AsyncList.js +69 -0
  45. package/dist/components/Breadcrumbs.js +6 -6
  46. package/dist/components/Button.js +4 -4
  47. package/dist/components/Calendar.js +18 -18
  48. package/dist/components/Checkbox.js +10 -10
  49. package/dist/components/CheckboxGroup.js +2 -2
  50. package/dist/components/Collapsible.js +5 -5
  51. package/dist/components/ColorSwatch.js +2 -2
  52. package/dist/components/ColorSwatchPicker.js +4 -4
  53. package/dist/components/ComboBox.d.ts +27 -9
  54. package/dist/components/ComboBox.js +40 -9
  55. package/dist/components/Command.js +13 -13
  56. package/dist/components/ContentCard.js +28 -28
  57. package/dist/components/ContentGrid.js +11 -11
  58. package/dist/components/DataList.js +1 -1
  59. package/dist/components/DateField.d.ts +4 -0
  60. package/dist/components/DateField.js +2 -2
  61. package/dist/components/DatePicker.js +2 -2
  62. package/dist/components/DateRangePicker.js +2 -2
  63. package/dist/components/Dialog.d.ts +14 -3
  64. package/dist/components/Dialog.js +38 -11
  65. package/dist/components/DropZone.js +6 -6
  66. package/dist/components/DropdownMenu.js +8 -8
  67. package/dist/components/Empty.js +4 -4
  68. package/dist/components/Field.d.ts +1 -1
  69. package/dist/components/Field.js +18 -12
  70. package/dist/components/Form.d.ts +23 -0
  71. package/dist/components/Form.js +64 -0
  72. package/dist/components/Link.d.ts +8 -1
  73. package/dist/components/List.js +27 -27
  74. package/dist/components/MediaPreview.js +5 -5
  75. package/dist/components/MultipleSelect.d.ts +13 -8
  76. package/dist/components/MultipleSelect.js +25 -25
  77. package/dist/components/NavRail.js +7 -7
  78. package/dist/components/NumberField.d.ts +5 -1
  79. package/dist/components/NumberField.js +6 -4
  80. package/dist/components/Page.js +6 -6
  81. package/dist/components/Popover.js +2 -2
  82. package/dist/components/PreviewFrame.js +8 -8
  83. package/dist/components/RadioGroup.js +10 -10
  84. package/dist/components/Resizable.js +1 -1
  85. package/dist/components/SearchField.js +8 -8
  86. package/dist/components/Select.d.ts +13 -10
  87. package/dist/components/Select.js +18 -32
  88. package/dist/components/Sheet.js +6 -6
  89. package/dist/components/Sidebar.js +5 -5
  90. package/dist/components/SortableList.js +12 -12
  91. package/dist/components/Spinner.js +4 -4
  92. package/dist/components/Stack.d.ts +20 -0
  93. package/dist/components/Stack.js +45 -0
  94. package/dist/components/Surface.js +1 -1
  95. package/dist/components/Switch.js +5 -5
  96. package/dist/components/Table.d.ts +11 -1
  97. package/dist/components/Table.js +81 -53
  98. package/dist/components/Tabs.js +6 -6
  99. package/dist/components/TagGroup.js +10 -10
  100. package/dist/components/TextField.d.ts +7 -1
  101. package/dist/components/TextField.js +20 -11
  102. package/dist/components/TimeField.d.ts +6 -1
  103. package/dist/components/TimeField.js +51 -26
  104. package/dist/components/Timestamp.js +1 -1
  105. package/dist/components/ToggleGroup.js +2 -2
  106. package/dist/components/Toolbar.js +3 -3
  107. package/dist/components/Tooltip.js +5 -4
  108. package/dist/components/Tree.js +27 -27
  109. package/dist/components/internal/DateControl.js +11 -11
  110. package/dist/components/internal/FormScope.d.ts +2 -0
  111. package/dist/components/internal/FormScope.js +8 -0
  112. package/dist/components/internal/ListBoxGroup.d.ts +12 -0
  113. package/dist/components/internal/ListBoxGroup.js +46 -0
  114. package/dist/components/internal/ListBoxOption.d.ts +2 -2
  115. package/dist/components/internal/ListBoxOption.js +5 -5
  116. package/dist/components/internal/Locale.js +2 -2
  117. package/dist/components/internal/PopoverSurface.js +5 -4
  118. package/dist/components/internal/SelectionCheckbox.js +5 -5
  119. package/dist/components/internal/Slot.js +1 -1
  120. package/dist/components/internal/ToggleButton.js +4 -4
  121. package/dist/components/internal/Trigger.js +2 -2
  122. package/dist/components/internal/useDragDrop.js +2 -2
  123. package/dist/components/types.d.ts +4 -0
  124. package/dist/components.d.ts +3 -0
  125. package/dist/components.js +3 -0
  126. package/dist/core/Client.js +12 -1
  127. package/dist/core/Config.d.ts +6 -0
  128. package/dist/core/Config.js +12 -0
  129. package/dist/core/DashboardEntry.d.ts +19 -0
  130. package/dist/core/DashboardEntry.js +0 -0
  131. package/dist/core/Document.d.ts +2 -2
  132. package/dist/core/Document.js +10 -3
  133. package/dist/core/EntryFields.d.ts +8 -2
  134. package/dist/core/Field.d.ts +5 -0
  135. package/dist/core/Filter.d.ts +19 -2
  136. package/dist/core/Filter.js +5 -0
  137. package/dist/core/Graph.d.ts +10 -2
  138. package/dist/core/Overview.d.ts +74 -5
  139. package/dist/core/Overview.js +1 -0
  140. package/dist/core/Root.js +1 -1
  141. package/dist/core/Scope.d.ts +5 -0
  142. package/dist/core/Scope.js +22 -5
  143. package/dist/core/Type.d.ts +25 -6
  144. package/dist/core/Type.js +25 -7
  145. package/dist/core/db/LocalStore.d.ts +7 -0
  146. package/dist/core/field/CreateField.d.ts +1 -2
  147. package/dist/core/source/Source.d.ts +2 -0
  148. package/dist/core/source/Source.js +11 -0
  149. package/dist/core/util/Async.d.ts +2 -0
  150. package/dist/core/util/Async.js +12 -1
  151. package/dist/core/util/Checks.js +1 -1
  152. package/dist/core/util/Slugs.js +4 -3
  153. package/dist/dashboard/App.css +13 -11
  154. package/dist/dashboard/App.d.ts +1 -0
  155. package/dist/dashboard/App.js +22 -6
  156. package/dist/dashboard/Href.d.ts +37 -0
  157. package/dist/dashboard/Href.js +46 -0
  158. package/dist/dashboard/app/ActivityStatus.js +34 -12
  159. package/dist/dashboard/app/AuthView.js +2 -2
  160. package/dist/dashboard/app/BlockSettings.d.ts +9 -0
  161. package/dist/dashboard/app/BlockSettings.js +16 -0
  162. package/dist/dashboard/app/BlockSheet.js +3 -3
  163. package/dist/dashboard/app/BlockSheetStoryFrame.js +2 -2
  164. package/dist/dashboard/app/CompactField.js +15 -15
  165. package/dist/dashboard/app/CroppedImage.js +2 -2
  166. package/dist/dashboard/app/DashboardLayout.d.ts +1 -1
  167. package/dist/dashboard/app/DashboardLayout.js +12 -0
  168. package/dist/dashboard/app/EntryActions.d.ts +11 -0
  169. package/dist/dashboard/app/EntryActions.js +30 -0
  170. package/dist/dashboard/app/EntryFields.d.ts +15 -2
  171. package/dist/dashboard/app/EntryFields.js +26 -5
  172. package/dist/dashboard/app/EntryHeader.js +17 -7
  173. package/dist/dashboard/app/EntryReferences.js +2 -2
  174. package/dist/dashboard/app/EntrySidebar.js +25 -23
  175. package/dist/dashboard/app/EntrySidebarPreview.js +2 -2
  176. package/dist/dashboard/app/EntryValidationModal.js +3 -3
  177. package/dist/dashboard/app/Explorer.js +84 -45
  178. package/dist/dashboard/app/ExplorerBatchActions.js +4 -4
  179. package/dist/dashboard/app/ExplorerControls.js +5 -5
  180. package/dist/dashboard/app/ExplorerList.js +2 -2
  181. package/dist/dashboard/app/ExplorerModal.js +3 -3
  182. package/dist/dashboard/app/ExplorerOverviewHeader.d.ts +6 -0
  183. package/dist/dashboard/app/ExplorerOverviewHeader.js +28 -0
  184. package/dist/dashboard/app/ExplorerTable.js +7 -7
  185. package/dist/dashboard/app/ExplorerTabs.d.ts +12 -0
  186. package/dist/dashboard/app/ExplorerTabs.js +42 -0
  187. package/dist/dashboard/app/ImageEditor.js +31 -31
  188. package/dist/dashboard/app/LinkPicker.js +3 -3
  189. package/dist/dashboard/app/LocaleMenu.js +9 -9
  190. package/dist/dashboard/app/MediaPreviewCell.js +5 -5
  191. package/dist/dashboard/app/OverviewCell.js +12 -10
  192. package/dist/dashboard/app/RemoveDialog.js +5 -0
  193. package/dist/dashboard/app/SearchBar.js +4 -4
  194. package/dist/dashboard/app/SettingsTab.d.ts +6 -0
  195. package/dist/dashboard/app/SettingsTab.js +27 -0
  196. package/dist/dashboard/app/SidebarTree.js +19 -19
  197. package/dist/dashboard/app/WorkspaceMenu.js +6 -6
  198. package/dist/dashboard/app/WorkspaceRoots.js +102 -98
  199. package/dist/dashboard/app/editor/FileEditor.js +18 -18
  200. package/dist/dashboard/app/pages/EntryPage.js +42 -39
  201. package/dist/dashboard/app/pages/RootPage.js +3 -3
  202. package/dist/dashboard/app/pages/SplashPage.js +94 -79
  203. package/dist/dashboard/app/pages/UsersPage.js +9 -9
  204. package/dist/dashboard/app/ui/DashboardModal.js +14 -14
  205. package/dist/dashboard/atoms/activity.d.ts +1 -0
  206. package/dist/dashboard/atoms/activity.js +8 -5
  207. package/dist/dashboard/atoms/config.d.ts +2 -0
  208. package/dist/dashboard/atoms/dashboard.d.ts +11 -0
  209. package/dist/dashboard/atoms/dashboard.js +8 -0
  210. package/dist/dashboard/atoms/editor.d.ts +7 -1
  211. package/dist/dashboard/atoms/editor.js +14 -2
  212. package/dist/dashboard/atoms/explorer.d.ts +15 -0
  213. package/dist/dashboard/atoms/explorer.js +43 -14
  214. package/dist/dashboard/atoms/graph.d.ts +5 -0
  215. package/dist/dashboard/atoms/graph.js +26 -1
  216. package/dist/dashboard/atoms/nav.d.ts +16 -10
  217. package/dist/dashboard/atoms/nav.js +96 -36
  218. package/dist/dashboard/atoms/overview.d.ts +26 -4
  219. package/dist/dashboard/atoms/overview.js +41 -12
  220. package/dist/dashboard/atoms/root.js +7 -1
  221. package/dist/dashboard/boot/ActivityEvent.d.ts +1 -1
  222. package/dist/dashboard/boot/Boot.js +6 -0
  223. package/dist/dashboard/boot/DashboardWorker.d.ts +6 -0
  224. package/dist/dashboard/boot/DashboardWorker.js +89 -8
  225. package/dist/dashboard/boot/LoadWorker.js +3 -0
  226. package/dist/dashboard/boot/SyncEvent.d.ts +7 -0
  227. package/dist/dashboard/boot/SyncEvent.js +14 -0
  228. package/dist/dashboard/boot/WorkerDB.d.ts +1 -0
  229. package/dist/dashboard/boot/WorkerDB.js +3 -0
  230. package/dist/dashboard/cms/EntryTable.d.ts +4 -3
  231. package/dist/dashboard/cms/EntryTable.js +2 -2
  232. package/dist/dashboard/cms/ViewProps.d.ts +3 -2
  233. package/dist/dashboard/cms/hooks.d.ts +34 -18
  234. package/dist/dashboard/cms/hooks.js +43 -18
  235. package/dist/dashboard/contexts.d.ts +3 -2
  236. package/dist/dashboard/contexts.js +3 -2
  237. package/dist/dashboard/hook/UseEntryEditor.d.ts +1 -1
  238. package/dist/dashboard/hook/UseEntryEditor.js +7 -3
  239. package/dist/dashboard/icons.d.ts +1 -0
  240. package/dist/dashboard/icons.js +15 -0
  241. package/dist/database/BrowserEntryStore.js +35 -13
  242. package/dist/database/DatabaseTables.js +1 -1
  243. package/dist/database/EntryDatabase.d.ts +10 -1
  244. package/dist/database/EntryDatabase.js +31 -10
  245. package/dist/database/EntryStore.js +1 -11
  246. package/dist/database/entry/EntryTable.d.ts +5 -3
  247. package/dist/database/entry/EntryTable.js +25 -8
  248. package/dist/database/query/Condition.d.ts +4 -1
  249. package/dist/database/query/Condition.js +16 -5
  250. package/dist/database/query/EntryQuery.js +59 -7
  251. package/dist/database/query/Relation.d.ts +13 -1
  252. package/dist/database/query/Relation.js +19 -1
  253. package/dist/database/query/Search.d.ts +7 -1
  254. package/dist/database/query/Search.js +54 -9
  255. package/dist/database/sync/EntrySyncer.d.ts +2 -0
  256. package/dist/database/sync/EntrySyncer.js +4 -2
  257. package/dist/database/sync/Ingest.d.ts +2 -1
  258. package/dist/database/sync/Ingest.js +20 -6
  259. package/dist/field/code/CodeField.view.js +12 -12
  260. package/dist/field/link/EntryLink.d.ts +4 -5
  261. package/dist/field/link/FileLink.d.ts +2 -2
  262. package/dist/field/link/ImageLink.d.ts +2 -5
  263. package/dist/field/link/ImageLink.js +0 -1
  264. package/dist/field/link/LinkField.view.js +18 -15
  265. package/dist/field/list/ListField.view.js +50 -35
  266. package/dist/field/metadata/MetadataField.view.js +14 -14
  267. package/dist/field/richtext/RichTextBlock.js +39 -35
  268. package/dist/field/richtext/RichTextExtensions.js +23 -23
  269. package/dist/field/richtext/RichTextField.view.js +6 -6
  270. package/dist/field/richtext/RichTextInsertMenu.js +5 -5
  271. package/dist/field/richtext/RichTextToolbar.js +26 -1
  272. package/dist/field/richtext/Toolbar.d.ts +9 -1
  273. package/dist/field/richtext/Toolbar.js +12 -2
  274. package/dist/field/select/SelectField.view.js +1 -0
  275. package/dist/index.css +174 -23
  276. package/dist/index.d.ts +1 -0
  277. package/dist/index.js +3 -1
  278. package/dist/next.d.ts +2 -0
  279. package/dist/next.edge.d.ts +2 -0
  280. package/dist/picker/entry/EntryPicker.d.ts +3 -1
  281. package/dist/picker/entry/EntryPicker.js +15 -1
  282. package/dist/preview/react.js +3 -0
  283. package/dist/query.d.ts +26 -14
  284. package/dist/query.js +4 -0
  285. package/dist/types.d.ts +8 -5
  286. package/dist/ui/Stack.d.ts +4 -2
  287. package/docs/ai-setup.md +3 -3
  288. package/docs/cli.md +4 -2
  289. package/docs/components/combo-box.md +105 -16
  290. package/docs/components/date-field.md +1 -1
  291. package/docs/components/dialog.md +51 -0
  292. package/docs/components/form.md +67 -0
  293. package/docs/components/link.md +10 -0
  294. package/docs/components/multiple-select.md +9 -17
  295. package/docs/components/number-field.md +5 -1
  296. package/docs/components/select.md +9 -20
  297. package/docs/components/stack.md +42 -0
  298. package/docs/components/table.md +83 -0
  299. package/docs/components/text-field.md +9 -1
  300. package/docs/components/time-field.md +5 -1
  301. package/docs/components.md +39 -1
  302. package/docs/configuration.md +3 -1
  303. package/docs/custom-fields.md +135 -7
  304. package/docs/deploy/self-host.md +2 -0
  305. package/docs/deploy.md +7 -4
  306. package/docs/fields/image.md +0 -1
  307. package/docs/fields/list.md +19 -0
  308. package/docs/fields/object.md +5 -3
  309. package/docs/fields/rich-text.md +31 -0
  310. package/docs/index.md +8 -6
  311. package/docs/instant-publishing.md +23 -2
  312. package/docs/overviews.md +128 -4
  313. package/docs/query/filtering.md +2 -0
  314. package/docs/query/related.md +58 -9
  315. package/docs/query.md +52 -1
  316. package/docs/quickstart.md +5 -5
  317. package/docs/schema/document.md +2 -0
  318. package/docs/schema/type.md +3 -1
  319. package/docs/upgrading.md +100 -19
  320. package/llms-full.txt +1022 -125
  321. package/package.json +1 -1
  322. package/readme.md +2 -2
  323. package/dist/chunks/{chunk-4ZA6KZHS.js → chunk-6FQ5IMNA.js} +3 -3
@@ -5,11 +5,11 @@ import {
5
5
  $89d060d8eb451127$export$53d36ab85dc89436,
6
6
  $89d060d8eb451127$export$7fbedc92909ed28e,
7
7
  $942f06a693c162e2$export$cacbb3924155d68e
8
- } from "../chunks/chunk-QHHMKJUO.js";
8
+ } from "../chunks/chunk-7DDPSWRY.js";
9
9
  import "../chunks/chunk-NUFRM6SI.js";
10
10
  import {
11
11
  $42ceafc619f9c3ba$export$fb8073518f34e6ec
12
- } from "../chunks/chunk-HOETF6HN.js";
12
+ } from "../chunks/chunk-PMGIIYDD.js";
13
13
  import "../chunks/chunk-RKDPDEF7.js";
14
14
  import "../chunks/chunk-PSSMQKAH.js";
15
15
  import {
@@ -25,44 +25,44 @@ import { useDragDrop } from "./internal/useDragDrop.js";
25
25
 
26
26
  // src/components/Tree.module.css
27
27
  var Tree_default = {
28
- "Tree": "alinea-Tree",
29
- "TreeItem-labelLink": "alinea-TreeItem-labelLink",
30
- "TreeItemLabelLink": "alinea-TreeItem-labelLink",
28
+ "Tree-dropIndicator": "alinea-Tree-dropIndicator",
29
+ "TreeDropIndicator": "alinea-Tree-dropIndicator",
30
+ "TreeItem-chevron": "alinea-TreeItem-chevron",
31
+ "TreeItemChevron": "alinea-TreeItem-chevron",
32
+ "Tree-empty": "alinea-Tree-empty",
33
+ "TreeEmpty": "alinea-Tree-empty",
31
34
  "is-dropTarget": "alinea-is-dropTarget",
32
35
  "isDropTarget": "alinea-is-dropTarget",
33
- "is-dragging": "alinea-is-dragging",
34
- "isDragging": "alinea-is-dragging",
35
- "TreeItem-controls": "alinea-TreeItem-controls",
36
- "TreeItemControls": "alinea-TreeItem-controls",
37
- "TreeItem-dragHandle": "alinea-TreeItem-dragHandle",
38
- "TreeItemDragHandle": "alinea-TreeItem-dragHandle",
39
36
  "TreeItem-icon": "alinea-TreeItem-icon",
40
37
  "TreeItemIcon": "alinea-TreeItem-icon",
41
- "is-invisible": "alinea-is-invisible",
42
- "isInvisible": "alinea-is-invisible",
43
- "Tree-empty": "alinea-Tree-empty",
44
- "TreeEmpty": "alinea-Tree-empty",
45
- "TreeItem-iconLink": "alinea-TreeItem-iconLink",
46
- "TreeItemIconLink": "alinea-TreeItem-iconLink",
47
- "TreeItem-label": "alinea-TreeItem-label",
48
- "TreeItemLabel": "alinea-TreeItem-label",
49
- "TreeItem-foldIcon": "alinea-TreeItem-foldIcon",
50
- "TreeItemFoldIcon": "alinea-TreeItem-foldIcon",
38
+ "TreeItem-labelLink": "alinea-TreeItem-labelLink",
39
+ "TreeItemLabelLink": "alinea-TreeItem-labelLink",
51
40
  "is-expanded": "alinea-is-expanded",
52
41
  "isExpanded": "alinea-is-expanded",
53
42
  "is-allowsDragging": "alinea-is-allowsDragging",
54
43
  "isAllowsDragging": "alinea-is-allowsDragging",
55
- "TreeItem-chevron": "alinea-TreeItem-chevron",
56
- "TreeItemChevron": "alinea-TreeItem-chevron",
44
+ "TreeItem-iconLink": "alinea-TreeItem-iconLink",
45
+ "TreeItemIconLink": "alinea-TreeItem-iconLink",
46
+ "is-expandable": "alinea-is-expandable",
47
+ "isExpandable": "alinea-is-expandable",
48
+ "Tree": "alinea-Tree",
49
+ "TreeItem-controls": "alinea-TreeItem-controls",
50
+ "TreeItemControls": "alinea-TreeItem-controls",
57
51
  "TreeItem-suffix": "alinea-TreeItem-suffix",
58
52
  "TreeItemSuffix": "alinea-TreeItem-suffix",
59
- "Tree-dropIndicator": "alinea-Tree-dropIndicator",
60
- "TreeDropIndicator": "alinea-Tree-dropIndicator",
53
+ "is-invisible": "alinea-is-invisible",
54
+ "isInvisible": "alinea-is-invisible",
55
+ "is-dragging": "alinea-is-dragging",
56
+ "isDragging": "alinea-is-dragging",
61
57
  "is-active": "alinea-is-active",
62
58
  "isActive": "alinea-is-active",
59
+ "TreeItem-foldIcon": "alinea-TreeItem-foldIcon",
60
+ "TreeItemFoldIcon": "alinea-TreeItem-foldIcon",
63
61
  "TreeItem": "alinea-TreeItem",
64
- "is-expandable": "alinea-is-expandable",
65
- "isExpandable": "alinea-is-expandable"
62
+ "TreeItem-dragHandle": "alinea-TreeItem-dragHandle",
63
+ "TreeItemDragHandle": "alinea-TreeItem-dragHandle",
64
+ "TreeItem-label": "alinea-TreeItem-label",
65
+ "TreeItemLabel": "alinea-TreeItem-label"
66
66
  };
67
67
 
68
68
  // src/components/Tree.tsx
@@ -4,9 +4,9 @@ import {
4
4
  $5400c097f4765e59$export$7edc06cf1783b30f,
5
5
  $7705c033048f6da7$export$353f5b6fc5456de1,
6
6
  $f2ff30fde7b014be$export$3ddf2d174ce01153
7
- } from "../../chunks/chunk-QHHMKJUO.js";
7
+ } from "../../chunks/chunk-7DDPSWRY.js";
8
8
  import "../../chunks/chunk-NUFRM6SI.js";
9
- import "../../chunks/chunk-HOETF6HN.js";
9
+ import "../../chunks/chunk-PMGIIYDD.js";
10
10
  import "../../chunks/chunk-RKDPDEF7.js";
11
11
  import "../../chunks/chunk-PSSMQKAH.js";
12
12
  import {
@@ -20,21 +20,21 @@ import { Icon } from "../Icon.js";
20
20
 
21
21
  // src/components/internal/DateControl.module.css
22
22
  var DateControl_default = {
23
+ "is-framed": "alinea-is-framed",
24
+ "isFramed": "alinea-is-framed",
25
+ "DateControl-trigger": "alinea-DateControl-trigger",
26
+ "DateControlTrigger": "alinea-DateControl-trigger",
23
27
  "DateControl-segment": "alinea-DateControl-segment",
24
28
  "DateControlSegment": "alinea-DateControl-segment",
25
- "DateControl-dialog": "alinea-DateControl-dialog",
26
- "DateControlDialog": "alinea-DateControl-dialog",
27
- "DateControl-input": "alinea-DateControl-input",
28
- "DateControlInput": "alinea-DateControl-input",
29
29
  "is-placeholder": "alinea-is-placeholder",
30
30
  "isPlaceholder": "alinea-is-placeholder",
31
- "is-framed": "alinea-is-framed",
32
- "isFramed": "alinea-is-framed",
33
31
  "DateControl-icon": "alinea-DateControl-icon",
34
32
  "DateControlIcon": "alinea-DateControl-icon",
35
- "DateControl": "alinea-DateControl",
36
- "DateControl-trigger": "alinea-DateControl-trigger",
37
- "DateControlTrigger": "alinea-DateControl-trigger"
33
+ "DateControl-dialog": "alinea-DateControl-dialog",
34
+ "DateControlDialog": "alinea-DateControl-dialog",
35
+ "DateControl-input": "alinea-DateControl-input",
36
+ "DateControlInput": "alinea-DateControl-input",
37
+ "DateControl": "alinea-DateControl"
38
38
  };
39
39
 
40
40
  // src/components/internal/DateControl.tsx
@@ -0,0 +1,2 @@
1
+ /** Set inside a Form, where fields show the validation errors of react-aria */
2
+ export declare const FormScope: import("react").Context<boolean>;
@@ -0,0 +1,8 @@
1
+ import "../../chunks/chunk-CQ52GEHY.js";
2
+
3
+ // src/components/internal/FormScope.ts
4
+ import { createContext } from "react";
5
+ var FormScope = createContext(false);
6
+ export {
7
+ FormScope
8
+ };
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { AriaProps } from '../types.js';
3
+ export interface ListBoxGroupProps extends AriaProps {
4
+ /** data-slot of the group, eg. "select-group" */
5
+ slot: string;
6
+ /** data-slot of its label */
7
+ labelSlot: string;
8
+ label?: ReactNode;
9
+ children: ReactNode;
10
+ }
11
+ /** A labelled group of options in the listbox of a Select or ComboBox */
12
+ export declare function ListBoxGroup({ slot, labelSlot, label, children, ...props }: ListBoxGroupProps): import("react").JSX.Element;
@@ -0,0 +1,46 @@
1
+ import {
2
+ $53e61d82d8b8611d$export$8b251419efc915eb,
3
+ $928221da08ecbc62$export$dca12b0bb56e4fc
4
+ } from "../../chunks/chunk-7DDPSWRY.js";
5
+ import "../../chunks/chunk-NUFRM6SI.js";
6
+ import "../../chunks/chunk-PMGIIYDD.js";
7
+ import "../../chunks/chunk-RKDPDEF7.js";
8
+ import "../../chunks/chunk-PSSMQKAH.js";
9
+ import {
10
+ dist_default
11
+ } from "../../chunks/chunk-I4OYYAX5.js";
12
+ import "../../chunks/chunk-CQ52GEHY.js";
13
+
14
+ // src/components/internal/ListBoxGroup.module.css
15
+ var ListBoxGroup_default = {
16
+ "ListBoxGroup": "alinea-ListBoxGroup",
17
+ "ListBoxGroup-label": "alinea-ListBoxGroup-label",
18
+ "ListBoxGroupLabel": "alinea-ListBoxGroup-label"
19
+ };
20
+
21
+ // src/components/internal/ListBoxGroup.tsx
22
+ import { jsx, jsxs } from "react/jsx-runtime";
23
+ var styles = dist_default(ListBoxGroup_default);
24
+ function ListBoxGroup({
25
+ slot,
26
+ labelSlot,
27
+ label,
28
+ children,
29
+ ...props
30
+ }) {
31
+ return /* @__PURE__ */ jsxs(
32
+ $928221da08ecbc62$export$dca12b0bb56e4fc,
33
+ {
34
+ "data-slot": slot,
35
+ ...props,
36
+ className: styles.ListBoxGroup(),
37
+ children: [
38
+ label && /* @__PURE__ */ jsx($53e61d82d8b8611d$export$8b251419efc915eb, { "data-slot": labelSlot, className: styles.ListBoxGroup.label(), children: label }),
39
+ children
40
+ ]
41
+ }
42
+ );
43
+ }
44
+ export {
45
+ ListBoxGroup
46
+ };
@@ -1,9 +1,9 @@
1
1
  import type { CSSProperties, ReactElement, ReactNode } from 'react';
2
- import type { IconType } from '../types.js';
2
+ import type { IconType, Key } from '../types.js';
3
3
  export interface ListBoxOptionProps {
4
4
  /** Prefix for the data-slot attributes, eg. "select-item" */
5
5
  slot: string;
6
- value: string;
6
+ value: Key;
7
7
  textValue?: string;
8
8
  disabled?: boolean;
9
9
  icon?: IconType | ReactElement;
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  $928221da08ecbc62$export$a11e76429ed99b4,
3
3
  $efe09c6d1c304b50$export$5f1af8db9871e1d6
4
- } from "../../chunks/chunk-QHHMKJUO.js";
4
+ } from "../../chunks/chunk-7DDPSWRY.js";
5
5
  import "../../chunks/chunk-NUFRM6SI.js";
6
- import "../../chunks/chunk-HOETF6HN.js";
6
+ import "../../chunks/chunk-PMGIIYDD.js";
7
7
  import "../../chunks/chunk-RKDPDEF7.js";
8
8
  import "../../chunks/chunk-PSSMQKAH.js";
9
9
  import {
@@ -17,19 +17,19 @@ import { Icon } from "../Icon.js";
17
17
 
18
18
  // src/components/internal/ListBoxOption.module.css
19
19
  var ListBoxOption_default = {
20
+ "is-highlighted": "alinea-is-highlighted",
21
+ "isHighlighted": "alinea-is-highlighted",
20
22
  "ListBoxOption-icon": "alinea-ListBoxOption-icon",
21
23
  "ListBoxOptionIcon": "alinea-ListBoxOption-icon",
22
24
  "ListBoxOption-indicator": "alinea-ListBoxOption-indicator",
23
25
  "ListBoxOptionIndicator": "alinea-ListBoxOption-indicator",
24
26
  "is-focusVisible": "alinea-is-focusVisible",
25
27
  "isFocusVisible": "alinea-is-focusVisible",
26
- "is-highlighted": "alinea-is-highlighted",
27
- "isHighlighted": "alinea-is-highlighted",
28
+ "ListBoxOption": "alinea-ListBoxOption",
28
29
  "ListBoxOption-content": "alinea-ListBoxOption-content",
29
30
  "ListBoxOptionContent": "alinea-ListBoxOption-content",
30
31
  "ListBoxOption-label": "alinea-ListBoxOption-label",
31
32
  "ListBoxOptionLabel": "alinea-ListBoxOption-label",
32
- "ListBoxOption": "alinea-ListBoxOption",
33
33
  "ListBoxOption-description": "alinea-ListBoxOption-description",
34
34
  "ListBoxOptionDescription": "alinea-ListBoxOption-description"
35
35
  };
@@ -1,8 +1,8 @@
1
- import "../../chunks/chunk-QHHMKJUO.js";
1
+ import "../../chunks/chunk-7DDPSWRY.js";
2
2
  import "../../chunks/chunk-NUFRM6SI.js";
3
3
  import {
4
4
  $2eb8e6d23f3d0cb0$export$a54013f0d02a8f82
5
- } from "../../chunks/chunk-HOETF6HN.js";
5
+ } from "../../chunks/chunk-PMGIIYDD.js";
6
6
  import "../../chunks/chunk-RKDPDEF7.js";
7
7
  import "../../chunks/chunk-PSSMQKAH.js";
8
8
  import "../../chunks/chunk-CQ52GEHY.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  $542a13ca2fa5b484$export$5b6b19405a83ff9d
3
- } from "../../chunks/chunk-QHHMKJUO.js";
3
+ } from "../../chunks/chunk-7DDPSWRY.js";
4
4
  import "../../chunks/chunk-NUFRM6SI.js";
5
- import "../../chunks/chunk-HOETF6HN.js";
5
+ import "../../chunks/chunk-PMGIIYDD.js";
6
6
  import "../../chunks/chunk-RKDPDEF7.js";
7
7
  import "../../chunks/chunk-PSSMQKAH.js";
8
8
  import {
@@ -18,9 +18,9 @@ import {
18
18
 
19
19
  // src/components/internal/PopoverSurface.module.css
20
20
  var PopoverSurface_default = {
21
+ "PopoverSurface": "alinea-PopoverSurface",
21
22
  "is-matchTriggerWidth": "alinea-is-matchTriggerWidth",
22
- "isMatchTriggerWidth": "alinea-is-matchTriggerWidth",
23
- "PopoverSurface": "alinea-PopoverSurface"
23
+ "isMatchTriggerWidth": "alinea-is-matchTriggerWidth"
24
24
  };
25
25
 
26
26
  // src/components/internal/PopoverSurface.tsx
@@ -39,6 +39,7 @@ function PopoverSurface({
39
39
  return /* @__PURE__ */ jsx(
40
40
  $542a13ca2fa5b484$export$5b6b19405a83ff9d,
41
41
  {
42
+ "data-alinea-theme": "",
42
43
  ...props,
43
44
  style: { ...style, ...widthStyle },
44
45
  className: styles.PopoverSurface(
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  $ed8ccb2e23e76301$export$48513f6b9f8ce62d
3
- } from "../../chunks/chunk-QHHMKJUO.js";
3
+ } from "../../chunks/chunk-7DDPSWRY.js";
4
4
  import "../../chunks/chunk-NUFRM6SI.js";
5
- import "../../chunks/chunk-HOETF6HN.js";
5
+ import "../../chunks/chunk-PMGIIYDD.js";
6
6
  import "../../chunks/chunk-RKDPDEF7.js";
7
7
  import "../../chunks/chunk-PSSMQKAH.js";
8
8
  import {
@@ -12,11 +12,11 @@ import "../../chunks/chunk-CQ52GEHY.js";
12
12
 
13
13
  // src/components/internal/SelectionCheckbox.module.css
14
14
  var SelectionCheckbox_default = {
15
- "SelectionCheckbox-box": "alinea-SelectionCheckbox-box",
16
- "SelectionCheckboxBox": "alinea-SelectionCheckbox-box",
15
+ "SelectionCheckbox": "alinea-SelectionCheckbox",
17
16
  "is-focusVisible": "alinea-is-focusVisible",
18
17
  "isFocusVisible": "alinea-is-focusVisible",
19
- "SelectionCheckbox": "alinea-SelectionCheckbox",
18
+ "SelectionCheckbox-box": "alinea-SelectionCheckbox-box",
19
+ "SelectionCheckboxBox": "alinea-SelectionCheckbox-box",
20
20
  "SelectionCheckbox-mark": "alinea-SelectionCheckbox-mark",
21
21
  "SelectionCheckboxMark": "alinea-SelectionCheckbox-mark"
22
22
  };
@@ -3,7 +3,7 @@ import "../../chunks/chunk-NUFRM6SI.js";
3
3
  import {
4
4
  $4064df0d6f9620e1$export$c9058316764c140e,
5
5
  $bbaa08b3cd72f041$export$9d1611c77c2fe928
6
- } from "../../chunks/chunk-HOETF6HN.js";
6
+ } from "../../chunks/chunk-PMGIIYDD.js";
7
7
  import "../../chunks/chunk-RKDPDEF7.js";
8
8
  import "../../chunks/chunk-PSSMQKAH.js";
9
9
  import "../../chunks/chunk-CQ52GEHY.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  $75afe627ae0cc0fa$export$d2b052e7b4be1756
3
- } from "../../chunks/chunk-QHHMKJUO.js";
3
+ } from "../../chunks/chunk-7DDPSWRY.js";
4
4
  import "../../chunks/chunk-NUFRM6SI.js";
5
- import "../../chunks/chunk-HOETF6HN.js";
5
+ import "../../chunks/chunk-PMGIIYDD.js";
6
6
  import "../../chunks/chunk-RKDPDEF7.js";
7
7
  import "../../chunks/chunk-PSSMQKAH.js";
8
8
  import {
@@ -15,11 +15,11 @@ import { Icon } from "../Icon.js";
15
15
 
16
16
  // src/components/internal/ToggleButton.module.css
17
17
  var ToggleButton_default = {
18
- "ToggleButton": "alinea-ToggleButton",
19
18
  "is-grouped": "alinea-is-grouped",
20
19
  "isGrouped": "alinea-is-grouped",
21
20
  "ToggleButton-icon": "alinea-ToggleButton-icon",
22
- "ToggleButtonIcon": "alinea-ToggleButton-icon"
21
+ "ToggleButtonIcon": "alinea-ToggleButton-icon",
22
+ "ToggleButton": "alinea-ToggleButton"
23
23
  };
24
24
 
25
25
  // src/components/internal/ToggleButton.tsx
@@ -1,10 +1,10 @@
1
1
  import "../../chunks/chunk-NUFRM6SI.js";
2
- import "../../chunks/chunk-QHHMKJUO.js";
2
+ import "../../chunks/chunk-7DDPSWRY.js";
3
3
  import "../../chunks/chunk-NUFRM6SI.js";
4
4
  import {
5
5
  $15e7830bf6471d45$export$27c701ed9e449e99,
6
6
  $d27d541f9569d26d$export$45712eceda6fad21
7
- } from "../../chunks/chunk-HOETF6HN.js";
7
+ } from "../../chunks/chunk-PMGIIYDD.js";
8
8
  import "../../chunks/chunk-RKDPDEF7.js";
9
9
  import "../../chunks/chunk-PSSMQKAH.js";
10
10
  import "../../chunks/chunk-CQ52GEHY.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  $32ef394310635fd5$export$2cfc5be7a55829f6,
3
3
  $f9554a667e4f0374$export$62ed72bc21f6b8a6
4
- } from "../../chunks/chunk-QHHMKJUO.js";
4
+ } from "../../chunks/chunk-7DDPSWRY.js";
5
5
  import "../../chunks/chunk-NUFRM6SI.js";
6
- import "../../chunks/chunk-HOETF6HN.js";
6
+ import "../../chunks/chunk-PMGIIYDD.js";
7
7
  import "../../chunks/chunk-RKDPDEF7.js";
8
8
  import "../../chunks/chunk-PSSMQKAH.js";
9
9
  import "../../chunks/chunk-CQ52GEHY.js";
@@ -104,3 +104,7 @@ export interface DragDropProps {
104
104
  renderDragPreview?: (items: Array<Record<string, string>>) => ReactNode;
105
105
  }
106
106
  export type ContentStatus = 'published' | 'draft' | 'unpublished' | 'archived' | 'untranslated';
107
+ /** Error messages keyed by the `name` of a form field */
108
+ export interface ValidationErrors {
109
+ [name: string]: string | Array<string>;
110
+ }
@@ -1,5 +1,6 @@
1
1
  export * from './components/Alert.js';
2
2
  export * from './components/AppShell.js';
3
+ export * from './components/AsyncList.js';
3
4
  export * from './components/Badge.js';
4
5
  export * from './components/Blockquote.js';
5
6
  export * from './components/Breadcrumbs.js';
@@ -26,6 +27,7 @@ export * from './components/Empty.js';
26
27
  export * from './components/Field.js';
27
28
  export * from './components/FileTrigger.js';
28
29
  export * from './components/FoldIcon.js';
30
+ export * from './components/Form.js';
29
31
  export * from './components/Heading.js';
30
32
  export * from './components/Icon.js';
31
33
  export * from './components/Kbd.js';
@@ -46,6 +48,7 @@ export * from './components/Sheet.js';
46
48
  export * from './components/Sidebar.js';
47
49
  export * from './components/SortableList.js';
48
50
  export * from './components/Spinner.js';
51
+ export * from './components/Stack.js';
49
52
  export * from './components/Surface.js';
50
53
  export * from './components/Switch.js';
51
54
  export * from './components/Table.js';
@@ -1,6 +1,7 @@
1
1
  // src/components.ts
2
2
  export * from "./components/Alert.js";
3
3
  export * from "./components/AppShell.js";
4
+ export * from "./components/AsyncList.js";
4
5
  export * from "./components/Badge.js";
5
6
  export * from "./components/Blockquote.js";
6
7
  export * from "./components/Breadcrumbs.js";
@@ -27,6 +28,7 @@ export * from "./components/Empty.js";
27
28
  export * from "./components/Field.js";
28
29
  export * from "./components/FileTrigger.js";
29
30
  export * from "./components/FoldIcon.js";
31
+ export * from "./components/Form.js";
30
32
  export * from "./components/Heading.js";
31
33
  export * from "./components/Icon.js";
32
34
  export * from "./components/Kbd.js";
@@ -47,6 +49,7 @@ export * from "./components/Sheet.js";
47
49
  export * from "./components/Sidebar.js";
48
50
  export * from "./components/SortableList.js";
49
51
  export * from "./components/Spinner.js";
52
+ export * from "./components/Stack.js";
50
53
  export * from "./components/Surface.js";
51
54
  export * from "./components/Switch.js";
52
55
  export * from "./components/Table.js";
@@ -13,6 +13,13 @@ import { getScope } from "./Scope.js";
13
13
  import { ReadonlyTree } from "./source/Tree.js";
14
14
  import { base64 } from "./util/Encoding.js";
15
15
  import { isRecord } from "./util/Objects.js";
16
+ var readTimeout = 6e4;
17
+ var reads = /* @__PURE__ */ new Set([
18
+ HandleAction.Tree,
19
+ HandleAction.Sha,
20
+ HandleAction.Blob,
21
+ HandleAction.Resolve
22
+ ]);
16
23
  var Client = class _Client {
17
24
  #options;
18
25
  constructor(options) {
@@ -180,10 +187,14 @@ var Client = class _Client {
180
187
  const controller = new AbortController();
181
188
  const signal = controller.signal;
182
189
  const location = `${url}?${new URLSearchParams(params).toString()}`;
190
+ const timer = reads.has(params.action) ? setTimeout(() => {
191
+ const seconds = readTimeout / 1e3;
192
+ controller.abort(new Error(`No response within ${seconds}s`));
193
+ }, readTimeout) : void 0;
183
194
  const promise = fetch(location, {
184
195
  ...applyAuth(init),
185
196
  signal
186
- }).catch((err) => {
197
+ }).finally(() => clearTimeout(timer)).catch((err) => {
187
198
  throw new HttpError(
188
199
  500,
189
200
  `${err} @ ${init?.method || "GET"} action ${params.action}`
@@ -57,6 +57,12 @@ export interface Config {
57
57
  export declare namespace Config {
58
58
  function baseUrl(config: Config, env?: string): string | undefined;
59
59
  function handlerUrl(config: Config): string;
60
+ /**
61
+ * The handler as reached from server renders. There is no request to take
62
+ * an origin from in static renders, and reading one would make every route
63
+ * dynamic, so a relative handlerUrl needs a baseUrl.
64
+ */
65
+ function serverHandlerUrl(config: Config, env?: string): URL;
60
66
  function adminPath(config: Config): string;
61
67
  function filePathname(config: Config, file: string): string;
62
68
  function dashboardFile(config: Config): string;
@@ -27,6 +27,18 @@ var Config;
27
27
  return config.handlerUrl;
28
28
  }
29
29
  Config2.handlerUrl = handlerUrl;
30
+ function serverHandlerUrl(config, env = process.env.NODE_ENV ?? "production") {
31
+ const handlerUrl2 = Config2.handlerUrl(config);
32
+ const absolute = URL.parse(handlerUrl2);
33
+ if (absolute) return absolute;
34
+ const base = Config2.baseUrl(config, env);
35
+ if (!base)
36
+ throw new Error(
37
+ `Missing baseUrl in Alinea config: set baseUrl.${env} to the url of your site, server renders reach the handler at ${handlerUrl2} through it`
38
+ );
39
+ return new URL(handlerUrl2, base);
40
+ }
41
+ Config2.serverHandlerUrl = serverHandlerUrl;
30
42
  function adminPath(config) {
31
43
  if (config.adminPath) return normalizeUrlPath(config.adminPath);
32
44
  const file = config.dashboardFile ?? "admin.html";
@@ -0,0 +1,19 @@
1
+ import type { OverviewEntry } from './Overview.js';
2
+ /** The entry a dashboard view renders for, eg. the entry being edited */
3
+ export interface DashboardEntry<Data = Record<string, unknown>> extends OverviewEntry {
4
+ /**
5
+ * The field values of the selected version as saved. Unsaved edits are not
6
+ * included: read the live value of a field with `useFieldValue(field)`.
7
+ */
8
+ data: Data;
9
+ }
10
+ /** Props of an entry `actions` view, rendered in the entry header */
11
+ export interface EntryActionProps {
12
+ /** The entry being edited, in the selected version */
13
+ entry: DashboardEntry;
14
+ /**
15
+ * The locale the entry is edited in, which differs from `entry.locale`
16
+ * while a translation is not saved yet
17
+ */
18
+ locale: string | null;
19
+ }
File without changes
@@ -7,12 +7,12 @@ export type Document = {
7
7
  path: PathField;
8
8
  metadata: MetadataField;
9
9
  };
10
- export type DocumentConfig<Fields, Seo, Details> = (TypeConfig<Fields> | ContainerTypeConfig<Fields>) & {
10
+ export type DocumentConfig<Fields, Seo, Details, Settings = {}> = (TypeConfig<Fields, Settings> | ContainerTypeConfig<Fields, Settings>) & {
11
11
  /** Fields shown in the SEO tab, above the previews */
12
12
  seo?: Seo;
13
13
  /** Fields shown in the Details tab, above the created and updated details */
14
14
  details?: Details;
15
15
  };
16
- export declare function document<Fields extends FieldsDefinition = {}, Seo extends FieldsDefinition = {}, Details extends FieldsDefinition = {}>(label: string, { fields, seo, details, ...config }: DocumentConfig<Fields, Seo, Details>): Type<Document & Fields & Seo & Details>;
16
+ export declare function document<Fields extends FieldsDefinition = {}, Seo extends FieldsDefinition = {}, Details extends FieldsDefinition = {}, Settings extends FieldsDefinition = {}>(label: string, { fields, seo, details, settings, ...config }: DocumentConfig<Fields, Seo, Details, Settings>): Type<Document & Fields & Seo & Details & Settings>;
17
17
  /** Whether `type` was created with `Config.document` */
18
18
  export declare function isDocument(type: Type): boolean;
@@ -4,7 +4,8 @@ import "../chunks/chunk-CQ52GEHY.js";
4
4
  import {
5
5
  IcRoundBolt,
6
6
  IcRoundDescription,
7
- IcRoundInfo
7
+ IcRoundInfo,
8
+ IcOutlineSettings
8
9
  } from "alinea/dashboard/icons";
9
10
  import {
10
11
  metadata as createMetadata,
@@ -31,6 +32,7 @@ function document(label, {
31
32
  fields = {},
32
33
  seo = {},
33
34
  details = {},
35
+ settings = {},
34
36
  ...config
35
37
  }) {
36
38
  const { title, path, metadata } = documentFields();
@@ -38,7 +40,11 @@ function document(label, {
38
40
  ...keys({ title, path, metadata }),
39
41
  ...fieldNames(fields)
40
42
  ]);
41
- for (const name of [...fieldNames(seo), ...fieldNames(details)]) {
43
+ for (const name of [
44
+ ...fieldNames(seo),
45
+ ...fieldNames(details),
46
+ ...fieldNames(settings)
47
+ ]) {
42
48
  if (taken.has(name)) throw new Error(`Field "${name}" is defined twice`);
43
49
  taken.add(name);
44
50
  }
@@ -54,7 +60,8 @@ function document(label, {
54
60
  tab("Details", {
55
61
  icon: IcRoundInfo,
56
62
  fields: { ...details, ...metadataDetails(metadata) }
57
- })
63
+ }),
64
+ ...keys(settings).length > 0 ? [tab("Settings", { icon: IcOutlineSettings, fields: settings })] : []
58
65
  );
59
66
  const result = type(label, {
60
67
  ...config,
@@ -1,4 +1,5 @@
1
1
  import type { EntryStatus } from './Entry.js';
2
+ import type { Related } from './Filter.js';
2
3
  export interface EntryFields {
3
4
  _id: string;
4
5
  _type: string;
@@ -16,8 +17,13 @@ export interface EntryFields {
16
17
  }
17
18
  /** The fields filters can match, next to those of the entry */
18
19
  export interface EntryFilterFields extends EntryFields {
19
- /** Whether another entry links to the entry */
20
- _referenced: boolean;
20
+ /**
21
+ * Whether another entry links to the entry, or an entry that matches a
22
+ * query, eg. `{_referenced: Query.referencedBy({type: Product})}`
23
+ */
24
+ _referenced: Related<{
25
+ edge: 'referencedBy';
26
+ }>;
21
27
  }
22
28
  export declare const EntryFields: {
23
29
  _id: import("./Expr.js").Expr<string>;
@@ -26,6 +26,11 @@ export interface FieldOptions<StoredValue> {
26
26
  required?: boolean;
27
27
  /** Validate the given value */
28
28
  validate?(value: StoredValue): boolean | string | undefined;
29
+ /**
30
+ * The width of the field in the entry form, a fraction between 0 and 1.
31
+ * Fields that fit next to each other share a row.
32
+ */
33
+ width?: number;
29
34
  }
30
35
  export interface EntryAnchorTarget {
31
36
  id: string;