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
@@ -15,7 +15,13 @@ export interface SearchQuery {
15
15
  export declare function createSearch(db: Database): Promise<void>;
16
16
  /** The searchable text of an entry row, read from its search row. */
17
17
  export declare function searchableText(entry: EntryIndexTarget): Sql<string>;
18
- export declare function searchTokens(input: string | Array<string> | undefined): RegExpMatchArray | [] | undefined;
18
+ /**
19
+ * The words of a search, each with the tokens the index splits it in: the
20
+ * index splits `multi-modal` in `multi` and `modal`.
21
+ */
22
+ export declare function searchWords(input: string | Array<string> | undefined): Array<Array<string>> | undefined;
23
+ /** The tokens of a search, and the joined spelling of split words. */
24
+ export declare function searchTokens(input: string | Array<string> | undefined): string[] | undefined;
19
25
  export interface SearchQueryOptions {
20
26
  /** Indexed spellings a token may also match, besides its prefix. */
21
27
  alternatives?(token: string): ReadonlyArray<string>;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  integer,
3
3
  text
4
- } from "../../chunks/chunk-5H4D5JQL.js";
4
+ } from "../../chunks/chunk-2PP7WJUJ.js";
5
5
  import {
6
6
  table
7
7
  } from "../../chunks/chunk-PYDOMKJZ.js";
@@ -33,23 +33,47 @@ function searchableText(entry) {
33
33
  return sql`(select ${search.body} from ${search}
34
34
  where ${search.rowid} = ${entry.rowid})`;
35
35
  }
36
- function searchTokens(input) {
36
+ var tokenPattern = /[\p{L}\p{N}\p{M}]+/gu;
37
+ function searchWords(input) {
37
38
  const text2 = Array.isArray(input) ? input.join(" ") : input;
38
39
  if (!text2) return void 0;
39
- return text2.match(/[\p{L}\p{N}\p{M}]+/gu) ?? [];
40
+ return text2.split(/\s+/).map((word) => word.match(tokenPattern) ?? []).filter((tokens) => tokens.length > 0);
41
+ }
42
+ function searchTokens(input) {
43
+ const words = searchWords(input);
44
+ if (!words) return void 0;
45
+ return words.flatMap(
46
+ (tokens) => tokens.length > 1 ? [...tokens, tokens.join("")] : tokens
47
+ );
40
48
  }
41
49
  function searchQuery(input, entry, options = {}) {
42
- const tokens = searchTokens(input);
43
- if (!tokens) return void 0;
44
- const terms = tokens.map((token) => {
50
+ const words = searchWords(input);
51
+ if (!words) return void 0;
52
+ const tokens = words.flat();
53
+ function term(token) {
45
54
  const spellings = [
46
55
  `"${token}"*`,
47
56
  ...(options.alternatives?.(token) ?? []).map(
48
- (term) => `"${term.replaceAll('"', "")}"`
57
+ (term2) => `"${term2.replaceAll('"', "")}"`
49
58
  )
50
59
  ];
51
60
  return spellings.length > 1 ? `(${spellings.join(" OR ")})` : spellings[0];
52
- }).join(" AND ");
61
+ }
62
+ function wordTerm(word) {
63
+ if (word.length === 1) return term(word[0]);
64
+ return `((${word.map(term).join(" AND ")}) OR ${term(word.join(""))})`;
65
+ }
66
+ function phraseTerm(from) {
67
+ const word = words[from];
68
+ if (from === words.length - 1) return wordTerm(word);
69
+ const rest = phraseTerm(from + 1);
70
+ const separate = `${wordTerm(word)} AND ${rest}`;
71
+ if (words.length > maxJoinedWords) return separate;
72
+ const joined = term([...word, ...words[from + 1]].join(""));
73
+ const after = from + 2 < words.length ? ` AND ${phraseTerm(from + 2)}` : "";
74
+ return `((${separate}) OR (${joined}${after}))`;
75
+ }
76
+ const terms = words.length ? phraseTerm(0) : "";
53
77
  const search = sql.identifier(getTable(EntrySearchTable).name);
54
78
  const match = sql`${search} match ${terms}`;
55
79
  const relevance = sql`bm25(${search}, 20, 1)`;
@@ -66,10 +90,12 @@ function searchQuery(input, entry, options = {}) {
66
90
  }
67
91
  };
68
92
  }
93
+ var maxJoinedWords = 5;
69
94
  var fuzzyFactor = 0.1;
70
95
  var maxFuzzyDistance = 6;
71
96
  var maxAlternatives = 10;
72
97
  var maxNumberMatches = 50;
98
+ var minSplitLength = 2;
73
99
  var vocabulary = "alinea_entry_search_vocab";
