alinea 0.6.4 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/alinea.d.ts CHANGED
@@ -1,4 +1,9 @@
1
1
  export { createConfig as config, Meta as meta, page, root, schema, snippet, track, type, workspace } from 'alinea/core';
2
+ export { Root, Workspace } from 'alinea/core';
3
+ export type { Config, Infer, Schema, TextDoc, Type } from 'alinea/core';
4
+ export type { EntryReference, FileReference, ImageReference } from 'alinea/picker/entry/EntryReference';
5
+ export type { UrlReference } from 'alinea/picker/url';
2
6
  export type { Infer as infer } from 'alinea/core';
7
+ export { document } from 'alinea/core/Document';
3
8
  export { createMediaRoot as media } from 'alinea/core/media/MediaRoot';
4
9
  export * from './input.js';
package/dist/alinea.js CHANGED
@@ -12,10 +12,15 @@ import {
12
12
  type,
13
13
  workspace
14
14
  } from "alinea/core";
15
+ import { Root, Workspace } from "alinea/core";
16
+ import { document } from "alinea/core/Document";
15
17
  import { createMediaRoot } from "alinea/core/media/MediaRoot";
16
18
  export * from "./input.js";
17
19
  export {
20
+ Root,
21
+ Workspace,
18
22
  createConfig as config,
23
+ document,
19
24
  createMediaRoot as media,
20
25
  Meta as meta,
21
26
  page,
@@ -2,7 +2,7 @@
2
2
  var package_default = {
3
3
  bin: "./dist/cli.js",
4
4
  name: "alinea",
5
- version: "0.6.4",
5
+ version: "0.7.0",
6
6
  license: "MIT",
7
7
  type: "module",
8
8
  scripts: {
package/dist/cli/Serve.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunks/chunk-UJJSVROY.js";
4
4
  import {
5
5
  package_default
6
- } from "../chunks/chunk-TFVRT7UJ.js";
6
+ } from "../chunks/chunk-BUMNAE3A.js";
7
7
  import "../chunks/chunk-U5RRZUYZ.js";
8
8
 
9
9
  // src/cli/Serve.ts
package/dist/cli/bin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "../chunks/chunk-TFVRT7UJ.js";
3
+ } from "../chunks/chunk-BUMNAE3A.js";
4
4
  import "../chunks/chunk-U5RRZUYZ.js";
5
5
 
6
6
  // node_modules/mri/lib/index.mjs
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "../../chunks/chunk-TFVRT7UJ.js";
3
+ } from "../../chunks/chunk-BUMNAE3A.js";
4
4
  import {
5
5
  __commonJS,
6
6
  __toESM
@@ -3,7 +3,7 @@ import {
3
3
  } from "../../chunks/chunk-IKINPSS5.js";
4
4
  import {
5
5
  package_default
6
- } from "../../chunks/chunk-TFVRT7UJ.js";
6
+ } from "../../chunks/chunk-BUMNAE3A.js";
7
7
  import "../../chunks/chunk-U5RRZUYZ.js";
8
8
 
9
9
  // src/cloud/server/CloudAuthServer.ts
@@ -7,7 +7,7 @@ export declare const EntryMeta: import("cito").Type<{
7
7
  type: string;
8
8
  index: string;
9
9
  root?: string | undefined;
10
- seeded?: string | undefined;
10
+ seeded?: string | boolean | undefined;
11
11
  }>;
12
12
  export type EntryRecord = typeof EntryRecord.infer & {
13
13
  [field: string]: unknown;
@@ -20,7 +20,7 @@ export declare const EntryRecord: import("cito").Type<{
20
20
  type: string;
21
21
  index: string;
22
22
  root?: string | undefined;
23
- seeded?: string | undefined;
23
+ seeded?: string | boolean | undefined;
24
24
  };
25
25
  }>;
