alinea 1.4.5 → 1.4.6

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 (46) hide show
  1. package/dist/.init/content/pages/welcome.json +1 -1
  2. package/dist/LICENSES.md +83 -83
  3. package/dist/adapter/next/cms.d.ts +1 -1
  4. package/dist/adapter/next/cms.js +1 -1
  5. package/dist/backend/router/Router.d.ts +0 -1
  6. package/dist/backend/router/Router.js +1 -10
  7. package/dist/bundled.d.ts +39 -68
  8. package/dist/chunks/{chunk-BWPXC7VK.js → chunk-2MTR56XD.js} +4 -2
  9. package/dist/chunks/{chunk-WR25RMMO.js → chunk-T5PTMPOY.js} +5 -3
  10. package/dist/cli/Init.js +2 -1
  11. package/dist/cli/Serve.js +1 -1
  12. package/dist/cli/bin.js +1 -1
  13. package/dist/cli/util/EnsureLibs.js +6 -7
  14. package/dist/cloud/CloudRemote.d.ts +2 -2
  15. package/dist/cloud/CloudRemote.js +13 -5
  16. package/dist/core/Outcome.d.ts +4 -59
  17. package/dist/core/Outcome.js +5 -114
  18. package/dist/core/db/EntryResolver.d.ts +1 -1
  19. package/dist/core/db/EntryResolver.js +3 -6
  20. package/dist/core/source/IndexedDBSource.js +47 -18
  21. package/dist/dashboard/atoms/Edits.js +2 -1
  22. package/dist/dashboard/atoms/EntryEditorAtoms.js +8 -5
  23. package/dist/dashboard/view/InputLabel.d.ts +4 -0
  24. package/dist/dashboard/view/InputLabel.js +45 -16
  25. package/dist/dashboard/view/MediaExplorer.js +1 -5
  26. package/dist/dashboard/view/RootOverview.js +1 -5
  27. package/dist/dashboard/view/WorkspaceLabel.js +2 -2
  28. package/dist/dashboard/view/entry/EntryTitle.js +1 -5
  29. package/dist/dashboard/view/media/FileEntry.js +4 -5
  30. package/dist/field/check/CheckField.view.js +19 -8
  31. package/dist/field/list/ListField.view.d.ts +1 -1
  32. package/dist/field/list/ListField.view.js +160 -94
  33. package/dist/field/metadata/MetadataField.d.ts +1 -3
  34. package/dist/field/metadata/MetadataField.js +3 -5
  35. package/dist/field/select/SelectField.view.js +8 -4
  36. package/dist/field/text/TextField.d.ts +4 -0
  37. package/dist/field/text/TextField.view.js +2 -2
  38. package/dist/index.css +47 -20
  39. package/dist/ui/icons/IcRoundArrowDownward.d.ts +2 -0
  40. package/dist/ui/icons/IcRoundArrowDownward.js +26 -0
  41. package/dist/ui/icons/IcRoundArrowUpward.d.ts +2 -0
  42. package/dist/ui/icons/IcRoundArrowUpward.js +26 -0
  43. package/dist/ui/icons/IcRoundUnfoldLess.d.ts +2 -0
  44. package/dist/ui/icons/IcRoundUnfoldLess.js +26 -0
  45. package/package.json +4 -2
  46. package/readme.md +8 -2
