@dxos/plugin-wnfs 0.8.4-main.c4373fc → 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.
Files changed (147) hide show
  1. package/dist/lib/browser/FileContainer-EILNV5LV.mjs +74 -0
  2. package/dist/lib/browser/FileContainer-EILNV5LV.mjs.map +7 -0
  3. package/dist/lib/browser/blockstore-Q66HQJ4Q.mjs +191 -0
  4. package/dist/lib/browser/blockstore-Q66HQJ4Q.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-BXGCJRL2.mjs +155 -0
  6. package/dist/lib/browser/chunk-BXGCJRL2.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-HXVPBJ3A.mjs +56 -0
  8. package/dist/lib/browser/chunk-HXVPBJ3A.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-D6VTEQIE.mjs → chunk-UC4HMNZZ.mjs} +23 -13
  10. package/dist/lib/browser/chunk-UC4HMNZZ.mjs.map +7 -0
  11. package/dist/lib/browser/file-uploader-QL4DTOMM.mjs +35 -0
  12. package/dist/lib/browser/file-uploader-QL4DTOMM.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +85 -84
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/{markdown-5XD3I2NQ.mjs → markdown-AYCVG6TJ.mjs} +33 -41
  16. package/dist/lib/browser/markdown-AYCVG6TJ.mjs.map +7 -0
  17. package/dist/lib/browser/meta.json +1 -1
  18. package/dist/lib/browser/operation-resolver-YYWUF6EY.mjs +99 -0
  19. package/dist/lib/browser/operation-resolver-YYWUF6EY.mjs.map +7 -0
  20. package/dist/lib/browser/react-surface-3LKVDPH7.mjs +60 -0
  21. package/dist/lib/browser/react-surface-3LKVDPH7.mjs.map +7 -0
  22. package/dist/lib/browser/types/index.mjs +9 -6
  23. package/dist/types/src/WnfsPlugin.d.ts +2 -1
  24. package/dist/types/src/WnfsPlugin.d.ts.map +1 -1
  25. package/dist/types/src/capabilities/blockstore/blockstore.d.ts +5 -0
  26. package/dist/types/src/capabilities/blockstore/blockstore.d.ts.map +1 -0
  27. package/dist/types/src/capabilities/blockstore/index.d.ts +3 -0
  28. package/dist/types/src/capabilities/blockstore/index.d.ts.map +1 -0
  29. package/dist/types/src/capabilities/file-uploader/file-uploader.d.ts +6 -0
  30. package/dist/types/src/capabilities/file-uploader/file-uploader.d.ts.map +1 -0
  31. package/dist/types/src/capabilities/file-uploader/index.d.ts +3 -0
  32. package/dist/types/src/capabilities/file-uploader/index.d.ts.map +1 -0
  33. package/dist/types/src/capabilities/index.d.ts +5 -6
  34. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  35. package/dist/types/src/capabilities/markdown/index.d.ts +3 -0
  36. package/dist/types/src/capabilities/markdown/index.d.ts.map +1 -0
  37. package/dist/types/src/capabilities/markdown/markdown.d.ts +5 -0
  38. package/dist/types/src/capabilities/markdown/markdown.d.ts.map +1 -0
  39. package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
  40. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
  41. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
  42. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
  43. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  44. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  45. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  46. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  47. package/dist/types/src/components/index.d.ts +1 -1
  48. package/dist/types/src/components/index.d.ts.map +1 -1
  49. package/dist/types/src/containers/FileContainer/FileContainer.d.ts +7 -0
  50. package/dist/types/src/containers/FileContainer/FileContainer.d.ts.map +1 -0
  51. package/dist/types/src/containers/FileContainer/index.d.ts +3 -0
  52. package/dist/types/src/containers/FileContainer/index.d.ts.map +1 -0
  53. package/dist/types/src/containers/index.d.ts +3 -0
  54. package/dist/types/src/containers/index.d.ts.map +1 -0
  55. package/dist/types/src/extensions/image.d.ts +1 -1
  56. package/dist/types/src/extensions/image.d.ts.map +1 -1
  57. package/dist/types/src/helpers/load.d.ts +1 -1
  58. package/dist/types/src/helpers/load.d.ts.map +1 -1
  59. package/dist/types/src/helpers/upload.d.ts +1 -1
  60. package/dist/types/src/helpers/upload.d.ts.map +1 -1
  61. package/dist/types/src/index.d.ts +1 -1
  62. package/dist/types/src/index.d.ts.map +1 -1
  63. package/dist/types/src/meta.d.ts +2 -2
  64. package/dist/types/src/meta.d.ts.map +1 -1
  65. package/dist/types/src/translations.d.ts +6 -3
  66. package/dist/types/src/translations.d.ts.map +1 -1
  67. package/dist/types/src/types/File.d.ts +16 -0
  68. package/dist/types/src/types/File.d.ts.map +1 -0
  69. package/dist/types/src/{capabilities → types}/capabilities.d.ts +3 -2
  70. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  71. package/dist/types/src/types/index.d.ts +2 -1
  72. package/dist/types/src/types/index.d.ts.map +1 -1
  73. package/dist/types/src/types/types.d.ts +107 -46
  74. package/dist/types/src/types/types.d.ts.map +1 -1
  75. package/dist/types/tsconfig.tsbuildinfo +1 -1
  76. package/package.json +43 -36
  77. package/src/WnfsPlugin.tsx +49 -68
  78. package/src/capabilities/blockstore/blockstore.ts +22 -0
  79. package/src/capabilities/blockstore/index.ts +7 -0
  80. package/src/capabilities/file-uploader/file-uploader.ts +34 -0
  81. package/src/capabilities/file-uploader/index.ts +7 -0
  82. package/src/capabilities/index.ts +5 -9
  83. package/src/capabilities/markdown/index.ts +7 -0
  84. package/src/capabilities/markdown/markdown.ts +33 -0
  85. package/src/capabilities/operation-resolver/index.ts +7 -0
  86. package/src/capabilities/operation-resolver/operation-resolver.ts +62 -0
  87. package/src/capabilities/react-surface/index.ts +7 -0
  88. package/src/capabilities/react-surface/react-surface.tsx +51 -0
  89. package/src/components/FileInput.tsx +3 -3
  90. package/src/components/FilePreview.tsx +1 -1
  91. package/src/components/index.ts +1 -4
  92. package/src/containers/FileContainer/FileContainer.tsx +58 -0
  93. package/src/containers/FileContainer/index.ts +7 -0
  94. package/src/containers/index.ts +7 -0
  95. package/src/extensions/image.stories.tsx +4 -4
  96. package/src/extensions/image.tsx +6 -6
  97. package/src/helpers/load.ts +12 -7
  98. package/src/helpers/upload.ts +5 -2
  99. package/src/index.ts +1 -1
  100. package/src/meta.ts +8 -3
  101. package/src/translations.ts +6 -3
  102. package/src/types/File.ts +24 -0
  103. package/src/{capabilities → types}/capabilities.ts +3 -3
  104. package/src/types/index.ts +2 -1
  105. package/src/types/types.ts +54 -14
  106. package/dist/lib/browser/FileContainer-A4OJVMVS.mjs +0 -103
  107. package/dist/lib/browser/FileContainer-A4OJVMVS.mjs.map +0 -7
  108. package/dist/lib/browser/blockstore-HK4IYHJJ.mjs +0 -273
  109. package/dist/lib/browser/blockstore-HK4IYHJJ.mjs.map +0 -7
  110. package/dist/lib/browser/chunk-D6VTEQIE.mjs.map +0 -7
  111. package/dist/lib/browser/chunk-FYRZOKHG.mjs +0 -13
  112. package/dist/lib/browser/chunk-FYRZOKHG.mjs.map +0 -7
  113. package/dist/lib/browser/chunk-PAIK4SJ3.mjs +0 -16
  114. package/dist/lib/browser/chunk-PAIK4SJ3.mjs.map +0 -7
  115. package/dist/lib/browser/chunk-QQB5IBX7.mjs +0 -64
  116. package/dist/lib/browser/chunk-QQB5IBX7.mjs.map +0 -7
  117. package/dist/lib/browser/chunk-Y5JMTQ74.mjs +0 -16
  118. package/dist/lib/browser/chunk-Y5JMTQ74.mjs.map +0 -7
  119. package/dist/lib/browser/file-uploader-5S37ZZCW.mjs +0 -30
  120. package/dist/lib/browser/file-uploader-5S37ZZCW.mjs.map +0 -7
  121. package/dist/lib/browser/intent-resolver-3KMIEDBO.mjs +0 -49
  122. package/dist/lib/browser/intent-resolver-3KMIEDBO.mjs.map +0 -7
  123. package/dist/lib/browser/markdown-5XD3I2NQ.mjs.map +0 -7
  124. package/dist/lib/browser/react-surface-5D7M3Y4W.mjs +0 -88
  125. package/dist/lib/browser/react-surface-5D7M3Y4W.mjs.map +0 -7
  126. package/dist/types/src/capabilities/blockstore.d.ts +0 -4
  127. package/dist/types/src/capabilities/blockstore.d.ts.map +0 -1
  128. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  129. package/dist/types/src/capabilities/file-uploader.d.ts +0 -4
  130. package/dist/types/src/capabilities/file-uploader.d.ts.map +0 -1
  131. package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
  132. package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
  133. package/dist/types/src/capabilities/markdown.d.ts +0 -4
  134. package/dist/types/src/capabilities/markdown.d.ts.map +0 -1
  135. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  136. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  137. package/dist/types/src/components/FileContainer.d.ts +0 -9
  138. package/dist/types/src/components/FileContainer.d.ts.map +0 -1
  139. package/dist/types/src/types/file.d.ts +0 -16
  140. package/dist/types/src/types/file.d.ts.map +0 -1
  141. package/src/capabilities/blockstore.ts +0 -19
  142. package/src/capabilities/file-uploader.ts +0 -27
  143. package/src/capabilities/intent-resolver.ts +0 -33
  144. package/src/capabilities/markdown.ts +0 -26
  145. package/src/capabilities/react-surface.tsx +0 -45
  146. package/src/components/FileContainer.tsx +0 -49
  147. package/src/types/file.ts +0 -17
