alinea 2.0.0-preview.0 → 2.0.0-preview.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (237) hide show
  1. package/dist/.init/content/pages/welcome.json +1 -1
  2. package/dist/LICENSES.md +134 -80
  3. package/dist/adapter/next/DevRemote.d.ts +3 -0
  4. package/dist/adapter/next/DevRemote.js +37 -0
  5. package/dist/adapter/next/ForwardCredentials.d.ts +1 -0
  6. package/dist/adapter/next/ForwardCredentials.js +17 -0
  7. package/dist/adapter/next/cms.js +86 -38
  8. package/dist/adapter/next/context.d.ts +1 -1
  9. package/dist/adapter/next/context.js +11 -3
  10. package/dist/adapter/next/handler.d.ts +2 -0
  11. package/dist/adapter/next/handler.js +23 -16
  12. package/dist/adapter/next/with-alinea.js +18 -16
  13. package/dist/backend/Handler.d.ts +14 -13
  14. package/dist/backend/Handler.js +70 -36
  15. package/dist/backend/resolver/ParsePreview.d.ts +8 -4
  16. package/dist/backend/resolver/ParsePreview.js +40 -43
  17. package/dist/backend/router/Router.d.ts +1 -0
  18. package/dist/backend/router/Router.js +21 -15
  19. package/dist/bundled.d.ts +369 -99
  20. package/dist/chunks/chunk-6UT4N4CO.js +919 -0
  21. package/dist/chunks/{chunk-LUBOGJCG.js → chunk-6V4TAD2N.js} +1 -1
  22. package/dist/chunks/{chunk-TL7ZW6BX.js → chunk-A3XXZBOQ.js} +2535 -2999
  23. package/dist/chunks/chunk-AC5ATYI3.js +1434 -0
  24. package/dist/chunks/{chunk-7ORQ7BYK.js → chunk-KMLLLZ6X.js} +202 -269
  25. package/dist/chunks/{chunk-IWN3T3FL.js → chunk-O7XWTMCB.js} +1 -1
  26. package/dist/chunks/{chunk-53DZYORR.js → chunk-PAYSVIYI.js} +76 -176
  27. package/dist/chunks/{chunk-YK3OSMDM.js → chunk-S4AU6SRS.js} +188 -158
  28. package/dist/chunks/{chunk-EQ3TDHYD.js → chunk-UVOEM4AH.js} +6 -3
  29. package/dist/chunks/{chunk-I7X64JTZ.js → chunk-VXZM6V4P.js} +4 -4
  30. package/dist/cli/Generate.js +3 -13
  31. package/dist/cli/Serve.js +7 -3
  32. package/dist/cli/bin.js +8 -5
  33. package/dist/cli/generate/CompileConfig.js +3 -2
  34. package/dist/cli/generate/CopyStaticFiles.js +2 -3
  35. package/dist/cli/generate/DevDB.d.ts +1 -1
  36. package/dist/cli/generate/DevDB.js +3 -5
  37. package/dist/cli/serve/CreateLocalServer.d.ts +1 -1
  38. package/dist/cli/serve/CreateLocalServer.js +3 -2
  39. package/dist/cli/serve/DevServer.d.ts +3 -2
  40. package/dist/cli/serve/DevServer.js +60 -3
  41. package/dist/cli/serve/ServeContext.d.ts +1 -0
  42. package/dist/cli/serve/StartServer.d.ts +1 -0
  43. package/dist/cli/serve/StartServer.js +6 -1
  44. package/dist/cli/util/EnsureLibs.js +2 -2
  45. package/dist/cli/util/EnsureNode.js +2 -2
  46. package/dist/cloud/CloudRemote.d.ts +2 -1
  47. package/dist/cloud/CloudRemote.js +3 -2
  48. package/dist/components/Breadcrumbs.js +8 -8
  49. package/dist/components/Button.js +6 -6
  50. package/dist/components/Calendar.js +11 -11
  51. package/dist/components/Checkbox.js +7 -7
  52. package/dist/components/CheckboxGroup.js +6 -6
  53. package/dist/components/ColorSwatch.js +6 -6
  54. package/dist/components/ColorSwatchPicker.js +6 -6
  55. package/dist/components/ComboBox.js +17 -17
  56. package/dist/components/DateField.js +9 -9
  57. package/dist/components/DatePicker.js +10 -10
  58. package/dist/components/DateRangePicker.js +14 -14
  59. package/dist/components/Dialog.js +6 -6
  60. package/dist/components/Disclosure.js +13 -13
  61. package/dist/components/DropZone.js +6 -6
  62. package/dist/components/Label.js +16 -16
  63. package/dist/components/Link.js +6 -6
  64. package/dist/components/List.js +34 -34
  65. package/dist/components/Menu.js +10 -10
  66. package/dist/components/Modal.js +8 -8
  67. package/dist/components/MultipleSelect.js +33 -33
  68. package/dist/components/NumberField.d.ts +2 -1
  69. package/dist/components/NumberField.js +21 -11
  70. package/dist/components/Popover.js +6 -6
  71. package/dist/components/ProgressCircle.js +10 -10
  72. package/dist/components/RadioGroup.js +6 -6
  73. package/dist/components/SearchField.js +11 -11
  74. package/dist/components/Select.js +13 -13
  75. package/dist/components/Surface.js +3 -3
  76. package/dist/components/Switch.js +6 -6
  77. package/dist/components/Table.js +13 -13
  78. package/dist/components/Tabs.js +8 -8
  79. package/dist/components/TagGroup.js +7 -7
  80. package/dist/components/TextField.js +10 -10
  81. package/dist/components/TimeField.js +6 -6
  82. package/dist/components/Toggle.js +6 -6
  83. package/dist/components/Toolbar.js +7 -7
  84. package/dist/components/Tooltip.js +10 -10
  85. package/dist/components/Tree.js +9 -9
  86. package/dist/core/BlobTransport.d.ts +5 -0
  87. package/dist/core/BlobTransport.js +79 -0
  88. package/dist/core/Client.d.ts +2 -1
  89. package/dist/core/Client.js +17 -12
  90. package/dist/core/Config.d.ts +4 -0
  91. package/dist/core/Config.js +6 -0
  92. package/dist/core/Connection.d.ts +4 -3
  93. package/dist/core/Connection.js +7 -0
  94. package/dist/core/Graph.d.ts +3 -4
  95. package/dist/core/ListRow.d.ts +2 -0
  96. package/dist/core/OrderBy.d.ts +7 -3
  97. package/dist/core/TextDoc.d.ts +11 -0
  98. package/dist/core/Trace.d.ts +8 -0
  99. package/dist/core/Trace.js +32 -0
  100. package/dist/core/Type.d.ts +7 -1
  101. package/dist/core/db/CommitRequest.d.ts +0 -3
  102. package/dist/core/db/CommitRequest.js +0 -9
  103. package/dist/core/db/EntryDB.js +1 -1
  104. package/dist/core/db/EntryIndex.d.ts +12 -2
  105. package/dist/core/db/EntryIndex.js +131 -22
  106. package/dist/core/db/EntryResolver.js +104 -29
  107. package/dist/core/db/EntryTransaction.d.ts +1 -2
  108. package/dist/core/db/EntryTransaction.js +29 -22
  109. package/dist/core/db/LocalDB.d.ts +5 -5
  110. package/dist/core/db/LocalDB.js +27 -12
  111. package/dist/core/field/RichTextField.d.ts +30 -3
  112. package/dist/core/field/RichTextField.js +124 -56
  113. package/dist/core/media/MediaAltField.d.ts +1 -0
  114. package/dist/core/media/MediaAltField.js +9 -1
  115. package/dist/core/media/MediaLocation.d.ts +5 -2
  116. package/dist/core/media/MediaLocation.js +6 -7
  117. package/dist/core/media/MediaTypes.js +11 -0
  118. package/dist/core/source/CombinedSource.d.ts +2 -2
  119. package/dist/core/source/CombinedSource.js +6 -3
  120. package/dist/core/source/FSSource.d.ts +4 -3
  121. package/dist/core/source/FSSource.js +59 -27
  122. package/dist/core/source/GithubSource.d.ts +2 -2
  123. package/dist/core/source/GithubSource.js +21 -9
  124. package/dist/core/source/IndexedDBSource.d.ts +2 -2
  125. package/dist/core/source/IndexedDBSource.js +3 -1
  126. package/dist/core/source/MemorySource.d.ts +2 -2
  127. package/dist/core/source/MemorySource.js +3 -1
  128. package/dist/core/source/OverlaySource.d.ts +12 -0
  129. package/dist/core/source/OverlaySource.js +50 -0
  130. package/dist/core/source/Source.d.ts +5 -2
  131. package/dist/core/source/Source.js +3 -3
  132. package/dist/core/util/Async.d.ts +8 -2
  133. package/dist/core/util/Async.js +67 -0
  134. package/dist/core/util/EntryFilenames.d.ts +2 -2
  135. package/dist/core/util/EntryFilenames.js +3 -3
  136. package/dist/dashboard/App.css +158 -0
  137. package/dist/dashboard/App.js +2 -2
  138. package/dist/dashboard/app/AccessDenied.js +3 -3
  139. package/dist/dashboard/app/ActivityStatus.js +15 -15
  140. package/dist/dashboard/app/AppShell.js +1 -1
  141. package/dist/dashboard/app/AuthView.js +11 -11
  142. package/dist/dashboard/app/CompactField.js +10 -10
  143. package/dist/dashboard/app/DashboardErrorBoundary.js +5 -5
  144. package/dist/dashboard/app/DashboardLayout.js +22 -19
  145. package/dist/dashboard/app/EntryHeader.js +12 -12
  146. package/dist/dashboard/app/EntryReferences.js +9 -9
  147. package/dist/dashboard/app/EntrySidebar.d.ts +1 -1
  148. package/dist/dashboard/app/EntrySidebar.js +17 -16
  149. package/dist/dashboard/app/EntrySidebarPreview.d.ts +1 -1
  150. package/dist/dashboard/app/EntrySidebarPreview.js +19 -14
  151. package/dist/dashboard/app/EntryTranslationBanner.js +7 -7
  152. package/dist/dashboard/app/Explorer.js +51 -43
  153. package/dist/dashboard/app/ExplorerCards.js +34 -34
  154. package/dist/dashboard/app/ExplorerFileCard.js +18 -18
  155. package/dist/dashboard/app/ExplorerList.js +13 -13
  156. package/dist/dashboard/app/ExplorerModal.js +3 -3
  157. package/dist/dashboard/app/ExplorerTable.js +76 -61
  158. package/dist/dashboard/app/ExternalLinkPicker.js +15 -4
  159. package/dist/dashboard/app/LinkPicker.js +8 -8
  160. package/dist/dashboard/app/LocaleMenu.js +12 -12
  161. package/dist/dashboard/app/SidebarLayout.d.ts +8 -0
  162. package/dist/dashboard/app/SidebarLayout.js +1169 -0
  163. package/dist/dashboard/app/SidebarTree.js +46 -46
  164. package/dist/dashboard/app/WorkspaceMenu.js +17 -17
  165. package/dist/dashboard/app/WorkspaceRoots.js +23 -23
  166. package/dist/dashboard/app/editor/FileEditor.d.ts +2 -1
  167. package/dist/dashboard/app/editor/FileEditor.js +41 -32
  168. package/dist/dashboard/app/editor/FilePreview.js +4 -4
  169. package/dist/dashboard/app/editor/MediaAltField.view.d.ts +1 -1
  170. package/dist/dashboard/app/editor/MediaAltField.view.js +6 -9
  171. package/dist/dashboard/app/modals/CreateEntry.js +4 -4
  172. package/dist/dashboard/app/pages/EntryPage.js +57 -31
  173. package/dist/dashboard/app/pages/UsersPage.js +33 -33
  174. package/dist/dashboard/app/ui/DashboardModal.js +23 -23
  175. package/dist/dashboard/app/ui/Rail.js +3 -3
  176. package/dist/dashboard/app/ui/Sidebar.js +2 -2
  177. package/dist/dashboard/atoms/auth.js +2 -0
  178. package/dist/dashboard/atoms/dashboard.d.ts +9 -0
  179. package/dist/dashboard/atoms/dashboard.js +17 -0
  180. package/dist/dashboard/atoms/editor.d.ts +7 -1
  181. package/dist/dashboard/atoms/editor.js +4 -1
  182. package/dist/dashboard/atoms/entry.d.ts +48 -2
  183. package/dist/dashboard/atoms/entry.js +222 -17
  184. package/dist/dashboard/atoms/explorer.js +4 -9
  185. package/dist/dashboard/atoms/preview.d.ts +3 -0
  186. package/dist/dashboard/atoms/preview.js +18 -1
  187. package/dist/dashboard/atoms/root.d.ts +4 -1
  188. package/dist/dashboard/atoms/root.js +96 -157
  189. package/dist/dashboard/hooks.d.ts +4 -2
  190. package/dist/dashboard/hooks.js +9 -5
  191. package/dist/dashboard/icons.d.ts +1 -0
  192. package/dist/dashboard/icons.js +10 -0
  193. package/dist/field/check/CheckField.view.js +2 -2
  194. package/dist/field/code/CodeField.view.js +12 -12
  195. package/dist/field/date/DateField.view.js +12 -2
  196. package/dist/field/link/FileLink.d.ts +2 -2
  197. package/dist/field/link/FileLink.js +5 -3
  198. package/dist/field/link/ImageLink.d.ts +1 -1
  199. package/dist/field/link/ImageLink.js +1 -1
  200. package/dist/field/link/Link.js +2 -2
  201. package/dist/field/link/LinkField.view.js +155 -128
  202. package/dist/field/list/ListField.view.js +22 -33
  203. package/dist/field/metadata/MetadataField.view.js +19 -19
  204. package/dist/field/number/NumberField.d.ts +2 -0
  205. package/dist/field/number/NumberField.view.js +4 -2
  206. package/dist/field/richtext/PickTextLink.d.ts +7 -0
  207. package/dist/field/richtext/PickTextLink.js +104 -2
  208. package/dist/field/richtext/ReferenceLink.d.ts +4 -1
  209. package/dist/field/richtext/ReferenceLink.js +18 -4
  210. package/dist/field/richtext/RichTextDocument.d.ts +7 -2
  211. package/dist/field/richtext/RichTextDocument.js +34 -5
  212. package/dist/field/richtext/RichTextExtensions.d.ts +3 -1
  213. package/dist/field/richtext/RichTextExtensions.js +2704 -7467
  214. package/dist/field/richtext/RichTextField.d.ts +4 -0
  215. package/dist/field/richtext/RichTextField.story.d.ts +4 -0
  216. package/dist/field/richtext/RichTextField.view.js +43 -20
  217. package/dist/field/richtext/RichTextInsertMenu.js +281 -495
  218. package/dist/field/richtext/RichTextToolbar.d.ts +5 -2
  219. package/dist/field/richtext/RichTextToolbar.js +38 -3
  220. package/dist/field/richtext/Toolbar.d.ts +19 -1
  221. package/dist/field/richtext/Toolbar.js +18 -13
  222. package/dist/field/richtext/extensions/Anchor.js +1 -1
  223. package/dist/field/richtext/extensions/Link.js +1 -1
  224. package/dist/field/richtext/extensions/Small.js +1 -1
  225. package/dist/field/select/SelectField.view.js +8 -6
  226. package/dist/index.css +227 -16
  227. package/dist/next.cjs +18 -16
  228. package/dist/next.d.ts +2 -1
  229. package/dist/next.edge.d.ts +2 -1
  230. package/dist/picker/entry/EntryPicker.js +9 -35
  231. package/dist/preview/PreviewPayload.js +35 -250
  232. package/dist/ui/RichText.d.ts +1 -0
  233. package/dist/ui/RichText.js +29 -2
  234. package/package.json +6 -3
  235. package/dist/cli/util/ExternalPlugin.d.ts +0 -2
  236. package/dist/cli/util/ExternalPlugin.js +0 -919
  237. package/dist/chunks/{chunk-JFROOUG6.js → chunk-NIVGVRDS.js} +17 -17
