alinea 0.5.6 → 0.5.8
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 +1 -1
- package/dist/alinea.js +2 -0
- package/dist/backend/Database.js +1 -1
- package/dist/backend/Handler.d.ts +1 -1
- package/dist/backend/Handler.js +8 -4
- package/dist/backend/resolver/EntryResolver.d.ts +1 -0
- package/dist/backend/resolver/EntryResolver.js +19 -1
- package/dist/chunks/{chunk-CYNFUAZ7.js → chunk-AAR2W5FM.js} +2 -1
- package/dist/chunks/{chunk-HWXESJ6U.js → chunk-CMEMS6ZG.js} +1 -1
- package/dist/cli/Generate.js +8 -8
- package/dist/cli/Serve.js +1 -1
- package/dist/cli/bin.js +1 -1
- package/dist/cli/generate/GenerateDashboard.js +1 -1
- package/dist/cloud/server/CloudAuthServer.js +1 -1
- package/dist/core/CMS.d.ts +0 -1
- package/dist/core/Config.d.ts +3 -1
- package/dist/core/Connection.d.ts +1 -0
- package/dist/core/Graph.d.ts +12 -0
- package/dist/core/Graph.js +24 -0
- package/dist/core/Resolver.d.ts +1 -0
- package/dist/core/driver/DefaultDriver.d.ts +0 -1
- package/dist/core/driver/DefaultDriver.js +0 -3
- package/dist/core/driver/DefaultDriver.server.d.ts +0 -1
- package/dist/core/driver/DefaultDriver.server.js +1 -5
- package/dist/core/driver/NextDriver.server.js +1 -0
- package/dist/core/pages/ExprData.d.ts +9 -1
- package/dist/core/pages/ExprData.js +12 -1
- package/dist/core/pages/Serialize.js +2 -0
- package/dist/core/pages/Snippet.d.ts +2 -0
- package/dist/core/pages/Snippet.js +18 -0
- package/dist/core/pages/index.d.ts +1 -0
- package/dist/core/pages/index.js +1 -0
- package/dist/core.d.ts +1 -0
- package/dist/core.js +1 -0
- package/dist/dashboard/view/explorer/Explorer.d.ts +1 -1
- package/dist/dashboard/view/explorer/Explorer.js +2 -0
- package/dist/ui/icons/IcRoundSearch.d.ts +0 -1
- package/dist/ui/icons/IcRoundSearch.js +1 -3
- package/dist/ui/util/TextareaAutosize.d.ts +1 -1
- package/package.json +1 -1
package/dist/alinea.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createConfig as config, Meta as meta, page, root, schema, track, type, workspace } from 'alinea/core';
|
|
1
|
+
export { createConfig as config, Meta as meta, page, root, schema, snippet, track, type, workspace } from 'alinea/core';
|
|
2
2
|
export type { Infer as infer } from 'alinea/core';
|
|
3
3
|
export { createMediaRoot as media } from 'alinea/core/media/MediaRoot';
|
|
4
4
|
export * from './input.js';
|
package/dist/alinea.js
CHANGED
package/dist/backend/Database.js
CHANGED
|
@@ -59,7 +59,7 @@ export declare class Handler implements Resolver {
|
|
|
59
59
|
url: string;
|
|
60
60
|
searchableText: string;
|
|
61
61
|
} | undefined>;
|
|
62
|
-
periodicSync(): Promise<void>;
|
|
62
|
+
periodicSync(syncInterval?: number): Promise<void>;
|
|
63
63
|
syncPending(): Promise<{
|
|
64
64
|
commitHash: string;
|
|
65
65
|
contentHash: string;
|
package/dist/backend/Handler.js
CHANGED
|
@@ -54,8 +54,10 @@ var Handler = class {
|
|
|
54
54
|
resolver;
|
|
55
55
|
resolve = async (params) => {
|
|
56
56
|
const { resolveDefaults } = this.options;
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
const resolveParams = { ...resolveDefaults, ...params };
|
|
58
|
+
const { syncInterval } = resolveParams;
|
|
59
|
+
await this.periodicSync(syncInterval);
|
|
60
|
+
return this.resolver.resolve(resolveParams);
|
|
59
61
|
};
|
|
60
62
|
previewAuth() {
|
|
61
63
|
return {
|
|
@@ -88,9 +90,11 @@ var Handler = class {
|
|
|
88
90
|
const entryData = parseYDoc(type, doc);
|
|
89
91
|
return { ...entry, ...entryData, path: entry.path };
|
|
90
92
|
}
|
|
91
|
-
async periodicSync() {
|
|
93
|
+
async periodicSync(syncInterval = 5) {
|
|
94
|
+
if (syncInterval === Infinity)
|
|
95
|
+
return;
|
|
92
96
|
const now = Date.now();
|
|
93
|
-
if (now - this.lastSync <
|
|
97
|
+
if (now - this.lastSync < syncInterval * 1e3)
|
|
94
98
|
return;
|
|
95
99
|
this.lastSync = now;
|
|
96
100
|
try {
|
|
@@ -27,6 +27,7 @@ export declare class EntryResolver {
|
|
|
27
27
|
exprValue(ctx: ResolveContext, { value }: pages.ExprData.Value): ExprData;
|
|
28
28
|
exprRecord(ctx: ResolveContext, { fields }: pages.ExprData.Record): ExprData;
|
|
29
29
|
exprCase(ctx: ResolveContext, { expr, cases, defaultCase }: pages.ExprData.Case): ExprData;
|
|
30
|
+
exprCall(ctx: ResolveContext, { method, args }: pages.ExprData.Call): ExprData;
|
|
30
31
|
expr(ctx: ResolveContext, expr: pages.ExprData): ExprData;
|
|
31
32
|
selectRecord(ctx: ResolveContext, { fields }: pages.Selection.Record): ExprData;
|
|
32
33
|
selectRow(ctx: ResolveContext, { target }: pages.Selection.Row): ExprData;
|
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
count,
|
|
4
4
|
iif,
|
|
5
5
|
match,
|
|
6
|
+
snippet,
|
|
6
7
|
withRecursive
|
|
7
|
-
} from "../../chunks/chunk-
|
|
8
|
+
} from "../../chunks/chunk-AAR2W5FM.js";
|
|
8
9
|
import {
|
|
9
10
|
BinOpType,
|
|
10
11
|
Expr,
|
|
@@ -131,6 +132,21 @@ var EntryResolver = class {
|
|
|
131
132
|
);
|
|
132
133
|
return res[Expr.Data];
|
|
133
134
|
}
|
|
135
|
+
exprCall(ctx, { method, args }) {
|
|
136
|
+
switch (method) {
|
|
137
|
+
case "snippet":
|
|
138
|
+
return snippet(
|
|
139
|
+
EntrySearch,
|
|
140
|
+
1,
|
|
141
|
+
new Expr(this.expr(ctx, args[0])),
|
|
142
|
+
new Expr(this.expr(ctx, args[1])),
|
|
143
|
+
new Expr(this.expr(ctx, args[2])),
|
|
144
|
+
new Expr(this.expr(ctx, args[3]))
|
|
145
|
+
)[Expr.Data];
|
|
146
|
+
default:
|
|
147
|
+
throw new Error(`Unknown method: "${method}"`);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
134
150
|
expr(ctx, expr) {
|
|
135
151
|
switch (expr.type) {
|
|
136
152
|
case "unop":
|
|
@@ -147,6 +163,8 @@ var EntryResolver = class {
|
|
|
147
163
|
return this.exprRecord(ctx, expr);
|
|
148
164
|
case "case":
|
|
149
165
|
return this.exprCase(ctx, expr);
|
|
166
|
+
case "call":
|
|
167
|
+
return this.exprCall(ctx, expr);
|
|
150
168
|
}
|
|
151
169
|
}
|
|
152
170
|
selectRecord(ctx, { fields }) {
|
package/dist/cli/Generate.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import "../chunks/chunk-U5RRZUYZ.js";
|
|
2
2
|
|
|
3
3
|
// src/cli/Generate.ts
|
|
4
|
+
import { exportStore } from "alinea/cli/util/ExportStore.server";
|
|
5
|
+
import { join } from "alinea/core/util/Paths";
|
|
4
6
|
import fs from "node:fs";
|
|
5
7
|
import { createRequire } from "node:module";
|
|
6
8
|
import path from "node:path";
|
|
@@ -62,14 +64,17 @@ async function* generate(options) {
|
|
|
62
64
|
const builds = compileConfig(context)[Symbol.asyncIterator]();
|
|
63
65
|
let nextBuild = builds.next();
|
|
64
66
|
let afterGenerateCalled = false;
|
|
65
|
-
|
|
67
|
+
function writeStore(data) {
|
|
68
|
+
return exportStore(data, join(context.outDir, "store.js"));
|
|
69
|
+
}
|
|
70
|
+
const [store, storeData] = await createDb();
|
|
66
71
|
await copyStaticFiles(context);
|
|
67
72
|
while (true) {
|
|
68
73
|
const { done } = await nextBuild;
|
|
69
74
|
nextBuild = builds.next();
|
|
70
75
|
try {
|
|
71
76
|
const cms = await loadCMS(context.outDir);
|
|
72
|
-
|
|
77
|
+
await writeStore(new Uint8Array());
|
|
73
78
|
const fileData = new LocalData({
|
|
74
79
|
config: cms.config,
|
|
75
80
|
fs: fs.promises,
|
|
@@ -84,11 +89,6 @@ async function* generate(options) {
|
|
|
84
89
|
nextBuild
|
|
85
90
|
)) {
|
|
86
91
|
yield { cms, db, localData: fileData };
|
|
87
|
-
if (process.env.NODE_ENV === "development")
|
|
88
|
-
fs.writeFileSync(
|
|
89
|
-
path.join(context.outDir, "content.sqlite"),
|
|
90
|
-
exportStore()
|
|
91
|
-
);
|
|
92
92
|
if (onAfterGenerate && !afterGenerateCalled) {
|
|
93
93
|
afterGenerateCalled = true;
|
|
94
94
|
onAfterGenerate();
|
|
@@ -97,7 +97,7 @@ async function* generate(options) {
|
|
|
97
97
|
if (done) {
|
|
98
98
|
await Promise.all([
|
|
99
99
|
generatePackage(context, cms.config),
|
|
100
|
-
|
|
100
|
+
writeStore(storeData())
|
|
101
101
|
]);
|
|
102
102
|
break;
|
|
103
103
|
}
|
package/dist/cli/Serve.js
CHANGED
package/dist/cli/bin.js
CHANGED
package/dist/core/CMS.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export declare abstract class CMS extends GraphRealm implements CMSApi {
|
|
|
14
14
|
config: Config;
|
|
15
15
|
constructor(config: Config);
|
|
16
16
|
abstract resolver(): Promise<Resolver>;
|
|
17
|
-
abstract exportStore(cwd: string, store: Uint8Array): Promise<void>;
|
|
18
17
|
abstract readStore(): Promise<Store>;
|
|
19
18
|
get schema(): import("alinea/core").Schema<{}>;
|
|
20
19
|
get workspaces(): Record<string, Workspace>;
|
package/dist/core/Config.d.ts
CHANGED
|
@@ -25,8 +25,10 @@ export interface Config {
|
|
|
25
25
|
}>;
|
|
26
26
|
/** Every edit will pass through a draft phase before being published */
|
|
27
27
|
enableDrafts?: boolean;
|
|
28
|
+
/** The interval in seconds at which the frontend will poll for updates */
|
|
29
|
+
syncInterval?: number;
|
|
28
30
|
/**
|
|
29
|
-
|
|
31
|
+
publicDir?: string
|
|
30
32
|
dashboardFile?: string
|
|
31
33
|
handlerUrl?:
|
|
32
34
|
*/
|
package/dist/core/Graph.d.ts
CHANGED
|
@@ -10,11 +10,21 @@ import { Projection } from './pages/Projection.js';
|
|
|
10
10
|
import { Selection } from './pages/Selection.js';
|
|
11
11
|
export type Location = Root | Workspace | PageSeed;
|
|
12
12
|
export interface GraphRealmApi {
|
|
13
|
+
/** Filter results by location */
|
|
13
14
|
in(location: Location): GraphRealmApi;
|
|
15
|
+
/** Filter results by locale */
|
|
14
16
|
locale(locale: string): GraphRealmApi;
|
|
17
|
+
/** Find a single entry or null */
|
|
15
18
|
maybeGet<S extends Projection | Type>(select: S): Promise<Projection.InferOne<S> | null>;
|
|
19
|
+
/** Find a single entry */
|
|
16
20
|
get<S extends Projection | Type>(select: S): Promise<Projection.InferOne<S>>;
|
|
21
|
+
/** Find a set of entries */
|
|
17
22
|
find<S extends Projection | Type>(select: S): Promise<Selection.Infer<S>>;
|
|
23
|
+
/** The time in seconds to poll for updates to content */
|
|
24
|
+
syncInterval(interval: number): GraphRealmApi;
|
|
25
|
+
/** Disable polling for updates to content */
|
|
26
|
+
disableSync(): GraphRealmApi;
|
|
27
|
+
/** The amount of results found */
|
|
18
28
|
count(cursor: Cursor.Find<any>): Promise<number>;
|
|
19
29
|
}
|
|
20
30
|
export interface GraphOrigin {
|
|
@@ -27,6 +37,8 @@ export declare class GraphRealm implements GraphRealmApi {
|
|
|
27
37
|
private origin;
|
|
28
38
|
targets: Schema.Targets;
|
|
29
39
|
constructor(config: Config, resolve: (params: Connection.ResolveParams) => Promise<unknown>, origin?: GraphOrigin);
|
|
40
|
+
disableSync(): GraphRealm;
|
|
41
|
+
syncInterval(interval: number): GraphRealm;
|
|
30
42
|
in(location: Location): GraphRealmApi;
|
|
31
43
|
locale(locale: string): GraphRealm;
|
|
32
44
|
maybeGet<S extends Projection | Type>(select: S): Promise<Projection.InferOne<S> | null>;
|
package/dist/core/Graph.js
CHANGED
|
@@ -15,6 +15,30 @@ var GraphRealm = class _GraphRealm {
|
|
|
15
15
|
this.targets = Schema.targets(config.schema);
|
|
16
16
|
}
|
|
17
17
|
targets;
|
|
18
|
+
disableSync() {
|
|
19
|
+
return new _GraphRealm(
|
|
20
|
+
this.config,
|
|
21
|
+
(params) => {
|
|
22
|
+
return this.resolve({
|
|
23
|
+
...params,
|
|
24
|
+
syncInterval: Infinity
|
|
25
|
+
});
|
|
26
|
+
},
|
|
27
|
+
this.origin
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
syncInterval(interval) {
|
|
31
|
+
return new _GraphRealm(
|
|
32
|
+
this.config,
|
|
33
|
+
(params) => {
|
|
34
|
+
return this.resolve({
|
|
35
|
+
...params,
|
|
36
|
+
syncInterval: interval
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
this.origin
|
|
40
|
+
);
|
|
41
|
+
}
|
|
18
42
|
in(location) {
|
|
19
43
|
return new _GraphRealm(this.config, this.resolve, { ...this.origin, location });
|
|
20
44
|
}
|
package/dist/core/Resolver.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { CMS, CMSApi } from '../CMS.js';
|
|
|
3
3
|
import { Config } from '../Config.js';
|
|
4
4
|
import { Resolver } from '../Resolver.js';
|
|
5
5
|
export declare class DefaultDriver extends CMS {
|
|
6
|
-
exportStore(outDir: string, data: Uint8Array): Promise<void>;
|
|
7
6
|
readStore(): Promise<Store>;
|
|
8
7
|
resolver(): Promise<Resolver>;
|
|
9
8
|
}
|
|
@@ -3,9 +3,6 @@ import "../../chunks/chunk-U5RRZUYZ.js";
|
|
|
3
3
|
// src/core/driver/DefaultDriver.tsx
|
|
4
4
|
import { CMS } from "../CMS.js";
|
|
5
5
|
var DefaultDriver = class extends CMS {
|
|
6
|
-
exportStore(outDir, data) {
|
|
7
|
-
throw new Error("Not implemented");
|
|
8
|
-
}
|
|
9
6
|
async readStore() {
|
|
10
7
|
throw new Error("Not implemented");
|
|
11
8
|
}
|
|
@@ -6,7 +6,6 @@ import { Config } from '../Config.js';
|
|
|
6
6
|
import { Resolver } from '../Resolver.js';
|
|
7
7
|
export declare class DefaultDriver extends CMS {
|
|
8
8
|
db: PLazy<Database>;
|
|
9
|
-
exportStore(outDir: string, data: Uint8Array): Promise<void>;
|
|
10
9
|
readStore(): Promise<Store>;
|
|
11
10
|
resolver(): Promise<Resolver>;
|
|
12
11
|
private createDb;
|
|
@@ -7,17 +7,12 @@ import "../../chunks/chunk-U5RRZUYZ.js";
|
|
|
7
7
|
import { Database } from "alinea/backend";
|
|
8
8
|
import { createStore } from "alinea/backend/Store";
|
|
9
9
|
import { EntryResolver } from "alinea/backend/resolver/EntryResolver";
|
|
10
|
-
import { exportStore } from "alinea/cli/util/ExportStore";
|
|
11
10
|
import { base64 } from "alinea/core/util/Encoding";
|
|
12
11
|
import { CMS } from "../CMS.js";
|
|
13
12
|
import { Client } from "../Client.js";
|
|
14
13
|
import { Realm } from "../pages/Realm.js";
|
|
15
|
-
import { join } from "../util/Paths.js";
|
|
16
14
|
var DefaultDriver = class extends CMS {
|
|
17
15
|
db = PLazy.from(this.createDb.bind(this));
|
|
18
|
-
exportStore(outDir, data) {
|
|
19
|
-
return exportStore(data, join(outDir, "store.js"));
|
|
20
|
-
}
|
|
21
16
|
async readStore() {
|
|
22
17
|
const { storeData } = await import("@alinea/generated/store.js");
|
|
23
18
|
return createStore(new Uint8Array(base64.parse(storeData)));
|
|
@@ -29,6 +24,7 @@ var DefaultDriver = class extends CMS {
|
|
|
29
24
|
config: this.config,
|
|
30
25
|
url: devUrl,
|
|
31
26
|
resolveDefaults: {
|
|
27
|
+
syncInterval: this.config.syncInterval ?? 60,
|
|
32
28
|
realm: Realm.Published
|
|
33
29
|
}
|
|
34
30
|
});
|
|
@@ -38,6 +38,7 @@ var NextDriver = class extends DefaultDriver {
|
|
|
38
38
|
const [draftStatus] = outcome(() => draftMode());
|
|
39
39
|
const isDraft = draftStatus?.isEnabled;
|
|
40
40
|
const resolveDefaults = {
|
|
41
|
+
syncInterval: this.config.syncInterval ?? 60,
|
|
41
42
|
realm: Realm.Published
|
|
42
43
|
};
|
|
43
44
|
if (isDraft) {
|
|
@@ -24,7 +24,7 @@ export declare enum BinaryOp {
|
|
|
24
24
|
NotIn = "NotIn",
|
|
25
25
|
Concat = "Concat"
|
|
26
26
|
}
|
|
27
|
-
export type ExprData = ExprData.UnOp | ExprData.BinOp | ExprData.Field | ExprData.Access | ExprData.Value | ExprData.Record | ExprData.Case;
|
|
27
|
+
export type ExprData = ExprData.UnOp | ExprData.BinOp | ExprData.Field | ExprData.Access | ExprData.Value | ExprData.Record | ExprData.Case | ExprData.Call;
|
|
28
28
|
export declare namespace ExprData {
|
|
29
29
|
namespace types {
|
|
30
30
|
class UnOp {
|
|
@@ -65,6 +65,11 @@ export declare namespace ExprData {
|
|
|
65
65
|
cases: Type<[ExprData, Selection<T>][]>;
|
|
66
66
|
defaultCase?: Type<Selection<T> | undefined> | undefined;
|
|
67
67
|
}
|
|
68
|
+
class Call {
|
|
69
|
+
type: Type<"call">;
|
|
70
|
+
method: Type<string>;
|
|
71
|
+
args: Type<ExprData[]>;
|
|
72
|
+
}
|
|
68
73
|
}
|
|
69
74
|
export interface UnOp extends Infer<types.UnOp> {
|
|
70
75
|
}
|
|
@@ -89,6 +94,9 @@ export declare namespace ExprData {
|
|
|
89
94
|
export interface Case extends Infer<types.Case> {
|
|
90
95
|
}
|
|
91
96
|
export function Case(expr: ExprData, cases: Array<[ExprData, Selection]>, defaultCase?: Selection): ExprData;
|
|
97
|
+
export interface Call extends Infer<types.Call> {
|
|
98
|
+
}
|
|
99
|
+
export function Call(method: string, args: Array<ExprData>): ExprData;
|
|
92
100
|
export const adt: Type<ExprData>;
|
|
93
101
|
export {};
|
|
94
102
|
}
|
|
@@ -84,6 +84,12 @@ var ExprData;
|
|
|
84
84
|
defaultCase = Selection.adt.optional;
|
|
85
85
|
}
|
|
86
86
|
types2.Case = Case2;
|
|
87
|
+
class Call2 {
|
|
88
|
+
type = literal("call");
|
|
89
|
+
method = string;
|
|
90
|
+
args = array(ExprData2.adt);
|
|
91
|
+
}
|
|
92
|
+
types2.Call = Call2;
|
|
87
93
|
})(types || (types = {}));
|
|
88
94
|
function UnOp(op, expr) {
|
|
89
95
|
return { type: "unop", op, expr };
|
|
@@ -113,6 +119,10 @@ var ExprData;
|
|
|
113
119
|
return { type: "case", expr, cases, defaultCase };
|
|
114
120
|
}
|
|
115
121
|
ExprData2.Case = Case;
|
|
122
|
+
function Call(method, args) {
|
|
123
|
+
return { type: "call", method, args };
|
|
124
|
+
}
|
|
125
|
+
ExprData2.Call = Call;
|
|
116
126
|
ExprData2.adt = union(
|
|
117
127
|
types.UnOp,
|
|
118
128
|
types.BinOp,
|
|
@@ -120,7 +130,8 @@ var ExprData;
|
|
|
120
130
|
types.Access,
|
|
121
131
|
types.Value,
|
|
122
132
|
types.Record,
|
|
123
|
-
types.Case
|
|
133
|
+
types.Case,
|
|
134
|
+
types.Call
|
|
124
135
|
);
|
|
125
136
|
})(ExprData || (ExprData = {}));
|
|
126
137
|
export {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "../../chunks/chunk-U5RRZUYZ.js";
|
|
2
|
+
|
|
3
|
+
// src/core/pages/Snippet.ts
|
|
4
|
+
import { Expr } from "./Expr.js";
|
|
5
|
+
import { ExprData } from "./ExprData.js";
|
|
6
|
+
function snippet(start = "<mark>", end = "</mark>", cutOff = "...", limit = 64) {
|
|
7
|
+
return Expr(
|
|
8
|
+
ExprData.Call("snippet", [
|
|
9
|
+
ExprData.Value(start),
|
|
10
|
+
ExprData.Value(end),
|
|
11
|
+
ExprData.Value(cutOff),
|
|
12
|
+
ExprData.Value(limit)
|
|
13
|
+
])
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
snippet
|
|
18
|
+
};
|
package/dist/core/pages/index.js
CHANGED
package/dist/core.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export * from './core/field/RecordField.js';
|
|
|
36
36
|
export * from './core/field/RichTextField.js';
|
|
37
37
|
export * from './core/field/ScalarField.js';
|
|
38
38
|
export * from './core/field/UnionField.js';
|
|
39
|
+
export * from './core/pages/Snippet.js';
|
|
39
40
|
export * from './core/shape/ListShape.js';
|
|
40
41
|
export * from './core/shape/RichTextShape.js';
|
|
41
42
|
export * from './core/util/Async.js';
|
package/dist/core.js
CHANGED
|
@@ -37,6 +37,7 @@ export * from "./core/field/RecordField.js";
|
|
|
37
37
|
export * from "./core/field/RichTextField.js";
|
|
38
38
|
export * from "./core/field/ScalarField.js";
|
|
39
39
|
export * from "./core/field/UnionField.js";
|
|
40
|
+
export * from "./core/pages/Snippet.js";
|
|
40
41
|
export * from "./core/shape/ListShape.js";
|
|
41
42
|
export * from "./core/shape/RichTextShape.js";
|
|
42
43
|
export * from "./core/util/Async.js";
|
|
@@ -22,4 +22,4 @@ export interface ExplorerProps {
|
|
|
22
22
|
withNavigation?: boolean;
|
|
23
23
|
border?: boolean;
|
|
24
24
|
}
|
|
25
|
-
export declare function Explorer({ type, cursor, virtualized, max, selectable, selection, toggleSelect, onNavigate, showMedia, border }: ExplorerProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function Explorer({ type, cursor, virtualized, max, selectable, selection, toggleSelect, onNavigate, withNavigation, showMedia, border }: ExplorerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1831,6 +1831,7 @@ function Explorer({
|
|
|
1831
1831
|
toggleSelect = () => {
|
|
1832
1832
|
},
|
|
1833
1833
|
onNavigate,
|
|
1834
|
+
withNavigation,
|
|
1834
1835
|
showMedia,
|
|
1835
1836
|
border = true
|
|
1836
1837
|
}) {
|
|
@@ -1882,6 +1883,7 @@ function Explorer({
|
|
|
1882
1883
|
selection,
|
|
1883
1884
|
onSelect: toggleSelect,
|
|
1884
1885
|
onNavigate,
|
|
1886
|
+
withNavigation,
|
|
1885
1887
|
showMedia,
|
|
1886
1888
|
border
|
|
1887
1889
|
},
|
|
@@ -22,7 +22,7 @@ export declare namespace TextareaAutosize {
|
|
|
22
22
|
lineHeight: number | null;
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
export declare const TextareaAutosize: React.ForwardRefExoticComponent<Pick<React.HTMLProps<HTMLTextAreaElement>, "data" | "value" | "default" | "manifest" | "style" | "key" | "name" | "type" | "title" | "target" | "is" | "children" | "form" | "cite" | "label" | "slot" | "span" | "summary" | "pattern" | "hidden" | "readOnly" | "as" | "className" | "disabled" | "size" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "start" | "wrap" | "open" | "multiple" | "list" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "
|
|
25
|
+
export declare const TextareaAutosize: React.ForwardRefExoticComponent<Pick<React.HTMLProps<HTMLTextAreaElement>, "data" | "value" | "default" | "manifest" | "style" | "key" | "name" | "type" | "title" | "target" | "method" | "is" | "children" | "form" | "cite" | "label" | "slot" | "span" | "summary" | "pattern" | "hidden" | "readOnly" | "as" | "className" | "disabled" | "size" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "start" | "wrap" | "open" | "multiple" | "list" | "accept" | "acceptCharset" | "action" | "allowFullScreen" | "allowTransparency" | "alt" | "async" | "autoComplete" | "autoPlay" | "capture" | "cellPadding" | "cellSpacing" | "charSet" | "challenge" | "checked" | "classID" | "cols" | "colSpan" | "controls" | "coords" | "crossOrigin" | "dateTime" | "defer" | "download" | "encType" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "frameBorder" | "headers" | "height" | "high" | "href" | "hrefLang" | "htmlFor" | "httpEquiv" | "integrity" | "keyParams" | "keyType" | "kind" | "loop" | "low" | "marginHeight" | "marginWidth" | "max" | "maxLength" | "media" | "mediaGroup" | "min" | "minLength" | "muted" | "noValidate" | "optimum" | "playsInline" | "poster" | "preload" | "required" | "reversed" | "rows" | "rowSpan" | "sandbox" | "scope" | "scoped" | "scrolling" | "seamless" | "selected" | "shape" | "sizes" | "src" | "srcDoc" | "srcLang" | "srcSet" | "step" | "useMap" | "width" | "wmode"> & {
|
|
26
26
|
/** Called whenever the textarea resizes */
|
|
27
27
|
onResize?: ((e: Event) => void) | undefined;
|
|
28
28
|
/** Minimum number of visible rows */
|