@@ -1,7 +1,7 @@
1
1
  import { type Extension } from '@codemirror/state';
2
2
  import type { Blockstore } from 'interface-blockstore';
3
3
  import { type Space } from '@dxos/react-client/echo';
4
- import { type WnfsCapabilities } from '../capabilities';
4
+ import { type WnfsCapabilities } from '../types';
5
5
  export type ImageOptions = {
6
6
  blockstore: Blockstore;
7
7
  instances: WnfsCapabilities.Instances;
@@ -1 +1 @@
1
- {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../src/extensions/image.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAoB,KAAK,SAAS,EAA0B,MAAM,mBAAmB,CAAC;AAE7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIvD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAMrD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAKxD,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,gBAAgB,CAAC,SAAS,CAAC;IACtC,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,YAAY,KAAG,SAAS,EAgDtD,CAAC"}
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../../src/extensions/image.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAoB,KAAK,SAAS,EAA0B,MAAM,mBAAmB,CAAC;AAE7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAIvD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAOrD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjD,MAAM,MAAM,YAAY,GAAG;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,EAAE,gBAAgB,CAAC,SAAS,CAAC;IACtC,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,SAAS,YAAY,KAAG,SAAS,EAgDtD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { Blockstore } from 'interface-blockstore';
2
2
  import { PrivateDirectory, PrivateForest } from 'wnfs';
3
3
  import { type Space } from '@dxos/react-client/echo';
4
- import { type WnfsCapabilities } from '../capabilities';
4
+ import { type WnfsCapabilities } from '../types';
5
5
  export declare const loadWnfs: ({ space, blockstore, instances, }: {
6
6
  space: Space;
7
7
  blockstore: Blockstore;
@@ -1 +1 @@
1
- {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../../src/helpers/load.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAa,gBAAgB,EAAE,aAAa,EAAe,MAAM,MAAM,CAAC;AAE/E,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAQxD,eAAO,MAAM,QAAQ,GAAU,mCAI5B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC;CACxC;;;EAoBA,CAAC"}
1
+ {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../../src/helpers/load.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,OAAO,EAAa,gBAAgB,EAAE,aAAa,EAAe,MAAM,MAAM,CAAC;AAG/E,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAQjD,eAAO,MAAM,QAAQ,GAAU,mCAI5B;IACD,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC;CACxC;;;EAsBA,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { Blockstore } from 'interface-blockstore';
2
2
  import type { Space } from '@dxos/client/echo';
3
- import { type WnfsCapabilities } from '../capabilities';
3
+ import { type WnfsCapabilities } from '../types';
4
4
  export declare const upload: ({ file, blockstore, instances, space, }: {
5
5
  file: File;
6
6
  blockstore: Blockstore;
@@ -1 +1 @@
1
- {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/helpers/upload.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAMxD,eAAO,MAAM,MAAM,GAAU,yCAK1B;IACD,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC;IACvC,KAAK,EAAE,KAAK,CAAC;CACd;;;;;EAgCA,CAAC"}
1
+ {"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../../../src/helpers/upload.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAKvD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAMjD,eAAO,MAAM,MAAM,GAAU,yCAK1B;IACD,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,UAAU,CAAC;IACvB,SAAS,CAAC,EAAE,gBAAgB,CAAC,SAAS,CAAC;IACvC,KAAK,EAAE,KAAK,CAAC;CACd;;;;;EAkCA,CAAC"}
@@ -1,4 +1,4 @@
1
- export { WnfsCapabilities } from './capabilities';
1
+ export { WnfsCapabilities } from './types';
2
2
  export * from './meta';
3
3
  export * from './WnfsPlugin';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
@@ -1,3 +1,3 @@
1
- import { type PluginMeta } from '@dxos/app-framework';
2
- export declare const meta: PluginMeta;
1
+ import { type Plugin } from '@dxos/app-framework';
2
+ export declare const meta: Plugin.Meta;
3
3
  //# sourceMappingURL=meta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEtD,eAAO,MAAM,IAAI,EAAE,UAMlB,CAAC"}
1
+ {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../src/meta.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,IAUzB,CAAC"}
@@ -1,16 +1,19 @@
1
1
  import { meta } from './meta';
2
- import { FileType } from './types';
2
+ import { WnfsFile } from './types';
3
3
  export declare const translations: [{
4
4
  readonly 'en-US': {
5
- readonly [FileType.typename]: {
5
+ readonly [WnfsFile.File.typename]: {
6
6
  readonly 'typename label': "File";
7
+ readonly 'typename label_zero': "Files";
8
+ readonly 'typename label_one': "File";
9
+ readonly 'typename label_other': "Files";
7
10
  readonly 'object name placeholder': "New file";
8
11
  readonly 'rename object label': "Rename file";
9
12
  readonly 'delete object label': "Delete file";
13
+ readonly 'object deleted label': "File deleted";
10
14
  };
11
15
  readonly [meta.id]: {
12
16
  readonly 'plugin name': "Files";
13
- readonly 'delete object label': "Delete";
14
17
  readonly 'file input placeholder': "Drop a file here, or click to select a file";
15
18
  };
16
19
  };
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,QAAQ,CAAC,QAAQ,CAAC;;;;;UAKlB;QACD,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;;;UAIR;;EAGwB,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEnC,eAAO,MAAM,YAAY;;QAGnB,SAAA,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;;;;;;;;;UASvB;QACD,SAAA,CAAC,IAAI,CAAC,EAAE,CAAC;;;UAGR;;EAGwB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import * as Schema from 'effect/Schema';
2
+ import { Obj, Type } from '@dxos/echo';
3
+ export declare const File: Type.Obj<{
4
+ readonly name?: string | undefined;
5
+ readonly type: string;
6
+ readonly cid: string;
7
+ readonly timestamp?: string | undefined;
8
+ }, Schema.Struct.Fields>;
9
+ export type File = Schema.Schema.Type<typeof File>;
10
+ export declare const make: (props: Obj.MakeProps<typeof File>) => Obj.OfShape<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
11
+ readonly name?: string | undefined;
12
+ readonly type: string;
13
+ readonly cid: string;
14
+ readonly timestamp?: string | undefined;
15
+ }>;
16
+ //# sourceMappingURL=File.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"File.d.ts","sourceRoot":"","sources":["../../../../src/types/File.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGvC,eAAO,MAAM,IAAI;;;;;wBAUhB,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnD,eAAO,MAAM,IAAI,GAAI,OAAO,GAAG,CAAC,SAAS,CAAC,OAAO,IAAI,CAAC;;;;;EAA0B,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import { type Blockstore } from 'interface-blockstore';
2
2
  import { type PrivateDirectory, type PrivateForest } from 'wnfs';
3
+ import { Capability } from '@dxos/app-framework';
3
4
  import { type SpaceId } from '@dxos/keys';
4
5
  export declare namespace WnfsCapabilities {
5
- const Blockstore: import("@dxos/app-framework").InterfaceDef<Blockstore<{}, {}, {}, {}, {}, {}, {}, {}>>;
6
+ const Blockstore: Capability.InterfaceDef<Blockstore<{}, {}, {}, {}, {}, {}, {}, {}>>;
6
7
  type Instances = Record<SpaceId, {
7
8
  directory: PrivateDirectory;
8
9
  forest: PrivateForest;
9
10
  }>;
10
- const Instances: import("@dxos/app-framework").InterfaceDef<Instances>;
11
+ const Instances: Capability.InterfaceDef<Instances>;
11
12
  }
12
13
  //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,aAAa,EAAE,MAAM,MAAM,CAAC;AAEjE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,YAAY,CAAC;AAI1C,yBAAiB,gBAAgB,CAAC;IACzB,MAAM,UAAU,qEAAkE,CAAC;IAE1F,KAAY,SAAS,GAAG,MAAM,CAAC,OAAO,EAAE;QAAE,SAAS,EAAE,gBAAgB,CAAC;QAAC,MAAM,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC;IACzF,MAAM,SAAS,oCAAgE,CAAC;CACxF"}
@@ -1,3 +1,4 @@
1
- export * from './file';
1
+ export * from './capabilities';
2
+ export * as WnfsFile from './File';
2
3
  export * from './types';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,OAAO,KAAK,QAAQ,MAAM,QAAQ,CAAC;AACnC,cAAc,SAAS,CAAC"}
@@ -1,51 +1,112 @@
1
1
  import * as Schema from 'effect/Schema';
2
- import { FileType } from './file';
2
+ import { Capability } from '@dxos/app-framework';
3
+ import { Database } from '@dxos/echo';
3
4
  export declare namespace WnfsAction {
4
- const Create_base: Schema.TaggedClass<Create, `${string}/action/create`, {
5
- readonly _tag: Schema.tag<`${string}/action/create`>;
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
- export class Create extends Create_base {
21
- }
22
- export const UploadAnnotationId: unique symbol;
23
- export const UploadFileSchema: Schema.Struct<{
24
- file: Schema.instanceOf<File>;
25
- }>;
26
- export type UploadFileForm = Schema.Schema.Type<typeof UploadFileSchema>;
27
- const Upload_base: Schema.TaggedClass<Upload, `${string}/action/upload`, {
28
- readonly _tag: Schema.tag<`${string}/action/upload`>;
29
- } & {
30
- input: Schema.extend<Schema.Struct<{
31
- file: Schema.instanceOf<File>;
32
- }>, Schema.Struct<{
33
- space: Schema.Schema<import("@dxos/client-protocol").Space, import("@dxos/client-protocol").Space, never>;
34
- }>>;
35
- output: Schema.SchemaClass<{
36
- readonly name: string;
37
- readonly type: string;
38
- readonly cid: string;
39
- readonly url: string;
40
- }, {
41
- readonly name: string;
42
- readonly type: string;
43
- readonly cid: string;
44
- readonly url: string;
45
- }, never>;
46
- }>;
47
- export class Upload extends Upload_base {
48
- }
49
- export {};
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,KAAK,MAAM,MAAM,eAAe,CAAC;AAOxC,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAElC,yBAAiB,UAAU,CAAC;;;;;;;;;;;;;;;;;IAC1B,MAAM,OAAO,MAAO,SAAQ,WAK1B;KAAG;IAEL,MAAM,CAAC,MAAM,kBAAkB,eAA6C,CAAC;IAE7E,MAAM,CAAC,MAAM,gBAAgB;;MAS3B,CAAC;IAEH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;IAEzE,MAAM,OAAO,MAAO,SAAQ,WAG1B;KAAG;;CACN"}
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"}