26
26
  interface RequiredEntryFields extends Partial<EntryRow> {
@@ -1,4 +1,5 @@
1
1
  import {
2
+ boolean,
2
3
  object,
3
4
  string
4
5
  } from "../chunks/chunk-7LBNER34.js";
@@ -13,7 +14,7 @@ var EntryMeta = object(
13
14
  type = string;
14
15
  index = string;
15
16
  root = string.optional;
16
- seeded = string.optional;
17
+ seeded = string.optional.or(boolean);
17
18
  }
18
19
  );
19
20
  var EntryRecord = object(
@@ -490,7 +490,8 @@ import {
490
490
  Entry,
491
491
  EntryPhase,
492
492
  HttpError,
493
- Workspace
493
+ Workspace,
494
+ slugify
494
495
  } from "alinea/core";
495
496
  import { entryFileName, entryFilepath } from "alinea/core/EntryFilenames";
496
497
  import { createId } from "alinea/core/Id";
@@ -592,7 +593,9 @@ async function process(upload, publishUpload, client) {
592
593
  }
593
594
  case 2 /* Uploading */: {
594
595
  const fileName = upload.file.name;
595
- const file = join(upload.to.directory, fileName);
596
+ const extension = extname(fileName);
597
+ const path = slugify(basename(fileName, extension));
598
+ const file = join(upload.to.directory, path + extension);
596
599
  const info = await client.prepareUpload(file);
597
600
  await fetch(info.upload.url, {
598
601
  method: info.upload.method ?? "POST",
@@ -668,9 +671,9 @@ function useUploads(onSelect) {
668
671
  }
669
672
  })
670
673
  );
674
+ const extension = extname(upload2.file.name);
675
+ const path = slugify(basename(upload2.file.name, extension));
671
676
  const prev = await graph.preferPublished.maybeGet(Entry({ parent: parentId }));
672
- const extension = extname(upload2.file.name.toLowerCase());
673
- const path = basename(upload2.file.name.toLowerCase(), extension);
674
677
  const entryLocation = {
675
678
  workspace: upload2.to.workspace,
676
679
  root: upload2.to.root,
@@ -689,13 +692,14 @@ function useUploads(onSelect) {
689
692
  const prefix = workspace.mediaDir && normalize(workspace.mediaDir);
690
693
  const fileLocation = prefix && location.startsWith(prefix) ? location.slice(prefix.length) : location;
691
694
  const hash = await createFileHash(new Uint8Array(buffer));
695
+ const title = basename(upload2.file.name, extension);
692
696
  const entry = await createEntryRow(config, {
693
697
  ...entryLocation,
694
698
  parent: parent?.entryId ?? null,
695
699
  entryId,
696
700
  type: "MediaFile",
697
701
  url: (parent ? parent.url : "") + "/" + path,
698
- title: basename(path, extension),
702
+ title,
699
703
  seeded: null,
700
704
  modifiedAt: Date.now(),
701
705
  searchableText: "",
@@ -708,7 +712,7 @@ function useUploads(onSelect) {
708
712
  active: true,
709
713
  main: true,
710
714
  data: {
711
- title: basename(path, extension),
715
+ title,
712
716
  location: fileLocation,
713
717
  extension,
714
718
  size: buffer.byteLength,
@@ -1,6 +1,9 @@
1
1
  import {
2
2
  prettyMilliseconds
3
3
  } from "../../chunks/chunk-7YXWNKGS.js";
4
+ import {
5
+ package_default
6
+ } from "../../chunks/chunk-BUMNAE3A.js";
4
7
  import {
5
8
  connect
6
9
  } from "../../chunks/chunk-LMUDRU2U.js";
@@ -45,10 +48,12 @@ var transact = (db, stores, access = "readwrite") => {
45
48
  var get = (store, key) => rtop(store.get(key));
46
49
  var del = (store, key) => rtop(store.delete(key));
47
50
  var put = (store, item, key) => rtop(store.put(item, key));
51
+ var getAllKeys = (store, range, limit) => rtop(store.getAllKeys(range, limit));
48
52
  var getStore = (t, store) => t.objectStore(store);
49
53
 
50
54
  // src/dashboard/util/PersistentStore.ts
51
- var STORAGE_NAME = "@alinea/peristent.store";
55
+ var STORAGE_NAME = `@alinea/peristent.store`;
56
+ var dbName = `db-${package_default.version}`;
52
57
  async function createPersistentStore() {
53
58
  const storagePromise = openDB(
54
59
  STORAGE_NAME,
@@ -59,8 +64,15 @@ async function createPersistentStore() {
59
64
  storagePromise,
60
65
  sqlitePromise
61
66
  ]);
62
- const [store] = transact(storage, [STORAGE_NAME], "readonly");
63
- const buffer = await get(store, "db");
67
+ let store = transact(storage, [STORAGE_NAME], "readwrite")[0];
68
+ const databases = await getAllKeys(store);
69
+ for (const name of databases) {
70
+ if (name !== dbName) {
71
+ await del(store, name);
72
+ }
73
+ }
74
+ store = transact(storage, [STORAGE_NAME], "readonly")[0];
75
+ const buffer = await get(store, dbName);
64
76
  const init = ArrayBuffer.isView(buffer) ? buffer : void 0;
65
77
  let db = new Database(init);
66
78
  const driverOptions = {
@@ -96,16 +108,16 @@ async function createPersistentStore() {
96
108
  const persistent = {
97
109
  store: connect(db, driverOptions).toAsync(),
98
110
  async flush() {
99
- const [store2] = transact(storage, [STORAGE_NAME], "readwrite");
100
- await put(store2, db.export(), "db");
111
+ store = transact(storage, [STORAGE_NAME], "readwrite")[0];
112
+ await put(store, db.export(), dbName);
101
113
  },
102
114
  clone() {
103
115
  const clone = new Database(db.export());
104
116
  return connect(clone, driverOptions).toAsync();
105
117
  },
106
118
  async clear() {
107
- const [store2] = transact(storage, [STORAGE_NAME], "readwrite");
108
- await del(store2, "db");
119
+ store = transact(storage, [STORAGE_NAME], "readwrite")[0];
120
+ await del(store, dbName);
109
121
  db = new Database();
110
122
  persistent.store = connect(db, driverOptions).toAsync();
111
123
  }
@@ -1,6 +1,6 @@
1
- import { ComponentType, PropsWithChildren } from 'react';
1
+ import { ComponentType, PropsWithChildren, ReactNode } from 'react';
2
2
  export type LabelHeaderProps = {
3
- label: string;
3
+ label: ReactNode;
4
4
  help?: string;
5
5
  size?: 'small' | 'medium' | 'large';
6
6
  focused?: boolean;
@@ -11,8 +11,8 @@ export type LabelHeaderProps = {
11
11
  error?: boolean | string;
12
12
  };
13
13
  export declare const LabelHeader: import("react").NamedExoticComponent<LabelHeaderProps>;
14
- export interface LabelProps extends PropsWithChildren {
15
- label?: string;
14
+ export interface InputLabelProps extends PropsWithChildren {
15
+ label?: ReactNode;
16
16
  asLabel?: boolean;
17
17
  help?: string;
18
18
  width?: number;
@@ -29,4 +29,4 @@ export interface LabelProps extends PropsWithChildren {
29
29
  required?: boolean;
30
30
  }
31
31
  /** Label for an input */
32
- export declare const InputLabel: import("react").ForwardRefExoticComponent<LabelProps & import("react").RefAttributes<HTMLElement>>;
32
+ export declare const InputLabel: import("react").ForwardRefExoticComponent<InputLabelProps & import("react").RefAttributes<HTMLElement>>;
@@ -6,7 +6,10 @@ import { Chip } from "alinea/ui/Chip";
6
6
  import { HStack } from "alinea/ui/Stack";
7
7
  import { IcOutlineLock } from "alinea/ui/icons/IcOutlineLock";
8
8
  import { PhGlobe } from "alinea/ui/icons/PhGlobe";
9
- import { forwardRef, memo } from "react";
9
+ import {
10
+ forwardRef,
11
+ memo
12
+ } from "react";
10
13
 
11
14
  // src/dashboard/view/InputLabel.module.scss
12
15
  var InputLabel_module_default = {
@@ -1,2 +1,3 @@
1
1
  import { EntryEditProps } from '../EntryEdit.js';
2
+ export declare function IcTwotonePinDrop(): import("react/jsx-runtime").JSX.Element;
2
3
  export declare function FileEntry(props: EntryEditProps): import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,41 @@
1
1
  import {
2
2
  prettyBytes
3
3
  } from "../../../chunks/chunk-VRNNS7VT.js";
4
+ import {
5
+ v
6
+ } from "../../../chunks/chunk-57QP2MGK.js";
7
+ import {
8
+ useAtomValue
9
+ } from "../../../chunks/chunk-WF77DMLN.js";
10
+ import "../../../chunks/chunk-OBOPLPUQ.js";
4
11
  import "../../../chunks/chunk-U5RRZUYZ.js";
5
12
 
6
13
  // src/dashboard/view/media/FileEntry.tsx
7
14
  import { Media } from "alinea/backend/Media";
15
+ import { MediaFile } from "alinea/core/media/MediaSchema";
16
+ import { FormProvider, useField } from "alinea/dashboard";
8
17
  import { Typo, fromModule } from "alinea/ui";
18
+ import { Lift } from "alinea/ui/Lift";
9
19
  import { Main } from "alinea/ui/Main";
10
20
  import { Property } from "alinea/ui/Property";
21
+ import { useState } from "react";
22
+ import { InputField } from "../../editor/InputForm.js";
11
23
  import { useNav } from "../../hook/UseNav.js";
12
24
  import { EntryHeader } from "../entry/EntryHeader.js";
13
25
  import { EntryTitle } from "../entry/EntryTitle.js";
14
26
 
15
27
  // src/dashboard/view/media/FileEntry.module.scss
16
28
  var FileEntry_module_default = {
17
- "root": "alinea-FileEntry"
29
+ "root": "alinea-FileEntry",
30
+ "image": "alinea-FileEntry-image",
31
+ "image-col": "alinea-FileEntry-image-col",
32
+ "imageCol": "alinea-FileEntry-image-col",
33
+ "image-preview": "alinea-FileEntry-image-preview",
34
+ "imagePreview": "alinea-FileEntry-image-preview",
35
+ "image-preview-focus": "alinea-FileEntry-image-preview-focus",
36
+ "imagePreviewFocus": "alinea-FileEntry-image-preview-focus",
37
+ "image-preview-img": "alinea-FileEntry-image-preview-img",
38
+ "imagePreviewImg": "alinea-FileEntry-image-preview-img"
18
39
  };
19
40
 
20
41
  // src/dashboard/view/media/FileEntry.tsx
@@ -22,29 +43,130 @@ import { jsx, jsxs } from "react/jsx-runtime";
22
43
  var styles = fromModule(FileEntry_module_default);
23
44
  function ImageView({ editor }) {
24
45
  const image = editor.activeVersion;
25
- return /* @__PURE__ */ jsxs("div", { children: [
26
- /* @__PURE__ */ jsx("img", { src: image.data.preview }),
27
- /* @__PURE__ */ jsx(Property, { label: "Extension", children: image.data.extension }),
28
- /* @__PURE__ */ jsx(Property, { label: "File size", children: prettyBytes(image.data.size) }),
29
- /* @__PURE__ */ jsxs(Property, { label: "Dimensions", children: [
30
- image.data.width,
31
- " x ",
32
- image.data.height,
33
- " pixels"
34
- ] }),
35
- /* @__PURE__ */ jsx(Property, { label: "URL", children: /* @__PURE__ */ jsx(Typo.Monospace, { children: Media.ORIGINAL_LOCATION in image.data ? image.data[Media.ORIGINAL_LOCATION] : image.data.location }) }),
36
- image.data.focus && /* @__PURE__ */ jsxs(Property, { label: "Focus", children: [
37
- "(",
38
- image.data.focus.x.toFixed(2),
39
- ", ",
40
- image.data.focus.y.toFixed(2),
41
- ")"
46
+ const { value: focus = { x: 0.5, y: 0.5 }, mutator: setFocus } = useField(
47
+ MediaFile.focus
48
+ );
49
+ const [hover, setHover] = useState({});
50
+ const { x: focusX = focus.x, y: focusY = focus.y } = hover;
51
+ return /* @__PURE__ */ jsxs(Lift, { className: styles.image(), children: [
52
+ /* @__PURE__ */ jsx(
53
+ "div",
54
+ {
55
+ className: styles.image.col(),
56
+ style: {
57
+ backgroundImage: image.data.averageColor && `linear-gradient(45deg, ${v(
58
+ image.data.averageColor,
59
+ 0.6
60
+ )} 0%, ${v(image.data.averageColor, 0.8)} 100%)`
61
+ },
62
+ children: /* @__PURE__ */ jsxs(
63
+ "div",
64
+ {
65
+ className: styles.image.preview(),
66
+ onMouseMove: (event) => {
67
+ const rect = event.currentTarget.getBoundingClientRect();
68
+ const x = (event.clientX - rect.left) / rect.width;
69
+ const y = (event.clientY - rect.top) / rect.height;
70
+ setHover({ x, y });
71
+ },
72
+ onMouseOut: () => setHover({}),
73
+ onClick: (event) => {
74
+ event.preventDefault();
75
+ const rect = event.currentTarget.getBoundingClientRect();
76
+ const x = (event.clientX - rect.left) / rect.width;
77
+ const y = (event.clientY - rect.top) / rect.height;
78
+ setFocus({ x, y });
79
+ },
80
+ children: [
81
+ /* @__PURE__ */ jsx(
82
+ "img",
83
+ {
84
+ className: styles.image.preview.img(),
85
+ src: image.data.preview
86
+ }
87
+ ),
88
+ /* @__PURE__ */ jsx(
89
+ "div",
90
+ {
91
+ className: styles.image.preview.focus(),
92
+ style: {
93
+ left: focus.x * 100 + "%",
94
+ top: focus.y * 100 + "%"
95
+ },
96
+ children: /* @__PURE__ */ jsx(IcTwotonePinDrop, {})
97
+ }
98
+ )
99
+ ]
100
+ }
101
+ )
102
+ }
103
+ ),
104
+ /* @__PURE__ */ jsxs("div", { style: { minWidth: 0 }, children: [
105
+ /* @__PURE__ */ jsx(InputField, { field: MediaFile.title }),
106
+ /* @__PURE__ */ jsx(Property, { label: "Extension", children: image.data.extension }),
107
+ /* @__PURE__ */ jsx(Property, { label: "File size", children: prettyBytes(image.data.size) }),
108
+ /* @__PURE__ */ jsxs(Property, { label: "Dimensions", children: [
109
+ image.data.width,
110
+ " x ",
111
+ image.data.height,
112
+ " pixels"
113
+ ] }),
114
+ /* @__PURE__ */ jsx(Property, { label: "URL", children: /* @__PURE__ */ jsx(Typo.Monospace, { children: Media.ORIGINAL_LOCATION in image.data ? image.data[Media.ORIGINAL_LOCATION] : image.data.location }) }),
115
+ /* @__PURE__ */ jsxs(
116
+ Property,
117
+ {
118
+ label: "Focus",
119
+ help: "Click on the image to change the focus point",
120
+ children: [
121
+ "(",
122
+ focusX.toFixed(2),
123
+ ", ",
124
+ focusY.toFixed(2),
125
+ ")"
126
+ ]
127
+ }
128
+ )
42
129
  ] })
43
130
  ] });
44
131
  }
132
+ function IcTwotonePinDrop() {
133
+ return /* @__PURE__ */ jsxs(
134
+ "svg",
135
+ {
136
+ width: "1em",
137
+ height: "1em",
138
+ viewBox: "0 0 24 16",
139
+ style: { display: "block" },
140
+ children: [
141
+ /* @__PURE__ */ jsx(
142
+ "path",
143
+ {
144
+ fill: "var(--alinea-background)",
145
+ d: "M12 3C9.19 3 6 5.11 6 9.13c0 2.68 2 5.49 6 8.44c4-2.95 6-5.77 6-8.44C18 5.11 14.81 3 12 3z"
146
+ }
147
+ ),
148
+ /* @__PURE__ */ jsx(
149
+ "path",
150
+ {
151
+ fill: "var(--alinea-foreground)",
152
+ d: "M12 4c1.93 0 5 1.4 5 5.15c0 2.16-1.72 4.67-5 7.32c-3.28-2.65-5-5.17-5-7.32C7 5.4 10.07 4 12 4m0-2C8.73 2 5 4.46 5 9.15c0 3.12 2.33 6.41 7 9.85c4.67-3.44 7-6.73 7-9.85C19 4.46 15.27 2 12 2z"
153
+ }
154
+ ),
155
+ /* @__PURE__ */ jsx(
156
+ "path",
157
+ {
158
+ fill: "var(--alinea-foreground)",
159
+ d: "M12 7c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z"
160
+ }
161
+ )
162
+ ]
163
+ }
164
+ );
165
+ }
45
166
  function FileView({ editor }) {
46
167
  const file = editor.activeVersion;
47
- return /* @__PURE__ */ jsxs("div", { children: [
168
+ return /* @__PURE__ */ jsxs(Lift, { children: [
169
+ /* @__PURE__ */ jsx(InputField, { field: MediaFile.title }),
48
170
  /* @__PURE__ */ jsx(Property, { label: "Extension", children: file.data.extension }),
49
171
  /* @__PURE__ */ jsx(Property, { label: "File size", children: prettyBytes(file.data.size) }),
50
172
  /* @__PURE__ */ jsx(Property, { label: "URL", children: /* @__PURE__ */ jsx(Typo.Monospace, { children: Media.ORIGINAL_LOCATION in file.data ? file.data[Media.ORIGINAL_LOCATION] : file.data.location }) })
@@ -54,6 +176,7 @@ function FileEntry(props) {
54
176
  const nav = useNav();
55
177
  const { editor } = props;
56
178
  const isImage = Media.isImage(editor.activeVersion.data.extension);
179
+ const form = useAtomValue(editor.form);
57
180
  return /* @__PURE__ */ jsxs(Main, { className: styles.root(), children: [
58
181
  /* @__PURE__ */ jsx(EntryHeader, { editable: false, editor }),
59
182
  /* @__PURE__ */ jsx(
@@ -66,9 +189,10 @@ function FileEntry(props) {
66
189
  }) : nav.entry({ entryId: void 0 })
67
190
  }
68
191
  ),
69
- /* @__PURE__ */ jsx(Main.Container, { children: isImage ? /* @__PURE__ */ jsx(ImageView, { ...props }) : /* @__PURE__ */ jsx(FileView, { ...props }) })
192
+ /* @__PURE__ */ jsx(FormProvider, { form, children: /* @__PURE__ */ jsx(Main.Container, { children: isImage ? /* @__PURE__ */ jsx(ImageView, { ...props }) : /* @__PURE__ */ jsx(FileView, { ...props }) }) })
70
193
  ] });
71
194
  }
72
195
  export {
73
- FileEntry
196
+ FileEntry,
197
+ IcTwotonePinDrop
74
198
  };
@@ -93,8 +93,6 @@ var FileSummaryRow = view(
93
93
  var FileSummaryThumb = view(
94
94
  fileSummarySelect,
95
95
  function FileSummaryThumb2(file) {
96
- const ratio = file.width / file.height;
97
- const imageCover = ratio > 1 && ratio < 2;
98
96
  return /* @__PURE__ */ jsxs("div", { className: styles.thumb(), title: renderLabel(file.title), children: [
99
97
  /* @__PURE__ */ jsx(
100
98
  "div",
package/dist/index.css CHANGED
@@ -1289,6 +1289,57 @@ button {
1289
1289
  .alinea-FileEntry {
1290
1290
  position: relative;
1291
1291
  }
1292
+ .alinea-FileEntry-image {
1293
+ position: relative;
1294
+ overflow: hidden;
1295
+ padding-left: 15.625rem !important;
1296
+ }
1297
+ .alinea-FileEntry-image-col {
1298
+ position: absolute;
1299
+ top: 0;
1300
+ left: 0;
1301
+ width: 13.75rem;
1302
+ height: 100%;
1303
+ display: flex;
1304
+ align-items: center;
1305
+ justify-content: center;
1306
+ }
1307
+ .alinea-FileEntry-image-preview {
1308
+ position: relative;
1309
+ margin: 0 auto;
1310
+ cursor: pointer;
1311
+ }
1312
+ .alinea-FileEntry-image-preview-focus {
1313
+ position: absolute;
1314
+ top: 0;
1315
+ left: 0;
1316
+ transform: translate(-50%, -100%);
1317
+ font-size: 2.1875rem;
1318
+ opacity: 0;
1319
+ transition: opacity 0.3s;
1320
+ }
1321
+ .alinea-FileEntry-image-preview:hover .alinea-FileEntry-image-preview-focus {
1322
+ opacity: 1;
1323
+ }
1324
+ .alinea-FileEntry-image-preview-img {
1325
+ background-size: 1.25rem 1.25rem;
1326
+ background-position: 0px 0px, 0.625rem 0.625rem;
1327
+ background-image:
1328
+ linear-gradient(
1329
+ 45deg,
1330
+ #eee 25%,
1331
+ transparent 25%,
1332
+ transparent 75%,
1333
+ #eee 75%,
1334
+ #eee 100%),
1335
+ linear-gradient(
1336
+ 45deg,
1337
+ #eee 25%,
1338
+ white 25%,
1339
+ white 75%,
1340
+ #eee 75%,
1341
+ #eee 100%);
1342
+ }
1292
1343
 
1293
1344
  /* src/dashboard/view/media/FileSummary.module.scss */
1294
1345
  .alinea-FileSummary-row {
@@ -3838,19 +3889,6 @@ h3.alinea-RichTextKit-heading:not(:last-child) {
3838
3889
  box-shadow: var(--alinea-divider-top);
3839
3890
  }
3840
3891
 
3841
- /* src/ui/Property.module.scss */
3842
- .alinea-Property {
3843
- padding: 0.5rem 0;
3844
- }
3845
- .alinea-Property-label {
3846
- font-size: 0.8125rem;
3847
- padding-bottom: 0.1875rem;
3848
- }
3849
- .alinea-Property-contents {
3850
- display: block;
3851
- font-size: 0.9375rem;
3852
- }
3853
-
3854
3892
  /* src/ui/Sink.module.scss */
3855
3893
  .alinea-Sink {
3856
3894
  cursor: default;
package/dist/index.d.ts CHANGED
@@ -1,9 +1,8 @@
1
- export { Root, Workspace } from 'alinea/core';
2
- export type { Config, Infer, Schema, TextDoc, Type } from 'alinea/core';
3
- export * from 'alinea/core/driver/DefaultDriver';
4
- export * from 'alinea/core/driver/NextDriver';
5
- export { alinea };
1
+ export * from './alinea.js';
6
2
  import * as alinea from './alinea.js';
7
- export default alinea;
8
- export type { EntryReference, FileReference, ImageReference } from 'alinea/picker/entry/EntryReference';
9
- export type { UrlReference } from 'alinea/picker/url';
3
+ export { alinea as default };
4
+ import { createNextCMS as _createNextCMS } from 'alinea/core/driver/NextDriver';
5
+ export { createNextCMS };
6
+ /** @deprecated Use import {createCMS} from 'alinea/next' instead */
7
+ declare const createNextCMS: typeof _createNextCMS;
8
+ export * from 'alinea/core/driver/DefaultDriver';
package/dist/index.js CHANGED
@@ -1,14 +1,12 @@
1
1
  import "./chunks/chunk-U5RRZUYZ.js";
2
2
 
3
3
  // src/index.ts
4
- import { Root, Workspace } from "alinea/core";
5
- export * from "alinea/core/driver/DefaultDriver";
6
- export * from "alinea/core/driver/NextDriver";
4
+ export * from "./alinea.js";
7
5
  import * as alinea from "./alinea.js";
8
- var src_default = alinea;
6
+ import { createNextCMS as _createNextCMS } from "alinea/core/driver/NextDriver";
7
+ export * from "alinea/core/driver/DefaultDriver";
8
+ var createNextCMS = _createNextCMS;
9
9
  export {
10
- Root,
11
- Workspace,
12
- alinea,
13
- src_default as default
10
+ createNextCMS,
11
+ alinea as default
14
12
  };
package/dist/input.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export { document } from 'alinea/core/Document';
2
1
  export { check } from 'alinea/input/check';
3
2
  export { code } from 'alinea/input/code';
4
3
  export { date } from 'alinea/input/date';
package/dist/input.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import "./chunks/chunk-U5RRZUYZ.js";
2
2
 
3
3
  // src/input.ts
4
- import { document } from "alinea/core/Document";
5
4
  import { check } from "alinea/input/check";
6
5
  import { code } from "alinea/input/code";
7
6
  import { date } from "alinea/input/date";
@@ -26,7 +25,6 @@ export {
26
25
  check,
27
26
  code,
28
27
  date,
29
- document,
30
28
  entry,
31
29
  file,
32
30
  image,
package/dist/next.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { createNextCMS as createCMS } from 'alinea/core/driver/NextDriver';
package/dist/next.js ADDED
@@ -0,0 +1,7 @@
1
+ import "./chunks/chunk-U5RRZUYZ.js";
2
+
3
+ // src/next.ts
4
+ import { createNextCMS } from "alinea/core/driver/NextDriver";
5
+ export {
6
+ createNextCMS as createCMS
7
+ };
@@ -1,5 +1 @@
1
- import { PropsWithChildren, ReactNode } from 'react';
2
- export type PropertyProps = PropsWithChildren<{
3
- label: ReactNode;
4
- }>;
5
- export declare function Property({ label, children }: PropertyProps): import("react/jsx-runtime").JSX.Element;
1
+ export { InputLabel as Property } from 'alinea/dashboard';
@@ -1,24 +1,7 @@
1
1
  import "../chunks/chunk-U5RRZUYZ.js";
2
2
 
3
- // src/ui/Property.module.scss
4
- var Property_module_default = {
5
- "root": "alinea-Property",
6
- "root-label": "alinea-Property-label",
7
- "rootLabel": "alinea-Property-label",
8
- "root-contents": "alinea-Property-contents",
9
- "rootContents": "alinea-Property-contents"
10
- };
11
-
12
3
  // src/ui/Property.tsx
13
- import { fromModule } from "./util/Styler.js";
14
- import { jsx, jsxs } from "react/jsx-runtime";
15
- var styles = fromModule(Property_module_default);
16
- function Property({ label, children }) {
17
- return /* @__PURE__ */ jsxs("div", { className: styles.root(), children: [
18
- /* @__PURE__ */ jsx("div", { className: styles.root.label(), children: label }),
19
- /* @__PURE__ */ jsx("div", { className: styles.root.contents(), children })
20
- ] });
21
- }
4
+ import { InputLabel } from "alinea/dashboard";
22
5
  export {
23
- Property
6
+ InputLabel as Property
24
7
  };
@@ -1,3 +1,2 @@
1
1
  import { SVGProps } from 'react';
2
2
  export declare function IcRoundCode(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
3
- export default IcRoundCode;
@@ -11,8 +11,6 @@ function IcRoundCode(props) {
11
11
  }
12
12
  ) });
13
13
  }
14
- var IcRoundCode_default = IcRoundCode;
15
14
  export {
16
- IcRoundCode,
17
- IcRoundCode_default as default
15
+ IcRoundCode
18
16
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "bin": "./dist/cli.js",
3
3
  "name": "alinea",
4
- "version": "0.6.4",
4
+ "version": "0.7.0",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "scripts": {