@@ -1,15 +1,18 @@
1
1
  import type { Editor } from '@tiptap/core';
2
- import type { PickTextLinkFunc } from './PickTextLink.js';
2
+ import type { PickRichTextImageFunc, PickTextLinkFunc } from './PickTextLink.js';
3
3
  import { type ToolbarConfig } from './Toolbar.js';
4
4
  import type { PickTextAnchorFunc } from './PickTextAnchor.js';
5
5
  export interface RichTextToolbarProps {
6
6
  editor: Editor;
7
+ enableImages?: boolean;
7
8
  enableTables?: boolean;
8
9
  ownerId: string;
10
+ pickImage?: PickRichTextImageFunc;
9
11
  pickLink?: PickTextLinkFunc;
10
12
  pickAnchor?: PickTextAnchorFunc;
11
13
  getEntryAnchors: () => Array<string>;
12
14
  toolbar?: ToolbarConfig;
13
15
  onFocusChange: (focused: boolean, nextTarget?: EventTarget | null) => void;
14
16
  }
15
- export declare function RichTextToolbar({ editor, enableTables, ownerId, pickLink, pickAnchor, getEntryAnchors, toolbar, onFocusChange }: RichTextToolbarProps): import("react").JSX.Element;
17
+ export declare function RichTextToolbar({ editor, enableImages, enableTables, ownerId, pickImage, pickLink, pickAnchor, getEntryAnchors, toolbar, onFocusChange }: RichTextToolbarProps): import("react").JSX.Element;
18
+ export declare function createImageHandler(editor: Editor, pickImage: PickRichTextImageFunc | undefined, exec: () => ReturnType<Editor['chain']>): () => void;
@@ -34,8 +34,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
34
34
  var styles = dist_default(RichTextToolbar_default);