74
100
  function fuzzyDistance(token) {
75
101
  return Math.min(maxFuzzyDistance, Math.round(token.length * fuzzyFactor));
@@ -109,6 +135,7 @@ var SearchVocabulary = class {
109
135
  #loaded;
110
136
  #byLength = /* @__PURE__ */ new Map();
111
137
  #numbered = [];
138
+ #terms = /* @__PURE__ */ new Set();
112
139
  async load(db, revision) {
113
140
  if (this.#loaded === revision) return;
114
141
  await db.run(
@@ -131,13 +158,30 @@ var SearchVocabulary = class {
131
158
  }
132
159
  this.#byLength = byLength;
133
160
  this.#numbered = numbered;
161
+ this.#terms = new Set(rows.map((row) => row.term));
134
162
  this.#loaded = revision;
135
163
  }
136
164
  /** Indexed terms close to a token, most frequent first; prefixes of the
137
165
  * token are left to the prefix match. */
138
166
  alternatives(token) {
139
167
  const query = normalizeToken(token);
140
- return [...this.#numberMatches(query), ...this.#closeSpellings(query)];
168
+ return [
169
+ ...this.#numberMatches(query),
170
+ ...this.#closeSpellings(query),
171
+ ...this.#splits(query)
172
+ ];
173
+ }
174
+ /** Indexed pairs of terms a token joins, as phrases: multimodal finds
175
+ * multi-modal and multi modal. */
176
+ #splits(query) {
177
+ const splits = [];
178
+ for (let at = minSplitLength; at <= query.length - minSplitLength; at++) {
179
+ const head = query.slice(0, at);
180
+ const tail = query.slice(at);
181
+ if (this.#terms.has(head) && this.#terms.has(tail))
182
+ splits.push(`${head} ${tail}`);
183
+ }
184
+ return splits;
141
185
  }
142
186
  /** Indexed terms containing a number that starts with the digits of a
143
187
  * number token, ignoring leading zeros: 98 finds 098 and img098. */
@@ -173,5 +217,6 @@ export {
173
217
  fuzzyDistance,
174
218
  searchQuery,
175
219
  searchTokens,
220
+ searchWords,
176
221
  searchableText
177
222
  };
@@ -1,4 +1,5 @@
1
1
  import type { Config } from 'alinea/core/Config';
2
+ import type { SyncProgress } from 'alinea/core/db/LocalStore';
2
3
  import type { RemoteSource } from 'alinea/core/source/Source';
3
4
  import { ReadonlyTree } from 'alinea/core/source/Tree';
4
5
  import type { Database } from 'rado';
@@ -12,6 +13,7 @@ export interface EntrySyncOptions {
12
13
  * reopened and synced from it. Defaults to true.
13
14
  */
14
15
  recordsTree?: boolean;
16
+ onProgress?(progress: SyncProgress): void;
15
17
  }
16
18
  /** Prepared, serialized source synchronization for one database connection. */
17
19
  export declare class EntrySyncer {
@@ -34,7 +34,8 @@ var EntrySyncer = class {
34
34
  previousTree,
35
35
  withinTransaction = false,
36
36
  validate = true,
37
- recordsTree = true
37
+ recordsTree = true,
38
+ onProgress
38
39
  }) {
39
40
  const queries = await this.#prepared();
40
41
  const run = async () => {
@@ -54,7 +55,8 @@ var EntrySyncer = class {
54
55
  source,
55
56
  storedTree ?? ReadonlyTree.EMPTY,
56
57
  tree,
57
- queries
58
+ queries,
59
+ onProgress
58
60
  );
59
61
  const changed = await deriveEntries(
60
62
  this.#config,
@@ -1,4 +1,5 @@
1
1
  import type { Config } from 'alinea/core/Config';
2
+ import type { SyncProgress } from 'alinea/core/db/LocalStore';
2
3
  import type { RemoteSource } from 'alinea/core/source/Source';
3
4
  import { ReadonlyTree } from 'alinea/core/source/Tree';
4
5
  import { type SyncQueries } from './SyncQueries.js';
@@ -18,4 +19,4 @@ export interface SyncChanges {
18
19
  /** Whether a directory hash stands for a directory with files. */
19
20
  export declare function hasChildren(childrenSha: string | null): boolean;
20
21
  /** Write the files that differ between two source trees to the entry table. */
21
- export declare function mergeTrees(config: Config, source: RemoteSource, previousTree: ReadonlyTree, tree: ReadonlyTree, queries: SyncQueries): Promise<SyncChanges>;
22
+ export declare function mergeTrees(config: Config, source: RemoteSource, previousTree: ReadonlyTree, tree: ReadonlyTree, queries: SyncQueries, onProgress?: (progress: SyncProgress) => void): Promise<SyncChanges>;
@@ -4,7 +4,6 @@ import "../../chunks/chunk-CQ52GEHY.js";
4
4
  import { Leaf, ReadonlyTree } from "alinea/core/source/Tree";
5
5
  import { chunks } from "alinea/core/util/Arrays";
6
6
  import { assert } from "alinea/core/util/Assert";
7
- import { accumulate } from "alinea/core/util/Async";
8
7
  import { entryIndexRow } from "../entry/EntryTable.js";
9
8
  import { parseSourceEntry } from "./EntryParser.js";
10
9
  import { insertEntryValues } from "./SyncQueries.js";
@@ -66,7 +65,7 @@ async function updateDirectoryHashes(queries, tree, filePaths, changes) {
66
65
  for (const [dir, sha] of changed)
67
66
  await queries.updateChildrenSha.run({ dir, sha });
68
67
  }
69
- async function mergeTrees(config, source, previousTree, tree, queries) {
68
+ async function mergeTrees(config, source, previousTree, tree, queries, onProgress) {
70
69
  const changes = {
71
70
  touched: /* @__PURE__ */ new Set(),
72
71
  inserted: /* @__PURE__ */ new Set(),
@@ -87,10 +86,17 @@ async function mergeTrees(config, source, previousTree, tree, queries) {
87
86
  Math.max(minPartSize, Math.ceil(added.length / parallelParts))
88
87
  )
89
88
  );
90
- const reads = parts.map((files) => {
91
- const shas = [...new Set(files.map((file) => file.fileHash))];
92
- const blobs = accumulate(source.getBlobs(shas)).then(
93
- (found) => new Map(found)
89
+ const requests = parts.map((files) => [
90
+ ...new Set(files.map((file) => file.fileHash))
91
+ ]);
92
+ const total = requests.reduce((sum, shas) => sum + shas.length, 0);
93
+ let loaded = 0;
94
+ if (total) onProgress?.({ loaded, total });
95
+ const reads = requests.map((shas) => {
96
+ const blobs = readBlobs(
97
+ source,
98
+ shas,
99
+ () => onProgress?.({ loaded: ++loaded, total })
94
100
  );
95
101
  blobs.catch(() => {
96
102
  });
@@ -134,6 +140,14 @@ async function mergeTrees(config, source, previousTree, tree, queries) {
134
140
  );
135
141
  return changes;
136
142
  }
143
+ async function readBlobs(source, shas, onBlob) {
144
+ const blobs = /* @__PURE__ */ new Map();
145
+ for await (const [sha, blob] of source.getBlobs(shas)) {
146
+ blobs.set(sha, blob);
147
+ onBlob();
148
+ }
149
+ return blobs;
150
+ }
137
151
  function sourceDirectorySha(tree, path) {
138
152
  const node = tree.get(path);
139
153
  if (!node) return ReadonlyTree.EMPTY.sha;
@@ -66,25 +66,25 @@ import { Fragment, useId } from "react";
66
66
  var CodeField_default = {
67
67
  "CodeEditorInput-textarea": "alinea-CodeEditorInput-textarea",
68
68
  "CodeEditorInputTextarea": "alinea-CodeEditorInput-textarea",
69
- "CodeEditorInput": "alinea-CodeEditorInput",
70
- "CodeEditorInput-pre": "alinea-CodeEditorInput-pre",
71
- "CodeEditorInputPre": "alinea-CodeEditorInput-pre",
72
- "CodeEditorInput-identifier": "alinea-CodeEditorInput-identifier",
73
- "CodeEditorInputIdentifier": "alinea-CodeEditorInput-identifier",
74
- "CodeEditorInput-editor": "alinea-CodeEditorInput-editor",
75
- "CodeEditorInputEditor": "alinea-CodeEditorInput-editor",
69
+ "CodeEditorInput-string": "alinea-CodeEditorInput-string",
70
+ "CodeEditorInputString": "alinea-CodeEditorInput-string",
76
71
  "CodeEditorInput-comment": "alinea-CodeEditorInput-comment",
77
72
  "CodeEditorInputComment": "alinea-CodeEditorInput-comment",
73
+ "CodeEditorInput-punctuation": "alinea-CodeEditorInput-punctuation",
74
+ "CodeEditorInputPunctuation": "alinea-CodeEditorInput-punctuation",
78
75
  "CodeEditorInput-number": "alinea-CodeEditorInput-number",
79
76
  "CodeEditorInputNumber": "alinea-CodeEditorInput-number",
80
- "CodeEditorInput-string": "alinea-CodeEditorInput-string",
81
- "CodeEditorInputString": "alinea-CodeEditorInput-string",
77
+ "CodeEditorInput": "alinea-CodeEditorInput",
82
78
  "CodeEditorInput-keyword": "alinea-CodeEditorInput-keyword",
83
79
  "CodeEditorInputKeyword": "alinea-CodeEditorInput-keyword",
84
- "CodeEditorInput-punctuation": "alinea-CodeEditorInput-punctuation",
85
- "CodeEditorInputPunctuation": "alinea-CodeEditorInput-punctuation",
80
+ "CodeEditorInput-editor": "alinea-CodeEditorInput-editor",
81
+ "CodeEditorInputEditor": "alinea-CodeEditorInput-editor",
86
82
  "CodeEditorInput-regex": "alinea-CodeEditorInput-regex",
87
- "CodeEditorInputRegex": "alinea-CodeEditorInput-regex"
83
+ "CodeEditorInputRegex": "alinea-CodeEditorInput-regex",
84
+ "CodeEditorInput-pre": "alinea-CodeEditorInput-pre",
85
+ "CodeEditorInputPre": "alinea-CodeEditorInput-pre",
86
+ "CodeEditorInput-identifier": "alinea-CodeEditorInput-identifier",
87
+ "CodeEditorInputIdentifier": "alinea-CodeEditorInput-identifier"
88
88
  };
89
89
 
90
90
  // src/field/code/CodeField.view.tsx
@@ -23,14 +23,13 @@ export declare namespace EntryLink {
23
23
  const href: import("../../core/Expr").Expr<string>;
24
24
  const path: import("../../core/Expr").Expr<string>;
25
25
  }
26
- interface EntryOptions<Fields> extends LinkFieldOptions<EntryReference & InferStoredValue<Fields>>, Omit<EntryPickerOptions<Fields>, 'label' | 'selection'> {
26
+ export interface EntryOptions<Fields> extends LinkFieldOptions<EntryReference & InferStoredValue<Fields>>, Omit<EntryPickerOptions<Fields>, 'label' | 'selection'> {
27
27
  }
28
28
  export declare function entry<Fields = undefined>(label: Label, options?: WithoutLabel<EntryOptions<Fields>>): import("alinea/field/link/LinkField").LinkField<EntryReference & InferStoredValue<Fields>, EntryLink<LinkFields<{ [K in keyof Fields as Fields[K] extends import("../../core/Expr").Expr<any> ? K : never]: Fields[K] extends import("../../core/Expr").Expr<infer T_1> ? T_1 : never; } extends infer T ? { [K in keyof T]: T[K]; } : never>>>;
29
+ export interface EntriesOptions<Fields> extends LinkFieldOptions<Array<EntryReference & ListRow & InferStoredValue<Fields>>>, Omit<EntryPickerOptions<Fields>, 'label' | 'selection'> {
30
+ }
29
31
  export declare namespace entry {
30
32
  type EntryRow<Fields> = EntryLink<LinkFields<Type.Infer<Fields>>> & ListRow;
31
- interface EntryOptions<Fields> extends LinkFieldOptions<Array<EntryReference & ListRow & InferStoredValue<Fields>>>, Omit<EntryPickerOptions<Fields>, 'label' | 'selection'> {
32
- }
33
- export function multiple<Fields = undefined>(label: Label, options?: WithoutLabel<EntryOptions<Fields>>): import("alinea/field/link/LinkField").LinksField<EntryReference & ListRow & InferStoredValue<Fields>, EntryRow<Fields>>;
33
+ export function multiple<Fields = undefined>(label: Label, options?: WithoutLabel<EntriesOptions<Fields>>): import("alinea/field/link/LinkField").LinksField<EntryReference & ListRow & InferStoredValue<Fields>, EntryRow<Fields>>;
34
34
  export {};
35
35
  }
36
- export {};
@@ -26,8 +26,8 @@ export declare function filePicker<Fields>(multiple: boolean, options: Omit<Entr
26
26
  export interface FileOptions<Fields> extends LinkFieldOptions<EntryReference & InferStoredValue<Fields>>, Omit<EntryPickerOptions<Fields>, 'label' | 'selection'> {
27
27
  }
28
28
  export declare function file<Fields = undefined>(label: Label, options?: WithoutLabel<FileOptions<Fields>>): import("alinea/field/link/LinkField").LinkField<EntryReference & InferStoredValue<Fields>, FileLink<LinkFields<{ [K in keyof Fields as Fields[K] extends import("../../core/Expr").Expr<any> ? K : never]: Fields[K] extends import("../../core/Expr").Expr<infer T_1> ? T_1 : never; } extends infer T ? { [K in keyof T]: T[K]; } : never>>>;
29
+ export interface FilesOptions<Fields> extends LinkFieldOptions<Array<EntryReference & ListRow & InferStoredValue<Fields>>>, Omit<EntryPickerOptions<Fields>, 'label' | 'selection'> {
30
+ }
29
31
  export declare namespace file {
30
- interface FilesOptions<Fields> extends LinkFieldOptions<Array<EntryReference & ListRow & InferStoredValue<Fields>>>, Omit<EntryPickerOptions<Fields>, 'label' | 'selection'> {
31
- }
32
32
  function multiple<Fields = undefined>(label: Label, options?: WithoutLabel<FilesOptions<Fields>>): import("alinea/field/link/LinkField").LinksField<EntryReference & ListRow & InferStoredValue<Fields>, FileLink<LinkFields<{ [K in keyof Fields as Fields[K] extends import("../../core/Expr").Expr<any> ? K : never]: Fields[K] extends import("../../core/Expr").Expr<infer T_1> ? T_1 : never; } extends infer T ? { [K in keyof T]: T[K]; } : never>>>;
33
33
  }
@@ -11,8 +11,6 @@ export interface ImageLink<InferredFields = {}> extends EntryReference {
11
11
  alt?: string;
12
12
  /** Public url of the image file, versioned by its hash */
13
13
  src: string;
14
- /** Same as src */
15
- url: string;
16
14
  extension: string;
17
15
  size: number;
18
16
  hash: string;
@@ -30,7 +28,6 @@ export declare namespace ImageLink {
30
28
  const title: import("../../core/Expr").Expr<string>;
31
29
  const alt: import("../../core/media/MediaAltField").MediaAltField;
32
30
  const src: import("../../core/Expr").Expr<string>;
33
- const url: import("../../core/Expr").Expr<string>;
34
31
  const extension: import("../hidden").HiddenField<string>;
35
32
  const size: import("../hidden").HiddenField<number>;
36
33
  const hash: import("../hidden").HiddenField<string>;
@@ -50,8 +47,8 @@ export interface ImageOptions<Fields> extends LinkFieldOptions<EntryReference &
50
47
  export declare function image<Fields = undefined>(label: Label, options?: WithoutLabel<ImageOptions<Fields>>): ImageField<Fields>;
51
48
  export interface ImagesField<Fields = undefined> extends LinksField<EntryReference & ListRow & InferStoredValue<Fields>, ImageLink<LinkFields<Type.Infer<Fields>>>> {
52
49
  }
50
+ export interface ImagesOptions<Fields> extends LinkFieldOptions<Array<EntryReference & ListRow & InferStoredValue<Fields>>>, Omit<EntryPickerOptions<Fields>, 'label' | 'selection'> {
51
+ }
53
52
  export declare namespace image {
54
- interface ImagesOptions<Fields> extends LinkFieldOptions<Array<EntryReference & ListRow & InferStoredValue<Fields>>>, Omit<EntryPickerOptions<Fields>, 'label' | 'selection'> {
55
- }
56
53
  function multiple<Fields = undefined>(label: Label, options?: WithoutLabel<ImagesOptions<Fields>>): ImagesField<Fields>;
57
54
  }
@@ -14,7 +14,6 @@ var ImageLink;
14
14
  ImageLink2.title = Entry.title;
15
15
  ImageLink2.alt = MediaFile.alt;
16
16
  ImageLink2.src = Entry.url;
17
- ImageLink2.url = Entry.url;
18
17
  ImageLink2.extension = MediaFile.extension;
19
18
  ImageLink2.size = MediaFile.size;
20
19
  ImageLink2.hash = MediaFile.hash;
@@ -93,32 +93,33 @@ import {
93
93
  IcRoundOpenInNew,
94
94
  IcRoundPanorama
95
95
  } from "alinea/dashboard/icons";
96
+ import { assertPickerCondition } from "alinea/picker/entry/EntryPicker";
96
97
  import { useId, useMemo, useRef, useState } from "react";
97
98
 
98
99
  // src/field/link/LinkField.module.css
99
100
  var LinkField_default = {
100
- "LinkFieldView-previewImagePlaceholder": "alinea-LinkFieldView-previewImagePlaceholder",
101
- "LinkFieldViewPreviewImagePlaceholder": "alinea-LinkFieldView-previewImagePlaceholder",
102
- "LinkFieldView-previewImage": "alinea-LinkFieldView-previewImage",
103
- "LinkFieldViewPreviewImage": "alinea-LinkFieldView-previewImage",
104
- "LinkFieldView-anchorOption-label": "alinea-LinkFieldView-anchorOption-label",
105
- "LinkFieldViewAnchorOptionLabel": "alinea-LinkFieldView-anchorOption-label",
106
- "LinkFieldView-metaLabel": "alinea-LinkFieldView-metaLabel",
107
- "LinkFieldViewMetaLabel": "alinea-LinkFieldView-metaLabel",
108
- "LinkFieldView-anchorOption-location": "alinea-LinkFieldView-anchorOption-location",
109
- "LinkFieldViewAnchorOptionLocation": "alinea-LinkFieldView-anchorOption-location",
110
101
  "LinkFieldView-skeleton-pulse": "alinea-LinkFieldView-skeleton-pulse",
111
102
  "LinkFieldViewSkeletonPulse": "alinea-LinkFieldView-skeleton-pulse",
112
- "LinkFieldView-type": "alinea-LinkFieldView-type",
113
- "LinkFieldViewType": "alinea-LinkFieldView-type",
114
- "LinkFieldView-anchorOption": "alinea-LinkFieldView-anchorOption",
115
- "LinkFieldViewAnchorOption": "alinea-LinkFieldView-anchorOption",
116
103
  "LinkFieldView-icon": "alinea-LinkFieldView-icon",
117
104
  "LinkFieldViewIcon": "alinea-LinkFieldView-icon",
118
105
  "LinkFieldView-create": "alinea-LinkFieldView-create",
119
106
  "LinkFieldViewCreate": "alinea-LinkFieldView-create",
107
+ "LinkFieldView-anchorOption-label": "alinea-LinkFieldView-anchorOption-label",
108
+ "LinkFieldViewAnchorOptionLabel": "alinea-LinkFieldView-anchorOption-label",
109
+ "LinkFieldView-previewImagePlaceholder": "alinea-LinkFieldView-previewImagePlaceholder",
110
+ "LinkFieldViewPreviewImagePlaceholder": "alinea-LinkFieldView-previewImagePlaceholder",
111
+ "LinkFieldView-anchorOption-location": "alinea-LinkFieldView-anchorOption-location",
112
+ "LinkFieldViewAnchorOptionLocation": "alinea-LinkFieldView-anchorOption-location",
120
113
  "LinkFieldView-createButton": "alinea-LinkFieldView-createButton",
121
- "LinkFieldViewCreateButton": "alinea-LinkFieldView-createButton"
114
+ "LinkFieldViewCreateButton": "alinea-LinkFieldView-createButton",
115
+ "LinkFieldView-anchorOption": "alinea-LinkFieldView-anchorOption",
116
+ "LinkFieldViewAnchorOption": "alinea-LinkFieldView-anchorOption",
117
+ "LinkFieldView-type": "alinea-LinkFieldView-type",
118
+ "LinkFieldViewType": "alinea-LinkFieldView-type",
119
+ "LinkFieldView-metaLabel": "alinea-LinkFieldView-metaLabel",
120
+ "LinkFieldViewMetaLabel": "alinea-LinkFieldView-metaLabel",
121
+ "LinkFieldView-previewImage": "alinea-LinkFieldView-previewImage",
122
+ "LinkFieldViewPreviewImage": "alinea-LinkFieldView-previewImage"
122
123
  };
123
124
 
124
125
  // src/field/link/LinkField.view.tsx
@@ -429,6 +430,7 @@ function useResolvedEntryPickerOptions(options, type, entry) {
429
430
  condition,
430
431
  location
431
432
  ]);
433
+ if (nextCondition) assertPickerCondition(nextCondition);
432
434
  return { condition: nextCondition, location: nextLocation };
433
435
  });
434
436
  return unwrap(resolved, (previous) => previous ?? initialValue);
@@ -662,6 +664,7 @@ function EntryAnchorFieldInner({
662
664
  return /* @__PURE__ */ jsx(
663
665
  Select,
664
666
  {
667
+ clearable: true,
665
668
  disabled: isDisabled || anchors.length === 0,
666
669
  label: "Anchor",
667
670
  onValueChange: (next) => onChange(next ?? void 0),
@@ -59,6 +59,7 @@ import {
59
59
  BlockSheet,
60
60
  useBlockSheet
61
61
  } from "alinea/dashboard/app/BlockSheet";
62
+ import { BlockSettings } from "alinea/dashboard/app/BlockSettings";
62
63
  import { NodeEditor } from "alinea/dashboard/app/NodeEditor";
63
64
  import {
64
65
  useEntry,
@@ -85,6 +86,8 @@ import { memo, useCallback, useMemo, useRef, useState } from "react";
85
86
 
86
87
  // src/field/list/ListField.module.css
87
88
  var ListField_default = {
89
+ "ListFieldTypePicker-popover": "alinea-ListFieldTypePicker-popover",
90
+ "ListFieldTypePickerPopover": "alinea-ListFieldTypePicker-popover",
88
91
  "ListFieldRowSheet-anchor-field": "alinea-ListFieldRowSheet-anchor-field",
89
92
  "ListFieldRowSheetAnchorField": "alinea-ListFieldRowSheet-anchor-field",
90
93
  "ListFieldRowSheet-anchor": "alinea-ListFieldRowSheet-anchor",
@@ -93,9 +96,7 @@ var ListField_default = {
93
96
  "ListFieldTypePickerTrigger": "alinea-ListFieldTypePicker-trigger",
94
97
  "ListFieldCreateActions": "alinea-ListFieldCreateActions",
95
98
  "ListFieldCreateActions-button": "alinea-ListFieldCreateActions-button",
96
- "ListFieldCreateActionsButton": "alinea-ListFieldCreateActions-button",
97
- "ListFieldTypePicker-popover": "alinea-ListFieldTypePicker-popover",
98
- "ListFieldTypePickerPopover": "alinea-ListFieldTypePicker-popover"
99
+ "ListFieldCreateActionsButton": "alinea-ListFieldCreateActions-button"
99
100
  };
100
101
 
101
102
  // src/field/list/ListField.view.tsx
@@ -126,6 +127,7 @@ function ListFieldView({ field }) {
126
127
  [schemaEntries]
127
128
  );
128
129
  const readOnly = Boolean(options.readOnly);
130
+ const labelled = Boolean(options.label);
129
131
  const hasRows = nodes.length > 0;
130
132
  const canCreate = options.max === void 0 || nodes.length < options.max;
131
133
  const rowIdsAtom = useMemo(
@@ -231,7 +233,8 @@ function ListFieldView({ field }) {
231
233
  onClick: toggleAll,
232
234
  description: options.help,
233
235
  shared: options.shared,
234
- inline: options.inline,
236
+ showFold: labelled,
237
+ inline: options.inline || !labelled,
235
238
  children: options.label
236
239
  }
237
240
  ),
@@ -391,6 +394,14 @@ var ListFieldRow = memo(function ListFieldRow2({
391
394
  ListFieldRowSheet,
392
395
  {
393
396
  anchor: anchorValue,
397
+ settings: /* @__PURE__ */ jsx(
398
+ BlockSettings,
399
+ {
400
+ node: row,
401
+ type,
402
+ readOnly
403
+ }
404
+ ),
394
405
  canInsert: canCreate,
395
406
  customLabel,
396
407
  isFirstRow: index === 0,
@@ -528,6 +539,7 @@ function ListFieldRowHeader({
528
539
  }
529
540
  function ListFieldRowSheet({
530
541
  anchor,
542
+ settings,
531
543
  canInsert,
532
544
  customLabel,
533
545
  isFirstRow,
@@ -586,42 +598,45 @@ function ListFieldRowSheet({
586
598
  onSelect: (item) => insert(insertPosition, createRow(item.id, item.type))
587
599
  }
588
600
  ) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
589
- /* @__PURE__ */ jsx(SheetBody, { children: /* @__PURE__ */ jsxs(SheetSection, { children: [
590
- /* @__PURE__ */ jsx(
591
- TextField,
592
- {
593
- label: "Label",
594
- disabled: readOnly,
595
- onValueChange: onCustomLabelChange,
596
- value: customLabel
597
- }
598
- ),
599
- /* @__PURE__ */ jsxs("div", { className: styles.ListFieldRowSheet.anchor(), children: [
600
- /* @__PURE__ */ jsx("div", { className: styles.ListFieldRowSheet.anchor.field(), children: /* @__PURE__ */ jsx(
601
- SlugField,
601
+ /* @__PURE__ */ jsxs(SheetBody, { children: [
602
+ /* @__PURE__ */ jsxs(SheetSection, { children: [
603
+ /* @__PURE__ */ jsx(
604
+ TextField,
602
605
  {
603
- fieldValue: anchor,
604
- label: "Anchor",
605
- isDisabled: readOnly,
606
- onChange: onAnchorChange,
607
- source: customLabel
606
+ label: "Label",
607
+ disabled: readOnly,
608
+ onValueChange: onCustomLabelChange,
609
+ value: customLabel
608
610
  }
609
- ) }),
610
- link && /* @__PURE__ */ jsxs(Tooltip, { children: [
611
- /* @__PURE__ */ jsx(
612
- TooltipTrigger,
611
+ ),
612
+ /* @__PURE__ */ jsxs("div", { className: styles.ListFieldRowSheet.anchor(), children: [
613
+ /* @__PURE__ */ jsx("div", { className: styles.ListFieldRowSheet.anchor.field(), children: /* @__PURE__ */ jsx(
614
+ SlugField,
613
615
  {
614
- variant: "ghost",
615
- size: "icon",
616
- icon: IcRoundLink,
617
- "aria-label": "Copy link to block",
618
- onClick: () => navigator.clipboard.writeText(link)
616
+ fieldValue: anchor,
617
+ label: "Anchor",
618
+ isDisabled: readOnly,
619
+ onChange: onAnchorChange,
620
+ source: customLabel
619
621
  }
620
- ),
621
- /* @__PURE__ */ jsx(TooltipContent, { children: "Copy link to block" })
622
+ ) }),
623
+ link && /* @__PURE__ */ jsxs(Tooltip, { children: [
624
+ /* @__PURE__ */ jsx(
625
+ TooltipTrigger,
626
+ {
627
+ variant: "ghost",
628
+ size: "icon",
629
+ icon: IcRoundLink,
630
+ "aria-label": "Copy link to block",
631
+ onClick: () => navigator.clipboard.writeText(link)
632
+ }
633
+ ),
634
+ /* @__PURE__ */ jsx(TooltipContent, { children: "Copy link to block" })
635
+ ] })
622
636
  ] })
623
- ] })
624
- ] }) }),
637
+ ] }),
638
+ settings
639
+ ] }),
625
640
  /* @__PURE__ */ jsxs(SheetFooter, { children: [
626
641
  /* @__PURE__ */ jsx(
627
642
  Button,
@@ -18,34 +18,34 @@ import { IcRoundPublic } from "alinea/dashboard/icons";
18
18
 
19
19
  // src/field/metadata/MetadataField.module.css
20
20
  var MetadataField_default = {
21
- "OpenGraphPreview-site": "alinea-OpenGraphPreview-site",
22
- "OpenGraphPreviewSite": "alinea-OpenGraphPreview-site",
23
- "OpenGraphPreview-title": "alinea-OpenGraphPreview-title",
24
- "OpenGraphPreviewTitle": "alinea-OpenGraphPreview-title",
25
- "OpenGraphPreview-content": "alinea-OpenGraphPreview-content",
26
- "OpenGraphPreviewContent": "alinea-OpenGraphPreview-content",
27
- "MetadataUserFieldView-contact": "alinea-MetadataUserFieldView-contact",
28
- "MetadataUserFieldViewContact": "alinea-MetadataUserFieldView-contact",
29
- "SearchEnginePreview-og-label-small": "alinea-SearchEnginePreview-og-label-small",
30
- "SearchEnginePreviewOgLabelSmall": "alinea-SearchEnginePreview-og-label-small",
21
+ "MetadataTimestampFieldView": "alinea-MetadataTimestampFieldView",
31
22
  "OpenGraphPreview-description": "alinea-OpenGraphPreview-description",
32
23
  "OpenGraphPreviewDescription": "alinea-OpenGraphPreview-description",
33
24
  "SearchEnginePreview-link": "alinea-SearchEnginePreview-link",
34
25
  "SearchEnginePreviewLink": "alinea-SearchEnginePreview-link",
35
26
  "SearchEnginePreview-og": "alinea-SearchEnginePreview-og",
36
27
  "SearchEnginePreviewOg": "alinea-SearchEnginePreview-og",
37
- "MetadataUserFieldView": "alinea-MetadataUserFieldView",
38
- "SearchEnginePreview": "alinea-SearchEnginePreview",
39
28
  "OpenGraphPreview": "alinea-OpenGraphPreview",
40
- "MetadataTimestampFieldView": "alinea-MetadataTimestampFieldView",
29
+ "MetadataUserFieldView-contact": "alinea-MetadataUserFieldView-contact",
30
+ "MetadataUserFieldViewContact": "alinea-MetadataUserFieldView-contact",
31
+ "OpenGraphPreview-title": "alinea-OpenGraphPreview-title",
32
+ "OpenGraphPreviewTitle": "alinea-OpenGraphPreview-title",
41
33
  "OpenGraphPreview-image": "alinea-OpenGraphPreview-image",
42
34
  "OpenGraphPreviewImage": "alinea-OpenGraphPreview-image",
35
+ "SearchEnginePreview-og-label-small": "alinea-SearchEnginePreview-og-label-small",
36
+ "SearchEnginePreviewOgLabelSmall": "alinea-SearchEnginePreview-og-label-small",
37
+ "SearchEnginePreview": "alinea-SearchEnginePreview",
43
38
  "SearchEnginePreview-description": "alinea-SearchEnginePreview-description",
44
39
  "SearchEnginePreviewDescription": "alinea-SearchEnginePreview-description",
40
+ "OpenGraphPreview-site": "alinea-OpenGraphPreview-site",
41
+ "OpenGraphPreviewSite": "alinea-OpenGraphPreview-site",
45
42
  "MetadataUserFieldView-person": "alinea-MetadataUserFieldView-person",
46
43
  "MetadataUserFieldViewPerson": "alinea-MetadataUserFieldView-person",
44
+ "MetadataUserFieldView": "alinea-MetadataUserFieldView",
47
45
  "SearchEnginePreview-og-label": "alinea-SearchEnginePreview-og-label",
48
- "SearchEnginePreviewOgLabel": "alinea-SearchEnginePreview-og-label"
46
+ "SearchEnginePreviewOgLabel": "alinea-SearchEnginePreview-og-label",
47
+ "OpenGraphPreview-content": "alinea-OpenGraphPreview-content",
48
+ "OpenGraphPreviewContent": "alinea-OpenGraphPreview-content"
49
49
  };
50
50
 
51
51
  // src/field/metadata/MetadataField.view.tsx