@dxos/plugin-wnfs 0.8.4-main.74a063c4e0 → 0.8.4-main.765dc60934

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 (169) hide show
  1. package/LICENSE +102 -5
  2. package/README.md +2 -2
  3. package/dist/lib/neutral/FileArticle-B3NF2VKL.mjs +58 -0
  4. package/dist/lib/neutral/FileArticle-B3NF2VKL.mjs.map +7 -0
  5. package/dist/lib/neutral/WnfsPlugin.mjs +50 -0
  6. package/dist/lib/neutral/WnfsPlugin.mjs.map +7 -0
  7. package/dist/lib/neutral/WnfsPlugin.node.mjs +23 -0
  8. package/dist/lib/neutral/WnfsPlugin.node.mjs.map +7 -0
  9. package/dist/lib/neutral/blockstore-3NLSWC7Z.mjs +190 -0
  10. package/dist/lib/neutral/blockstore-3NLSWC7Z.mjs.map +7 -0
  11. package/dist/lib/neutral/capabilities/index.mjs +19 -0
  12. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  13. package/dist/lib/{browser/chunk-N6Y4QPNF.mjs → neutral/chunk-7KFJ6LYH.mjs} +51 -17
  14. package/dist/lib/neutral/chunk-7KFJ6LYH.mjs.map +7 -0
  15. package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
  16. package/dist/lib/neutral/chunk-LHUHUCBD.mjs +18 -0
  17. package/dist/lib/neutral/chunk-LHUHUCBD.mjs.map +7 -0
  18. package/dist/lib/neutral/chunk-UIZBWELF.mjs +8 -0
  19. package/dist/lib/neutral/chunk-UIZBWELF.mjs.map +7 -0
  20. package/dist/lib/neutral/chunk-VWVCHTUK.mjs +125 -0
  21. package/dist/lib/neutral/chunk-VWVCHTUK.mjs.map +7 -0
  22. package/dist/lib/neutral/components/index.mjs +63 -0
  23. package/dist/lib/neutral/components/index.mjs.map +7 -0
  24. package/dist/lib/neutral/containers/index.mjs +9 -0
  25. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  26. package/dist/lib/neutral/create-4ERE5CA4.mjs +23 -0
  27. package/dist/lib/neutral/create-4ERE5CA4.mjs.map +7 -0
  28. package/dist/lib/neutral/create-file-RAHDIJVU.mjs +40 -0
  29. package/dist/lib/neutral/create-file-RAHDIJVU.mjs.map +7 -0
  30. package/dist/lib/neutral/create-object-7PJC47BB.mjs +33 -0
  31. package/dist/lib/neutral/create-object-7PJC47BB.mjs.map +7 -0
  32. package/dist/lib/neutral/file-uploader-WOF3H3FN.mjs +34 -0
  33. package/dist/lib/neutral/file-uploader-WOF3H3FN.mjs.map +7 -0
  34. package/dist/lib/neutral/helpers/index.mjs +26 -0
  35. package/dist/lib/neutral/helpers/index.mjs.map +7 -0
  36. package/dist/lib/neutral/index.mjs +40 -0
  37. package/dist/lib/neutral/index.mjs.map +7 -0
  38. package/dist/lib/neutral/markdown-I4FYAUCA.mjs +204 -0
  39. package/dist/lib/neutral/markdown-I4FYAUCA.mjs.map +7 -0
  40. package/dist/lib/neutral/meta.json +1 -0
  41. package/dist/lib/neutral/meta.mjs +8 -0
  42. package/dist/lib/neutral/meta.mjs.map +7 -0
  43. package/dist/lib/neutral/operation-handler-NPYSIPMR.mjs +13 -0
  44. package/dist/lib/neutral/operation-handler-NPYSIPMR.mjs.map +7 -0
  45. package/dist/lib/neutral/operations/index.mjs +8 -0
  46. package/dist/lib/neutral/operations/index.mjs.map +7 -0
  47. package/dist/lib/neutral/plugin.mjs +16 -0
  48. package/dist/lib/neutral/plugin.mjs.map +7 -0
  49. package/dist/lib/neutral/react-surface-6QHCDYC3.mjs +53 -0
  50. package/dist/lib/neutral/react-surface-6QHCDYC3.mjs.map +7 -0
  51. package/dist/lib/neutral/translations.mjs +30 -0
  52. package/dist/lib/neutral/translations.mjs.map +7 -0
  53. package/dist/lib/neutral/types/index.mjs +14 -0
  54. package/dist/lib/neutral/types/index.mjs.map +7 -0
  55. package/dist/lib/neutral/upload-VA5CSUEP.mjs +33 -0
  56. package/dist/lib/neutral/upload-VA5CSUEP.mjs.map +7 -0
  57. package/dist/types/src/WnfsPlugin.d.ts +1 -0
  58. package/dist/types/src/WnfsPlugin.d.ts.map +1 -1
  59. package/dist/types/src/WnfsPlugin.node.d.ts +4 -0
  60. package/dist/types/src/WnfsPlugin.node.d.ts.map +1 -0
  61. package/dist/types/src/WnfsPlugin.test.d.ts +2 -0
  62. package/dist/types/src/WnfsPlugin.test.d.ts.map +1 -0
  63. package/dist/types/src/blockstore.d.ts.map +1 -1
  64. package/dist/types/src/capabilities/blockstore.d.ts.map +1 -1
  65. package/dist/types/src/capabilities/create-object.d.ts +11 -0
  66. package/dist/types/src/capabilities/create-object.d.ts.map +1 -0
  67. package/dist/types/src/capabilities/file-uploader.d.ts.map +1 -1
  68. package/dist/types/src/capabilities/index.d.ts +7 -1
  69. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  70. package/dist/types/src/capabilities/markdown.d.ts +2 -1
  71. package/dist/types/src/capabilities/markdown.d.ts.map +1 -1
  72. package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
  73. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
  74. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  75. package/dist/types/src/components/FileInput/FileInput.d.ts.map +1 -1
  76. package/dist/types/src/components/FilePreview/FilePreview.d.ts +1 -5
  77. package/dist/types/src/components/FilePreview/FilePreview.d.ts.map +1 -1
  78. package/dist/types/src/containers/FileArticle/FileArticle.d.ts +7 -0
  79. package/dist/types/src/containers/FileArticle/FileArticle.d.ts.map +1 -0
  80. package/dist/types/src/containers/FileArticle/index.d.ts +2 -0
  81. package/dist/types/src/containers/FileArticle/index.d.ts.map +1 -0
  82. package/dist/types/src/containers/index.d.ts +1 -1
  83. package/dist/types/src/containers/index.d.ts.map +1 -1
  84. package/dist/types/src/extensions/image.d.ts.map +1 -1
  85. package/dist/types/src/extensions/image.stories.d.ts.map +1 -1
  86. package/dist/types/src/helpers/common.d.ts.map +1 -1
  87. package/dist/types/src/helpers/load.d.ts.map +1 -1
  88. package/dist/types/src/helpers/upload.d.ts.map +1 -1
  89. package/dist/types/src/helpers/wnfs-url.d.ts.map +1 -1
  90. package/dist/types/src/index.d.ts +2 -2
  91. package/dist/types/src/index.d.ts.map +1 -1
  92. package/dist/types/src/operations/create-file.d.ts +3 -3
  93. package/dist/types/src/operations/create-file.d.ts.map +1 -1
  94. package/dist/types/src/operations/create.d.ts +3 -3
  95. package/dist/types/src/operations/create.d.ts.map +1 -1
  96. package/dist/types/src/operations/index.d.ts +1 -2
  97. package/dist/types/src/operations/index.d.ts.map +1 -1
  98. package/dist/types/src/operations/upload.d.ts +3 -3
  99. package/dist/types/src/operations/upload.d.ts.map +1 -1
  100. package/dist/types/src/plugin.d.ts +4 -0
  101. package/dist/types/src/plugin.d.ts.map +1 -0
  102. package/dist/types/src/translations.d.ts +24 -16
  103. package/dist/types/src/translations.d.ts.map +1 -1
  104. package/dist/types/src/types/WnfsCapabilities.d.ts +11 -0
  105. package/dist/types/src/types/WnfsCapabilities.d.ts.map +1 -0
  106. package/dist/types/src/types/{File.d.ts → WnfsFile.d.ts} +4 -4
  107. package/dist/types/src/types/WnfsFile.d.ts.map +1 -0
  108. package/dist/types/src/{operations/definitions.d.ts → types/WnfsOperation.d.ts} +3 -3
  109. package/dist/types/src/types/WnfsOperation.d.ts.map +1 -0
  110. package/dist/types/src/types/index.d.ts +3 -2
  111. package/dist/types/src/types/index.d.ts.map +1 -1
  112. package/dist/types/src/types/types.d.ts.map +1 -1
  113. package/dist/types/tsconfig.tsbuildinfo +1 -1
  114. package/package.json +90 -58
  115. package/src/WnfsPlugin.node.ts +19 -0
  116. package/src/WnfsPlugin.test.ts +27 -0
  117. package/src/WnfsPlugin.tsx +8 -33
  118. package/src/capabilities/blockstore.ts +1 -1
  119. package/src/capabilities/create-object.ts +33 -0
  120. package/src/capabilities/file-uploader.ts +2 -2
  121. package/src/capabilities/index.ts +2 -1
  122. package/src/capabilities/markdown.ts +16 -12
  123. package/src/capabilities/operation-handler.ts +1 -1
  124. package/src/capabilities/react-surface.tsx +18 -9
  125. package/src/containers/{FileContainer/FileContainer.tsx → FileArticle/FileArticle.tsx} +3 -3
  126. package/src/containers/FileArticle/index.ts +5 -0
  127. package/src/containers/index.ts +1 -1
  128. package/src/extensions/image.stories.tsx +2 -2
  129. package/src/helpers/load.ts +2 -2
  130. package/src/helpers/upload.ts +1 -1
  131. package/src/index.ts +2 -2
  132. package/src/operations/create-file.ts +4 -5
  133. package/src/operations/create.ts +3 -4
  134. package/src/operations/index.ts +1 -3
  135. package/src/operations/upload.ts +4 -5
  136. package/src/plugin.ts +11 -0
  137. package/src/translations.ts +1 -1
  138. package/src/types/WnfsCapabilities.ts +18 -0
  139. package/src/types/{File.ts → WnfsFile.ts} +5 -3
  140. package/src/{operations/definitions.ts → types/WnfsOperation.ts} +7 -4
  141. package/src/types/index.ts +4 -2
  142. package/dist/lib/browser/chunk-BM3MEFES.mjs +0 -69
  143. package/dist/lib/browser/chunk-BM3MEFES.mjs.map +0 -7
  144. package/dist/lib/browser/chunk-N6Y4QPNF.mjs.map +0 -7
  145. package/dist/lib/browser/chunk-VXUCZHVZ.mjs +0 -69
  146. package/dist/lib/browser/chunk-VXUCZHVZ.mjs.map +0 -7
  147. package/dist/lib/browser/create-NOHKWE67.mjs +0 -24
  148. package/dist/lib/browser/create-NOHKWE67.mjs.map +0 -7
  149. package/dist/lib/browser/create-file-N7ADCFOF.mjs +0 -49
  150. package/dist/lib/browser/create-file-N7ADCFOF.mjs.map +0 -7
  151. package/dist/lib/browser/index.mjs +0 -117
  152. package/dist/lib/browser/index.mjs.map +0 -7
  153. package/dist/lib/browser/meta.json +0 -1
  154. package/dist/lib/browser/operations/index.mjs +0 -13
  155. package/dist/lib/browser/operations/index.mjs.map +0 -7
  156. package/dist/lib/browser/types/index.mjs +0 -11
  157. package/dist/lib/browser/upload-DA7GBOXF.mjs +0 -42
  158. package/dist/lib/browser/upload-DA7GBOXF.mjs.map +0 -7
  159. package/dist/types/src/containers/FileContainer/FileContainer.d.ts +0 -7
  160. package/dist/types/src/containers/FileContainer/FileContainer.d.ts.map +0 -1
  161. package/dist/types/src/containers/FileContainer/index.d.ts +0 -2
  162. package/dist/types/src/containers/FileContainer/index.d.ts.map +0 -1
  163. package/dist/types/src/operations/definitions.d.ts.map +0 -1
  164. package/dist/types/src/types/File.d.ts.map +0 -1
  165. package/dist/types/src/types/capabilities.d.ts +0 -13
  166. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  167. package/src/containers/FileContainer/index.ts +0 -5
  168. package/src/types/capabilities.ts +0 -18
  169. /package/dist/lib/{browser/types/index.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
@@ -5,15 +5,14 @@
5
5
  import * as Effect from 'effect/Effect';
6
6
 
7
7
  import { Capability } from '@dxos/app-framework';
8
+ import { Operation } from '@dxos/compute';
8
9
  import { invariant } from '@dxos/invariant';
9
- import { Operation } from '@dxos/operation';
10
- import { ClientCapabilities } from '@dxos/plugin-client/types';
10
+ import { ClientCapabilities } from '@dxos/plugin-client';
11
11
 
12
12
  import { upload } from '../helpers';
13
- import { WnfsCapabilities } from '../types';
14
- import { Upload } from './definitions';
13
+ import { WnfsCapabilities, WnfsOperation } from '../types';
15
14
 
16
- const handler: Operation.WithHandler<typeof Upload> = Upload.pipe(
15
+ const handler: Operation.WithHandler<typeof WnfsOperation.Upload> = WnfsOperation.Upload.pipe(
17
16
  Operation.withHandler(
18
17
  Effect.fnUntraced(function* ({ file, db }) {
19
18
  const client = yield* Capability.get(ClientCapabilities.Client);
package/src/plugin.ts ADDED
@@ -0,0 +1,11 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { Plugin } from '@dxos/app-framework';
6
+
7
+ import { meta } from './meta';
8
+
9
+ export const WnfsPlugin = Plugin.lazy(meta, () => import('#plugin'));
10
+
11
+ export { WnfsOperationHandlerSet } from './operations';
@@ -10,7 +10,7 @@ import { WnfsFile } from '#types';
10
10
  export const translations = [
11
11
  {
12
12
  'en-US': {
13
- [WnfsFile.File.typename]: {
13
+ [WnfsFile.WnfsFile.typename]: {
14
14
  'typename.label': 'File',
15
15
  'typename.label_zero': 'Files',
16
16
  'typename.label_one': 'File',
@@ -0,0 +1,18 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ // @import-as-namespace
6
+
7
+ import { type Blockstore as BlockstoreInterface } from 'interface-blockstore';
8
+ import { type PrivateDirectory, type PrivateForest } from 'wnfs';
9
+
10
+ import { Capability } from '@dxos/app-framework';
11
+ import { type SpaceId } from '@dxos/keys';
12
+
13
+ import { meta } from '#meta';
14
+
15
+ export const Blockstore = Capability.make<BlockstoreInterface>(`${meta.id}.capability.blockstore`);
16
+
17
+ export type Instances = Record<SpaceId, { directory: PrivateDirectory; forest: PrivateForest }>;
18
+ export const Instances = Capability.make<Instances>(`${meta.id}.capability.instances`);
@@ -2,12 +2,14 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
+ // @import-as-namespace
6
+
5
7
  import * as Schema from 'effect/Schema';
6
8
 
7
9
  import { Annotation, Obj, Type } from '@dxos/echo';
8
10
  import { FormInputAnnotation } from '@dxos/echo/internal';
9
11
 
10
- export const File = Schema.Struct({
12
+ export const WnfsFile = Schema.Struct({
11
13
  name: Schema.String.pipe(Schema.optional),
12
14
  type: Schema.String.pipe(FormInputAnnotation.set(false)),
13
15
  cid: Schema.String.pipe(FormInputAnnotation.set(false)),
@@ -23,6 +25,6 @@ export const File = Schema.Struct({
23
25
  }),
24
26
  );
25
27
 
26
- export type File = Schema.Schema.Type<typeof File>;
28
+ export type WnfsFile = Schema.Schema.Type<typeof WnfsFile>;
27
29
 
28
- export const make = (props: Obj.MakeProps<typeof File>) => Obj.make(File, props);
30
+ export const make = (props: Obj.MakeProps<typeof WnfsFile>) => Obj.make(WnfsFile, props);
@@ -2,16 +2,19 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ // @import-as-namespace
6
+
5
7
  import * as Schema from 'effect/Schema';
6
8
 
7
9
  import { Capability } from '@dxos/app-framework';
8
10
  import { FileInfoSchema } from '@dxos/app-toolkit';
11
+ import { Operation } from '@dxos/compute';
9
12
  import { Database } from '@dxos/echo';
10
- import { Operation } from '@dxos/operation';
11
13
 
12
14
  import { meta } from '#meta';
13
15
 
14
- import { WnfsFile, WnfsAction } from '../types';
16
+ import { WnfsAction } from './types';
17
+ import * as WnfsFile from './WnfsFile';
15
18
 
16
19
  const WNFS_OPERATION = `${meta.id}.operation`;
17
20
 
@@ -20,7 +23,7 @@ export const Create = Operation.make({
20
23
  services: [Capability.Service],
21
24
  input: FileInfoSchema.pick('name', 'type', 'cid').pipe(Schema.required),
22
25
  output: Schema.Struct({
23
- object: WnfsFile.File,
26
+ object: WnfsFile.WnfsFile,
24
27
  }),
25
28
  });
26
29
 
@@ -36,6 +39,6 @@ export const CreateFile = Operation.make({
36
39
  services: [Capability.Service],
37
40
  input: Schema.extend(WnfsAction.UploadFileSchema, Schema.Struct({ db: Database.Database })),
38
41
  output: Schema.Struct({
39
- object: WnfsFile.File,
42
+ object: WnfsFile.WnfsFile,
40
43
  }),
41
44
  });
@@ -2,6 +2,8 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- export * from './capabilities';
6
- export * as WnfsFile from './File';
7
5
  export * from './types';
6
+
7
+ export * as WnfsCapabilities from './WnfsCapabilities';
8
+ export * as WnfsFile from './WnfsFile';
9
+ export * as WnfsOperation from './WnfsOperation';
@@ -1,69 +0,0 @@
1
- import {
2
- File_exports,
3
- WnfsAction,
4
- __export
5
- } from "./chunk-VXUCZHVZ.mjs";
6
-
7
- // src/operations/definitions.ts
8
- var definitions_exports = {};
9
- __export(definitions_exports, {
10
- Create: () => Create,
11
- CreateFile: () => CreateFile,
12
- Upload: () => Upload
13
- });
14
- import * as Schema from "effect/Schema";
15
- import { Capability } from "@dxos/app-framework";
16
- import { FileInfoSchema } from "@dxos/app-toolkit";
17
- import { Database } from "@dxos/echo";
18
- import { Operation } from "@dxos/operation";
19
- import { meta } from "#meta";
20
- var WNFS_OPERATION = `${meta.id}.operation`;
21
- var Create = Operation.make({
22
- meta: {
23
- key: `${WNFS_OPERATION}.create`,
24
- name: "Create WNFS File"
25
- },
26
- services: [
27
- Capability.Service
28
- ],
29
- input: FileInfoSchema.pick("name", "type", "cid").pipe(Schema.required),
30
- output: Schema.Struct({
31
- object: File_exports.File
32
- })
33
- });
34
- var Upload = Operation.make({
35
- meta: {
36
- key: `${WNFS_OPERATION}.upload`,
37
- name: "Upload File"
38
- },
39
- services: [
40
- Capability.Service
41
- ],
42
- input: Schema.extend(WnfsAction.UploadFileSchema, Schema.Struct({
43
- db: Database.Database
44
- })),
45
- output: Schema.required(FileInfoSchema)
46
- });
47
- var CreateFile = Operation.make({
48
- meta: {
49
- key: `${WNFS_OPERATION}.create-file`,
50
- name: "Create File"
51
- },
52
- services: [
53
- Capability.Service
54
- ],
55
- input: Schema.extend(WnfsAction.UploadFileSchema, Schema.Struct({
56
- db: Database.Database
57
- })),
58
- output: Schema.Struct({
59
- object: File_exports.File
60
- })
61
- });
62
-
63
- export {
64
- Create,
65
- Upload,
66
- CreateFile,
67
- definitions_exports
68
- };
69
- //# sourceMappingURL=chunk-BM3MEFES.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/definitions.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { FileInfoSchema } from '@dxos/app-toolkit';\nimport { Database } from '@dxos/echo';\nimport { Operation } from '@dxos/operation';\n\nimport { meta } from '#meta';\n\nimport { WnfsFile, WnfsAction } from '../types';\n\nconst WNFS_OPERATION = `${meta.id}.operation`;\n\nexport const Create = Operation.make({\n meta: { key: `${WNFS_OPERATION}.create`, name: 'Create WNFS File' },\n services: [Capability.Service],\n input: FileInfoSchema.pick('name', 'type', 'cid').pipe(Schema.required),\n output: Schema.Struct({\n object: WnfsFile.File,\n }),\n});\n\nexport const Upload = Operation.make({\n meta: { key: `${WNFS_OPERATION}.upload`, name: 'Upload File' },\n services: [Capability.Service],\n input: Schema.extend(WnfsAction.UploadFileSchema, Schema.Struct({ db: Database.Database })),\n output: Schema.required(FileInfoSchema),\n});\n\nexport const CreateFile = Operation.make({\n meta: { key: `${WNFS_OPERATION}.create-file`, name: 'Create File' },\n services: [Capability.Service],\n input: Schema.extend(WnfsAction.UploadFileSchema, Schema.Struct({ db: Database.Database })),\n output: Schema.Struct({\n object: WnfsFile.File,\n }),\n});\n"],
5
- "mappings": ";;;;;;;AAAA;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,sBAAsB;AAC/B,SAASC,gBAAgB;AACzB,SAASC,iBAAiB;AAE1B,SAASC,YAAY;AAIrB,IAAMC,iBAAiB,GAAGC,KAAKC,EAAE;AAE1B,IAAMC,SAASC,UAAUC,KAAK;EACnCJ,MAAM;IAAEK,KAAK,GAAGN,cAAAA;IAAyBO,MAAM;EAAmB;EAClEC,UAAU;IAACC,WAAWC;;EACtBC,OAAOC,eAAeC,KAAK,QAAQ,QAAQ,KAAA,EAAOC,KAAYC,eAAQ;EACtEC,QAAeC,cAAO;IACpBC,QAAQC,aAASC;EACnB,CAAA;AACF,CAAA;AAEO,IAAMC,SAASjB,UAAUC,KAAK;EACnCJ,MAAM;IAAEK,KAAK,GAAGN,cAAAA;IAAyBO,MAAM;EAAc;EAC7DC,UAAU;IAACC,WAAWC;;EACtBC,OAAcW,cAAOC,WAAWC,kBAAyBP,cAAO;IAAEQ,IAAIC,SAASA;EAAS,CAAA,CAAA;EACxFV,QAAeD,gBAASH,cAAAA;AAC1B,CAAA;AAEO,IAAMe,aAAavB,UAAUC,KAAK;EACvCJ,MAAM;IAAEK,KAAK,GAAGN,cAAAA;IAA8BO,MAAM;EAAc;EAClEC,UAAU;IAACC,WAAWC;;EACtBC,OAAcW,cAAOC,WAAWC,kBAAyBP,cAAO;IAAEQ,IAAIC,SAASA;EAAS,CAAA,CAAA;EACxFV,QAAeC,cAAO;IACpBC,QAAQC,aAASC;EACnB,CAAA;AACF,CAAA;",
6
- "names": ["Schema", "Capability", "FileInfoSchema", "Database", "Operation", "meta", "WNFS_OPERATION", "meta", "id", "Create", "Operation", "make", "key", "name", "services", "Capability", "Service", "input", "FileInfoSchema", "pick", "pipe", "required", "output", "Struct", "object", "WnfsFile", "File", "Upload", "extend", "WnfsAction", "UploadFileSchema", "db", "Database", "CreateFile"]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/helpers/upload.ts", "../../../src/helpers/common.ts", "../../../src/helpers/load.ts", "../../../src/helpers/wnfs-url.ts"],
4
- "sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport type { Blockstore } from 'interface-blockstore';\nimport { CID } from 'multiformats';\nimport * as Raw from 'multiformats/codecs/raw';\nimport { sha256 } from 'multiformats/hashes/sha2';\n\nimport type { Space } from '@dxos/client/echo';\nimport { Obj } from '@dxos/echo';\nimport { log } from '@dxos/log';\n\nimport { type WnfsCapabilities } from '#types';\n\nimport { Rng, filePath, store } from './common';\nimport { loadWnfs } from './load';\nimport { wnfsUrl } from './wnfs-url';\n\nexport const upload = async ({\n file,\n blockstore,\n instances,\n space,\n}: {\n file: File;\n blockstore: Blockstore;\n instances?: WnfsCapabilities.Instances;\n space: Space;\n}) => {\n const { directory, forest } = await loadWnfs({ blockstore, instances, space });\n const wnfsStore = store(blockstore);\n\n const bytes = new Uint8Array(await file.arrayBuffer());\n const hash = await sha256.digest(bytes);\n const cid = CID.create(1, Raw.code, hash);\n\n const path = filePath(cid.toString(), space);\n\n // Given the root directory of the private file system,\n // write the file contents to `path` in said directory.\n const result = await directory.write(path, true, bytes, new Date(), forest, wnfsStore, new Rng());\n\n // Given the new immutable instance of the root directory after writing to it,\n // **store** the changes in the \"dark forest\" and the associated (block) store.\n const [_, updatedForest] = await result.rootDir.store(result.forest, wnfsStore, new Rng());\n const cidBytes = await updatedForest.store(wnfsStore);\n\n // Update the forest pointer on the associated space.\n Obj.change(space.properties, (obj) => {\n obj.wnfs.privateForestCid = CID.decode(cidBytes).toString();\n });\n\n // Generate `wnfs://` URL & return the info.\n const info = {\n name: file.name,\n type: file.type,\n url: wnfsUrl(path),\n cid: cid.toString(),\n };\n\n log('upload', { file, info });\n return info;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { Blockstore } from 'interface-blockstore';\nimport { CID } from 'multiformats/cid';\nimport { sha256 } from 'multiformats/hashes/sha2';\nimport { type BlockStore as WnfsBlockStore } from 'wnfs';\n\nimport * as crypto from '@dxos/crypto';\nimport { type Space } from '@dxos/react-client/echo';\n\n//\n// PATH\n//\n\nexport const filePath = (fileName: string, space: Space) => {\n return ['spaces', space.id, 'files', fileName];\n};\n\n//\n// RNG\n//\n\nexport class Rng {\n randomBytes(count: number): Uint8Array {\n return new Uint8Array(crypto.randomBytes(count));\n }\n}\n\n//\n// STORE\n//\n\nexport const store = (blockstore: Blockstore): WnfsBlockStore => {\n const getBlock = async (cid: Uint8Array): Promise<Uint8Array | undefined> => {\n const decodedCid = CID.decode(cid);\n return await blockstore.get(decodedCid);\n };\n\n const hasBlock = async (cid: Uint8Array): Promise<boolean> => {\n const decodedCid = CID.decode(cid);\n return await blockstore.has(decodedCid);\n };\n\n const putBlockKeyed = async (cid: Uint8Array, bytes: Uint8Array): Promise<void> => {\n const decodedCid = CID.decode(cid);\n await blockstore.put(decodedCid, bytes);\n };\n\n // Don't hash blocks with the rs-wnfs default Blake 3, sha256 has better support.\n const putBlock = async (bytes: Uint8Array, codec: number): Promise<Uint8Array> => {\n const hash = await sha256.digest(bytes);\n const cid = CID.create(1, codec, hash);\n await blockstore.put(cid, bytes);\n return cid.bytes;\n };\n\n return { getBlock, hasBlock, putBlockKeyed, putBlock };\n};\n\nexport const storeName = () => 'dxos/wnfs';\n\n//\n// OTHER\n//\n\nexport const readFile = (file: File): Promise<Uint8Array> => {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = (event) => {\n const result = event.target?.result;\n if (result === null || result === undefined || typeof result === 'string') {\n reject(new Error('Expected an ArrayBuffer'));\n return;\n }\n resolve(new Uint8Array(result));\n };\n reader.onerror = (err) => {\n reject(err);\n };\n reader.readAsArrayBuffer(file);\n });\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { Blockstore } from 'interface-blockstore';\nimport { CID } from 'multiformats';\nimport * as Uint8Arrays from 'uint8arrays';\nimport { AccessKey, PrivateDirectory, PrivateForest, PrivateNode } from 'wnfs';\n\nimport { Obj } from '@dxos/echo';\nimport { type Space } from '@dxos/react-client/echo';\n\nimport { type WnfsCapabilities } from '#types';\n\nimport { Rng, store } from './common';\n\n//\n// LOAD\n//\n\nexport const loadWnfs = async ({\n space,\n blockstore,\n instances,\n}: {\n space: Space;\n blockstore: Blockstore;\n instances?: WnfsCapabilities.Instances;\n}) => {\n // TODO(wittjosiah): Remove.\n // Delete old properties if they exist.\n if (space.properties.wnfs_access_key !== undefined && space.properties.wnfs_private_forest_cid !== undefined) {\n Obj.change(space.properties, (obj) => {\n delete obj['wnfs_access_key'];\n delete obj['wnfs_private_forest_cid'];\n });\n }\n\n const cacheKey = space.properties.wnfs?.privateForestCid;\n if (instances?.[cacheKey]) {\n return instances[cacheKey];\n }\n\n const exists = !!space.properties.wnfs;\n const instance = exists ? await loadWnfsDir(blockstore, space) : await createWnfsDir(blockstore, space);\n if (instances) {\n instances[cacheKey] = instance;\n }\n\n return instance;\n};\n\n//\n// PRIVATE\n//\n\nconst createWnfsDir = async (blockstore: Blockstore, space: Space) => {\n const wnfsStore = store(blockstore);\n const rng = new Rng();\n const forest = new PrivateForest(rng);\n\n const dirResult = await PrivateDirectory.newAndStore(forest.emptyName(), new Date(), forest, wnfsStore, rng);\n const dir = dirResult.rootDir as PrivateDirectory;\n\n const [accessKeyRaw, newForest]: [AccessKey, PrivateForest] = await dir\n .asNode()\n .store(dirResult.forest as PrivateForest, wnfsStore, rng);\n\n const cidBytes = await newForest.store(wnfsStore);\n\n Obj.change(space.properties, (obj) => {\n obj.wnfs = {\n accessKey: Uint8Arrays.toString(accessKeyRaw.toBytes(), 'base64'),\n privateForestCid: CID.decode(cidBytes).toString(),\n };\n });\n\n return {\n directory: dir,\n forest: newForest,\n };\n};\n\nconst loadWnfsDir = async (blockstore: Blockstore, space: Space) => {\n const wnfsStore = store(blockstore);\n\n const accessKey = AccessKey.fromBytes(Uint8Arrays.fromString(space.properties.wnfs.accessKey, 'base64'));\n const forest: PrivateForest = await PrivateForest.load(\n CID.parse(space.properties.wnfs.privateForestCid).bytes,\n wnfsStore,\n );\n const node: PrivateNode = await PrivateNode.load(accessKey, forest, wnfsStore);\n\n return {\n directory: node.asDir(),\n forest,\n };\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { Blockstore } from 'interface-blockstore';\nimport { type PrivateDirectory, type PrivateForest } from 'wnfs';\n\nimport { store } from './common';\n\nexport const wnfsUrl = (filePath: string[]) => {\n return 'wnfs://' + filePath.map((f) => encodeURIComponent(f)).join('/');\n};\n\nexport const getPathFromUrl = (wnfsUrl: string) =>\n wnfsUrl\n .replace(/^wnfs:\\/\\//, '')\n .split('/')\n .map((p) => decodeURIComponent(p));\n\nexport const getBlobUrl = async ({\n wnfsUrl,\n blockstore,\n forest,\n directory,\n type,\n}: {\n wnfsUrl: string;\n blockstore: Blockstore;\n forest: PrivateForest;\n directory: PrivateDirectory;\n type?: string;\n}) => {\n const path = getPathFromUrl(wnfsUrl);\n const wnfsStore = store(blockstore);\n const { result } = await directory.read(path, true, forest, wnfsStore);\n const blob = new Blob([result], { type });\n return URL.createObjectURL(blob);\n};\n"],
5
- "mappings": ";AAKA,SAASA,OAAAA,YAAW;AACpB,YAAYC,SAAS;AACrB,SAASC,UAAAA,eAAc;AAGvB,SAASC,OAAAA,YAAW;AACpB,SAASC,WAAW;;;ACNpB,S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AAA;AAGA,QAAMgB,OAAO;IACXC,MAAMtC,KAAKsC;IACXC,MAAMvC,KAAKuC;IACXC,KAAKC,QAAQtB,IAAAA;IACbJ,KAAKA,IAAIM,SAAQ;EACnB;AAEAqB,MAAI,UAAU;IAAE1C;IAAMqC;EAAK,GAAA;;;;;;AAC3B,SAAOA;AACT;",
6
- "names": ["CID", "Raw", "sha256", "Obj", "log", "CID", "sha256", "crypto", "filePath", "fileName", "space", "id", "Rng", "randomBytes", "count", "Uint8Array", "store", "blockstore", "getBlock", "cid", "decodedCid", "CID", "decode", "get", "hasBlock", "has", "putBlockKeyed", "bytes", "put", "putBlock", "codec", "hash", "sha256", "digest", "create", "CID", "Uint8Arrays", "AccessKey", "PrivateDirectory", "PrivateForest", "PrivateNode", "Obj", "loadWnfs", "space", "blockstore", "instances", "properties", "wnfs_access_key", "undefined", "wnfs_private_forest_cid", "Obj", "change", "obj", "cacheKey", "wnfs", "privateForestCid", "exists", "instance", "loadWnfsDir", "createWnfsDir", "wnfsStore", "store", "rng", "Rng", "forest", "PrivateForest", "dirResult", "PrivateDirectory", "newAndStore", "emptyName", "Date", "dir", "rootDir", "accessKeyRaw", "newForest", "asNode", "cidBytes", "accessKey", "toString", "toBytes", "CID", "decode", "directory", "AccessKey", "fromBytes", "fromString", "load", "parse", "bytes", "node", "PrivateNode", "asDir", "wnfsUrl", "filePath", "map", "f", "encodeURIComponent", "join", "upload", "file", "blockstore", "instances", "space", "directory", "forest", "loadWnfs", "wnfsStore", "store", "bytes", "Uint8Array", "arrayBuffer", "hash", "sha256", "digest", "cid", "CID", "create", "code", "path", "filePath", "toString", "result", "write", "Date", "Rng", "_", "updatedForest", "rootDir", "cidBytes", "Obj", "change", "properties", "obj", "wnfs", "privateForestCid", "decode", "info", "name", "type", "url", "wnfsUrl", "log"]
7
- }
@@ -1,69 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
- // src/types/capabilities.ts
8
- import { Capability } from "@dxos/app-framework";
9
- import { meta } from "#meta";
10
- (function(WnfsCapabilities2) {
11
- WnfsCapabilities2.Blockstore = Capability.make(`${meta.id}.capability.blockstore`);
12
- WnfsCapabilities2.Instances = Capability.make(`${meta.id}.capability.instances`);
13
- })(WnfsCapabilities || (WnfsCapabilities = {}));
14
- var WnfsCapabilities;
15
-
16
- // src/types/File.ts
17
- var File_exports = {};
18
- __export(File_exports, {
19
- File: () => File2,
20
- make: () => make
21
- });
22
- import * as Schema from "effect/Schema";
23
- import { Annotation, Obj, Type } from "@dxos/echo";
24
- import { FormInputAnnotation } from "@dxos/echo/internal";
25
- var File2 = Schema.Struct({
26
- name: Schema.String.pipe(Schema.optional),
27
- type: Schema.String.pipe(FormInputAnnotation.set(false)),
28
- cid: Schema.String.pipe(FormInputAnnotation.set(false)),
29
- timestamp: Schema.String.pipe(FormInputAnnotation.set(false), Schema.optional)
30
- }).pipe(Type.object({
31
- typename: "org.dxos.type.file",
32
- version: "0.1.0"
33
- }), Annotation.IconAnnotation.set({
34
- icon: "ph--file--regular",
35
- hue: "teal"
36
- }));
37
- var make = (props) => Obj.make(File2, props);
38
-
39
- // src/types/types.ts
40
- import * as Schema2 from "effect/Schema";
41
- import { meta as meta2 } from "#meta";
42
- (function(WnfsAction2) {
43
- WnfsAction2.UploadAnnotationId = /* @__PURE__ */ Symbol.for(`${meta2.id}.annotation.upload`);
44
- WnfsAction2.UploadFileSchema = Schema2.Struct({
45
- file: Schema2.instanceOf(File).annotations({
46
- [WnfsAction2.UploadAnnotationId]: {
47
- // Accept file types.
48
- "image/*": [
49
- ".jpg",
50
- ".jpeg",
51
- ".png",
52
- ".gif"
53
- ],
54
- "application/pdf": [
55
- ".pdf"
56
- ]
57
- }
58
- })
59
- });
60
- })(WnfsAction || (WnfsAction = {}));
61
- var WnfsAction;
62
-
63
- export {
64
- __export,
65
- WnfsCapabilities,
66
- File_exports,
67
- WnfsAction
68
- };
69
- //# sourceMappingURL=chunk-VXUCZHVZ.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/types/capabilities.ts", "../../../src/types/File.ts", "../../../src/types/types.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { type Blockstore } from 'interface-blockstore';\nimport { type PrivateDirectory, type PrivateForest } from 'wnfs';\n\nimport { Capability } from '@dxos/app-framework';\nimport { type SpaceId } from '@dxos/keys';\n\nimport { meta } from '#meta';\n\nexport namespace WnfsCapabilities {\n export const Blockstore = Capability.make<Blockstore>(`${meta.id}.capability.blockstore`);\n\n export type Instances = Record<SpaceId, { directory: PrivateDirectory; forest: PrivateForest }>;\n export const Instances = Capability.make<Instances>(`${meta.id}.capability.instances`);\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Annotation, Obj, Type } from '@dxos/echo';\nimport { FormInputAnnotation } from '@dxos/echo/internal';\n\nexport const File = Schema.Struct({\n name: Schema.String.pipe(Schema.optional),\n type: Schema.String.pipe(FormInputAnnotation.set(false)),\n cid: Schema.String.pipe(FormInputAnnotation.set(false)),\n timestamp: Schema.String.pipe(FormInputAnnotation.set(false), Schema.optional),\n}).pipe(\n Type.object({\n typename: 'org.dxos.type.file',\n version: '0.1.0',\n }),\n Annotation.IconAnnotation.set({\n icon: 'ph--file--regular',\n hue: 'teal',\n }),\n);\n\nexport type File = Schema.Schema.Type<typeof File>;\n\nexport const make = (props: Obj.MakeProps<typeof File>) => Obj.make(File, props);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { meta } from '#meta';\n\nexport namespace WnfsAction {\n export const UploadAnnotationId = Symbol.for(`${meta.id}.annotation.upload`);\n\n export const UploadFileSchema = Schema.Struct({\n file: Schema.instanceOf(File).annotations({\n [UploadAnnotationId]: {\n // Accept file types.\n 'image/*': ['.jpg', '.jpeg', '.png', '.gif'],\n 'application/pdf': ['.pdf'],\n // TODO(wittjosiah): Add more file types.\n },\n }),\n });\n\n export type UploadFileForm = Schema.Schema.Type<typeof UploadFileSchema>;\n}\n"],
5
- "mappings": ";;;;;;;AAOA,SAASA,kBAAkB;AAG3B,SAASC,YAAY;UAEJC,mBAAAA;oBACFC,aAAaC,WAAWC,KAAiB,GAAGC,KAAKC,EAAE,wBAAwB;oBAG3EC,YAAYJ,WAAWC,KAAgB,GAAGC,KAAKC,EAAE,uBAAuB;AACvF,GALiBL,qBAAAA,mBAAAA,CAAAA,EAAAA;;;;ACZjB;;cAAAO;EAAA;;AAIA,YAAYC,YAAY;AAExB,SAASC,YAAYC,KAAKC,YAAY;AACtC,SAASC,2BAA2B;AAE7B,IAAMC,QAAcC,cAAO;EAChCC,MAAaC,cAAOC,KAAYC,eAAQ;EACxCC,MAAaH,cAAOC,KAAKG,oBAAoBC,IAAI,KAAA,CAAA;EACjDC,KAAYN,cAAOC,KAAKG,oBAAoBC,IAAI,KAAA,CAAA;EAChDE,WAAkBP,cAAOC,KAAKG,oBAAoBC,IAAI,KAAA,GAAeH,eAAQ;AAC/E,CAAA,EAAGD,KACDO,KAAKC,OAAO;EACVC,UAAU;EACVC,SAAS;AACX,CAAA,GACAC,WAAWC,eAAeR,IAAI;EAC5BS,MAAM;EACNC,KAAK;AACP,CAAA,CAAA;AAKK,IAAMC,OAAO,CAACC,UAAsCC,IAAIF,KAAKnB,OAAMoB,KAAAA;;;ACvB1E,YAAYE,aAAY;AAExB,SAASC,QAAAA,aAAY;UAEJC,aAAAA;cACFC,qBAAqBC,uBAAOC,IAAI,GAAGC,MAAKC,EAAE,oBAAoB;cAE9DC,mBAA0BC,eAAO;IAC5CC,MAAaC,mBAAWC,IAAAA,EAAMC,YAAY;MACxC,CAAAX,YAACC,kBAAAA,GAAqB;;QAEpB,WAAW;UAAC;UAAQ;UAAS;UAAQ;;QACrC,mBAAmB;UAAC;;MAEtB;IACF,CAAA;EACF,CAAA;AAGF,GAfiBD,eAAAA,aAAAA,CAAAA,EAAAA;;",
6
- "names": ["Capability", "meta", "WnfsCapabilities", "Blockstore", "Capability", "make", "meta", "id", "Instances", "File", "Schema", "Annotation", "Obj", "Type", "FormInputAnnotation", "File", "Struct", "name", "String", "pipe", "optional", "type", "FormInputAnnotation", "set", "cid", "timestamp", "Type", "object", "typename", "version", "Annotation", "IconAnnotation", "icon", "hue", "make", "props", "Obj", "Schema", "meta", "WnfsAction", "UploadAnnotationId", "Symbol", "for", "meta", "id", "UploadFileSchema", "Struct", "file", "instanceOf", "File", "annotations"]
7
- }
@@ -1,24 +0,0 @@
1
- import {
2
- Create
3
- } from "./chunk-BM3MEFES.mjs";
4
- import {
5
- File_exports
6
- } from "./chunk-VXUCZHVZ.mjs";
7
-
8
- // src/operations/create.ts
9
- import * as Effect from "effect/Effect";
10
- import { Operation } from "@dxos/operation";
11
- var handler = Create.pipe(Operation.withHandler(Effect.fnUntraced(function* ({ name, type, cid }) {
12
- return {
13
- object: File_exports.make({
14
- name,
15
- type,
16
- cid
17
- })
18
- };
19
- })));
20
- var create_default = handler;
21
- export {
22
- create_default as default
23
- };
24
- //# sourceMappingURL=create-NOHKWE67.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/create.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Operation } from '@dxos/operation';\n\nimport { WnfsFile } from '../types';\nimport { Create } from './definitions';\n\nconst handler: Operation.WithHandler<typeof Create> = Create.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ name, type, cid }) {\n return {\n object: WnfsFile.make({ name, type, cid }),\n };\n }),\n ),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,iBAAiB;AAK1B,IAAMC,UAAgDC,OAAOC,KAC3DC,UAAUC,YACDC,kBAAW,WAAW,EAAEC,MAAMC,MAAMC,IAAG,GAAE;AAC9C,SAAO;IACLC,QAAQC,aAASC,KAAK;MAAEL;MAAMC;MAAMC;IAAI,CAAA;EAC1C;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,iBAAeR;",
6
- "names": ["Effect", "Operation", "handler", "Create", "pipe", "Operation", "withHandler", "fnUntraced", "name", "type", "cid", "object", "WnfsFile", "make"]
7
- }
@@ -1,49 +0,0 @@
1
- import {
2
- upload
3
- } from "./chunk-N6Y4QPNF.mjs";
4
- import {
5
- CreateFile
6
- } from "./chunk-BM3MEFES.mjs";
7
- import {
8
- File_exports,
9
- WnfsCapabilities
10
- } from "./chunk-VXUCZHVZ.mjs";
11
-
12
- // src/operations/create-file.ts
13
- import * as Effect from "effect/Effect";
14
- import { Capability } from "@dxos/app-framework";
15
- import { invariant } from "@dxos/invariant";
16
- import { Operation } from "@dxos/operation";
17
- import { ClientCapabilities } from "@dxos/plugin-client/types";
18
- var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-wnfs/src/operations/create-file.ts";
19
- var handler = CreateFile.pipe(Operation.withHandler(Effect.fnUntraced(function* ({ file, db }) {
20
- const client = yield* Capability.get(ClientCapabilities.Client);
21
- const blockstore = yield* Capability.get(WnfsCapabilities.Blockstore);
22
- const space = client.spaces.get(db.spaceId);
23
- invariant(space, "Space not found", {
24
- F: __dxlog_file,
25
- L: 22,
26
- S: this,
27
- A: [
28
- "space",
29
- "'Space not found'"
30
- ]
31
- });
32
- const info = yield* Effect.promise(() => upload({
33
- file,
34
- blockstore,
35
- space
36
- }));
37
- return {
38
- object: File_exports.make({
39
- name: info.name,
40
- type: info.type,
41
- cid: info.cid
42
- })
43
- };
44
- })));
45
- var create_file_default = handler;
46
- export {
47
- create_file_default as default
48
- };
49
- //# sourceMappingURL=create-file-N7ADCFOF.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/operations/create-file.ts"],
4
- "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { invariant } from '@dxos/invariant';\nimport { Operation } from '@dxos/operation';\nimport { ClientCapabilities } from '@dxos/plugin-client/types';\n\nimport { upload } from '../helpers';\nimport { WnfsCapabilities, WnfsFile } from '../types';\nimport { CreateFile } from './definitions';\n\nconst handler: Operation.WithHandler<typeof CreateFile> = CreateFile.pipe(\n Operation.withHandler(\n Effect.fnUntraced(function* ({ file, db }) {\n const client = yield* Capability.get(ClientCapabilities.Client);\n const blockstore = yield* Capability.get(WnfsCapabilities.Blockstore);\n const space = client.spaces.get(db.spaceId);\n invariant(space, 'Space not found');\n const info = yield* Effect.promise(() => upload({ file, blockstore, space }));\n return {\n object: WnfsFile.make({ name: info.name, type: info.type, cid: info.cid }),\n };\n }),\n ),\n);\n\nexport default handler;\n"],
5
- "mappings": ";;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,iBAAiB;AAC1B,SAASC,iBAAiB;AAC1B,SAASC,0BAA0B;;AAMnC,IAAMC,UAAoDC,WAAWC,KACnEC,UAAUC,YACDC,kBAAW,WAAW,EAAEC,MAAMC,GAAE,GAAE;AACvC,QAAMC,SAAS,OAAOC,WAAWC,IAAIC,mBAAmBC,MAAM;AAC9D,QAAMC,aAAa,OAAOJ,WAAWC,IAAII,iBAAiBC,UAAU;AACpE,QAAMC,QAAQR,OAAOS,OAAOP,IAAIH,GAAGW,OAAO;AAC1CC,YAAUH,OAAO,mBAAA;;;;;;;;;AACjB,QAAMI,OAAO,OAAcC,eAAQ,MAAMC,OAAO;IAAEhB;IAAMO;IAAYG;EAAM,CAAA,CAAA;AAC1E,SAAO;IACLO,QAAQC,aAASC,KAAK;MAAEC,MAAMN,KAAKM;MAAMC,MAAMP,KAAKO;MAAMC,KAAKR,KAAKQ;IAAI,CAAA;EAC1E;AACF,CAAA,CAAA,CAAA;AAIJ,IAAA,sBAAe5B;",
6
- "names": ["Effect", "Capability", "invariant", "Operation", "ClientCapabilities", "handler", "CreateFile", "pipe", "Operation", "withHandler", "fnUntraced", "file", "db", "client", "Capability", "get", "ClientCapabilities", "Client", "blockstore", "WnfsCapabilities", "Blockstore", "space", "spaces", "spaceId", "invariant", "info", "promise", "upload", "object", "WnfsFile", "make", "name", "type", "cid"]
7
- }
@@ -1,117 +0,0 @@
1
- import {
2
- WnfsCapabilities
3
- } from "./chunk-VXUCZHVZ.mjs";
4
-
5
- // src/meta.ts
6
- import { trim } from "@dxos/util";
7
- var meta = {
8
- id: "org.dxos.plugin.wnfs",
9
- name: "WNFS",
10
- description: trim`
11
- Decentralized file storage using the Web Native File System protocol.
12
- Store and sync files with end-to-end encryption across devices without central servers.
13
- `,
14
- icon: "ph--file-cloud--regular",
15
- iconHue: "teal",
16
- source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-wnfs"
17
- };
18
-
19
- // src/WnfsPlugin.tsx
20
- import * as Effect from "effect/Effect";
21
- import * as Option from "effect/Option";
22
- import { Capability, Plugin } from "@dxos/app-framework";
23
- import { AppPlugin } from "@dxos/app-toolkit";
24
- import { Annotation } from "@dxos/echo";
25
- import { Operation } from "@dxos/operation";
26
- import { ClientEvents } from "@dxos/plugin-client/types";
27
- import { MarkdownEvents } from "@dxos/plugin-markdown";
28
- import { SpaceOperation } from "@dxos/plugin-space/operations";
29
- import { Blockstore, FileUploader, Markdown, OperationHandler, ReactSurface } from "#capabilities";
30
- import { meta as meta3 } from "#meta";
31
- import { WnfsOperation } from "#operations";
32
- import { WnfsAction, WnfsCapabilities as WnfsCapabilities2, WnfsFile as WnfsFile2 } from "#types";
33
-
34
- // src/translations.ts
35
- import { meta as meta2 } from "#meta";
36
- import { WnfsFile } from "#types";
37
- var translations = [
38
- {
39
- "en-US": {
40
- [WnfsFile.File.typename]: {
41
- "typename.label": "File",
42
- "typename.label_zero": "Files",
43
- "typename.label_one": "File",
44
- "typename.label_other": "Files",
45
- "object-name.placeholder": "New file",
46
- "add-object.label": "Add file",
47
- "rename-object.label": "Rename file",
48
- "delete-object.label": "Delete file",
49
- "object-deleted.label": "File deleted"
50
- },
51
- [meta2.id]: {
52
- "plugin.name": "Files",
53
- "file-input.placeholder": "Drop a file here, or click to select a file"
54
- }
55
- }
56
- }
57
- ];
58
-
59
- // src/WnfsPlugin.tsx
60
- var WnfsPlugin = Plugin.define(meta3).pipe(AppPlugin.addMetadataModule({
61
- metadata: {
62
- id: WnfsFile2.File.typename,
63
- metadata: {
64
- // TODO(wittjosiah): Would be nice if icon could change based on the type of the file.
65
- icon: Annotation.IconAnnotation.get(WnfsFile2.File).pipe(Option.getOrThrow).icon,
66
- iconHue: Annotation.IconAnnotation.get(WnfsFile2.File).pipe(Option.getOrThrow).hue ?? "white",
67
- inputSchema: WnfsAction.UploadFileSchema,
68
- createObject: (props, options) => Effect.gen(function* () {
69
- const { object } = yield* Operation.invoke(WnfsOperation.CreateFile, {
70
- ...props,
71
- db: options.db
72
- });
73
- return yield* Operation.invoke(SpaceOperation.AddObject, {
74
- object,
75
- target: options.target,
76
- hidden: true,
77
- targetNodeId: options.targetNodeId
78
- });
79
- })
80
- }
81
- }
82
- }), AppPlugin.addOperationHandlerModule({
83
- activate: OperationHandler
84
- }), AppPlugin.addSchemaModule({
85
- schema: [
86
- WnfsFile2.File
87
- ]
88
- }), AppPlugin.addSurfaceModule({
89
- activate: ReactSurface
90
- }), AppPlugin.addTranslationsModule({
91
- translations
92
- }), Plugin.addModule({
93
- id: "blockstore",
94
- activatesOn: ClientEvents.ClientReady,
95
- activate: Blockstore
96
- }), Plugin.addModule({
97
- id: "instances",
98
- activatesOn: ClientEvents.ClientReady,
99
- activate: () => Effect.sync(() => {
100
- const instances = {};
101
- return Capability.contributes(WnfsCapabilities2.Instances, instances);
102
- })
103
- }), Plugin.addModule({
104
- id: "file-uploader",
105
- activatesOn: ClientEvents.ClientReady,
106
- activate: FileUploader
107
- }), Plugin.addModule({
108
- id: "markdown",
109
- activatesOn: MarkdownEvents.SetupExtensions,
110
- activate: Markdown
111
- }), Plugin.make);
112
- export {
113
- WnfsCapabilities,
114
- WnfsPlugin,
115
- meta
116
- };
117
- //# sourceMappingURL=index.mjs.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/meta.ts", "../../../src/WnfsPlugin.tsx", "../../../src/translations.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.plugin.wnfs',\n name: 'WNFS',\n description: trim`\n Decentralized file storage using the Web Native File System protocol.\n Store and sync files with end-to-end encryption across devices without central servers.\n `,\n icon: 'ph--file-cloud--regular',\n iconHue: 'teal',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-wnfs',\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Option from 'effect/Option';\n\nimport { Capability, Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Annotation } from '@dxos/echo';\nimport { Operation } from '@dxos/operation';\nimport { ClientEvents } from '@dxos/plugin-client/types';\nimport { MarkdownEvents } from '@dxos/plugin-markdown';\nimport { SpaceOperation } from '@dxos/plugin-space/operations';\nimport { type CreateObject } from '@dxos/plugin-space/types';\n\nimport { Blockstore, FileUploader, Markdown, OperationHandler, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { WnfsOperation } from '#operations';\nimport { WnfsAction, WnfsCapabilities, WnfsFile } from '#types';\n\nimport { translations } from './translations';\n\nexport const WnfsPlugin = Plugin.define(meta).pipe(\n AppPlugin.addMetadataModule({\n metadata: {\n id: WnfsFile.File.typename,\n metadata: {\n // TODO(wittjosiah): Would be nice if icon could change based on the type of the file.\n icon: Annotation.IconAnnotation.get(WnfsFile.File).pipe(Option.getOrThrow).icon,\n iconHue: Annotation.IconAnnotation.get(WnfsFile.File).pipe(Option.getOrThrow).hue ?? 'white',\n inputSchema: WnfsAction.UploadFileSchema,\n createObject: ((props, options) =>\n Effect.gen(function* () {\n const { object } = yield* Operation.invoke(WnfsOperation.CreateFile, { ...props, db: options.db });\n return yield* Operation.invoke(SpaceOperation.AddObject, {\n object,\n target: options.target,\n hidden: true,\n targetNodeId: options.targetNodeId,\n });\n })) satisfies CreateObject,\n },\n },\n }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [WnfsFile.File] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'blockstore',\n activatesOn: ClientEvents.ClientReady,\n activate: Blockstore,\n }),\n Plugin.addModule({\n id: 'instances',\n activatesOn: ClientEvents.ClientReady,\n activate: () =>\n Effect.sync(() => {\n const instances: WnfsCapabilities.Instances = {};\n return Capability.contributes(WnfsCapabilities.Instances, instances);\n }),\n }),\n Plugin.addModule({\n id: 'file-uploader',\n activatesOn: ClientEvents.ClientReady,\n activate: FileUploader,\n }),\n Plugin.addModule({\n id: 'markdown',\n activatesOn: MarkdownEvents.SetupExtensions,\n activate: Markdown,\n }),\n Plugin.make,\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from '#meta';\nimport { WnfsFile } from '#types';\n\nexport const translations = [\n {\n 'en-US': {\n [WnfsFile.File.typename]: {\n 'typename.label': 'File',\n 'typename.label_zero': 'Files',\n 'typename.label_one': 'File',\n 'typename.label_other': 'Files',\n 'object-name.placeholder': 'New file',\n 'add-object.label': 'Add file',\n 'rename-object.label': 'Rename file',\n 'delete-object.label': 'Delete file',\n 'object-deleted.label': 'File deleted',\n },\n [meta.id]: {\n 'plugin.name': 'Files',\n 'file-input.placeholder': 'Drop a file here, or click to select a file',\n },\n },\n },\n] as const satisfies Resource[];\n"],
5
- "mappings": ";;;;;AAKA,SAASA,YAAY;AA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,IAAIP,QAAQO;QAAG,CAAA;AAChG,eAAO,OAAOJ,UAAUC,OAAOI,eAAeC,WAAW;UACvDP;UACAQ,QAAQV,QAAQU;UAChBC,QAAQ;UACRC,cAAcZ,QAAQY;QACxB,CAAA;MACF,CAAA;IACJ;EACF;AACF,CAAA,GACA/B,UAAUgC,0BAA0B;EAAEC,UAAUC;AAAiB,CAAA,GACjElC,UAAUmC,gBAAgB;EAAEC,QAAQ;IAAChC,UAASC;;AAAM,CAAA,GACpDL,UAAUqC,iBAAiB;EAAEJ,UAAUK;AAAa,CAAA,GACpDtC,UAAUuC,sBAAsB;EAAEC;AAAa,CAAA,GAC/C5C,OAAO6C,UAAU;EACftC,IAAI;EACJuC,aAAaC,aAAaC;EAC1BX,UAAUY;AACZ,CAAA,GACAjD,OAAO6C,UAAU;EACftC,IAAI;EACJuC,aAAaC,aAAaC;EAC1BX,UAAU,MACDa,YAAK,MAAA;AACV,UAAMC,YAAwC,CAAC;AAC/C,WAAOC,WAAWC,YAAYC,kBAAiBC,WAAWJ,SAAAA;EAC5D,CAAA;AACJ,CAAA,GACAnD,OAAO6C,UAAU;EACftC,IAAI;EACJuC,aAAaC,aAAaC;EAC1BX,UAAUmB;AACZ,CAAA,GACAxD,OAAO6C,UAAU;EACftC,IAAI;EACJuC,aAAaW,eAAeC;EAC5BrB,UAAUsB;AACZ,CAAA,GACA3D,OAAO4D,IAAI;",
6
- "names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "Effect", "Option", "Capability", "Plugin", "AppPlugin", "Annotation", "Operation", "ClientEvents", "MarkdownEvents", "SpaceOperation", "Blockstore", "FileUploader", "Markdown", "OperationHandler", "ReactSurface", "meta", "WnfsOperation", "WnfsAction", "WnfsCapabilities", "WnfsFile", "meta", "WnfsFile", "translations", "WnfsFile", "File", "typename", "meta", "id", "WnfsPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addMetadataModule", "metadata", "id", "WnfsFile", "File", "typename", "icon", "Annotation", "IconAnnotation", "get", "getOrThrow", "iconHue", "hue", "inputSchema", "WnfsAction", "UploadFileSchema", "createObject", "props", "options", "gen", "object", "Operation", "invoke", "WnfsOperation", "CreateFile", "db", "SpaceOperation", "AddObject", "target", "hidden", "targetNodeId", "addOperationHandlerModule", "activate", "OperationHandler", "addSchemaModule", "schema", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addModule", "activatesOn", "ClientEvents", "ClientReady", "Blockstore", "sync", "instances", "Capability", "contributes", "WnfsCapabilities", "Instances", "FileUploader", "MarkdownEvents", "SetupExtensions", "Markdown", "make"]
7
- }