35
35
  function RichTextToolbar({
36
36
  editor,
37
+ enableImages,
37
38
  enableTables,
38
39
  ownerId,
40
+ pickImage,
39
41
  pickLink,
40
42
  pickAnchor,
41
43
  getEntryAnchors,
@@ -43,17 +45,20 @@ function RichTextToolbar({
43
45
  onFocusChange
44
46
  }) {
45
47
  const config = useMemo(
46
- () => toolbar ?? defaultToolbar(Boolean(enableTables)),
47
- [enableTables, toolbar]
48
+ () => toolbar ?? defaultToolbar({ enableImages, enableTables }),
49
+ [enableImages, enableTables, toolbar]
48
50
  );
49
51
  const context = useMemo(() => {
50
52
  const exec = () => editor.chain().focus(null, { scrollIntoView: false });
51
53
  return {
52
54
  editor,
55
+ enableImages,
53
56
  enableTables,
54
57
  exec,
55
58
  focusToggle: (target) => onFocusChange(Boolean(target)),
59
+ pickImage: pickImage ?? emptyPicker,
56
60
  pickLink: pickLink ?? emptyPicker,
61
+ handleImage: createImageHandler(editor, pickImage, exec),
57
62
  handleLink: createLinkHandler(editor, pickLink, exec),
58
63
  handleAnchor: pickAnchor ? createAnchorHandler(editor, pickAnchor, getEntryAnchors, exec) : () => void 0,
59
64
  toolbar: config
@@ -61,10 +66,12 @@ function RichTextToolbar({
61
66
  }, [
62
67
  config,
63
68
  editor,
69
+ enableImages,
64
70
  enableTables,
65
71
  getEntryAnchors,
66
72
  onFocusChange,
67
73
  pickAnchor,
74
+ pickImage,
68
75
  pickLink
69
76
  ]);
70
77
  return /* @__PURE__ */ jsx(
@@ -87,6 +94,33 @@ function RichTextToolbar({
87
94
  }
88
95
  );
89
96
  }
97
+ function createImageHandler(editor, pickImage, exec) {
98
+ return function handleImage() {
99
+ if (!pickImage) return;
100
+ const existing = attributesToReference(editor.getAttributes("image"));
101
+ void pickImage({ link: existing }).then((picked) => {
102
+ if (picked === void 0) return;
103
+ if (!picked.link) {
104
+ if (editor.isActive("image")) exec().deleteSelection().run();
105
+ return;
106
+ }
107
+ const link = picked.link;
108
+ if (link._type !== "image" || !("_entry" in link)) return;
109
+ const attributes = {
110
+ alt: picked.alt ?? "",
111
+ height: null,
112
+ src: picked.src ?? "",
113
+ width: null,
114
+ _id: link._id,
115
+ _entry: link._entry,
116
+ _link: "image"
117
+ };
118
+ if (editor.isActive("image"))
119
+ exec().updateAttributes("image", attributes).run();
120
+ else exec().insertContent({ type: "image", attrs: attributes }).run();
121
+ }).catch(console.error);
122
+ };
123
+ }
90
124
  function ToolbarItems({ config, context, menu, ownerId }) {
91
125
  return entries(config).flatMap(([name, entry], index) => {
92
126
  const separator = index === 0 ? [] : [
@@ -229,5 +263,6 @@ async function emptyPicker() {
229
263
  return void 0;
230
264
  }
231
265
  export {
232
- RichTextToolbar
266
+ RichTextToolbar,
267
+ createImageHandler
233
268
  };
@@ -1,6 +1,7 @@
1
1
  import type { Editor } from '@tiptap/react';
2
2
  import type { ComponentType, ReactElement, ReactNode } from 'react';
3
3
  import type { PickTextLinkFunc } from './PickTextLink.js';
4
+ import type { PickRichTextImageFunc } from './PickTextLink.js';
4
5
  export interface RichTextCommand {
5
6
  (): ReturnType<Editor['chain']>;
6
7
  }
@@ -27,9 +28,12 @@ export interface ToolbarConfig {
27
28
  export interface RichTextToolbarContext {
28
29
  editor: Editor;
29
30
  focusToggle: (target: EventTarget | null) => void;
31
+ pickImage: PickRichTextImageFunc;
30
32
  pickLink: PickTextLinkFunc;
33
+ enableImages?: boolean;
31
34
  enableTables?: boolean;
32
35
  exec: RichTextCommand;
36
+ handleImage: () => void;
33
37
  handleLink: () => void;
34
38
  handleAnchor: () => void;
35
39
  toolbar: ToolbarConfig;
@@ -179,6 +183,16 @@ export declare const links: {
179
183
  };
180
184
  };
181
185
  };
186
+ export declare const images: {
187
+ group: {
188
+ image: {
189
+ icon: () => import("react").JSX.Element;
190
+ title: string;
191
+ active: ({ editor }: RichTextToolbarContext) => boolean;
192
+ onSelect: ({ handleImage }: RichTextToolbarContext) => void;
193
+ };
194
+ };
195
+ };
182
196
  export declare const anchors: {
183
197
  group: {
184
198
  anchor: {
@@ -200,5 +214,9 @@ export declare const inserts: {
200
214
  title: string;
201
215
  onSelect: ({ exec }: RichTextToolbarContext) => boolean;
202
216
  };
203
- export declare function defaultToolbar(enableTables: boolean): ToolbarConfig;
217
+ export interface DefaultToolbarOptions {
218
+ enableImages?: boolean;
219
+ enableTables?: boolean;
220
+ }
221
+ export declare function defaultToolbar({ enableImages, enableTables }?: DefaultToolbarOptions): ToolbarConfig;
204
222
  export {};
@@ -13,6 +13,7 @@ import {
13
13
  IcRoundFormatListBulleted,
14
14
  IcRoundFormatListNumbered,
15
15
  IcRoundHorizontalRule,
16
+ IcRoundImage,
16
17
  IcRoundLink,
17
18
  IcRoundQuote,
18
19
  IcRoundSubscript,
@@ -285,6 +286,16 @@ var links = {
285
286
  }
286
287
  }
287
288
  };
289
+ var images = {
290
+ group: {
291
+ image: {
292
+ icon: () => /* @__PURE__ */ jsx(IcRoundImage, {}),
293
+ title: "Image",
294
+ active: ({ editor }) => editor.isActive("image"),
295
+ onSelect: ({ handleImage }) => handleImage()
296
+ }
297
+ }
298
+ };
288
299
  var anchors = {
289
300
  group: {
290
301
  anchor: {
@@ -306,26 +317,19 @@ var inserts = {
306
317
  title: "Horizontal rule",
307
318
  onSelect: ({ exec }) => exec().setHorizontalRule().run()
308
319
  };
309
- function defaultToolbar(enableTables) {
310
- if (!enableTables)
311
- return {
312
- headings,
313
- formatting,
314
- alignment,
315
- lists,
316
- links,
317
- anchors,
318
- quotes,
319
- inserts
320
- };
320
+ function defaultToolbar({
321
+ enableImages = false,
322
+ enableTables = false
323
+ } = {}) {
321
324
  return {
322
325
  headings,
323
- tables,
326
+ ...enableTables ? { tables } : {},
324
327
  formatting,
325
328
  alignment,
326
329
  lists,
327
330
  links,
328
331
  anchors,
332
+ ...enableImages ? { images } : {},
329
333
  quotes,
330
334
  inserts
331
335
  };
@@ -336,6 +340,7 @@ export {
336
340
  defaultToolbar,
337
341
  formatting,
338
342
  headings,
343
+ images,
339
344
  inserts,
340
345
  links,
341
346
  lists,
@@ -2,7 +2,7 @@ import {
2
2
  Mark,
3
3
  getMarkRange,
4
4
  mergeAttributes
5
- } from "../../../chunks/chunk-TL7ZW6BX.js";
5
+ } from "../../../chunks/chunk-A3XXZBOQ.js";
6
6
  import "../../../chunks/chunk-CQ52GEHY.js";
7
7
 
8
8
  // src/field/richtext/extensions/Anchor.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Mark,
3
3
  mergeAttributes
4
- } from "../../../chunks/chunk-TL7ZW6BX.js";
4
+ } from "../../../chunks/chunk-A3XXZBOQ.js";
5
5
  import "../../../chunks/chunk-CQ52GEHY.js";
6
6
 
7
7
  // src/field/richtext/extensions/Link.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Mark,
3
3
  mergeAttributes
4
- } from "../../../chunks/chunk-TL7ZW6BX.js";
4
+ } from "../../../chunks/chunk-A3XXZBOQ.js";
5
5
  import "../../../chunks/chunk-CQ52GEHY.js";
6
6
 
7
7
  // src/field/richtext/extensions/Small.ts
@@ -1,9 +1,9 @@
1
1
  import "../../chunks/chunk-NUFRM6SI.js";
2
2
  import {
3
3
  $232f8dea1b0a4f2f$export$762f73dccccd255d
4
- } from "../../chunks/chunk-JFROOUG6.js";
5
- import "../../chunks/chunk-SJBZFMQ2.js";
4
+ } from "../../chunks/chunk-NIVGVRDS.js";
6
5
  import "../../chunks/chunk-IYAQC63Y.js";
6
+ import "../../chunks/chunk-SJBZFMQ2.js";
7
7
  import "../../chunks/chunk-AC4U3IMS.js";
8
8
  import "../../chunks/chunk-CQ52GEHY.js";
9
9
 
@@ -42,10 +42,11 @@ function SelectFieldView({ field }) {
42
42
  isDisabled: options.readOnly,
43
43
  isRequired: options.required,
44
44
  items,
45
- label: options.label,
45
+ "aria-label": options.inline ? options.label : void 0,
46
+ label: options.inline ? void 0 : options.label,
46
47
  shared: options.shared,
47
48
  onSelectionChange: handleSelectionChange,
48
- placeholder: options.placeholder,
49
+ placeholder: options.placeholder ?? (options.inline ? options.label : void 0),
49
50
  selectedKey: value,
50
51
  children: (item) => /* @__PURE__ */ jsx(SelectItem, { id: item.id, children: item.label })
51
52
  }
@@ -87,11 +88,12 @@ function MultipleSelectFieldView({
87
88
  isDisabled: options.readOnly,
88
89
  isRequired: options.required,
89
90
  items,
90
- label: options.label,
91
+ "aria-label": options.inline ? options.label : void 0,
92
+ label: options.inline ? void 0 : options.label,
91
93
  shared: options.shared,
92
94
  onItemCleared: handleItemCleared,
93
95
  onItemInserted: handleItemInserted,
94
- placeholder: options.placeholder,
96
+ placeholder: options.placeholder ?? (options.inline ? options.label : void 0),
95
97
  selectedKeys: value
96
98
  },
97
99
  value.join("\0")
package/dist/index.css CHANGED
@@ -1310,9 +1310,11 @@
1310
1310
  display: flex;
1311
1311
  }
1312
1312
  .alinea-LabelTitle {
1313
- flex-shrink: 0;
1313
+ flex-wrap: wrap;
1314
1314
  align-items: center;
1315
1315
  gap: 4px;
1316
+ min-width: 0;
1317
+ max-width: 100%;
1316
1318
  display: flex;
1317
1319
  }
1318
1320
  .alinea-LabelIcon {
@@ -1347,6 +1349,7 @@
1347
1349
  font-size: var(--alinea-font-size-base);
1348
1350
  white-space: normal;
1349
1351
  word-wrap: break-word;
1352
+ overflow-wrap: anywhere;
1350
1353
  font-style: italic;
1351
1354
  font-weight: 400;
1352
1355
  line-height: 1.1;
@@ -2187,8 +2190,10 @@
2187
2190
  }
2188
2191
  & .alinea-NumberField-buttons {
2189
2192
  border-left: 1px solid var(--alinea-border);
2193
+ border-radius: 0 7px 7px 0;
2190
2194
  flex-direction: column;
2191
2195
  display: flex;
2196
+ overflow: hidden;
2192
2197
  & .alinea-NumberField-button {
2193
2198
  width: 22px;
2194
2199
  height: 16px;
@@ -2203,10 +2208,10 @@
2203
2208
  padding: 4px;
2204
2209
  display: flex;
2205
2210
  &[data-slot=increment] {
2206
- border-top-right-radius: 4px;
2211
+ border-top-right-radius: 7px;
2207
2212
  }
2208
2213
  &[data-slot=decrement] {
2209
- border-bottom-right-radius: 4px;
2214
+ border-bottom-right-radius: 7px;
2210
2215
  }
2211
2216
  &:hover {
2212
2217
  background-color: var(--alinea-muted-hover);
@@ -3968,11 +3973,6 @@
3968
3973
  margin: 0;
3969
3974
  }
3970
3975
  }
3971
- @media (width <= 768px) {
3972
- .alinea-DashboardLayout-sidebar.alinea-DashboardLayout-sidebar {
3973
- display: none;
3974
- }
3975
- }
3976
3976
 
3977
3977
  /* src/dashboard/app/editor/FileEditor.module.css */
3978
3978
  .alinea-FileEditor-surface {
@@ -4017,7 +4017,7 @@
4017
4017
  padding: 12px;
4018
4018
  }
4019
4019
  .alinea-FileEditor-metadata-grid {
4020
- grid-template-columns: repeat(2, minmax(0, 1fr));
4020
+ grid-template-columns: repeat(3, minmax(0, 1fr));
4021
4021
  gap: 16px 40px;
4022
4022
  margin: 0;
4023
4023
  display: grid;
@@ -4044,7 +4044,7 @@
4044
4044
  margin: 0;
4045
4045
  font-size: 13px;
4046
4046
  line-height: 1.35;
4047
- &:hover {
4047
+ &.alinea-is-link:hover {
4048
4048
  text-decoration: underline;
4049
4049
  }
4050
4050
  }
@@ -6028,6 +6028,20 @@
6028
6028
  }
6029
6029
  }
6030
6030
 
6031
+ /* src/dashboard/app/SidebarLayout.module.css */
6032
+ .alinea-SidebarLayout {
6033
+ --focus-border: var(--alinea-border-accent);
6034
+ --separator-border: var(--alinea-border);
6035
+ flex: 1;
6036
+ min-width: 0;
6037
+ height: 100%;
6038
+ }
6039
+ .alinea-SidebarLayout-content {
6040
+ min-width: 0;
6041
+ height: 100%;
6042
+ display: flex;
6043
+ }
6044
+
6031
6045
  /* src/dashboard/app/SidebarTree.module.css */
6032
6046
  .alinea-SidebarTree-tree {
6033
6047
  flex-direction: column;
@@ -6356,7 +6370,7 @@
6356
6370
  .alinea-DashboardModalDialog {
6357
6371
  background: var(--alinea-bg);
6358
6372
  flex-direction: column;
6359
- gap: 16px;
6373
+ gap: 24px;
6360
6374
  height: 100%;
6361
6375
  padding: 0;
6362
6376
  display: flex;
@@ -6381,10 +6395,11 @@
6381
6395
  color: #fff;
6382
6396
  }
6383
6397
  .alinea-DashboardModalDialog-header {
6398
+ border-bottom: 1px solid var(--alinea-border);
6384
6399
  justify-content: space-between;
6385
6400
  align-items: center;
6386
6401
  gap: 16px;
6387
- padding: 8px 16px;
6402
+ padding: 12px 16px;
6388
6403
  display: flex;
6389
6404
  }
6390
6405
  .alinea-DashboardModalCloseButton {
@@ -6392,10 +6407,11 @@
6392
6407
  margin-left: 12px;
6393
6408
  }
6394
6409
  .alinea-DashboardModalFooter {
6410
+ border-top: 1px solid var(--alinea-border);
6395
6411
  justify-content: space-between;
6396
6412
  align-items: center;
6397
6413
  gap: 8px;
6398
- padding: 8px 16px;
6414
+ padding: 12px 16px;
6399
6415
  display: flex;
6400
6416
  }
6401
6417
  .alinea-DashboardModalContent {
@@ -6493,7 +6509,7 @@
6493
6509
  /* src/dashboard/app/ui/Sidebar.module.css */
6494
6510
  .alinea-Sidebar {
6495
6511
  flex-shrink: 0;
6496
- width: 320px;
6512
+ width: 100%;
6497
6513
  min-width: 0;
6498
6514
  }
6499
6515
  .alinea-SidebarBody {
@@ -6616,6 +6632,9 @@
6616
6632
  margin-top: auto;
6617
6633
  display: flex;
6618
6634
  }
6635
+ .alinea-WorkspaceRoots-rootButton[data-hovered] {
6636
+ background: var(--alinea-button-hovered);
6637
+ }
6619
6638
  .alinea-WorkspaceRoots-profile-popover {
6620
6639
  min-width: 260px;
6621
6640
  margin: 0;
@@ -6715,6 +6734,164 @@
6715
6734
  }
6716
6735
  }
6717
6736
 
6737
+ /* node_modules/allotment/dist/style.css */
6738
+ :root {
6739
+ --separator-border: rgba(128, 128, 128, 0.35);
6740
+ --sash-hover-transition-duration: 0.1s;
6741
+ }
6742
+ .allotment-module_splitView__L-yRc {
6743
+ height: 100%;
6744
+ overflow: hidden;
6745
+ position: relative;
6746
+ width: 100%;
6747
+ }
6748
+ .allotment-module_splitView__L-yRc > .allotment-module_sashContainer__fzwJF {
6749
+ height: 100%;
6750
+ pointer-events: none;
6751
+ position: absolute;
6752
+ width: 100%;
6753
+ }
6754
+ .allotment-module_splitView__L-yRc > .allotment-module_sashContainer__fzwJF > .allotment-module_sash__QA-2t {
6755
+ pointer-events: auto;
6756
+ }
6757
+ .allotment-module_splitView__L-yRc > .allotment-module_splitViewContainer__rQnVa {
6758
+ height: 100%;
6759
+ position: relative;
6760
+ white-space: nowrap;
6761
+ width: 100%;
6762
+ }
6763
+ .allotment-module_splitView__L-yRc > .allotment-module_splitViewContainer__rQnVa > .allotment-module_splitViewView__MGZ6O {
6764
+ overflow: hidden;
6765
+ position: absolute;
6766
+ white-space: initial;
6767
+ }
6768
+ .allotment-module_splitView__L-yRc.allotment-module_vertical__WSwwa > .allotment-module_splitViewContainer__rQnVa > .allotment-module_splitViewView__MGZ6O {
6769
+ width: 100%;
6770
+ }
6771
+ .allotment-module_splitView__L-yRc.allotment-module_horizontal__7doS8 > .allotment-module_splitViewContainer__rQnVa > .allotment-module_splitViewView__MGZ6O {
6772
+ height: 100%;
6773
+ }
6774
+ .allotment-module_splitView__L-yRc.allotment-module_separatorBorder__x-rDS > .allotment-module_splitViewContainer__rQnVa > .allotment-module_splitViewView__MGZ6O:not(:first-child)::before {
6775
+ background-color: var(--separator-border);
6776
+ content: " ";
6777
+ left: 0;
6778
+ pointer-events: none;
6779
+ position: absolute;
6780
+ top: 0;
6781
+ z-index: 5;
6782
+ }
6783
+ .allotment-module_splitView__L-yRc.allotment-module_separatorBorder__x-rDS.allotment-module_vertical__WSwwa > .allotment-module_splitViewContainer__rQnVa > .allotment-module_splitViewView__MGZ6O:not(:first-child)::before {
6784
+ height: 1px;
6785
+ width: 100%;
6786
+ }
6787
+ .allotment-module_splitView__L-yRc.allotment-module_separatorBorder__x-rDS.allotment-module_horizontal__7doS8 > .allotment-module_splitViewContainer__rQnVa > .allotment-module_splitViewView__MGZ6O:not(:first-child)::before {
6788
+ height: 100%;
6789
+ width: 1px;
6790
+ }
6791
+ :root {
6792
+ --focus-border: #007fd4;
6793
+ --sash-size: 8px;
6794
+ --sash-hover-size: 4px;
6795
+ }
6796
+ .sash-module_sash__K-9lB {
6797
+ position: absolute;
6798
+ z-index: 35;
6799
+ touch-action: none;
6800
+ pointer-events: auto;
6801
+ text-align: initial;
6802
+ }
6803
+ .sash-module_sash__K-9lB.sash-module_disabled__Hm-wx {
6804
+ pointer-events: none;
6805
+ }
6806
+ .sash-module_sash__K-9lB.sash-module_mac__Jf6OJ.sash-module_vertical__pB-rs {
6807
+ cursor: col-resize;
6808
+ }
6809
+ .sash-module_sash__K-9lB.sash-module_vertical__pB-rs.sash-module_minimum__-UKxp {
6810
+ cursor: e-resize;
6811
+ }
6812
+ .sash-module_sash__K-9lB.sash-module_vertical__pB-rs.sash-module_maximum__TCWxD {
6813
+ cursor: w-resize;
6814
+ }
6815
+ .sash-module_sash__K-9lB.sash-module_mac__Jf6OJ.sash-module_horizontal__kFbiw {
6816
+ cursor: row-resize;
6817
+ }
6818
+ .sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_minimum__-UKxp {
6819
+ cursor: s-resize;
6820
+ }
6821
+ .sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_maximum__TCWxD {
6822
+ cursor: n-resize;
6823
+ }
6824
+ .sash-module_sash__K-9lB.sash-module_disabled__Hm-wx {
6825
+ cursor: default !important;
6826
+ pointer-events: none !important;
6827
+ }
6828
+ .sash-module_sash__K-9lB.sash-module_vertical__pB-rs {
6829
+ cursor: ew-resize;
6830
+ top: 0;
6831
+ width: var(--sash-size);
6832
+ height: 100%;
6833
+ }
6834
+ .sash-module_sash__K-9lB.sash-module_horizontal__kFbiw {
6835
+ cursor: ns-resize;
6836
+ left: 0;
6837
+ width: 100%;
6838
+ height: var(--sash-size);
6839
+ }
6840
+ .sash-module_sash__K-9lB:not(.sash-module_disabled__Hm-wx) > .sash-module_orthogonal-drag-handle__Yii2- {
6841
+ content: " ";
6842
+ height: calc(var(--sash-size) * 2);
6843
+ width: calc(var(--sash-size) * 2);
6844
+ z-index: 100;
6845
+ display: block;
6846
+ cursor: all-scroll;
6847
+ position: absolute;
6848
+ }
6849
+ .sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(.sash-module_disabled__Hm-wx) > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk,
6850
+ .sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(.sash-module_disabled__Hm-wx) > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
6851
+ cursor: nwse-resize;
6852
+ }
6853
+ .sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-north__f7Noe:not(.sash-module_disabled__Hm-wx) > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R,
6854
+ .sash-module_sash__K-9lB.sash-module_horizontal__kFbiw.sash-module_orthogonal-edge-south__6ZrFC:not(.sash-module_disabled__Hm-wx) > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
6855
+ cursor: nesw-resize;
6856
+ }
6857
+ .sash-module_sash__K-9lB.sash-module_vertical__pB-rs > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
6858
+ left: calc(var(--sash-size) * -0.5);
6859
+ top: calc(var(--sash-size) * -1);
6860
+ }
6861
+ .sash-module_sash__K-9lB.sash-module_vertical__pB-rs > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
6862
+ left: calc(var(--sash-size) * -0.5);
6863
+ bottom: calc(var(--sash-size) * -1);
6864
+ }
6865
+ .sash-module_sash__K-9lB.sash-module_horizontal__kFbiw > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_start__uZEDk {
6866
+ top: calc(var(--sash-size) * -0.5);
6867
+ left: calc(var(--sash-size) * -1);
6868
+ }
6869
+ .sash-module_sash__K-9lB.sash-module_horizontal__kFbiw > .sash-module_orthogonal-drag-handle__Yii2-.sash-module_end__0TP-R {
6870
+ top: calc(var(--sash-size) * -0.5);
6871
+ right: calc(var(--sash-size) * -1);
6872
+ }
6873
+ .sash-module_sash__K-9lB:before {
6874
+ content: "";
6875
+ pointer-events: none;
6876
+ position: absolute;
6877
+ width: 100%;
6878
+ height: 100%;
6879
+ transition: background-color var(--sash-hover-transition-duration) ease-out;
6880
+ background: transparent;
6881
+ }
6882
+ .sash-module_sash__K-9lB.sash-module_vertical__pB-rs:before {
6883
+ width: var(--sash-hover-size);
6884
+ left: calc(50% - (var(--sash-hover-size) / 2));
6885
+ }
6886
+ .sash-module_sash__K-9lB.sash-module_horizontal__kFbiw:before {
6887
+ height: var(--sash-hover-size);
6888
+ top: calc(50% - (var(--sash-hover-size) / 2));
6889
+ }
6890
+ .sash-module_sash__K-9lB.sash-module_hover__80W6I:before,
6891
+ .sash-module_sash__K-9lB.sash-module_active__bJspD:before {
6892
+ background: var(--focus-border);
6893
+ }
6894
+
6718
6895
  /* src/dashboard/global.css */
6719
6896
  html,
6720
6897
  body,
@@ -6979,6 +7156,9 @@ button {
6979
7156
  }
6980
7157
 
6981
7158
  /* src/field/link/LinkField.module.css */
7159
+ .alinea-LinkFieldView-inputHeader {
7160
+ min-height: calc(1.5 * var(--alinea-font-size-base) + 16px);
7161
+ }
6982
7162
  .alinea-LinkFieldView-label {
6983
7163
  flex: 0 auto;
6984
7164
  align-self: stretch;
@@ -7128,6 +7308,12 @@ button {
7128
7308
  .alinea-LinkFieldView-createButton {
7129
7309
  flex-shrink: 0;
7130
7310
  }
7311
+ .alinea-LinkFieldView-rowAction {
7312
+ flex: 1;
7313
+ align-self: stretch;
7314
+ min-width: 0;
7315
+ padding: 0;
7316
+ }
7131
7317
  .alinea-LinkFieldView-rowDropTarget {
7132
7318
  display: grid;
7133
7319
  }
@@ -7260,6 +7446,10 @@ button {
7260
7446
  .alinea-ListFieldTypePicker-item[data-focus-visible] {
7261
7447
  outline: none;
7262
7448
  }
7449
+ .alinea-ListFieldTypePicker-item[data-hovered]:not([data-focus-visible]) {
7450
+ background: var(--alinea-muted);
7451
+ color: var(--alinea-fg);
7452
+ }
7263
7453
  .alinea-ListFieldTypePicker-item[data-selected] {
7264
7454
  background: var(--alinea-selected);
7265
7455
  color: var(--alinea-primary-subtle-fg);
@@ -7492,13 +7682,12 @@ button {
7492
7682
  .alinea-RichTextExtensions-link {
7493
7683
  cursor: text;
7494
7684
  color: inherit;
7495
- text-decoration: underline;
7496
- text-decoration-color: color-mix(in srgb, var(--alinea-danger) 40%, transparent);
7497
7685
  text-underline-offset: .3em;
7498
7686
  overflow-wrap: break-word;
7499
7687
  word-wrap: break-word;
7500
7688
  word-break: break-word;
7501
7689
  hyphens: auto;
7690
+ text-decoration: underline;
7502
7691
  }
7503
7692
  .alinea-RichTextExtensions-anchor,
7504
7693
  .alinea-RichTextExtensions-heading[data-anchor] {
@@ -7572,6 +7761,21 @@ button {
7572
7761
  background: var(--alinea-primary);
7573
7762
  color: var(--alinea-primary-fg);
7574
7763
  }
7764
+ .alinea-RichTextExtensions-image {
7765
+ max-width: 100%;
7766
+ display: block;
7767
+ height: auto !important;
7768
+ }
7769
+ .alinea-RichTextExtensions-image ~ [data-resize-handle] {
7770
+ box-sizing: border-box;
7771
+ border: 2px solid var(--alinea-bg);
7772
+ background: var(--alinea-primary);
7773
+ cursor: nwse-resize;
7774
+ border-radius: 50%;
7775
+ width: 12px;
7776
+ height: 12px;
7777
+ transform: translate(50%, 50%);
7778
+ }
7575
7779
 
7576
7780
  /* src/field/richtext/RichTextField.module.css */
7577
7781
  .alinea-RichTextFieldView {
@@ -7585,6 +7789,13 @@ button {
7585
7789
  outline-color,
7586
7790
  background-color;
7587
7791
  }
7792
+ .alinea-RichTextFieldView-empty:before {
7793
+ content: attr(data-placeholder);
7794
+ float: left;
7795
+ height: 0;
7796
+ color: var(--alinea-fg-muted);
7797
+ pointer-events: none;
7798
+ }
7588
7799
  .alinea-RichTextFieldView:hover {
7589
7800
  border-color: var(--alinea-border-hover);
7590
7801
  outline-color: var(--alinea-ring-subtle);