@dxos/plugin-wnfs 0.8.4-main.c1de068 → 0.8.4-main.c85a9c8dae
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/lib/browser/FileContainer-EILNV5LV.mjs +74 -0
- package/dist/lib/browser/FileContainer-EILNV5LV.mjs.map +7 -0
- package/dist/lib/browser/{blockstore-KQO2NTVM.mjs → blockstore-Q66HQJ4Q.mjs} +19 -19
- package/dist/lib/browser/blockstore-Q66HQJ4Q.mjs.map +7 -0
- package/dist/lib/browser/chunk-BXGCJRL2.mjs +155 -0
- package/dist/lib/browser/chunk-BXGCJRL2.mjs.map +7 -0
- package/dist/lib/browser/chunk-HXVPBJ3A.mjs +56 -0
- package/dist/lib/browser/chunk-HXVPBJ3A.mjs.map +7 -0
- package/dist/lib/browser/{chunk-VRRXG6IB.mjs → chunk-UC4HMNZZ.mjs} +24 -14
- package/dist/lib/browser/chunk-UC4HMNZZ.mjs.map +7 -0
- package/dist/lib/browser/file-uploader-QL4DTOMM.mjs +35 -0
- package/dist/lib/browser/file-uploader-QL4DTOMM.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +85 -86
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{markdown-6VH477GB.mjs → markdown-AYCVG6TJ.mjs} +31 -26
- package/dist/lib/browser/markdown-AYCVG6TJ.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-YYWUF6EY.mjs +99 -0
- package/dist/lib/browser/operation-resolver-YYWUF6EY.mjs.map +7 -0
- package/dist/lib/browser/react-surface-3LKVDPH7.mjs +60 -0
- package/dist/lib/browser/react-surface-3LKVDPH7.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +9 -6
- package/dist/types/src/WnfsPlugin.d.ts +2 -1
- package/dist/types/src/WnfsPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/blockstore/blockstore.d.ts +5 -0
- package/dist/types/src/capabilities/blockstore/blockstore.d.ts.map +1 -0
- package/dist/types/src/capabilities/blockstore/index.d.ts +3 -0
- package/dist/types/src/capabilities/blockstore/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/file-uploader/file-uploader.d.ts +6 -0
- package/dist/types/src/capabilities/file-uploader/file-uploader.d.ts.map +1 -0
- package/dist/types/src/capabilities/file-uploader/index.d.ts +3 -0
- package/dist/types/src/capabilities/file-uploader/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +5 -6
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
- package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
- package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/components/FileInput.d.ts +1 -1
- package/dist/types/src/components/FileInput.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/FileContainer/FileContainer.d.ts +7 -0
- package/dist/types/src/containers/FileContainer/FileContainer.d.ts.map +1 -0
- package/dist/types/src/containers/FileContainer/index.d.ts +3 -0
- package/dist/types/src/containers/FileContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/extensions/image.d.ts +1 -1
- package/dist/types/src/extensions/image.d.ts.map +1 -1
- package/dist/types/src/extensions/image.stories.d.ts +5 -4
- package/dist/types/src/extensions/image.stories.d.ts.map +1 -1
- package/dist/types/src/helpers/load.d.ts +2 -2
- package/dist/types/src/helpers/load.d.ts.map +1 -1
- package/dist/types/src/helpers/upload.d.ts +1 -1
- package/dist/types/src/helpers/upload.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +6 -3
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/File.d.ts +16 -0
- package/dist/types/src/types/File.d.ts.map +1 -0
- package/dist/types/src/{capabilities → types}/capabilities.d.ts +3 -2
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +108 -47
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +48 -40
- package/src/WnfsPlugin.tsx +63 -80
- package/src/blockstore.ts +2 -2
- package/src/capabilities/blockstore/blockstore.ts +22 -0
- package/src/capabilities/blockstore/index.ts +7 -0
- package/src/capabilities/file-uploader/file-uploader.ts +34 -0
- package/src/capabilities/file-uploader/index.ts +7 -0
- package/src/capabilities/index.ts +5 -9
- package/src/capabilities/markdown/index.ts +7 -0
- package/src/capabilities/markdown/markdown.ts +33 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +62 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +51 -0
- package/src/components/FileInput.tsx +6 -6
- package/src/components/FilePreview.tsx +1 -1
- package/src/components/index.ts +1 -4
- package/src/containers/FileContainer/FileContainer.tsx +58 -0
- package/src/containers/FileContainer/index.ts +7 -0
- package/src/containers/index.ts +7 -0
- package/src/extensions/image.stories.tsx +18 -14
- package/src/extensions/image.tsx +9 -9
- package/src/helpers/load.ts +14 -8
- package/src/helpers/upload.ts +6 -2
- package/src/index.ts +1 -1
- package/src/meta.ts +9 -6
- package/src/translations.ts +6 -3
- package/src/types/File.ts +24 -0
- package/src/{capabilities → types}/capabilities.ts +4 -4
- package/src/types/index.ts +2 -1
- package/src/types/types.ts +58 -17
- package/dist/lib/browser/FileContainer-6P2SYTVH.mjs +0 -105
- package/dist/lib/browser/FileContainer-6P2SYTVH.mjs.map +0 -7
- package/dist/lib/browser/blockstore-KQO2NTVM.mjs.map +0 -7
- package/dist/lib/browser/chunk-GVBV2QWA.mjs +0 -64
- package/dist/lib/browser/chunk-GVBV2QWA.mjs.map +0 -7
- package/dist/lib/browser/chunk-KZANQHJY.mjs +0 -16
- package/dist/lib/browser/chunk-KZANQHJY.mjs.map +0 -7
- package/dist/lib/browser/chunk-VDDGZWAY.mjs +0 -15
- package/dist/lib/browser/chunk-VDDGZWAY.mjs.map +0 -7
- package/dist/lib/browser/chunk-VRRXG6IB.mjs.map +0 -7
- package/dist/lib/browser/chunk-WTYTESSC.mjs +0 -16
- package/dist/lib/browser/chunk-WTYTESSC.mjs.map +0 -7
- package/dist/lib/browser/file-uploader-JA55DPMW.mjs +0 -29
- package/dist/lib/browser/file-uploader-JA55DPMW.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-YM6QRFIH.mjs +0 -49
- package/dist/lib/browser/intent-resolver-YM6QRFIH.mjs.map +0 -7
- package/dist/lib/browser/markdown-6VH477GB.mjs.map +0 -7
- package/dist/lib/browser/react-surface-NOSB5MZ2.mjs +0 -88
- package/dist/lib/browser/react-surface-NOSB5MZ2.mjs.map +0 -7
- package/dist/types/src/capabilities/blockstore.d.ts +0 -4
- package/dist/types/src/capabilities/blockstore.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/file-uploader.d.ts +0 -4
- package/dist/types/src/capabilities/file-uploader.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/markdown.d.ts +0 -4
- package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/components/FileContainer.d.ts +0 -9
- package/dist/types/src/components/FileContainer.d.ts.map +0 -1
- package/dist/types/src/types/file.d.ts +0 -16
- package/dist/types/src/types/file.d.ts.map +0 -1
- package/src/capabilities/blockstore.ts +0 -18
- package/src/capabilities/file-uploader.ts +0 -24
- package/src/capabilities/intent-resolver.ts +0 -32
- package/src/capabilities/markdown.ts +0 -25
- package/src/capabilities/react-surface.tsx +0 -45
- package/src/components/FileContainer.tsx +0 -51
- package/src/types/file.ts +0 -17
|
@@ -1,51 +1,112 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import * as Schema from 'effect/Schema';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
import { Database } from '@dxos/echo';
|
|
3
4
|
export declare namespace WnfsAction {
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
input: Schema.SchemaClass<{
|
|
8
|
-
readonly name: string;
|
|
9
|
-
readonly type: string;
|
|
10
|
-
readonly cid: string;
|
|
11
|
-
}, {
|
|
12
|
-
readonly name: string;
|
|
13
|
-
readonly type: string;
|
|
14
|
-
readonly cid: string;
|
|
15
|
-
}, never>;
|
|
16
|
-
output: Schema.Struct<{
|
|
17
|
-
object: typeof FileType;
|
|
18
|
-
}>;
|
|
5
|
+
const UploadAnnotationId: unique symbol;
|
|
6
|
+
const UploadFileSchema: Schema.Struct<{
|
|
7
|
+
file: Schema.instanceOf<any>;
|
|
19
8
|
}>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
readonly
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
readonly
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
9
|
+
type UploadFileForm = Schema.Schema.Type<typeof UploadFileSchema>;
|
|
10
|
+
}
|
|
11
|
+
export declare namespace WnfsOperation {
|
|
12
|
+
const OnCreateSpace: Omit<{
|
|
13
|
+
readonly meta: {
|
|
14
|
+
readonly key: `${string}/on-create-space`;
|
|
15
|
+
readonly name: "On Create Space";
|
|
16
|
+
};
|
|
17
|
+
readonly services: readonly [typeof Capability.Service];
|
|
18
|
+
readonly schema: {
|
|
19
|
+
readonly input: Schema.Struct<{
|
|
20
|
+
space: Schema.Schema<import("@dxos/client-protocol").Space, import("@dxos/client-protocol").Space, never>;
|
|
21
|
+
rootCollection: import("@dxos/echo/Type").Obj<{
|
|
22
|
+
readonly name?: string | undefined;
|
|
23
|
+
readonly objects: readonly import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & import("@dxos/echo/Obj").Unknown>[];
|
|
24
|
+
}, Schema.Struct.Fields>;
|
|
25
|
+
isDefault: Schema.optional<typeof Schema.Boolean>;
|
|
26
|
+
}>;
|
|
27
|
+
readonly output: typeof Schema.Void;
|
|
28
|
+
};
|
|
29
|
+
}, "executionMode"> & import("effect/Pipeable").Pipeable & {
|
|
30
|
+
readonly executionMode: "sync" | "async";
|
|
31
|
+
};
|
|
32
|
+
const Create: Omit<{
|
|
33
|
+
readonly meta: {
|
|
34
|
+
readonly key: `${string}/create`;
|
|
35
|
+
readonly name: "Create WNFS File";
|
|
36
|
+
};
|
|
37
|
+
readonly services: readonly [typeof Capability.Service];
|
|
38
|
+
readonly schema: {
|
|
39
|
+
readonly input: Schema.SchemaClass<{
|
|
40
|
+
readonly name: string;
|
|
41
|
+
readonly type: string;
|
|
42
|
+
readonly cid: string;
|
|
43
|
+
}, {
|
|
44
|
+
readonly name: string;
|
|
45
|
+
readonly type: string;
|
|
46
|
+
readonly cid: string;
|
|
47
|
+
}, never>;
|
|
48
|
+
readonly output: Schema.Struct<{
|
|
49
|
+
object: import("@dxos/echo/Type").Obj<{
|
|
50
|
+
readonly name?: string | undefined;
|
|
51
|
+
readonly type: string;
|
|
52
|
+
readonly cid: string;
|
|
53
|
+
readonly timestamp?: string | undefined;
|
|
54
|
+
}, Schema.Struct.Fields>;
|
|
55
|
+
}>;
|
|
56
|
+
};
|
|
57
|
+
}, "executionMode"> & import("effect/Pipeable").Pipeable & {
|
|
58
|
+
readonly executionMode: "sync" | "async";
|
|
59
|
+
};
|
|
60
|
+
const Upload: Omit<{
|
|
61
|
+
readonly meta: {
|
|
62
|
+
readonly key: `${string}/upload`;
|
|
63
|
+
readonly name: "Upload File";
|
|
64
|
+
};
|
|
65
|
+
readonly services: readonly [typeof Capability.Service];
|
|
66
|
+
readonly schema: {
|
|
67
|
+
readonly input: Schema.extend<Schema.Struct<{
|
|
68
|
+
file: Schema.instanceOf<any>;
|
|
69
|
+
}>, Schema.Struct<{
|
|
70
|
+
db: Schema.Schema<Database.Database, Database.Database, never>;
|
|
71
|
+
}>>;
|
|
72
|
+
readonly output: Schema.SchemaClass<{
|
|
73
|
+
readonly name: string;
|
|
74
|
+
readonly type: string;
|
|
75
|
+
readonly cid: string;
|
|
76
|
+
readonly url: string;
|
|
77
|
+
}, {
|
|
78
|
+
readonly name: string;
|
|
79
|
+
readonly type: string;
|
|
80
|
+
readonly cid: string;
|
|
81
|
+
readonly url: string;
|
|
82
|
+
}, never>;
|
|
83
|
+
};
|
|
84
|
+
}, "executionMode"> & import("effect/Pipeable").Pipeable & {
|
|
85
|
+
readonly executionMode: "sync" | "async";
|
|
86
|
+
};
|
|
87
|
+
const CreateFile: Omit<{
|
|
88
|
+
readonly meta: {
|
|
89
|
+
readonly key: `${string}/create-file`;
|
|
90
|
+
readonly name: "Create File";
|
|
91
|
+
};
|
|
92
|
+
readonly services: readonly [typeof Capability.Service];
|
|
93
|
+
readonly schema: {
|
|
94
|
+
readonly input: Schema.extend<Schema.Struct<{
|
|
95
|
+
file: Schema.instanceOf<any>;
|
|
96
|
+
}>, Schema.Struct<{
|
|
97
|
+
db: Schema.Schema<Database.Database, Database.Database, never>;
|
|
98
|
+
}>>;
|
|
99
|
+
readonly output: Schema.Struct<{
|
|
100
|
+
object: import("@dxos/echo/Type").Obj<{
|
|
101
|
+
readonly name?: string | undefined;
|
|
102
|
+
readonly type: string;
|
|
103
|
+
readonly cid: string;
|
|
104
|
+
readonly timestamp?: string | undefined;
|
|
105
|
+
}, Schema.Struct.Fields>;
|
|
106
|
+
}>;
|
|
107
|
+
};
|
|
108
|
+
}, "executionMode"> & import("effect/Pipeable").Pipeable & {
|
|
109
|
+
readonly executionMode: "sync" | "async";
|
|
110
|
+
};
|
|
50
111
|
}
|
|
51
112
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAStC,yBAAiB,UAAU,CAAC;IACnB,MAAM,kBAAkB,eAA6C,CAAC;IAEtE,MAAM,gBAAgB;;MAS3B,CAAC;IAEH,KAAY,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;CAC1E;AAID,yBAAiB,aAAa,CAAC;IACtB,MAAM,aAAa;;;;;;;;;;;;;;;;;;;KAWxB,CAAC;IAEI,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;KASjB,CAAC;IAEI,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;KAOjB,CAAC;IAEI,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;KASrB,CAAC;CACJ"}
|