@@ -1,5 +1,5 @@
1
1
  {
2
- "_id": "303LNPVhQGZ57ejsBVupQkfQyNC",
2
+ "_id": "30ogxUJkFuaoNf9O0dugQ4kzkdB",
3
3
  "_type": "Page",
4
4
  "_index": "a0",
5
5
  "_seeded": "welcome.json",
package/dist/LICENSES.md CHANGED
@@ -55,11 +55,11 @@ SOFTWARE.
55
55
 
56
56
  ===
57
57
 
58
- # react-query@3.39.3 (MIT)
58
+ # @headlessui/react@2.2.0 (MIT)
59
59
 
60
60
  MIT License
61
61
 
62
- Copyright (c) 2019 Tanner Linsley
62
+ Copyright (c) 2020 Tailwind Labs
63
63
 
64
64
  Permission is hereby granted, free of charge, to any person obtaining a copy
65
65
  of this software and associated documentation files (the "Software"), to deal
@@ -79,14 +79,13 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
79
79
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
80
80
  SOFTWARE.
81
81
 
82
-
83
82
  ===
84
83
 
85
- # @headlessui/react@2.2.0 (MIT)
84
+ # react-query@3.39.3 (MIT)
86
85
 
87
86
  MIT License
88
87
 
89
- Copyright (c) 2020 Tailwind Labs
88
+ Copyright (c) 2019 Tanner Linsley
90
89
 
91
90
  Permission is hereby granted, free of charge, to any person obtaining a copy
92
91
  of this software and associated documentation files (the "Software"), to deal
@@ -106,6 +105,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
106
105
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
107
106
  SOFTWARE.
108
107
 
108
+
109
109
  ===
110
110
 
111
111
  # htmlparser2@9.1.0 (MIT)
@@ -129,6 +129,23 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
129
129
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
130
130
  IN THE SOFTWARE.
131
131
 
132
+ ===
133
+
134
+ # domutils@3.1.0 (BSD-2-Clause)
135
+
136
+ Copyright (c) Felix Böhm
137
+ All rights reserved.
138
+
139
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
140
+
141
+ Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
142
+
143
+ Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
144
+
145
+ THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
146
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
147
+
148
+
132
149
  ===
133
150
 
134
151
  # @popperjs/core@2.11.8 (MIT)
@@ -172,23 +189,6 @@ THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRE
172
189
  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
173
190
 
174
191
 
175
- ===
176
-
177
- # domutils@3.1.0 (BSD-2-Clause)
178
-
179
- Copyright (c) Felix Böhm
180
- All rights reserved.
181
-
182
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
183
-
184
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
185
-
186
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
187
-
188
- THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS,
189
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
190
-
191
-
192
192
  ===
193
193
 
194
194
  # entities@4.5.0 (BSD-2-Clause)
@@ -206,33 +206,6 @@ THIS IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRE
206
206
  EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
207
207
 
208
208
 
209
- ===
210
-
211
- # prop-types@15.8.1 (MIT)
212
-
213
- MIT License
214
-
215
- Copyright (c) 2013-present, Facebook, Inc.
216
-
217
- Permission is hereby granted, free of charge, to any person obtaining a copy
218
- of this software and associated documentation files (the "Software"), to deal
219
- in the Software without restriction, including without limitation the rights
220
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
221
- copies of the Software, and to permit persons to whom the Software is
222
- furnished to do so, subject to the following conditions:
223
-
224
- The above copyright notice and this permission notice shall be included in all
225
- copies or substantial portions of the Software.
226
-
227
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
228
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
229
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
230
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
231
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
232
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
233
- SOFTWARE.
234
-
235
-
236
209
  ===
237
210
 
238
211
  # @juggle/resize-observer@3.4.0 (Apache-2.0)
@@ -442,11 +415,11 @@ SOFTWARE.
442
415
 
443
416
  ===
444
417
 
445
- # react-is@16.13.1 (MIT)
418
+ # prop-types@15.8.1 (MIT)
446
419
 
447
420
  MIT License
448
421
 
449
- Copyright (c) Facebook, Inc. and its affiliates.
422
+ Copyright (c) 2013-present, Facebook, Inc.
450
423
 
451
424
  Permission is hereby granted, free of charge, to any person obtaining a copy
452
425
  of this software and associated documentation files (the "Software"), to deal
@@ -469,15 +442,30 @@ SOFTWARE.
469
442
 
470
443
  ===
471
444
 
472
- # @headless-tree/react@0.0.15 (MIT)
445
+ # react-is@16.13.1 (MIT)
473
446
 
474
- MIT
447
+ MIT License
475
448
 
476
- ===
449
+ Copyright (c) Facebook, Inc. and its affiliates.
477
450
 
478
- # @headless-tree/core@0.0.15 (MIT)
451
+ Permission is hereby granted, free of charge, to any person obtaining a copy
452
+ of this software and associated documentation files (the "Software"), to deal
453
+ in the Software without restriction, including without limitation the rights
454
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
455
+ copies of the Software, and to permit persons to whom the Software is
456
+ furnished to do so, subject to the following conditions:
457
+
458
+ The above copyright notice and this permission notice shall be included in all
459
+ copies or substantial portions of the Software.
460
+
461
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
462
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
463
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
464
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
465
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
466
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
467
+ SOFTWARE.
479
468
 
480
- MIT
481
469
 
482
470
  ===
483
471
 
@@ -496,6 +484,18 @@ The above copyright notice and this permission notice shall be included in all c
496
484
  THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
497
485
 
498
486
 
487
+ ===
488
+
489
+ # @headless-tree/core@0.0.15 (MIT)
490
+
491
+ MIT
492
+
493
+ ===
494
+
495
+ # @headless-tree/react@0.0.15 (MIT)
496
+
497
+ MIT
498
+
499
499
  ===
500
500
 
501
501
  # y-prosemirror@1.2.15 (MIT)
@@ -1585,6 +1585,33 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1585
1585
  See the License for the specific language governing permissions and
1586
1586
  limitations under the License.
1587
1587
 
1588
+ ===
1589
+
1590
+ # @tanstack/virtual-core@3.10.6 (MIT)
1591
+
1592
+ MIT License
1593
+
1594
+ Copyright (c) 2021-present Tanner Linsley
1595
+
1596
+ Permission is hereby granted, free of charge, to any person obtaining a copy
1597
+ of this software and associated documentation files (the "Software"), to deal
1598
+ in the Software without restriction, including without limitation the rights
1599
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1600
+ copies of the Software, and to permit persons to whom the Software is
1601
+ furnished to do so, subject to the following conditions:
1602
+
1603
+ The above copyright notice and this permission notice shall be included in all
1604
+ copies or substantial portions of the Software.
1605
+
1606
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1607
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1608
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1609
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1610
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1611
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1612
+ SOFTWARE.
1613
+
1614
+
1588
1615
  ===
1589
1616
 
1590
1617
  # @react-stately/utils@3.10.5 (Apache-2.0)
@@ -1790,30 +1817,3 @@ limitations under the License.
1790
1817
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1791
1818
  See the License for the specific language governing permissions and
1792
1819
  limitations under the License.
1793
-
1794
-
1795
- ===
1796
-
1797
- # @tanstack/virtual-core@3.10.6 (MIT)
1798
-
1799
- MIT License
1800
-
1801
- Copyright (c) 2021-present Tanner Linsley
1802
-
1803
- Permission is hereby granted, free of charge, to any person obtaining a copy
1804
- of this software and associated documentation files (the "Software"), to deal
1805
- in the Software without restriction, including without limitation the rights
1806
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1807
- copies of the Software, and to permit persons to whom the Software is
1808
- furnished to do so, subject to the following conditions:
1809
-
1810
- The above copyright notice and this permission notice shall be included in all
1811
- copies or substantial portions of the Software.
1812
-
1813
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1814
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1815
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1816
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1817
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1819
- SOFTWARE.
@@ -1,9 +1,9 @@
1
1
  import { CMS } from 'alinea/core/CMS';
2
2
  import type { Config } from 'alinea/core/Config';
3
3
  import type { UploadResponse } from 'alinea/core/Connection';
4
+ import type { Mutation } from 'alinea/core/db/Mutation';
4
5
  import type { GraphQuery } from 'alinea/core/Graph';
5
6
  import type { User } from 'alinea/core/User';
6
- import type { Mutation } from 'alinea/core/db/Mutation';
7
7
  export interface PreviewProps {
8
8
  widget?: boolean;
9
9
  workspace?: string;
@@ -3,8 +3,8 @@ import "../../chunks/chunk-NZLE2WMY.js";
3
3
  // src/adapter/next/cms.tsx
4
4
  import { Headers } from "@alinea/iso";
5
5
  import { COOKIE_NAME } from "alinea/cloud/CloudRemote";
6
- import { CMS } from "alinea/core/CMS";
7
6
  import { Client } from "alinea/core/Client";
7
+ import { CMS } from "alinea/core/CMS";
8
8
  import { outcome } from "alinea/core/Outcome";
9
9
  import { getPreviewPayloadFromCookies } from "alinea/preview/PreviewCookies";
10
10
  import { requestContext } from "./context.js";
@@ -113,7 +113,6 @@ export declare namespace router {
113
113
  }>(input: In): Promise<In & {
114
114
  body: unknown;
115
115
  }>;
116
- function jsonResponse<Out>(output: Out, init?: ResponseInit): globalThis.Response;
117
116
  function reportError(error: any): globalThis.Response;
118
117
  function redirect(url: string, init?: ResponseInit): globalThis.Response;
119
118
  type Cookie = {
@@ -5,7 +5,6 @@ import "../../chunks/chunk-NZLE2WMY.js";
5
5
 
6
6
  // src/backend/router/Router.ts
7
7
  import { CompressionStream, Headers, Response } from "@alinea/iso";
8
- import { Outcome } from "alinea/core/Outcome";
9
8
  var Route = class _Route {
10
9
  constructor(handle) {
11
10
  this.handle = handle;
@@ -126,17 +125,9 @@ function callHandler(handler, input) {
126
125
  return { ...input, body };
127
126
  }
128
127
  router2.parseJson = parseJson;
129
- function jsonResponse(output, init = {}) {
130
- return new Response(JSON.stringify(output), {
131
- ...init,
132
- headers: { "content-type": "application/json", ...init.headers },
133
- status: Outcome.isOutcome(output) ? output.status : 200
134
- });
135
- }
136
- router2.jsonResponse = jsonResponse;
137
128
  function reportError(error) {
138
129
  console.error(error);
139
- return router2.jsonResponse(Outcome.Failure(error));
130
+ return Response.json({ success: false, error }, { status: 500 });
140
131
  }
141
132
  router2.reportError = reportError;
142
133
  function redirect(url, init = {}) {
package/dist/bundled.d.ts CHANGED
@@ -45,9 +45,9 @@ declare module 'alinea/adapter/next/cms' {
45
45
  import { CMS } from 'alinea/core/CMS';
46
46
  import type { Config } from 'alinea/core/Config';
47
47
  import type { UploadResponse } from 'alinea/core/Connection';
48
+ import type { Mutation } from 'alinea/core/db/Mutation';
48
49
  import type { GraphQuery } from 'alinea/core/Graph';
49
50
  import type { User } from 'alinea/core/User';
50
- import type { Mutation } from 'alinea/core/db/Mutation';
51
51
  export interface PreviewProps {
52
52
  widget?: boolean;
53
53
  workspace?: string;
@@ -428,7 +428,6 @@ declare module 'alinea/backend/router/Router' {
428
428
  }>(input: In): Promise<In & {
429
429
  body: unknown;
430
430
  }>;
431
- function jsonResponse<Out>(output: Out, init?: ResponseInit): globalThis.Response;
432
431
  function reportError(error: any): globalThis.Response;
433
432
  function redirect(url: string, init?: ResponseInit): globalThis.Response;
434
433
  type Cookie = {
@@ -995,10 +994,10 @@ declare module 'alinea/cloud/CloudRemote' {
995
994
  import { Config } from 'alinea/core/Config';
996
995
  import type { RemoteConnection, RequestContext, Revision } from 'alinea/core/Connection';
997
996
  import { type Draft, type DraftKey } from 'alinea/core/Draft';
998
- import type { EntryRecord } from 'alinea/core/EntryRecord';
999
- import type { User } from 'alinea/core/User';
1000
997
  import type { CommitRequest } from 'alinea/core/db/CommitRequest';
998
+ import type { EntryRecord } from 'alinea/core/EntryRecord';
1001
999
  import { ReadonlyTree } from 'alinea/core/source/Tree';
1000
+ import type { User } from 'alinea/core/User';
1002
1001
  export const COOKIE_NAME = "alinea.auth";
1003
1002
  export class CloudRemote implements RemoteConnection {
1004
1003
  #private;
@@ -1465,7 +1464,7 @@ declare module 'alinea/core/db/EntryResolver' {
1465
1464
  }
1466
1465
  export function statusChecker(status: Status): Check;
1467
1466
  interface Check {
1468
- (input: any): boolean;
1467
+ (input: Entry): boolean;
1469
1468
  }
1470
1469
  export {};
1471
1470
 
@@ -2756,65 +2755,10 @@ declare module 'alinea/core/OrderBy' {
2756
2755
 
2757
2756
  declare module 'alinea/core/Outcome' {
2758
2757
 
2759
- import { type ErrorCode } from 'alinea/core/HttpError';
2760
- type ErrorObject = {
2761
- stack?: string;
2762
- message?: string;
2763
- status?: number;
2764
- };
2765
- export type OutcomeJSON<D> = {
2766
- success: true;
2767
- data: D;
2768
- } | {
2769
- success: false;
2770
- error: ErrorObject;
2771
- };
2772
- type OutcomeRunner = (() => any) | Promise<any>;
2773
- type Pair<T> = [T, undefined] | [undefined, Error];
2774
- type OutcomeReturn<T> = T extends () => Promise<infer X> ? Promise<Outcome<X>> : T extends () => infer X ? Outcome<X> : T extends Promise<infer X> ? Promise<Outcome<X>> : Outcome<T>;
2775
- type OutcomeResult<T> = T extends () => Promise<any> ? Promise<boolean> : T extends () => any ? boolean : T extends Promise<any> ? Promise<boolean> : boolean;
2776
- export function outcome<Run extends OutcomeRunner>(run: Run): OutcomeReturn<Run>;
2777
- export namespace outcome {
2778
- function succeeds<Run extends OutcomeRunner>(run: OutcomeRunner): OutcomeResult<Run>;
2779
- function fails<Run extends OutcomeRunner>(run: OutcomeRunner): OutcomeResult<Run>;
2780
- }
2781
- export type Outcome<T = void> = Outcome.OutcomeImpl<T> & Pair<T>;
2782
- export namespace Outcome {
2783
- export function fromJSON<T>(json: OutcomeJSON<T>, status?: ErrorCode): Outcome<T>;
2784
- export function unpack<T>(outcome: Outcome<T>): T;
2785
- export function isOutcome(value: any): value is Outcome;
2786
- export function Success<T>(data: T): Outcome<T>;
2787
- export function Failure<T = any>(error: Error | any): Outcome<T>;
2788
- export abstract class OutcomeImpl<T> {
2789
- success: boolean;
2790
- abstract status: number;
2791
- constructor(success: boolean);
2792
- isSuccess(): this is SuccessOutcome<T>;
2793
- isFailure(): this is FailureOutcome<T>;
2794
- abstract map<U>(fn: (data: T) => U): Outcome<U>;
2795
- abstract toJSON(): OutcomeJSON<T>;
2796
- }
2797
- class SuccessOutcome<T> extends OutcomeImpl<T> {
2798
- value: T;
2799
- status: number;
2800
- error: undefined;
2801
- constructor(value: T);
2802
- [Symbol.iterator](): Generator<T | undefined, void, unknown>;
2803
- map<U>(fn: (data: T) => U): Outcome<U>;
2804
- toJSON(): OutcomeJSON<T>;
2805
- }
2806
- class FailureOutcome<T> extends OutcomeImpl<T> {
2807
- error: Error;
2808
- status: number;
2809
- value: undefined;
2810
- constructor(error: Error);
2811
- [Symbol.iterator](): Generator<Error | undefined, void, unknown>;
2812
- map<U>(fn: (data: T) => U): Outcome<U>;
2813
- toJSON(): OutcomeJSON<T>;
2814
- }
2815
- export {};
2816
- }
2817
- export {};
2758
+ export type Outcome<T = unknown> = [T, undefined] | [undefined, Error];
2759
+ export function outcome<T>(promised: Promise<T>): Promise<Outcome<T>>;
2760
+ export function outcome<T>(run: () => Promise<T>): Promise<Outcome<T>>;
2761
+ export function outcome<T>(run: () => T): Outcome<T>;
2818
2762
 
2819
2763
  }
2820
2764
 
@@ -6331,6 +6275,8 @@ declare module 'alinea/dashboard/view/InputLabel' {
6331
6275
  readOnly?: boolean;
6332
6276
  required?: boolean;
6333
6277
  error?: boolean | string;
6278
+ isFolded?: boolean;
6279
+ toggleFold?: () => void;
6334
6280
  };
6335
6281
  export const LabelHeader: import("react").NamedExoticComponent<LabelHeaderProps>;
6336
6282
  export interface InputLabelProps extends PropsWithChildren {
@@ -6349,6 +6295,8 @@ declare module 'alinea/dashboard/view/InputLabel' {
6349
6295
  className?: string;
6350
6296
  error?: boolean | string;
6351
6297
  required?: boolean;
6298
+ isFolded?: boolean;
6299
+ toggleFold?: () => void;
6352
6300
  }
6353
6301
  /** Label for an input */
6354
6302
  export const InputLabel: import("react").ForwardRefExoticComponent<InputLabelProps & import("react").RefAttributes<HTMLElement>>;
@@ -7180,8 +7128,8 @@ declare module 'alinea/field/list/ListField.stories' {
7180
7128
 
7181
7129
  declare module 'alinea/field/list/ListField.view' {
7182
7130
 
7183
- import type { Schema } from 'alinea/core/Schema';
7184
7131
  import type { ListField } from 'alinea/core/field/ListField';
7132
+ import type { Schema } from 'alinea/core/Schema';
7185
7133
  import { ListRow } from 'alinea/core/shape/ListShape';
7186
7134
  import type { ListOptions } from 'alinea/field/list/ListField';
7187
7135
  export interface ListInputProps {
@@ -7200,8 +7148,8 @@ declare module 'alinea/field/metadata' {
7200
7148
  declare module 'alinea/field/metadata/MetadataField' {
7201
7149
 
7202
7150
  import type { FieldOptions, WithoutLabel } from 'alinea/core';
7203
- import { type Type } from 'alinea/core/Type';
7204
7151
  import { RecordField } from 'alinea/core/field/RecordField';
7152
+ import { type Type } from 'alinea/core/Type';
7205
7153
  import { type ImageField, type ImageLink } from 'alinea/field/link';
7206
7154
  import { type ObjectField } from 'alinea/field/object';
7207
7155
  import { type TextField } from 'alinea/field/text';
@@ -7214,7 +7162,6 @@ declare module 'alinea/field/metadata/MetadataField' {
7214
7162
  title: TextField;
7215
7163
  description: TextField;
7216
7164
  openGraph: ObjectField<{
7217
- siteName: TextField;
7218
7165
  image: ImageField;
7219
7166
  title: TextField;
7220
7167
  description: TextField;
@@ -7224,7 +7171,6 @@ declare module 'alinea/field/metadata/MetadataField' {
7224
7171
  title: string;
7225
7172
  description: string;
7226
7173
  openGraph: {
7227
- siteName: string;
7228
7174
  image: ImageLink;
7229
7175
  title: string;
7230
7176
  description: string;
@@ -7735,6 +7681,10 @@ declare module 'alinea/field/text/TextField' {
7735
7681
  autoFocus?: boolean;
7736
7682
  /** Index the text value of this field */
7737
7683
  searchable?: boolean;
7684
+ /** Short hint that describes the expected value */
7685
+ placeholder?: string;
7686
+ /** Determines which data the field accepts */
7687
+ type?: 'email' | 'tel' | 'text' | 'url';
7738
7688
  }
7739
7689
  export class TextField extends ScalarField<string, TextOptions> {
7740
7690
  }
@@ -9214,6 +9164,13 @@ declare module 'alinea/ui/icons/IcRoundArrowBack' {
9214
9164
 
9215
9165
  }
9216
9166
 
9167
+ declare module 'alinea/ui/icons/IcRoundArrowDownward' {
9168
+
9169
+ import type { SVGProps } from 'react';
9170
+ export function IcRoundArrowDownward(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
9171
+
9172
+ }
9173
+
9217
9174
  declare module 'alinea/ui/icons/IcRoundArrowDropDown' {
9218
9175
 
9219
9176
  import type { SVGProps } from 'react';
@@ -9245,6 +9202,13 @@ declare module 'alinea/ui/icons/IcRoundArrowForward' {
9245
9202
 
9246
9203
  }
9247
9204
 
9205
+ declare module 'alinea/ui/icons/IcRoundArrowUpward' {
9206
+
9207
+ import type { SVGProps } from 'react';
9208
+ export function IcRoundArrowUpward(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
9209
+
9210
+ }
9211
+
9248
9212
  declare module 'alinea/ui/icons/IcRoundCheck' {
9249
9213
 
9250
9214
  import type { SVGProps } from 'react';
@@ -9659,6 +9623,13 @@ declare module 'alinea/ui/icons/IcRoundUndo' {
9659
9623
 
9660
9624
  }
9661
9625
 
9626
+ declare module 'alinea/ui/icons/IcRoundUnfoldLess' {
9627
+
9628
+ import type { SVGProps } from 'react';
9629
+ export function IcRoundUnfoldLess(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
9630
+
9631
+ }
9632
+
9662
9633
  declare module 'alinea/ui/icons/IcRoundUnfoldMore' {
9663
9634
 
9664
9635
  import type { SVGProps } from 'react';
@@ -2,7 +2,7 @@
2
2
  var package_default = {
3
3
  bin: "./dist/cli.js",
4
4
  name: "alinea",
5
- version: "1.4.5",
5
+ version: "1.4.6",
6
6
  description: "Headless git-based CMS",
7
7
  repository: {
8
8
  type: "git",
@@ -39,7 +39,9 @@ var package_default = {
39
39
  ],
40
40
  dependencies: {
41
41
  "@alinea/iso": "^0.3.3",
42
- esbuild: "^0.25.4"
42
+ "@types/node": "^24.0.15",
43
+ esbuild: "^0.25.4",
44
+ stylus: "^0.0.1-security"
43
45
  },
44
46
  peerDependencies: {
45
47
  react: "*",
@@ -38,7 +38,6 @@ var package_default = {
38
38
  "dist"
39
39
  ],
40
40
  workspaces: [
41
- "apps/web",
42
41
  "apps/dev",
43
42
  "src/adapter",
44
43
  "src/backend",
@@ -50,7 +49,9 @@ var package_default = {
50
49
  ],
51
50
  dependencies: {
52
51
  "@alinea/iso": "^0.3.3",
53
- esbuild: "^0.25.4"
52
+ "@types/node": "^24.0.15",
53
+ esbuild: "^0.25.4",
54
+ stylus: "^0.0.1-security"
54
55
  },
55
56
  peerDependencies: {
56
57
  react: "*",
@@ -74,6 +75,7 @@ var package_default = {
74
75
  "@ungap/with-resolvers": "^0.1.0",
75
76
  glob: "^7.2.0",
76
77
  madge: "^6.1.0",
78
+ next: "^15.4.2",
77
79
  "npm-run-all": "^4.1.5",
78
80
  "postcss-modules": "^6.0.0",
79
81
  "postcss-pxtorem": "^6.0.0",
@@ -85,7 +87,7 @@ var package_default = {
85
87
  speedscope: "^1.14.0",
86
88
  "symlink-dir": "^6.0.5",
87
89
  typescript: "5.6.2",
88
- "typescript-plugin-css-modules": "^5.0.2",
90
+ "typescript-plugin-css-modules": "^5.2.0",
89
91
  "yjs-src": "npm:yjs@13.6.11"
90
92
  },
91
93
  packageManager: "yarn@4.5.0",
package/dist/cli/Init.js CHANGED
@@ -17,7 +17,8 @@ var lockfiles = {
17
17
  };
18
18
  async function detectPm() {
19
19
  for (const [pm, lockFile] of Object.entries(lockfiles)) {
20
- if ((await outcome(fs.stat(lockFile))).isSuccess()) {
20
+ const [, error] = await outcome(fs.stat(lockFile));
21
+ if (!error) {
21
22
  return pm;
22
23
  }
23
24
  }
package/dist/cli/Serve.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "../chunks/chunk-BWPXC7VK.js";
3
+ } from "../chunks/chunk-2MTR56XD.js";
4
4
  import "../chunks/chunk-NZLE2WMY.js";
5
5
 
6
6
  // 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-BWPXC7VK.js";
3
+ } from "../chunks/chunk-2MTR56XD.js";
4
4
  import "../chunks/chunk-NZLE2WMY.js";
5
5
 
6
6
  // node_modules/mri/lib/index.mjs
@@ -16,19 +16,18 @@ function ensureLibs(libs) {
16
16
  process.exit(1);
17
17
  }
18
18
  function ensurePackage(pkg, minVersion) {
19
- const location = outcome(() => require2.resolve(pkg));
20
- if (!location.isSuccess())
19
+ const [location] = outcome(() => require2.resolve(pkg));
20
+ if (!location)
21
21
  throw fail(
22
22
  `We could not find the ${pkg} package. It's required for the alinea dashboard.
23
23
  You can install it with: npm i ${pkg}`
24
24
  );
25
- const dir = path.dirname(location.value);
26
- const meta = outcome(
25
+ const dir = path.dirname(location);
26
+ const [meta] = outcome(
27
27
  () => fs.readFileSync(path.join(dir, "package.json"), "utf8")
28
28
  );
29
- if (!meta.isSuccess())
30
- throw fail(`Could not retrieve ${pkg}'s package.json file`);
31
- const { version } = JSON.parse(meta.value);
29
+ if (!meta) throw fail(`Could not retrieve ${pkg}'s package.json file`);
30
+ const { version } = JSON.parse(meta);
32
31
  const pkgVersionWorks = compareVersions.compare(version, minVersion, ">=");
33
32
  if (!pkgVersionWorks)
34
33
  throw fail(
@@ -1,10 +1,10 @@
1
1
  import { Config } from 'alinea/core/Config';
2
2
  import type { RemoteConnection, RequestContext, Revision } from 'alinea/core/Connection';
3
3
  import { type Draft, type DraftKey } from 'alinea/core/Draft';
4
- import type { EntryRecord } from 'alinea/core/EntryRecord';
5
- import type { User } from 'alinea/core/User';
6
4
  import type { CommitRequest } from 'alinea/core/db/CommitRequest';
5
+ import type { EntryRecord } from 'alinea/core/EntryRecord';
7
6
  import { ReadonlyTree } from 'alinea/core/source/Tree';
7
+ import type { User } from 'alinea/core/User';
8
8
  export declare const COOKIE_NAME = "alinea.auth";
9
9
  export declare class CloudRemote implements RemoteConnection {
10
10
  #private;