alinea 2.0.0-preview.2 → 2.0.0-preview.4
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/.init/content/pages/welcome.json +1 -1
- package/dist/LICENSES.md +157 -103
- package/dist/adapter/next/DevRemote.js +10 -2
- package/dist/adapter/next/previews.js +4 -1
- package/dist/adapter/next/previews.spec.d.ts +1 -0
- package/dist/backend/Handler.js +14 -7
- package/dist/backend/api/BasicAuth.d.ts +1 -1
- package/dist/backend/api/BasicAuth.js +14 -14
- package/dist/backend/api/OAuth2.d.ts +3 -3
- package/dist/backend/api/OAuth2.js +7 -4
- package/dist/bundled.d.ts +159 -42
- package/dist/chunks/{chunk-Y7XOMJOC.js → chunk-CFNRVI3Y.js} +220 -247
- package/dist/chunks/chunk-D6UJHBJJ.js +183 -0
- package/dist/chunks/chunk-TIJTT5ZI.js +228 -0
- package/dist/chunks/{chunk-UVOEM4AH.js → chunk-XMOVGDFI.js} +1 -1
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/serve/LocalAuth.js +1 -1
- package/dist/cloud/AuthResult.d.ts +2 -0
- package/dist/cloud/CloudHandshake.d.ts +7 -0
- package/dist/cloud/CloudHandshake.js +64 -0
- package/dist/cloud/CloudRemote.d.ts +4 -1
- package/dist/cloud/CloudRemote.js +21 -3
- package/dist/components/Breadcrumbs.js +2 -2
- package/dist/components/Calendar.js +6 -6
- package/dist/components/Checkbox.js +3 -3
- package/dist/components/ComboBox.js +11 -11
- package/dist/components/DateField.js +3 -3
- package/dist/components/DatePicker.js +4 -4
- package/dist/components/DateRangePicker.js +6 -6
- package/dist/components/Disclosure.js +8 -8
- package/dist/components/Label.js +5 -5
- package/dist/components/List.js +34 -34
- package/dist/components/Menu.js +4 -4
- package/dist/components/Modal.js +3 -3
- package/dist/components/MultipleSelect.js +25 -25
- package/dist/components/NumberField.js +6 -6
- package/dist/components/ProgressCircle.js +2 -2
- package/dist/components/RadioGroup.js +2 -2
- package/dist/components/SearchField.js +3 -3
- package/dist/components/Select.js +7 -7
- package/dist/components/Surface.js +2 -2
- package/dist/components/Table.js +7 -7
- package/dist/components/Tabs.js +4 -4
- package/dist/components/TagGroup.js +2 -2
- package/dist/components/TextField.js +6 -6
- package/dist/components/TimeField.js +2 -2
- package/dist/components/Toggle.d.ts +1 -1
- package/dist/components/Toggle.js +2 -2
- package/dist/components/Toolbar.js +2 -2
- package/dist/components/Tooltip.js +3 -3
- package/dist/components/Tree.d.ts +4 -2
- package/dist/components/Tree.js +18 -4
- package/dist/core/Connection.d.ts +7 -4
- package/dist/core/Entry.d.ts +6 -0
- package/dist/core/Entry.js +10 -0
- package/dist/core/Graph.d.ts +1 -1
- package/dist/core/Id.d.ts +1 -0
- package/dist/core/Id.js +8 -0
- package/dist/core/Infer.d.ts +8 -1
- package/dist/core/db/EntryAliases.js +1 -4
- package/dist/core/db/EntryResolver.js +6 -6
- package/dist/core/db/EntryTransaction.js +1 -0
- package/dist/core/db/Operation.d.ts +2 -2
- package/dist/core/db/Operation.js +15 -4
- package/dist/dashboard/App.js +37 -17
- package/dist/dashboard/StoryProvider.js +2 -2
- package/dist/dashboard/app/AccessDenied.d.ts +16 -1
- package/dist/dashboard/app/AccessDenied.js +21 -12
- package/dist/dashboard/app/ActivityStatus.js +19 -19
- package/dist/dashboard/app/AppearanceToggle.d.ts +1 -0
- package/dist/dashboard/app/AppearanceToggle.js +43 -0
- package/dist/dashboard/app/AuthView.d.ts +1 -1
- package/dist/dashboard/app/AuthView.js +16 -18
- package/dist/dashboard/app/Badge.js +2 -2
- package/dist/dashboard/app/CompactField.js +17 -17
- package/dist/dashboard/app/DashboardErrorBoundary.js +22 -10
- package/dist/dashboard/app/DashboardLayout.js +15 -8
- package/dist/dashboard/app/DashboardMeta.d.ts +2 -1
- package/dist/dashboard/app/DashboardMeta.js +20 -5
- package/dist/dashboard/app/EntryFields.js +6 -6
- package/dist/dashboard/app/EntryHeader.js +25 -25
- package/dist/dashboard/app/EntryReferences.js +16 -16
- package/dist/dashboard/app/EntrySidebar.js +26 -26
- package/dist/dashboard/app/EntrySidebarPreview.js +61 -34
- package/dist/dashboard/app/EntrySidebarPreview.story.d.ts +6 -1
- package/dist/dashboard/app/EntryTranslationBanner.js +8 -8
- package/dist/dashboard/app/Explorer.d.ts +2 -1
- package/dist/dashboard/app/Explorer.js +79 -67
- package/dist/dashboard/app/ExplorerCards.js +62 -66
- package/dist/dashboard/app/ExplorerFileCard.js +20 -20
- package/dist/dashboard/app/ExplorerList.js +22 -22
- package/dist/dashboard/app/ExplorerModal.js +3 -3
- package/dist/dashboard/app/ExplorerPickerContent.js +2 -2
- package/dist/dashboard/app/ExplorerTable.js +68 -68
- package/dist/dashboard/app/ImagePicker.js +7 -7
- package/dist/dashboard/app/LinkPicker.js +44 -24
- package/dist/dashboard/app/LocaleMenu.js +5 -7
- package/dist/dashboard/app/SidebarLayout.js +7 -7
- package/dist/dashboard/app/SidebarTree.js +66 -74
- package/dist/dashboard/app/WorkspaceMenu.d.ts +10 -3
- package/dist/dashboard/app/WorkspaceMenu.js +85 -64
- package/dist/dashboard/app/WorkspaceMenu.stories.d.ts +2 -0
- package/dist/dashboard/app/WorkspaceRoots.d.ts +3 -1
- package/dist/dashboard/app/WorkspaceRoots.js +82 -107
- package/dist/dashboard/app/editor/FileEditor.js +31 -31
- package/dist/dashboard/app/editor/FilePreview.js +4 -4
- package/dist/dashboard/app/editor/MediaAltField.view.js +4 -4
- package/dist/dashboard/app/modals/CreateEntry.js +14 -14
- package/dist/dashboard/app/pages/EntryPage.js +28 -30
- package/dist/dashboard/app/pages/RootPage.js +4 -4
- package/dist/dashboard/app/pages/SplashPage.d.ts +3 -0
- package/dist/dashboard/app/pages/SplashPage.js +414 -0
- package/dist/dashboard/app/pages/UsersPage.js +35 -35
- package/dist/dashboard/app/ui/DashboardModal.js +19 -19
- package/dist/dashboard/app/ui/Rail.js +3 -3
- package/dist/dashboard/atoms/ReactiveNode.js +1 -1
- package/dist/dashboard/atoms/activity.js +2 -3
- package/dist/dashboard/atoms/auth.d.ts +2 -0
- package/dist/dashboard/atoms/auth.js +6 -2
- package/dist/dashboard/atoms/config.js +1 -1
- package/dist/dashboard/atoms/core.js +2 -2
- package/dist/dashboard/atoms/create.js +1 -1
- package/dist/dashboard/atoms/dashboard.js +2 -2
- package/dist/dashboard/atoms/editor.js +1 -1
- package/dist/dashboard/atoms/entry.js +2 -2
- package/dist/dashboard/atoms/explorer.d.ts +1 -3
- package/dist/dashboard/atoms/explorer.js +7 -9
- package/dist/dashboard/atoms/graph.d.ts +1 -0
- package/dist/dashboard/atoms/graph.js +7 -2
- package/dist/dashboard/atoms/link.js +2 -2
- package/dist/dashboard/atoms/nav.d.ts +4 -3
- package/dist/dashboard/atoms/nav.js +10 -5
- package/dist/dashboard/atoms/preview.js +1 -1
- package/dist/dashboard/atoms/root.js +2 -2
- package/dist/dashboard/atoms/upload.js +1 -1
- package/dist/dashboard/atoms/user.d.ts +1 -1
- package/dist/dashboard/atoms/user.js +8 -6
- package/dist/dashboard/atoms/utils.js +2 -2
- package/dist/dashboard/boot/Boot.js +2 -4
- package/dist/dashboard/boot/DashboardWorker.js +34 -29
- package/dist/dashboard/editor/UseField.js +6 -6
- package/dist/dashboard/fixture/cms.d.ts +12 -0
- package/dist/dashboard/fixture/cms.js +53 -2
- package/dist/dashboard/hook/UseGraph.js +4 -4
- package/dist/dashboard/hook/UseRoot.js +4 -4
- package/dist/dashboard/hooks.js +16 -16
- package/dist/field/check/CheckField.view.js +2 -2
- package/dist/field/code/CodeField.view.js +15 -15
- package/dist/field/link/EntryLink.d.ts +1 -1
- package/dist/field/link/EntryLink.js +1 -0
- package/dist/field/link/Link.js +1 -0
- package/dist/field/link/LinkField.d.ts +5 -0
- package/dist/field/link/LinkField.view.js +81 -64
- package/dist/field/list/ListField.view.js +26 -26
- package/dist/field/localiser/LocalisedField.view.js +76 -5
- package/dist/field/metadata/MetadataField.d.ts +2 -0
- package/dist/field/metadata/MetadataField.js +2 -1
- package/dist/field/metadata/MetadataField.view.js +20 -20
- package/dist/field/richtext/PickTextLink.js +6 -6
- package/dist/field/richtext/RichTextBlock.js +6 -6
- package/dist/field/richtext/RichTextBlocks.js +1 -1
- package/dist/field/richtext/RichTextExtensions.js +23 -23
- package/dist/field/richtext/RichTextField.view.js +9 -9
- package/dist/field/richtext/RichTextState.js +1 -1
- package/dist/field/text/TextField.view.js +2 -2
- package/dist/index.css +436 -28
- package/dist/preview/PreviewMessage.d.ts +3 -0
- package/dist/preview/PreviewMessage.js +1 -0
- package/dist/preview/RegisterPreview.d.ts +1 -1
- package/dist/preview/RegisterPreview.js +28 -10
- package/dist/preview/react.d.ts +5 -1
- package/dist/preview/react.js +12 -9
- package/dist/preview/widget.js +6 -12
- package/dist/query.d.ts +7 -7
- package/package.json +1 -1
- package/dist/chunks/chunk-STAJCW4Z.js +0 -322
- package/dist/chunks/chunk-U4VOHNR2.js +0 -210
package/dist/bundled.d.ts
CHANGED
|
@@ -127,6 +127,12 @@ declare module 'alinea/adapter/next/previews' {
|
|
|
127
127
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
declare module 'alinea/adapter/next/previews.spec' {
|
|
131
|
+
|
|
132
|
+
export {};
|
|
133
|
+
|
|
134
|
+
}
|
|
135
|
+
|
|
130
136
|
declare module 'alinea/adapter/next/with-alinea' {
|
|
131
137
|
|
|
132
138
|
import type { NextConfig } from 'next/dist/types.js';
|
|
@@ -181,7 +187,7 @@ declare module 'alinea/backend/api/BasicAuth' {
|
|
|
181
187
|
export class BasicAuth implements AuthApi {
|
|
182
188
|
#private;
|
|
183
189
|
constructor(context: RequestContext, verify: Verifier);
|
|
184
|
-
authenticate(request: Request, options
|
|
190
|
+
authenticate(request: Request, options: AuthOptions): Promise<Response>;
|
|
185
191
|
verify(request: Request): Promise<AuthedContext>;
|
|
186
192
|
}
|
|
187
193
|
|
|
@@ -325,15 +331,15 @@ declare module 'alinea/backend/api/OAuth2' {
|
|
|
325
331
|
*/
|
|
326
332
|
revocationEndpoint?: string;
|
|
327
333
|
/**
|
|
328
|
-
*
|
|
334
|
+
* Validate provider-specific claims, including `iss` and `aud`.
|
|
329
335
|
* If the claims are invalid, an error should be thrown.
|
|
330
336
|
*/
|
|
331
|
-
validateClaims
|
|
337
|
+
validateClaims(claims: JWTPayload): void | Promise<void>;
|
|
332
338
|
}
|
|
333
339
|
export class OAuth2 implements AuthApi {
|
|
334
340
|
#private;
|
|
335
341
|
constructor(context: RequestContext, config: Config, options: OAuth2Options);
|
|
336
|
-
authenticate(request: Request, options
|
|
342
|
+
authenticate(request: Request, options: AuthOptions): Promise<Response>;
|
|
337
343
|
verify(request: Request): Promise<AuthedContext>;
|
|
338
344
|
}
|
|
339
345
|
|
|
@@ -1219,6 +1225,7 @@ declare module 'alinea/cli/util/Watcher' {
|
|
|
1219
1225
|
|
|
1220
1226
|
declare module 'alinea/cloud/AuthResult' {
|
|
1221
1227
|
|
|
1228
|
+
import type { BackendCapabilities } from 'alinea/core/Connection';
|
|
1222
1229
|
import type { User } from 'alinea/core/User';
|
|
1223
1230
|
export enum AuthResultType {
|
|
1224
1231
|
Authenticated = 0,
|
|
@@ -1229,6 +1236,7 @@ declare module 'alinea/cloud/AuthResult' {
|
|
|
1229
1236
|
export type AuthResult = {
|
|
1230
1237
|
type: AuthResultType.Authenticated;
|
|
1231
1238
|
user: User;
|
|
1239
|
+
capabilities?: BackendCapabilities;
|
|
1232
1240
|
} | {
|
|
1233
1241
|
type: AuthResultType.UnAuthenticated;
|
|
1234
1242
|
redirect: string;
|
|
@@ -1264,6 +1272,18 @@ declare module 'alinea/cloud/CloudConfig' {
|
|
|
1264
1272
|
|
|
1265
1273
|
}
|
|
1266
1274
|
|
|
1275
|
+
declare module 'alinea/cloud/CloudHandshake' {
|
|
1276
|
+
|
|
1277
|
+
interface VerifyCloudHandshakeOptions {
|
|
1278
|
+
clientId: string;
|
|
1279
|
+
handshakeId: string;
|
|
1280
|
+
origin: string;
|
|
1281
|
+
}
|
|
1282
|
+
export function verifyCloudHandshake(token: string, options: VerifyCloudHandshakeOptions): Promise<void>;
|
|
1283
|
+
export {};
|
|
1284
|
+
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1267
1287
|
declare module 'alinea/cloud/CloudRemote' {
|
|
1268
1288
|
|
|
1269
1289
|
import { OAuth2 } from 'alinea/backend/api/OAuth2';
|
|
@@ -1278,12 +1298,15 @@ declare module 'alinea/cloud/CloudRemote' {
|
|
|
1278
1298
|
export class CloudRemote extends OAuth2 implements RemoteConnection {
|
|
1279
1299
|
#private;
|
|
1280
1300
|
constructor(context: RequestContext, config: Config);
|
|
1301
|
+
capabilities(): Promise<{
|
|
1302
|
+
users: boolean;
|
|
1303
|
+
}>;
|
|
1281
1304
|
getTreeIfDifferent(sha: string): Promise<ReadonlyTree | undefined>;
|
|
1282
1305
|
getBlobs(shas: ReadonlyArray<string>, options?: GetBlobsOptions): AsyncGenerator<[sha: string, blob: Uint8Array]>;
|
|
1283
1306
|
write(request: CommitRequest): Promise<{
|
|
1284
1307
|
sha: string;
|
|
1285
1308
|
}>;
|
|
1286
|
-
authenticate(request: Request, options
|
|
1309
|
+
authenticate(request: Request, options: AuthOptions): Promise<globalThis.Response>;
|
|
1287
1310
|
prepareUpload(file: string, metadata?: UploadMetadata): Promise<{
|
|
1288
1311
|
entryId: string;
|
|
1289
1312
|
location: string;
|
|
@@ -1939,7 +1962,7 @@ declare module 'alinea/components/Toggle' {
|
|
|
1939
1962
|
|
|
1940
1963
|
import { type ToggleButtonGroupProps as ToggleButtonGroupPrimitiveProps, type ToggleButtonProps as ToggleButtonPrimitiveProps } from 'react-aria-components';
|
|
1941
1964
|
export interface ToggleButtonGroupProps extends ToggleButtonGroupPrimitiveProps {
|
|
1942
|
-
variant?: 'compact' | 'enclosed';
|
|
1965
|
+
variant?: 'compact' | 'enclosed' | 'icon-small';
|
|
1943
1966
|
}
|
|
1944
1967
|
export function ToggleButtonGroup({ variant, className, ...props }: ToggleButtonGroupProps): import("react").JSX.Element;
|
|
1945
1968
|
export interface ToggleButtonProps extends ToggleButtonPrimitiveProps {
|
|
@@ -1986,18 +2009,20 @@ declare module 'alinea/components/Tree' {
|
|
|
1986
2009
|
children?: ReactNode;
|
|
1987
2010
|
disableDragging?: boolean;
|
|
1988
2011
|
icon?: IconProps['icon'];
|
|
2012
|
+
iconHref?: string;
|
|
1989
2013
|
suffix?: ReactNode;
|
|
1990
2014
|
}
|
|
1991
|
-
export const TreeItemContent: import("react").MemoExoticComponent<({ disableDragging, icon, suffix, children }: TreeItemContentProps) => import("react").JSX.Element>;
|
|
2015
|
+
export const TreeItemContent: import("react").MemoExoticComponent<({ disableDragging, icon, iconHref, suffix, children }: TreeItemContentProps) => import("react").JSX.Element>;
|
|
1992
2016
|
export interface TreeItemProps extends Partial<Omit<AriaTreeItemProps, 'className'>> {
|
|
1993
2017
|
className?: string;
|
|
1994
2018
|
disableDragging?: boolean;
|
|
1995
2019
|
title: string;
|
|
1996
2020
|
icon?: IconProps['icon'];
|
|
2021
|
+
iconHref?: string;
|
|
1997
2022
|
label?: ReactNode;
|
|
1998
2023
|
suffix?: ReactNode;
|
|
1999
2024
|
}
|
|
2000
|
-
export function TreeItem({ disableDragging, title, icon, label, suffix, children, className, hasChildItems, ...rest }: TreeItemProps): import("react").JSX.Element;
|
|
2025
|
+
export function TreeItem({ disableDragging, title, icon, iconHref, label, suffix, children, className, hasChildItems, ...rest }: TreeItemProps): import("react").JSX.Element;
|
|
2001
2026
|
|
|
2002
2027
|
}
|
|
2003
2028
|
|
|
@@ -2198,11 +2223,15 @@ declare module 'alinea/core/Connection' {
|
|
|
2198
2223
|
import type { ReadonlyTree } from 'alinea/core/source/Tree';
|
|
2199
2224
|
import type { User, UserInput } from 'alinea/core/User';
|
|
2200
2225
|
export interface AuthApi {
|
|
2201
|
-
authenticate(request: Request, options
|
|
2226
|
+
authenticate(request: Request, options: AuthOptions): Promise<Response>;
|
|
2202
2227
|
verify(request: Request): Promise<AuthedContext>;
|
|
2203
2228
|
}
|
|
2204
2229
|
export interface AuthOptions {
|
|
2205
|
-
|
|
2230
|
+
authenticated(user: User): Promise<AuthenticatedUser>;
|
|
2231
|
+
}
|
|
2232
|
+
export interface AuthenticatedUser {
|
|
2233
|
+
user: User;
|
|
2234
|
+
capabilities: BackendCapabilities;
|
|
2206
2235
|
}
|
|
2207
2236
|
export interface UserApi {
|
|
2208
2237
|
enrichUser(user: User): Promise<User>;
|
|
@@ -2215,7 +2244,7 @@ declare module 'alinea/core/Connection' {
|
|
|
2215
2244
|
users: boolean;
|
|
2216
2245
|
}
|
|
2217
2246
|
export interface CapabilitiesApi {
|
|
2218
|
-
capabilities
|
|
2247
|
+
capabilities(): Promise<BackendCapabilities>;
|
|
2219
2248
|
}
|
|
2220
2249
|
export interface RemoteConnection extends Connection, AuthApi, CapabilitiesApi {
|
|
2221
2250
|
}
|
|
@@ -2223,7 +2252,6 @@ declare module 'alinea/core/Connection' {
|
|
|
2223
2252
|
logout?(): Promise<void>;
|
|
2224
2253
|
}
|
|
2225
2254
|
export interface LocalConnection extends Connection, CapabilitiesApi {
|
|
2226
|
-
capabilities(): Promise<BackendCapabilities>;
|
|
2227
2255
|
mutate(mutations: Array<Mutation>): Promise<{
|
|
2228
2256
|
sha: string;
|
|
2229
2257
|
}>;
|
|
@@ -2852,7 +2880,7 @@ declare module 'alinea/core/db/Mutation' {
|
|
|
2852
2880
|
|
|
2853
2881
|
declare module 'alinea/core/db/Operation' {
|
|
2854
2882
|
|
|
2855
|
-
import type { StoredRow } from 'alinea/core/Infer';
|
|
2883
|
+
import type { CreateInputRow, StoredRow } from 'alinea/core/Infer';
|
|
2856
2884
|
import type { ImagePreviewDetails } from 'alinea/core/media/CreatePreview';
|
|
2857
2885
|
import { Type } from 'alinea/core/Type';
|
|
2858
2886
|
import type { Mutation } from 'alinea/core/db/Mutation';
|
|
@@ -2871,7 +2899,7 @@ declare module 'alinea/core/db/Operation' {
|
|
|
2871
2899
|
parentId?: string | null;
|
|
2872
2900
|
locale?: string | null;
|
|
2873
2901
|
status?: 'draft' | 'published' | 'archived';
|
|
2874
|
-
set: Partial<
|
|
2902
|
+
set: Partial<CreateInputRow<Fields>>;
|
|
2875
2903
|
insertOrder?: 'first' | 'last';
|
|
2876
2904
|
overwrite?: boolean;
|
|
2877
2905
|
}
|
|
@@ -3127,6 +3155,10 @@ declare module 'alinea/core/Entry' {
|
|
|
3127
3155
|
export interface EntryAlias {
|
|
3128
3156
|
url: string;
|
|
3129
3157
|
}
|
|
3158
|
+
export interface EntryAuditUser {
|
|
3159
|
+
email: string;
|
|
3160
|
+
name: string;
|
|
3161
|
+
}
|
|
3130
3162
|
export const Entry: {
|
|
3131
3163
|
id: Expr<string>;
|
|
3132
3164
|
status: Expr<EntryStatus>;
|
|
@@ -3151,7 +3183,9 @@ declare module 'alinea/core/Entry' {
|
|
|
3151
3183
|
url: Expr<string>;
|
|
3152
3184
|
aliases: Expr<EntryAlias[]>;
|
|
3153
3185
|
createdAt: Expr<number | null>;
|
|
3186
|
+
createdBy: Expr<EntryAuditUser | null>;
|
|
3154
3187
|
updatedAt: Expr<number | null>;
|
|
3188
|
+
updatedBy: Expr<EntryAuditUser | null>;
|
|
3155
3189
|
data: Expr<Record<string, any>>;
|
|
3156
3190
|
searchableText: Expr<string>;
|
|
3157
3191
|
};
|
|
@@ -3664,7 +3698,7 @@ declare module 'alinea/core/Graph' {
|
|
|
3664
3698
|
/** Filter by url */
|
|
3665
3699
|
url?: Condition<string>;
|
|
3666
3700
|
/** Filter by a metadata URL alias */
|
|
3667
|
-
alias?: string
|
|
3701
|
+
alias?: Condition<string>;
|
|
3668
3702
|
/** Filter by metadata created timestamp */
|
|
3669
3703
|
createdAt?: Condition<number | null>;
|
|
3670
3704
|
/** Filter by metadata updated timestamp */
|
|
@@ -3777,6 +3811,7 @@ declare module 'alinea/core/HttpError' {
|
|
|
3777
3811
|
declare module 'alinea/core/Id' {
|
|
3778
3812
|
|
|
3779
3813
|
export function validateId(id: string): boolean;
|
|
3814
|
+
export function timestampFromId(id: string): number | undefined;
|
|
3780
3815
|
export function createId(): string;
|
|
3781
3816
|
|
|
3782
3817
|
}
|
|
@@ -3790,6 +3825,7 @@ declare module 'alinea/core/Infer' {
|
|
|
3790
3825
|
import type { InferProjection } from 'alinea/core/Graph';
|
|
3791
3826
|
import type { ListRow } from 'alinea/core/ListRow';
|
|
3792
3827
|
import type { Type } from 'alinea/core/Type';
|
|
3828
|
+
import type { RecordField } from 'alinea/core/field/RecordField';
|
|
3793
3829
|
type QueryList<T> = Expand<UnionOfValues<{
|
|
3794
3830
|
[K in keyof T]: {
|
|
3795
3831
|
_type: K;
|
|
@@ -3804,9 +3840,15 @@ declare module 'alinea/core/Infer' {
|
|
|
3804
3840
|
export type StoredRow<Definition> = {
|
|
3805
3841
|
[K in keyof Definition as Definition[K] extends Field<any> ? K : never]: Definition[K] extends Field<infer T> ? T : never;
|
|
3806
3842
|
};
|
|
3807
|
-
|
|
3843
|
+
type CreateInputValue<T> = T extends RecordField<infer Row, infer _Options> ? Partial<Row> : T extends Field<infer StoredValue> ? StoredValue : never;
|
|
3844
|
+
export type CreateInputRow<Definition> = {
|
|
3845
|
+
[K in keyof Definition as Definition[K] extends Field ? K : never]: CreateInputValue<Definition[K]>;
|
|
3846
|
+
};
|
|
3847
|
+
export type InferStoredValue<T> = T extends Type<infer Fields> ? StoredRow<Fields> : T extends Field<infer StoredValue> ? StoredValue : T extends Record<string, Type> ? StoredList<T> : T extends object ? StoredRow<T> : {};
|
|
3808
3848
|
export type Infer<T> = InferQueryValue<T>;
|
|
3809
3849
|
export namespace Infer {
|
|
3850
|
+
/** Stored content for creation and editing, before links are resolved. */
|
|
3851
|
+
type Stored<T> = InferStoredValue<T>;
|
|
3810
3852
|
type Entry<T extends Type, TypeName extends string = string> = InferQueryValue<T> & Omit<EntryFields, '_type'> & {
|
|
3811
3853
|
_type: TypeName;
|
|
3812
3854
|
};
|
|
@@ -5892,11 +5934,26 @@ declare module 'alinea/dashboard/App' {
|
|
|
5892
5934
|
|
|
5893
5935
|
declare module 'alinea/dashboard/app/AccessDenied' {
|
|
5894
5936
|
|
|
5937
|
+
const copy: {
|
|
5938
|
+
root: {
|
|
5939
|
+
title: string;
|
|
5940
|
+
message: string;
|
|
5941
|
+
};
|
|
5942
|
+
users: {
|
|
5943
|
+
title: string;
|
|
5944
|
+
message: string;
|
|
5945
|
+
};
|
|
5946
|
+
workspace: {
|
|
5947
|
+
title: string;
|
|
5948
|
+
message: string;
|
|
5949
|
+
};
|
|
5950
|
+
};
|
|
5895
5951
|
export interface AccessDeniedProps {
|
|
5896
5952
|
canManageMembers: boolean;
|
|
5897
|
-
scope:
|
|
5953
|
+
scope: keyof typeof copy;
|
|
5898
5954
|
}
|
|
5899
5955
|
export function AccessDenied({ canManageMembers, scope }: AccessDeniedProps): import("react").JSX.Element;
|
|
5956
|
+
export {};
|
|
5900
5957
|
|
|
5901
5958
|
}
|
|
5902
5959
|
|
|
@@ -5924,6 +5981,12 @@ declare module 'alinea/dashboard/app/AlineaLogo' {
|
|
|
5924
5981
|
|
|
5925
5982
|
}
|
|
5926
5983
|
|
|
5984
|
+
declare module 'alinea/dashboard/app/AppearanceToggle' {
|
|
5985
|
+
|
|
5986
|
+
export function AppearanceToggle(): import("react").JSX.Element;
|
|
5987
|
+
|
|
5988
|
+
}
|
|
5989
|
+
|
|
5927
5990
|
declare module 'alinea/dashboard/app/AppShell' {
|
|
5928
5991
|
|
|
5929
5992
|
import { HTMLProps } from 'react';
|
|
@@ -5942,7 +6005,7 @@ declare module 'alinea/dashboard/app/AuthView' {
|
|
|
5942
6005
|
action?: DashboardAuthAction
|
|
5943
6006
|
], unknown>;
|
|
5944
6007
|
}
|
|
5945
|
-
export function AuthView({ auth: authState }: AuthViewProps): import("react").JSX.Element
|
|
6008
|
+
export function AuthView({ auth: authState }: AuthViewProps): import("react").JSX.Element;
|
|
5946
6009
|
|
|
5947
6010
|
}
|
|
5948
6011
|
|
|
@@ -6014,9 +6077,10 @@ declare module 'alinea/dashboard/app/DashboardMeta' {
|
|
|
6014
6077
|
export interface DashboardMetaProps {
|
|
6015
6078
|
color: string;
|
|
6016
6079
|
icon?: ComponentType;
|
|
6080
|
+
plain?: boolean;
|
|
6017
6081
|
title: string;
|
|
6018
6082
|
}
|
|
6019
|
-
export function DashboardMeta({ color, icon, title }: DashboardMetaProps): import("react").JSX.Element;
|
|
6083
|
+
export function DashboardMeta({ color, icon, plain, title }: DashboardMetaProps): import("react").JSX.Element;
|
|
6020
6084
|
|
|
6021
6085
|
}
|
|
6022
6086
|
|
|
@@ -6221,7 +6285,12 @@ declare module 'alinea/dashboard/app/EntrySidebarPreview.spec' {
|
|
|
6221
6285
|
|
|
6222
6286
|
declare module 'alinea/dashboard/app/EntrySidebarPreview.story' {
|
|
6223
6287
|
|
|
6224
|
-
|
|
6288
|
+
interface EntrySidebarPreviewStoryProps {
|
|
6289
|
+
previewUrl?: string;
|
|
6290
|
+
entryId?: string;
|
|
6291
|
+
}
|
|
6292
|
+
export function EntrySidebarPreviewStory({ previewUrl, entryId }: EntrySidebarPreviewStoryProps): import("react").JSX.Element;
|
|
6293
|
+
export {};
|
|
6225
6294
|
|
|
6226
6295
|
}
|
|
6227
6296
|
|
|
@@ -6266,6 +6335,7 @@ declare module 'alinea/dashboard/app/Explorer' {
|
|
|
6266
6335
|
onBack(): void;
|
|
6267
6336
|
}
|
|
6268
6337
|
export interface ExplorerHeaderProps {
|
|
6338
|
+
canBrowse?: boolean;
|
|
6269
6339
|
autoFocusSearch?: boolean;
|
|
6270
6340
|
controls?: ReactNode;
|
|
6271
6341
|
explorer: DashboardExplorer;
|
|
@@ -6287,7 +6357,7 @@ declare module 'alinea/dashboard/app/Explorer' {
|
|
|
6287
6357
|
page: ExplorerReadyPage;
|
|
6288
6358
|
}
|
|
6289
6359
|
export function ExplorerSearch({ autoFocus, explorer, onEntryAction, page }: ExplorerSearchProps): import("react").JSX.Element;
|
|
6290
|
-
export function ExplorerHeader({ autoFocusSearch, controls, explorer, headerEntry, navigate, page, titleControls }: ExplorerHeaderProps): import("react").JSX.Element;
|
|
6360
|
+
export function ExplorerHeader({ canBrowse, autoFocusSearch, controls, explorer, headerEntry, navigate, page, titleControls }: ExplorerHeaderProps): import("react").JSX.Element;
|
|
6291
6361
|
export function ExplorerBody({ compactTable, explorer, onSelectionChange, page }: ExplorerBodyProps): import("react").JSX.Element;
|
|
6292
6362
|
export function Explorer({ controls, explorer, headerEntry, page: loadedPage, titleControls }: ExplorerProps): import("react").JSX.Element;
|
|
6293
6363
|
export {};
|
|
@@ -6502,6 +6572,14 @@ declare module 'alinea/dashboard/app/pages/RootPage' {
|
|
|
6502
6572
|
|
|
6503
6573
|
}
|
|
6504
6574
|
|
|
6575
|
+
declare module 'alinea/dashboard/app/pages/SplashPage' {
|
|
6576
|
+
|
|
6577
|
+
import { type Getter } from 'jotai';
|
|
6578
|
+
import type { ReactNode } from 'react';
|
|
6579
|
+
export function splashPage(get: Getter): Promise<ReactNode>;
|
|
6580
|
+
|
|
6581
|
+
}
|
|
6582
|
+
|
|
6505
6583
|
declare module 'alinea/dashboard/app/pages/UsersPage' {
|
|
6506
6584
|
|
|
6507
6585
|
import { Page } from 'alinea/dashboard/atoms/nav';
|
|
@@ -6679,7 +6757,7 @@ declare module 'alinea/dashboard/app/WorkspaceMenu' {
|
|
|
6679
6757
|
import type { WorkspaceInternal } from 'alinea/core/Workspace';
|
|
6680
6758
|
import type { Page } from 'alinea/dashboard/atoms/nav';
|
|
6681
6759
|
import type { RootAtoms } from 'alinea/dashboard/atoms/root';
|
|
6682
|
-
import { type ComponentType } from 'react';
|
|
6760
|
+
import { type ComponentType, type ReactNode } from 'react';
|
|
6683
6761
|
interface WorkspaceMenuProps {
|
|
6684
6762
|
canManageMembers: boolean;
|
|
6685
6763
|
page: Page;
|
|
@@ -6691,14 +6769,21 @@ declare module 'alinea/dashboard/app/WorkspaceMenu' {
|
|
|
6691
6769
|
interface WorkspaceAvatarProps {
|
|
6692
6770
|
color: string;
|
|
6693
6771
|
icon?: ComponentType;
|
|
6694
|
-
size?: 'default' | 'small';
|
|
6772
|
+
size?: 'default' | 'large' | 'small';
|
|
6695
6773
|
}
|
|
6696
6774
|
function WorkspaceAvatar({ color, icon, size }: WorkspaceAvatarProps): import("react").JSX.Element;
|
|
6697
6775
|
export { WorkspaceAvatar };
|
|
6698
6776
|
interface WorkspaceAvatarMenuProps {
|
|
6699
6777
|
page: Page;
|
|
6778
|
+
root: RootAtoms;
|
|
6779
|
+
}
|
|
6780
|
+
export function WorkspaceAvatarMenu({ page, root }: WorkspaceAvatarMenuProps): import("react").JSX.Element;
|
|
6781
|
+
interface GlobalSearchProps {
|
|
6782
|
+
children: ReactNode;
|
|
6783
|
+
initialSearchScope?: 'everything' | 'workspace';
|
|
6784
|
+
root: RootAtoms;
|
|
6700
6785
|
}
|
|
6701
|
-
export function
|
|
6786
|
+
export function GlobalSearch({ children, initialSearchScope, root }: GlobalSearchProps): import("react").JSX.Element;
|
|
6702
6787
|
export function WorkspaceMenu({ canManageMembers, page, root, workspace }: WorkspaceMenuProps): import("react").JSX.Element;
|
|
6703
6788
|
|
|
6704
6789
|
}
|
|
@@ -6712,6 +6797,8 @@ declare module 'alinea/dashboard/app/WorkspaceMenu.spec' {
|
|
|
6712
6797
|
declare module 'alinea/dashboard/app/WorkspaceMenu.stories' {
|
|
6713
6798
|
|
|
6714
6799
|
export function GlobalSearchStory(): import("react").JSX.Element;
|
|
6800
|
+
export function SingleWorkspaceAvatarStory(): import("react").JSX.Element;
|
|
6801
|
+
export function LocalizedGlobalSearchStory(): import("react").JSX.Element;
|
|
6715
6802
|
const _default: {
|
|
6716
6803
|
title: string;
|
|
6717
6804
|
};
|
|
@@ -6722,11 +6809,13 @@ declare module 'alinea/dashboard/app/WorkspaceMenu.stories' {
|
|
|
6722
6809
|
declare module 'alinea/dashboard/app/WorkspaceRoots' {
|
|
6723
6810
|
|
|
6724
6811
|
import type { Page } from 'alinea/dashboard/atoms/nav';
|
|
6812
|
+
import { type RootAtoms } from 'alinea/dashboard/atoms/root';
|
|
6725
6813
|
export interface WorkspaceRootsProps {
|
|
6726
6814
|
canManageMembers: boolean;
|
|
6727
6815
|
page: Page;
|
|
6816
|
+
root: RootAtoms;
|
|
6728
6817
|
}
|
|
6729
|
-
export function WorkspaceRoots({ canManageMembers, page }: WorkspaceRootsProps): import("react").JSX.Element;
|
|
6818
|
+
export function WorkspaceRoots({ canManageMembers, page, root: currentRoot }: WorkspaceRootsProps): import("react").JSX.Element;
|
|
6730
6819
|
|
|
6731
6820
|
}
|
|
6732
6821
|
|
|
@@ -6785,6 +6874,7 @@ declare module 'alinea/dashboard/atoms/activity' {
|
|
|
6785
6874
|
|
|
6786
6875
|
declare module 'alinea/dashboard/atoms/auth' {
|
|
6787
6876
|
|
|
6877
|
+
import type { BackendCapabilities } from 'alinea/core/Connection';
|
|
6788
6878
|
import { User } from 'alinea/core/User';
|
|
6789
6879
|
export const authRequiredAtom: import("jotai").Atom<boolean>;
|
|
6790
6880
|
export interface DashboardAuthLoading {
|
|
@@ -6807,6 +6897,7 @@ declare module 'alinea/dashboard/atoms/auth' {
|
|
|
6807
6897
|
export interface DashboardAuthAuthenticated {
|
|
6808
6898
|
status: 'authenticated';
|
|
6809
6899
|
user: User;
|
|
6900
|
+
capabilities?: BackendCapabilities;
|
|
6810
6901
|
}
|
|
6811
6902
|
export type DashboardAuthState = DashboardAuthLoading | DashboardAuthMissingHandler | DashboardAuthMissingApiKey | DashboardAuthRedirecting | DashboardAuthError | DashboardAuthAuthenticated;
|
|
6812
6903
|
interface DashboardAuthCheck {
|
|
@@ -7326,7 +7417,6 @@ declare module 'alinea/dashboard/atoms/explorer' {
|
|
|
7326
7417
|
condition?: Filter<EntryFields>;
|
|
7327
7418
|
defaultOrderBy?: Atom<OrderBy | Array<OrderBy> | undefined>;
|
|
7328
7419
|
enableNavigation?: boolean;
|
|
7329
|
-
hideResultsUntilSearch?: boolean;
|
|
7330
7420
|
initialView?: ExplorerView;
|
|
7331
7421
|
initialResultMode?: ExplorerResultMode;
|
|
7332
7422
|
initialSearchScope?: 'workspace' | 'everything';
|
|
@@ -7366,6 +7456,7 @@ declare module 'alinea/dashboard/atoms/explorer' {
|
|
|
7366
7456
|
location: ExplorerLocation;
|
|
7367
7457
|
root: ExplorerRootData;
|
|
7368
7458
|
resultMode: ExplorerResultMode;
|
|
7459
|
+
search: string;
|
|
7369
7460
|
searchScope: 'workspace' | 'everything';
|
|
7370
7461
|
searchesEverything: boolean;
|
|
7371
7462
|
view: ExplorerView;
|
|
@@ -7475,7 +7566,6 @@ declare module 'alinea/dashboard/atoms/explorer' {
|
|
|
7475
7566
|
readonly hasRowAction: boolean;
|
|
7476
7567
|
readonly mode: 'browse' | 'search';
|
|
7477
7568
|
readonly hasSelection: boolean;
|
|
7478
|
-
readonly hideResultsUntilSearch: boolean;
|
|
7479
7569
|
readonly linkedKeys: ReadonlySet<Key>;
|
|
7480
7570
|
readonly searchDepth: "all" | "current";
|
|
7481
7571
|
readonly supportsInlineExpansion: boolean;
|
|
@@ -7507,7 +7597,6 @@ declare module 'alinea/dashboard/atoms/explorer' {
|
|
|
7507
7597
|
constructor(location: WritableAtom<ExplorerLocation, [
|
|
7508
7598
|
SetStateAction<ExplorerLocation>
|
|
7509
7599
|
], void>, options: ExplorerOptions, initialLocation: ExplorerLocation);
|
|
7510
|
-
showResults: Atom<boolean>;
|
|
7511
7600
|
isMedia: Atom<boolean>;
|
|
7512
7601
|
view: WritableAtom<ExplorerView, [view: ExplorerView], void>;
|
|
7513
7602
|
sort: WritableAtom<ExplorerSort, [sortBy: ExplorerSortBy], void>;
|
|
@@ -7556,6 +7645,7 @@ declare module 'alinea/dashboard/atoms/graph' {
|
|
|
7556
7645
|
export const syncAtom: import("jotai").WritableAtom<null, [], Promise<string | undefined>> & {
|
|
7557
7646
|
init: null;
|
|
7558
7647
|
};
|
|
7648
|
+
export const graphReadyAtom: import("jotai").Atom<Promise<void>>;
|
|
7559
7649
|
|
|
7560
7650
|
}
|
|
7561
7651
|
|
|
@@ -7603,7 +7693,7 @@ declare module 'alinea/dashboard/atoms/nav' {
|
|
|
7603
7693
|
init: RouteBlock | null;
|
|
7604
7694
|
};
|
|
7605
7695
|
export interface DashboardRoute {
|
|
7606
|
-
page?: 'entry' | 'users';
|
|
7696
|
+
page?: 'splash' | 'entry' | 'users';
|
|
7607
7697
|
workspace?: string;
|
|
7608
7698
|
root?: string;
|
|
7609
7699
|
entry?: string;
|
|
@@ -7611,9 +7701,10 @@ declare module 'alinea/dashboard/atoms/nav' {
|
|
|
7611
7701
|
view?: EntryDefaultView;
|
|
7612
7702
|
}
|
|
7613
7703
|
interface ResolvedDashboardRoute extends DashboardRoute {
|
|
7614
|
-
page: 'entry' | 'users';
|
|
7704
|
+
page: 'splash' | 'entry' | 'users';
|
|
7615
7705
|
}
|
|
7616
7706
|
export const nav: {
|
|
7707
|
+
splash(): string;
|
|
7617
7708
|
users(): string;
|
|
7618
7709
|
entry(workspace?: string, root?: string, entryId?: string, locale?: string | null, view?: EntryDefaultView): string;
|
|
7619
7710
|
};
|
|
@@ -7626,7 +7717,7 @@ declare module 'alinea/dashboard/atoms/nav' {
|
|
|
7626
7717
|
onMount(navigate: (request: NavigationRequest) => void): (() => void) | undefined;
|
|
7627
7718
|
};
|
|
7628
7719
|
export interface Page {
|
|
7629
|
-
type: 'users' | 'entry';
|
|
7720
|
+
type: 'splash' | 'users' | 'entry';
|
|
7630
7721
|
workspace: string | undefined;
|
|
7631
7722
|
root: string | undefined;
|
|
7632
7723
|
requestedRoot?: string;
|
|
@@ -7817,7 +7908,7 @@ declare module 'alinea/dashboard/atoms/user' {
|
|
|
7817
7908
|
export const preloadUserPolicyAtom: import("jotai").WritableAtom<null, [user: User, policy: Policy], void> & {
|
|
7818
7909
|
init: null;
|
|
7819
7910
|
};
|
|
7820
|
-
export const
|
|
7911
|
+
export const userPolicyReadyAtom: import("jotai").Atom<Promise<void>>;
|
|
7821
7912
|
export const canManageMembersAtom: import("jotai").Atom<Promise<boolean>>;
|
|
7822
7913
|
|
|
7823
7914
|
}
|
|
@@ -8143,6 +8234,18 @@ declare module 'alinea/dashboard/fixture/cms' {
|
|
|
8143
8234
|
pages: import("alinea").Root<import("alinea/core/Root").ChildrenDefinition>;
|
|
8144
8235
|
media: import("alinea/core/media/MediaRoot").MediaRoot<import("alinea/core/Root").ChildrenDefinition>;
|
|
8145
8236
|
}>;
|
|
8237
|
+
manyRoots: import("alinea").Workspace<{
|
|
8238
|
+
pages: import("alinea").Root<import("alinea/core/Root").ChildrenDefinition>;
|
|
8239
|
+
articles: import("alinea").Root<import("alinea/core/Root").ChildrenDefinition>;
|
|
8240
|
+
documentation: import("alinea").Root<import("alinea/core/Root").ChildrenDefinition>;
|
|
8241
|
+
campaigns: import("alinea").Root<import("alinea/core/Root").ChildrenDefinition>;
|
|
8242
|
+
translations: import("alinea").Root<import("alinea/core/Root").ChildrenDefinition>;
|
|
8243
|
+
archive: import("alinea").Root<import("alinea/core/Root").ChildrenDefinition>;
|
|
8244
|
+
settings: import("alinea").Root<import("alinea/core/Root").ChildrenDefinition>;
|
|
8245
|
+
brandAssets: import("alinea").Root<import("alinea/core/Root").ChildrenDefinition>;
|
|
8246
|
+
nestedContent: import("alinea").Root<import("alinea/core/Root").ChildrenDefinition>;
|
|
8247
|
+
media: import("alinea/core/media/MediaRoot").MediaRoot<import("alinea/core/Root").ChildrenDefinition>;
|
|
8248
|
+
}>;
|
|
8146
8249
|
};
|
|
8147
8250
|
}>;
|
|
8148
8251
|
|
|
@@ -8960,7 +9063,7 @@ declare module 'alinea/field/link/EntryLink' {
|
|
|
8960
9063
|
type EntryRow<Fields> = EntryLink<Type.Infer<Fields>> & ListRow;
|
|
8961
9064
|
interface EntryOptions<Fields> extends LinkFieldOptions<Array<EntryReference & ListRow & InferStoredValue<Fields>>>, Omit<EntryPickerOptions<Fields>, 'label' | 'selection'> {
|
|
8962
9065
|
}
|
|
8963
|
-
export function multiple<Fields = undefined>(label: Label, options?: WithoutLabel<EntryOptions<Fields>>): import("alinea/field/link/LinkField").LinksField<EntryReference & ListRow
|
|
9066
|
+
export function multiple<Fields = undefined>(label: Label, options?: WithoutLabel<EntryOptions<Fields>>): import("alinea/field/link/LinkField").LinksField<EntryReference & ListRow & InferStoredValue<Fields>, EntryRow<Fields>>;
|
|
8964
9067
|
export {};
|
|
8965
9068
|
}
|
|
8966
9069
|
export {};
|
|
@@ -9129,6 +9232,11 @@ declare module 'alinea/field/link/LinkField' {
|
|
|
9129
9232
|
import type { ReactNode } from 'react';
|
|
9130
9233
|
/** Optional settings to configure a link field */
|
|
9131
9234
|
export interface LinkFieldOptions<Value> extends FieldOptions<Value> {
|
|
9235
|
+
/**
|
|
9236
|
+
* Allow the same entry to be linked more than once.
|
|
9237
|
+
* Defaults to false for entry fields and true for generic link fields.
|
|
9238
|
+
*/
|
|
9239
|
+
allowDuplicates?: boolean;
|
|
9132
9240
|
/** Width of the field in the dashboard UI (0-1) */
|
|
9133
9241
|
width?: number;
|
|
9134
9242
|
/** Add instructional text to a field */
|
|
@@ -9452,6 +9560,8 @@ declare module 'alinea/field/metadata/MetadataField' {
|
|
|
9452
9560
|
fields: Type<MetadataFields>;
|
|
9453
9561
|
}> {
|
|
9454
9562
|
}
|
|
9563
|
+
export interface MetadataField extends MetadataFields {
|
|
9564
|
+
}
|
|
9455
9565
|
export class MetadataTimestampField extends ScalarField<number | null, MetadataTimestampOptions> {
|
|
9456
9566
|
}
|
|
9457
9567
|
export class MetadataUserField extends ScalarField<MetadataAuditUser, MetadataUserOptions> {
|
|
@@ -10698,6 +10808,7 @@ declare module 'alinea/preview/PreviewMessage' {
|
|
|
10698
10808
|
export enum PreviewAction {
|
|
10699
10809
|
Ping = "[alinea-ping]",
|
|
10700
10810
|
Pong = "[alinea-pong]",
|
|
10811
|
+
Disconnect = "[alinea-disconnect]",
|
|
10701
10812
|
Reload = "[alinea-reload]",
|
|
10702
10813
|
Refetch = "[alinea-refetch]",
|
|
10703
10814
|
Previous = "[alinea-previous]",
|
|
@@ -10709,6 +10820,8 @@ declare module 'alinea/preview/PreviewMessage' {
|
|
|
10709
10820
|
action: PreviewAction.Ping;
|
|
10710
10821
|
} | {
|
|
10711
10822
|
action: PreviewAction.Pong;
|
|
10823
|
+
} | {
|
|
10824
|
+
action: PreviewAction.Disconnect;
|
|
10712
10825
|
} | {
|
|
10713
10826
|
action: PreviewAction.Reload;
|
|
10714
10827
|
} | {
|
|
@@ -10736,7 +10849,11 @@ declare module 'alinea/preview/PreviewPayload' {
|
|
|
10736
10849
|
declare module 'alinea/preview/react' {
|
|
10737
10850
|
|
|
10738
10851
|
import { type PreviewApi } from 'alinea/preview/RegisterPreview';
|
|
10739
|
-
export
|
|
10852
|
+
export interface UsePreviewOptions {
|
|
10853
|
+
hostOrigin: string;
|
|
10854
|
+
preview: PreviewApi['preview'];
|
|
10855
|
+
}
|
|
10856
|
+
export function usePreview(options: UsePreviewOptions): {
|
|
10740
10857
|
isPreviewing: boolean;
|
|
10741
10858
|
};
|
|
10742
10859
|
|
|
@@ -10749,7 +10866,7 @@ declare module 'alinea/preview/RegisterPreview' {
|
|
|
10749
10866
|
preview(update: PreviewPayload): Promise<void>;
|
|
10750
10867
|
setIsPreviewing(isPreviewing: boolean): void;
|
|
10751
10868
|
}
|
|
10752
|
-
export function registerPreview(api: PreviewApi): (() => void) | undefined;
|
|
10869
|
+
export function registerPreview(api: PreviewApi, hostOrigin: string): (() => void) | undefined;
|
|
10753
10870
|
|
|
10754
10871
|
}
|
|
10755
10872
|
|
|
@@ -10799,7 +10916,7 @@ declare module 'alinea/query' {
|
|
|
10799
10916
|
parentId?: import("alinea/core/Filter").Condition<string | null>;
|
|
10800
10917
|
path?: import("alinea/core/Filter").Condition<string>;
|
|
10801
10918
|
url?: import("alinea/core/Filter").Condition<string>;
|
|
10802
|
-
alias?: string
|
|
10919
|
+
alias?: import("alinea/core/Filter").Condition<string>;
|
|
10803
10920
|
createdAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
10804
10921
|
updatedAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
10805
10922
|
workspace?: import("alinea/core/Filter").Condition<string> | import("alinea/types").Workspace;
|
|
@@ -10834,7 +10951,7 @@ declare module 'alinea/query' {
|
|
|
10834
10951
|
parentId?: import("alinea/core/Filter").Condition<string | null>;
|
|
10835
10952
|
path?: import("alinea/core/Filter").Condition<string>;
|
|
10836
10953
|
url?: import("alinea/core/Filter").Condition<string>;
|
|
10837
|
-
alias?: string
|
|
10954
|
+
alias?: import("alinea/core/Filter").Condition<string>;
|
|
10838
10955
|
createdAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
10839
10956
|
updatedAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
10840
10957
|
workspace?: import("alinea/core/Filter").Condition<string> | import("alinea/types").Workspace;
|
|
@@ -10869,7 +10986,7 @@ declare module 'alinea/query' {
|
|
|
10869
10986
|
parentId?: import("alinea/core/Filter").Condition<string | null>;
|
|
10870
10987
|
path?: import("alinea/core/Filter").Condition<string>;
|
|
10871
10988
|
url?: import("alinea/core/Filter").Condition<string>;
|
|
10872
|
-
alias?: string
|
|
10989
|
+
alias?: import("alinea/core/Filter").Condition<string>;
|
|
10873
10990
|
createdAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
10874
10991
|
updatedAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
10875
10992
|
workspace?: import("alinea/core/Filter").Condition<string> | import("alinea/types").Workspace;
|
|
@@ -10904,7 +11021,7 @@ declare module 'alinea/query' {
|
|
|
10904
11021
|
parentId?: import("alinea/core/Filter").Condition<string | null>;
|
|
10905
11022
|
path?: import("alinea/core/Filter").Condition<string>;
|
|
10906
11023
|
url?: import("alinea/core/Filter").Condition<string>;
|
|
10907
|
-
alias?: string
|
|
11024
|
+
alias?: import("alinea/core/Filter").Condition<string>;
|
|
10908
11025
|
createdAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
10909
11026
|
updatedAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
10910
11027
|
workspace?: import("alinea/core/Filter").Condition<string> | import("alinea/types").Workspace;
|
|
@@ -10937,7 +11054,7 @@ declare module 'alinea/query' {
|
|
|
10937
11054
|
parentId?: import("alinea/core/Filter").Condition<string | null>;
|
|
10938
11055
|
path?: import("alinea/core/Filter").Condition<string>;
|
|
10939
11056
|
url?: import("alinea/core/Filter").Condition<string>;
|
|
10940
|
-
alias?: string
|
|
11057
|
+
alias?: import("alinea/core/Filter").Condition<string>;
|
|
10941
11058
|
createdAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
10942
11059
|
updatedAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
10943
11060
|
workspace?: import("alinea/core/Filter").Condition<string> | import("alinea/types").Workspace;
|
|
@@ -10969,7 +11086,7 @@ declare module 'alinea/query' {
|
|
|
10969
11086
|
parentId?: import("alinea/core/Filter").Condition<string | null>;
|
|
10970
11087
|
path?: import("alinea/core/Filter").Condition<string>;
|
|
10971
11088
|
url?: import("alinea/core/Filter").Condition<string>;
|
|
10972
|
-
alias?: string
|
|
11089
|
+
alias?: import("alinea/core/Filter").Condition<string>;
|
|
10973
11090
|
createdAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
10974
11091
|
updatedAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
10975
11092
|
workspace?: import("alinea/core/Filter").Condition<string> | import("alinea/types").Workspace;
|
|
@@ -11001,7 +11118,7 @@ declare module 'alinea/query' {
|
|
|
11001
11118
|
parentId?: import("alinea/core/Filter").Condition<string | null>;
|
|
11002
11119
|
path?: import("alinea/core/Filter").Condition<string>;
|
|
11003
11120
|
url?: import("alinea/core/Filter").Condition<string>;
|
|
11004
|
-
alias?: string
|
|
11121
|
+
alias?: import("alinea/core/Filter").Condition<string>;
|
|
11005
11122
|
createdAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
11006
11123
|
updatedAt?: import("alinea/core/Filter").Condition<number | null>;
|
|
11007
11124
|
workspace?: import("alinea/core/Filter").Condition<string> | import("alinea/types").Workspace;
|